Package com.logicaldoc.dropbox
Class Dropbox
java.lang.Object
com.logicaldoc.dropbox.Dropbox
Our Dropbox facade
- Since:
- 7.0
- Author:
- Marco Meschieri - LogicalDOC
-
Constructor Summary
Constructors -
Method Summary
Modifier 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) booleanstartAuthorization(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
public Dropbox()
-
-
Method Details
-
login
-
startAuthorization
Generates 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
-
finishAuthorization
Finishes 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
-
list
public List<com.dropbox.core.v2.files.Metadata> list(String path) throws com.dropbox.core.DbxException - Throws:
com.dropbox.core.DbxException
-
listFilesInTree
public List<com.dropbox.core.v2.files.FileMetadata> listFilesInTree(String basePath) throws com.dropbox.core.DbxException - Throws:
com.dropbox.core.DbxException
-
find
public 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
-