public class BoxConfig extends Object implements IBoxConfig
| Modifier | Constructor and Description |
|---|---|
protected |
BoxConfig()
Private constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendCustomQueryParameterToAllRequests(String key,
String value)
Add a custom query parameter that will be added to all Box API requests.
|
void |
clearCustomQueryParameters()
Clear out all custom query parameters that may have been set.
|
String |
getAcceptLanguage()
Get the Accept-Language HTTP header that we should set.
|
String |
getApiUrlAuthority()
Get the API URL Authority.
|
String |
getApiUrlPath()
Get the API URL path.
|
String |
getApiUrlScheme()
Get the API URL scheme.
|
int |
getConnectionTimeOut()
Get the amount of time in milliseconds that calls to the server should wait before timing out.
|
List<org.apache.http.message.BasicNameValuePair> |
getCustomQueryParameters()
Get a list of all custom query parameters that have been set.
|
String |
getDownloadUrlAuthority()
Get the Download URL Authority.
|
String |
getDownloadUrlPath()
Get the download url path
|
String |
getDownloadUrlScheme()
Get the Download URL scheme.
|
boolean |
getHttpLoggingEnabled()
Get the flag indicating whether Http Logging is enabled.
|
static BoxConfig |
getInstance()
Get a singleton instance.
|
String |
getOAuthApiUrlPath() |
String |
getOAuthUrlAuthority() |
String |
getOAuthUrlScheme() |
String |
getOAuthWebUrlPath() |
String |
getUploadUrlAuthority()
Get the Upload URL Authority.
|
String |
getUploadUrlPath()
Get the upload url path.
|
String |
getUploadUrlScheme()
Get the Upload URL scheme.
|
String |
getUserAgent()
Get the User-Agent String to apply to the HTTP(S) calls.
|
void |
setApiUrlAuthority(String authority)
Set a custom API URL Authority.
|
void |
setApiUrlPath(String path)
Set a custom API URL path.
|
void |
setApiUrlScheme(String scheme)
Set a custom API URL scheme.
|
void |
setAuthUrlScheme(String oAuthUrlScheme) |
void |
setConnectionTimeOut(int timeout)
Set the amount of time in milliseconds that calls to the server should wait before timing out.
|
void |
setDownloadUrlAuthority(String authority)
Set a custom Download URL Authority.
|
void |
setDownloadUrlPath(String downloadUrlPath) |
void |
setDownloadUrlScheme(String scheme)
Set a custom Download URL scheme.
|
void |
setEnableHttpLogging(boolean flag)
SHOULD NEVER BE ENABLED FOR PRODUCTION BUILDS
Set the flag to enable HTTP Logging.
|
void |
setOAuthApiUrlPath(String oAuthApiUrlPath) |
void |
setOAuthUrlAuthority(String oAuthUrlAuthority) |
void |
setOAuthUrlPath(String oAuthUrlPath) |
void |
setUploadUrlAuthority(String authority)
Set a custom Upload URL Authority.
|
void |
setUploadUrlPath(String uploadUrlPath) |
void |
setUploadUrlScheme(String scheme)
Set a custom Upload URL scheme.
|
void |
setUserAgent(String agent)
Set the String to use as the User-Agent HTTP header.
|
public static BoxConfig getInstance()
public void setApiUrlScheme(String scheme)
scheme - Custom schemepublic String getApiUrlScheme()
getApiUrlScheme in interface IBoxConfigpublic void setApiUrlAuthority(String authority)
authority - Custom Authoritypublic String getApiUrlAuthority()
getApiUrlAuthority in interface IBoxConfigpublic void setApiUrlPath(String path)
path - Custom pathpublic String getApiUrlPath()
getApiUrlPath in interface IBoxConfigpublic void setUploadUrlScheme(String scheme)
scheme - Custom schemepublic String getUploadUrlScheme()
getUploadUrlScheme in interface IBoxConfigpublic void setUploadUrlAuthority(String authority)
authority - Custom Authoritypublic String getUploadUrlAuthority()
getUploadUrlAuthority in interface IBoxConfigpublic void setDownloadUrlScheme(String scheme)
scheme - Custom schemepublic String getDownloadUrlScheme()
getDownloadUrlScheme in interface IBoxConfigpublic void setDownloadUrlAuthority(String authority)
authority - Custom Authoritypublic String getDownloadUrlAuthority()
getDownloadUrlAuthority in interface IBoxConfigpublic void setConnectionTimeOut(int timeout)
timeout - Desired connection timeout.public int getConnectionTimeOut()
getConnectionTimeOut in interface IBoxConfigpublic void setUserAgent(String agent)
agent - User-Agent Stringpublic String getUserAgent()
getUserAgent in interface IBoxConfigpublic String getOAuthUrlScheme()
getOAuthUrlScheme in interface IBoxConfigpublic void setAuthUrlScheme(String oAuthUrlScheme)
OAuthUrlScheme - the OAuthUrlScheme to setpublic String getOAuthUrlAuthority()
getOAuthUrlAuthority in interface IBoxConfigpublic void setOAuthUrlAuthority(String oAuthUrlAuthority)
OAuthUrlAuthority - the OAuthUrlAuthority to setpublic String getOAuthWebUrlPath()
getOAuthWebUrlPath in interface IBoxConfigpublic void setOAuthUrlPath(String oAuthUrlPath)
OAuthUrlPath - the OAuthUrlPath to setpublic void appendCustomQueryParameterToAllRequests(String key, String value)
key - Key.value - Value.public void clearCustomQueryParameters()
public List<org.apache.http.message.BasicNameValuePair> getCustomQueryParameters()
public void setEnableHttpLogging(boolean flag)
flag - boolean to Enable Http Logging
SHOULD NEVER BE ENABLED FOR PRODUCTION BUILDSpublic boolean getHttpLoggingEnabled()
public String getAcceptLanguage()
getAcceptLanguage in interface IBoxConfigpublic String getOAuthApiUrlPath()
getOAuthApiUrlPath in interface IBoxConfigpublic void setOAuthApiUrlPath(String oAuthApiUrlPath)
mOAuthApiUrlPath - the mOAuthApiUrlPath to setpublic String getUploadUrlPath()
IBoxConfiggetUploadUrlPath in interface IBoxConfigpublic void setUploadUrlPath(String uploadUrlPath)
mUploadUrlPath - the mUploadUrlPath to setpublic String getDownloadUrlPath()
IBoxConfiggetDownloadUrlPath in interface IBoxConfigpublic void setDownloadUrlPath(String downloadUrlPath)
downloadUrlPath - the downloadUrlPath to setCopyright © 2014. All Rights Reserved.