Search in sources :

Example 1 with DropboxMoveResult

use of org.apache.camel.component.dropbox.dto.DropboxMoveResult in project camel by apache.

the class DropboxMoveProducer method process.

@Override
public void process(Exchange exchange) throws Exception {
    DropboxMoveResult result = new DropboxAPIFacade(configuration.getClient(), exchange).move(configuration.getRemotePath(), configuration.getNewRemotePath());
    exchange.getIn().setHeader(DropboxResultHeader.MOVED_PATH.name(), result.getOldPath());
    exchange.getIn().setBody(result.getNewPath());
    log.debug("Moved from {} to {}", configuration.getRemotePath(), configuration.getNewRemotePath());
}
Also used : DropboxMoveResult(org.apache.camel.component.dropbox.dto.DropboxMoveResult) DropboxAPIFacade(org.apache.camel.component.dropbox.core.DropboxAPIFacade)

Aggregations

DropboxAPIFacade (org.apache.camel.component.dropbox.core.DropboxAPIFacade)1 DropboxMoveResult (org.apache.camel.component.dropbox.dto.DropboxMoveResult)1