public class BoxTransactionalAPIConnection extends BoxAPIConnection
This class handles everything for transactional API that isn't already handled by BoxAPIConnection.
DEFAULT_MAX_ATTEMPTS| Constructor and Description |
|---|
BoxTransactionalAPIConnection(String accessToken)
Constructs a new BoxTransactionalAPIConnection that authenticates with an access token.
|
| Modifier and Type | Method and Description |
|---|---|
void |
authenticate(String authCode)
Disabling the non-Box Developer Edition authenticate method.
|
boolean |
canRefresh()
BoxTransactionalAPIConnection can never refresh.
|
static BoxAPIConnection |
getTransactionConnection(String accessToken,
String scope)
Request a scoped transactional token.
|
static BoxAPIConnection |
getTransactionConnection(String accessToken,
String scope,
String resource)
Request a scoped transactional token for a particular resource.
|
void |
refresh()
Transactional auth does not support token refreshes.
|
void |
setAutoRefresh(boolean autoRefresh)
Auto refresh is not available for transactional auth.
|
addListener, getAccessToken, getAuthorizationURL, getAutoRefresh, getBaseUploadURL, getBaseURL, getClientID, getClientSecret, getExpires, getLastRefresh, getLowerScopedToken, getMaxRequestAttempts, getProxy, getProxyPassword, getProxyUsername, getRefreshLock, getRefreshToken, getRequestInterceptor, getRevokeURL, getTokenURL, getUserAgent, needsRefresh, notifyError, notifyRefresh, removeListener, restore, restore, revokeToken, save, setAccessToken, setBaseUploadURL, setBaseURL, setExpires, setLastRefresh, setMaxRequestAttempts, setProxy, setProxyPassword, setProxyUsername, setRefreshToken, setRequestInterceptor, setRevokeURL, setTokenURL, setUserAgentpublic BoxTransactionalAPIConnection(String accessToken)
accessToken - a transactional auth access token.public static BoxAPIConnection getTransactionConnection(String accessToken, String scope)
accessToken - application access token.scope - scope of transactional token.public static BoxAPIConnection getTransactionConnection(String accessToken, String scope, String resource)
accessToken - application access token.scope - scope of transactional token.resource - resource transactional token has access to.public void authenticate(String authCode)
authenticate in class BoxAPIConnectionauthCode - an auth code obtained from the first half of the OAuth process.UnsupportedOperationException - Box Transactional API does not support authentication with an auth codepublic boolean canRefresh()
canRefresh in class BoxAPIConnectionpublic void setAutoRefresh(boolean autoRefresh)
setAutoRefresh in class BoxAPIConnectionautoRefresh - true to enable auto token refresh; otherwise false.UnsupportedOperationException - Box Transactional API tokens can not be refreshedpublic void refresh()
refresh in class BoxAPIConnectionUnsupportedOperationException - Box Transactional API tokens can not be refreshed