public final class DropboxAPIFacade extends Object
Constructor and Description |
---|
DropboxAPIFacade(com.dropbox.core.v2.DbxClientV2 client,
org.apache.camel.Exchange exchange) |
Modifier and Type | Method and Description |
---|---|
DropboxDelResult |
del(String remotePath)
Delete every files and subdirectories inside the remote directory.
|
DropboxFileDownloadResult |
get(String remotePath)
Get the content of every file inside the remote path.
|
DropboxMoveResult |
move(String remotePath,
String newRemotePath)
Rename a remote path with the new path location.
|
DropboxFileUploadResult |
put(String localPath,
String remotePath,
DropboxUploadMode mode)
Put or upload a new file or an entire directory to dropbox
|
DropboxSearchResult |
search(String remotePath,
String query)
Search inside a remote path including its sub directories.
|
public DropboxAPIFacade(com.dropbox.core.v2.DbxClientV2 client, org.apache.camel.Exchange exchange)
client
- the DbxClient performing dropbox low level operationsexchange
- the current Exchangepublic DropboxFileUploadResult put(String localPath, String remotePath, DropboxUploadMode mode) throws DropboxException
localPath
- the file path or the dir path on the local filesystemremotePath
- the remote path destination on dropboxmode
- how a file should be saved on dropbox; in case of "add" the
new file will be renamed in case a file with the same name
already exists on dropbox. in case of "force" the file already
existing with the same name will be overridden.DropboxException
public DropboxSearchResult search(String remotePath, String query) throws DropboxException
remotePath
- the remote path where starting the search fromquery
- a space-separated list of substrings to search for. A file
matches only if it contains all the substringsDropboxException
public DropboxDelResult del(String remotePath) throws DropboxException
remotePath
- the remote location to deleteDropboxException
public DropboxMoveResult move(String remotePath, String newRemotePath) throws DropboxException
remotePath
- the existing remote path to be renamednewRemotePath
- the new remote path substituting the old oneDropboxException
public DropboxFileDownloadResult get(String remotePath) throws DropboxException
remotePath
- the remote path where to download fromDropboxException
Apache Camel