public class SharedLinkAPIConnection extends BoxAPIConnection
BoxAPIConnection.ResourceLinkType
DEFAULT_BASE_AUTHORIZATION_URL, DEFAULT_HOSTNAME_VERIFIER, DEFAULT_MAX_RETRIES, DEFAULT_TRUST_MANAGER
Constructor and Description |
---|
SharedLinkAPIConnection(BoxAPIConnection connection,
String sharedLink)
Deprecated.
|
SharedLinkAPIConnection(BoxAPIConnection connection,
String sharedLink,
String sharedLinkPassword)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canRefresh()
Deprecated.
Determines if this connection's access token can be refreshed.
|
String |
getAccessToken()
Deprecated.
Gets an access token that can be used to authenticate an API request.
|
boolean |
getAutoRefresh()
Deprecated.
Gets whether or not automatic refreshing of this connection's access token is enabled.
|
String |
getBaseUploadURL()
Deprecated.
Gets the base upload URL that's used when performing file uploads to Box.
|
String |
getBaseURL()
Deprecated.
Gets the base URL that's used when sending requests to the Box API.
|
long |
getExpires()
Deprecated.
Gets the amount of time for which this connection's access token is valid.
|
int |
getMaxRetryAttempts()
Deprecated.
Gets the maximum number of times an API request will be retried after an error response
is received.
|
String |
getRefreshToken()
Deprecated.
Gets a refresh token that can be used to refresh an access token.
|
RequestInterceptor |
getRequestInterceptor()
Deprecated.
Gets the RequestInterceptor associated with this API connection.
|
String |
getUserAgent()
Deprecated.
Gets the user agent that's used when sending requests to the Box API.
|
boolean |
needsRefresh()
Deprecated.
Determines if this connection's access token has expired and needs to be refreshed.
|
void |
refresh()
Deprecated.
Refresh's this connection's access token using its refresh token.
|
void |
setAccessToken(String accessToken)
Deprecated.
Sets the access token to use when authenticating API requests.
|
void |
setAutoRefresh(boolean autoRefresh)
Deprecated.
Enables or disables automatic refreshing of this connection's access token.
|
void |
setBaseUploadURL(String baseUploadURL)
Deprecated.
Sets the base upload URL to be used when performing file uploads to Box.
|
void |
setBaseURL(String baseURL)
Deprecated.
Sets the base URL to be used when sending requests to the Box API.
|
void |
setExpires(long milliseconds)
Deprecated.
Sets the amount of time for which this connection's access token is valid before it must be refreshed.
|
void |
setMaxRetryAttempts(int attempts)
Deprecated.
Sets the maximum number of times an API request will be retried after an error response
is received.
|
void |
setRefreshToken(String refreshToken)
Deprecated.
Sets the refresh token to use when refreshing an access token.
|
void |
setUserAgent(String userAgent)
Deprecated.
Sets the user agent to be used when sending requests to the Box API.
|
addListener, asSelf, asUser, authenticate, configureSslCertificatesValidation, createNewCall, createTokenRequest, determineResourceLinkType, enableNotifications, extractTokens, getAuthorizationURL, getAuthorizationURL, getBaseAppUrl, getClientID, getClientSecret, getConnectTimeout, getHostnameVerifier, getKeyValueOrDefault, getLastRefresh, getLowerScopedToken, getProxy, getProxyPassword, getProxyUsername, getReadTimeout, getRefreshLock, getRevokeURL, getTokenURL, getTrustManager, modifyHttpClientBuilder, notifyError, notifyRefresh, removeCustomHeader, removeListener, restore, restore, revokeToken, save, setBaseAppUrl, setBaseAuthorizationURL, setConnectTimeout, setCustomHeader, setLastRefresh, setProxy, setProxyAuthenticator, setProxyBasicAuthentication, setProxyPassword, setProxyUsername, setReadTimeout, setRequestInterceptor, suppressNotifications
public SharedLinkAPIConnection(BoxAPIConnection connection, String sharedLink)
public SharedLinkAPIConnection(BoxAPIConnection connection, String sharedLink, String sharedLinkPassword)
public long getExpires()
BoxAPIConnection
getExpires
in class BoxAPIConnection
public void setExpires(long milliseconds)
BoxAPIConnection
setExpires
in class BoxAPIConnection
milliseconds
- the number of milliseconds for which the access token is valid.public String getBaseURL()
BoxAPIConnection
BoxAPIConnection.baseURL
and BoxAPIConnection.API_VERSION
.
The default value is "https://api.box.com/2.0/".getBaseURL
in class BoxAPIConnection
public void setBaseURL(String baseURL)
BoxAPIConnection
BoxAPIConnection.getRevokeURL()
and BoxAPIConnection.getTokenURL()
are constructed.setBaseURL
in class BoxAPIConnection
baseURL
- a base URLpublic String getBaseUploadURL()
BoxAPIConnection
BoxAPIConnection.baseUploadURL
and BoxAPIConnection.API_VERSION
.getBaseUploadURL
in class BoxAPIConnection
public void setBaseUploadURL(String baseUploadURL)
BoxAPIConnection
setBaseUploadURL
in class BoxAPIConnection
baseUploadURL
- a base upload URL.public String getUserAgent()
BoxAPIConnection
getUserAgent
in class BoxAPIConnection
public void setUserAgent(String userAgent)
BoxAPIConnection
setUserAgent
in class BoxAPIConnection
userAgent
- the user agent.public String getAccessToken()
BoxAPIConnection
getAccessToken()
.getAccessToken
in class BoxAPIConnection
public void setAccessToken(String accessToken)
BoxAPIConnection
setAccessToken
in class BoxAPIConnection
accessToken
- a valid access token to use when authenticating API requests.public String getRefreshToken()
BoxAPIConnection
getRefreshToken
in class BoxAPIConnection
public void setRefreshToken(String refreshToken)
BoxAPIConnection
setRefreshToken
in class BoxAPIConnection
refreshToken
- a valid refresh token.public boolean getAutoRefresh()
BoxAPIConnection
getAutoRefresh
in class BoxAPIConnection
public void setAutoRefresh(boolean autoRefresh)
BoxAPIConnection
setAutoRefresh
in class BoxAPIConnection
autoRefresh
- true to enable auto token refresh; otherwise false.public int getMaxRetryAttempts()
getMaxRetryAttempts
in class BoxAPIConnection
public void setMaxRetryAttempts(int attempts)
setMaxRetryAttempts
in class BoxAPIConnection
attempts
- the maximum number of request attempts.public boolean canRefresh()
BoxAPIConnection
canRefresh
in class BoxAPIConnection
public boolean needsRefresh()
BoxAPIConnection
needsRefresh
in class BoxAPIConnection
public void refresh()
BoxAPIConnection
refresh
in class BoxAPIConnection
public RequestInterceptor getRequestInterceptor()
BoxAPIConnection
getRequestInterceptor
in class BoxAPIConnection