Package org.apache.camel.component.dropbox.dto

Examples of org.apache.camel.component.dropbox.dto.DropboxResult


     * @param newRemotePath the new remote path substituting the old one
     * @return a DropboxResult object with the result of the move operation.
     * @throws DropboxException
     */
    public DropboxResult move(String remotePath, String newRemotePath) throws DropboxException {
        DropboxResult result = null;
        try {
            DropboxAPIFacade.client.move(remotePath, newRemotePath);
        } catch (DbxException e) {
            throw new DropboxException(remotePath + " does not exist or can't obtain metadata");
        }
        result = new DropboxMoveResult();
        result.setResultEntries(remotePath + "-" + newRemotePath);
        return result;
    }
View Full Code Here


     * @param remotePath the remote path where to download from
     * @return a DropboxResult object with the content (ByteArrayOutputStream) of every files inside the remote path.
     * @throws DropboxException
     */
    public DropboxResult get(String remotePath) throws DropboxException {
        DropboxResult result = new DropboxFileDownloadResult();
        //a map representing for each path the result of the baos
        Map<String, ByteArrayOutputStream> resultEntries = new HashMap<String, ByteArrayOutputStream>();
        //iterate from the remotePath
        downloadFilesInFolder(remotePath, resultEntries);
        //put the map of baos as result
        result.setResultEntries(resultEntries);
        return result;
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.component.dropbox.dto.DropboxResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.