use of org.apache.camel.component.dropbox.integration.producer.DropboxSearchProducer in project camel by apache.
the class DropboxEndpoint method createProducer.
/**
* Create one of the camel producer available based on the configuration
* @return the camel producer
* @throws Exception
*/
public Producer createProducer() throws Exception {
LOG.trace("Resolve producer dropbox endpoint {" + configuration.getOperation().toString() + "}");
LOG.trace("Resolve producer dropbox attached client: " + configuration.getClient());
if (configuration.getOperation() == DropboxOperation.put) {
return new DropboxPutProducer(this, configuration);
} else if (this.configuration.getOperation() == DropboxOperation.search) {
return new DropboxSearchProducer(this, configuration);
} else if (this.configuration.getOperation() == DropboxOperation.del) {
return new DropboxDelProducer(this, configuration);
} else if (this.configuration.getOperation() == DropboxOperation.get) {
return new DropboxGetProducer(this, configuration);
} else if (this.configuration.getOperation() == DropboxOperation.move) {
return new DropboxMoveProducer(this, configuration);
} else {
throw new DropboxException("Operation specified is not valid for producer!");
}
}
Aggregations