Search in sources :

Example 1 with DropboxDelProducer

use of org.apache.camel.component.dropbox.integration.producer.DropboxDelProducer 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!");
    }
}
Also used : DropboxGetProducer(org.apache.camel.component.dropbox.integration.producer.DropboxGetProducer) DropboxMoveProducer(org.apache.camel.component.dropbox.integration.producer.DropboxMoveProducer) DropboxPutProducer(org.apache.camel.component.dropbox.integration.producer.DropboxPutProducer) DropboxSearchProducer(org.apache.camel.component.dropbox.integration.producer.DropboxSearchProducer) DropboxException(org.apache.camel.component.dropbox.util.DropboxException) DropboxDelProducer(org.apache.camel.component.dropbox.integration.producer.DropboxDelProducer)

Aggregations

DropboxDelProducer (org.apache.camel.component.dropbox.integration.producer.DropboxDelProducer)1 DropboxGetProducer (org.apache.camel.component.dropbox.integration.producer.DropboxGetProducer)1 DropboxMoveProducer (org.apache.camel.component.dropbox.integration.producer.DropboxMoveProducer)1 DropboxPutProducer (org.apache.camel.component.dropbox.integration.producer.DropboxPutProducer)1 DropboxSearchProducer (org.apache.camel.component.dropbox.integration.producer.DropboxSearchProducer)1 DropboxException (org.apache.camel.component.dropbox.util.DropboxException)1