Package com.amilesend.onedrive
Class OneDriveFactoryStateManager.Builder
java.lang.Object
com.amilesend.onedrive.OneDriveFactoryStateManager.Builder
- Enclosing class:
OneDriveFactoryStateManager<T extends OneDrive>
The builder for creating a new
OneDriveFactoryStateManager
.-
Method Summary
Modifier and TypeMethodDescriptionauthInfoStore
(AuthInfoStore authInfoStore) Sets the store used to persist and retrieve the auth state.build()
Builds a newOneDriveFactoryStateManager
.callbackPath
(String callbackPath) Sets he callback path for the OAUTH redirect receiver.credentialConfig
(OneDriveFactoryStateManager.CredentialConfig credentialConfig) Sets the application client credential configuration.httpClient
(okhttp3.OkHttpClient httpClient) Sets the http client.receiverPort
(Integer receiverPort) Sets the port for the OAUTH redirect receiver to listen on.redirectUrl
(String redirectUrl) Sets the redirect URL for the OAUTH redirect receiver.Sets the list of scopes (permissions) for accessing the Graph API.Sets the optional persisted auth state.stateGson
(com.google.gson.Gson stateGson) Sets the JSON serializer configured for persisting auth state.Sets the user agent used for requests to the service.
-
Method Details
-
httpClient
Sets the http client.- Parameters:
httpClient
- the http client- Returns:
- this builder
-
receiverPort
Sets the port for the OAUTH redirect receiver to listen on.- Parameters:
receiverPort
- the port number- Returns:
- this builder
-
redirectUrl
Sets the redirect URL for the OAUTH redirect receiver.- Parameters:
redirectUrl
- the redirect URL- Returns:
- this builder
-
callbackPath
Sets he callback path for the OAUTH redirect receiver.- Parameters:
callbackPath
- the callback path- Returns:
- this builder
-
scopes
Sets the list of scopes (permissions) for accessing the Graph API.- Parameters:
scopes
- the list of scopes- Returns:
- this builder
-
stateGson
Sets the JSON serializer configured for persisting auth state.- Parameters:
stateGson
- the Gson instance- Returns:
- this builder
-
credentialConfig
public OneDriveFactoryStateManager.Builder credentialConfig(OneDriveFactoryStateManager.CredentialConfig credentialConfig) Sets the application client credential configuration.- Parameters:
credentialConfig
- the credential configuration- Returns:
- this builder
-
stateFile
Sets the optional persisted auth state.- Parameters:
stateFile
- the persisted auth tokens, or state file- Returns:
- this builder
-
authInfoStore
Sets the store used to persist and retrieve the auth state.- Parameters:
authInfoStore
- the auth info store implementation- Returns:
- this builder
-
userAgent
Sets the user agent used for requests to the service.- Parameters:
userAgent
- the user agent- Returns:
- this builder
-
build
Builds a newOneDriveFactoryStateManager
.- Returns:
- a new
OneDriveFactoryStateManager
-