Package com.logicaldoc.dropbox
Class Dropbox
java.lang.Object
com.logicaldoc.dropbox.Dropbox
Our Dropbox facade
- Since:
- 7.0
- Author:
- Marco Meschieri - LogicalDOC
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleandownloadFile(String path, File out) List<com.dropbox.core.v2.files.FileMetadata> finishAuthorization(String authorizationCode) Finishes the authorization process.com.dropbox.core.v2.files.MetadataList<com.dropbox.core.v2.files.Metadata> List<com.dropbox.core.v2.files.FileMetadata> listFilesInTree(String basePath) booleanlogin()voidsetAccessToken(String accessToken) voidvoidsetApiSecret(String apiSecret) startAuthorization(Locale locale) Generates the authorization URL where the user has to allow LogicalDOC and gets an authorization code to be used then with finishAuthorization.booleanuploadFile(File inputFile, String path) 
- 
Constructor Details- 
Dropbox
 
- 
- 
Method Details- 
loginpublic boolean login()
- 
startAuthorizationGenerates the authorization URL where the user has to allow LogicalDOC and gets an authorization code to be used then with finishAuthorization.- Parameters:
- locale- the user's locale
- Returns:
- The page to be shown to the user to allow the app to access
 
- 
finishAuthorizationFinishes the authorization process. The returned access token can be saved for future use.- Parameters:
- authorizationCode- The authorization code that the user see in the authorization page
- Returns:
- The access token
 
- 
listpublic List<com.dropbox.core.v2.files.Metadata> list(String path) throws com.dropbox.core.DbxException - Throws:
- com.dropbox.core.DbxException
 
- 
listFilesInTreepublic List<com.dropbox.core.v2.files.FileMetadata> listFilesInTree(String basePath) throws com.dropbox.core.DbxException - Throws:
- com.dropbox.core.DbxException
 
- 
findpublic List<com.dropbox.core.v2.files.FileMetadata> find(String basePath, String query) throws com.dropbox.core.DbxException - Throws:
- com.dropbox.core.DbxException
 
- 
get- Throws:
- com.dropbox.core.DbxException
 
- 
downloadFile- Throws:
- IOException
 
- 
uploadFile- Throws:
- IOException
 
- 
getAccountName
- 
getAccessToken
- 
setAccessToken
- 
getApiKey
- 
getApiSecret
- 
setApiKey
- 
setApiSecret
 
-