public interface IGoogleSessionService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MESSAGE
Message of the dialog displayed to notify user that connection is required.
|
static java.lang.String |
TITLE
Title of the dialog displayed to notify user that connection is required.
|
Modifier and Type | Method and Description |
---|---|
java.util.Optional<com.google.api.client.http.HttpRequestFactory> |
createRequestFactory()
Creates and returns a
HttpRequestFactory using internal session. |
static IGoogleSessionService |
get()
Static method that allows service instance quick access
without dealing with the eclipse service APÏ.
|
void |
login()
Uses OAuth mechanism to create a persistent Google account
session that will be used for interacting with google services.
|
void |
logout()
Destroy the current logged OAuth session.
|
static boolean |
requireLogin()
TODO : Optimizes method design.
|
static final java.lang.String TITLE
static final java.lang.String MESSAGE
void login() throws java.io.IOException, java.security.GeneralSecurityException
java.io.IOException
- If any error occurs while creating session.java.security.GeneralSecurityException
- If any error occurs during the OAuth phase.void logout()
java.util.Optional<com.google.api.client.http.HttpRequestFactory> createRequestFactory()
HttpRequestFactory
using internal session.java.lang.IllegalStateException
- If login step hasn't be performed before.static IGoogleSessionService get()
static boolean requireLogin()