| /* |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You under the Apache License, Version 2.0 |
| * (the "License"); you may not use this file except in compliance with |
| * the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| package org.apache.camel.builder.endpoint.dsl; |
| |
| import javax.annotation.Generated; |
| import org.apache.camel.ExchangePattern; |
| import org.apache.camel.builder.EndpointConsumerBuilder; |
| import org.apache.camel.builder.EndpointProducerBuilder; |
| import org.apache.camel.builder.endpoint.AbstractEndpointBuilder; |
| import org.apache.camel.spi.ExceptionHandler; |
| |
| /** |
| * The couchdb component is used for integrate with CouchDB databases. |
| * |
| * Generated by camel-package-maven-plugin - do not edit this file! |
| */ |
| @Generated("org.apache.camel.maven.packaging.EndpointDslMojo") |
| public interface CouchDbEndpointBuilderFactory { |
| |
| |
| /** |
| * Builder for endpoint consumers for the CouchDB component. |
| */ |
| public interface CouchDbEndpointConsumerBuilder |
| extends |
| EndpointConsumerBuilder { |
| default AdvancedCouchDbEndpointConsumerBuilder advanced() { |
| return (AdvancedCouchDbEndpointConsumerBuilder) this; |
| } |
| /** |
| * Creates the database if it does not already exist. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default CouchDbEndpointConsumerBuilder createDatabase( |
| boolean createDatabase) { |
| setProperty("createDatabase", createDatabase); |
| return this; |
| } |
| /** |
| * Creates the database if it does not already exist. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default CouchDbEndpointConsumerBuilder createDatabase( |
| String createDatabase) { |
| setProperty("createDatabase", createDatabase); |
| return this; |
| } |
| /** |
| * Allows for bridging the consumer to the Camel routing Error Handler, |
| * which mean any exceptions occurred while the consumer is trying to |
| * pickup incoming messages, or the likes, will now be processed as a |
| * message and handled by the routing Error Handler. By default the |
| * consumer will use the org.apache.camel.spi.ExceptionHandler to deal |
| * with exceptions, that will be logged at WARN or ERROR level and |
| * ignored. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: consumer |
| */ |
| default CouchDbEndpointConsumerBuilder bridgeErrorHandler( |
| boolean bridgeErrorHandler) { |
| setProperty("bridgeErrorHandler", bridgeErrorHandler); |
| return this; |
| } |
| /** |
| * Allows for bridging the consumer to the Camel routing Error Handler, |
| * which mean any exceptions occurred while the consumer is trying to |
| * pickup incoming messages, or the likes, will now be processed as a |
| * message and handled by the routing Error Handler. By default the |
| * consumer will use the org.apache.camel.spi.ExceptionHandler to deal |
| * with exceptions, that will be logged at WARN or ERROR level and |
| * ignored. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: consumer |
| */ |
| default CouchDbEndpointConsumerBuilder bridgeErrorHandler( |
| String bridgeErrorHandler) { |
| setProperty("bridgeErrorHandler", bridgeErrorHandler); |
| return this; |
| } |
| /** |
| * Document deletes are published as events. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: consumer |
| */ |
| default CouchDbEndpointConsumerBuilder deletes(boolean deletes) { |
| setProperty("deletes", deletes); |
| return this; |
| } |
| /** |
| * Document deletes are published as events. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: consumer |
| */ |
| default CouchDbEndpointConsumerBuilder deletes(String deletes) { |
| setProperty("deletes", deletes); |
| return this; |
| } |
| /** |
| * How often to send an empty message to keep socket alive in millis. |
| * |
| * The option is a: <code>long</code> type. |
| * |
| * Group: consumer |
| */ |
| default CouchDbEndpointConsumerBuilder heartbeat(long heartbeat) { |
| setProperty("heartbeat", heartbeat); |
| return this; |
| } |
| /** |
| * How often to send an empty message to keep socket alive in millis. |
| * |
| * The option will be converted to a <code>long</code> type. |
| * |
| * Group: consumer |
| */ |
| default CouchDbEndpointConsumerBuilder heartbeat(String heartbeat) { |
| setProperty("heartbeat", heartbeat); |
| return this; |
| } |
| /** |
| * Start tracking changes immediately after the given update sequence. |
| * The default, null, will start monitoring from the latest sequence. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: consumer |
| */ |
| default CouchDbEndpointConsumerBuilder since(String since) { |
| setProperty("since", since); |
| return this; |
| } |
| /** |
| * Specifies how many revisions are returned in the changes array. The |
| * default, main_only, will only return the current winning revision; |
| * all_docs will return all leaf revisions (including conflicts and |
| * deleted former conflicts.). |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: consumer |
| */ |
| default CouchDbEndpointConsumerBuilder style(String style) { |
| setProperty("style", style); |
| return this; |
| } |
| /** |
| * Document inserts/updates are published as events. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: consumer |
| */ |
| default CouchDbEndpointConsumerBuilder updates(boolean updates) { |
| setProperty("updates", updates); |
| return this; |
| } |
| /** |
| * Document inserts/updates are published as events. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: consumer |
| */ |
| default CouchDbEndpointConsumerBuilder updates(String updates) { |
| setProperty("updates", updates); |
| return this; |
| } |
| /** |
| * Password for authenticated databases. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default CouchDbEndpointConsumerBuilder password(String password) { |
| setProperty("password", password); |
| return this; |
| } |
| /** |
| * Username in case of authenticated databases. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default CouchDbEndpointConsumerBuilder username(String username) { |
| setProperty("username", username); |
| return this; |
| } |
| } |
| |
| /** |
| * Advanced builder for endpoint consumers for the CouchDB component. |
| */ |
| public interface AdvancedCouchDbEndpointConsumerBuilder |
| extends |
| EndpointConsumerBuilder { |
| default CouchDbEndpointConsumerBuilder basic() { |
| return (CouchDbEndpointConsumerBuilder) this; |
| } |
| /** |
| * To let the consumer use a custom ExceptionHandler. Notice if the |
| * option bridgeErrorHandler is enabled then this option is not in use. |
| * By default the consumer will deal with exceptions, that will be |
| * logged at WARN or ERROR level and ignored. |
| * |
| * The option is a: <code>org.apache.camel.spi.ExceptionHandler</code> |
| * type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedCouchDbEndpointConsumerBuilder exceptionHandler( |
| ExceptionHandler exceptionHandler) { |
| setProperty("exceptionHandler", exceptionHandler); |
| return this; |
| } |
| /** |
| * To let the consumer use a custom ExceptionHandler. Notice if the |
| * option bridgeErrorHandler is enabled then this option is not in use. |
| * By default the consumer will deal with exceptions, that will be |
| * logged at WARN or ERROR level and ignored. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.spi.ExceptionHandler</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedCouchDbEndpointConsumerBuilder exceptionHandler( |
| String exceptionHandler) { |
| setProperty("exceptionHandler", exceptionHandler); |
| return this; |
| } |
| /** |
| * Sets the exchange pattern when the consumer creates an exchange. |
| * |
| * The option is a: <code>org.apache.camel.ExchangePattern</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedCouchDbEndpointConsumerBuilder exchangePattern( |
| ExchangePattern exchangePattern) { |
| setProperty("exchangePattern", exchangePattern); |
| return this; |
| } |
| /** |
| * Sets the exchange pattern when the consumer creates an exchange. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.ExchangePattern</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedCouchDbEndpointConsumerBuilder exchangePattern( |
| String exchangePattern) { |
| setProperty("exchangePattern", exchangePattern); |
| return this; |
| } |
| /** |
| * Whether the endpoint should use basic property binding (Camel 2.x) or |
| * the newer property binding with additional capabilities. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedCouchDbEndpointConsumerBuilder basicPropertyBinding( |
| boolean basicPropertyBinding) { |
| setProperty("basicPropertyBinding", basicPropertyBinding); |
| return this; |
| } |
| /** |
| * Whether the endpoint should use basic property binding (Camel 2.x) or |
| * the newer property binding with additional capabilities. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedCouchDbEndpointConsumerBuilder basicPropertyBinding( |
| String basicPropertyBinding) { |
| setProperty("basicPropertyBinding", basicPropertyBinding); |
| return this; |
| } |
| /** |
| * Sets whether synchronous processing should be strictly used, or Camel |
| * is allowed to use asynchronous processing (if supported). |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedCouchDbEndpointConsumerBuilder synchronous( |
| boolean synchronous) { |
| setProperty("synchronous", synchronous); |
| return this; |
| } |
| /** |
| * Sets whether synchronous processing should be strictly used, or Camel |
| * is allowed to use asynchronous processing (if supported). |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedCouchDbEndpointConsumerBuilder synchronous( |
| String synchronous) { |
| setProperty("synchronous", synchronous); |
| return this; |
| } |
| } |
| |
| /** |
| * Builder for endpoint producers for the CouchDB component. |
| */ |
| public interface CouchDbEndpointProducerBuilder |
| extends |
| EndpointProducerBuilder { |
| default AdvancedCouchDbEndpointProducerBuilder advanced() { |
| return (AdvancedCouchDbEndpointProducerBuilder) this; |
| } |
| /** |
| * Creates the database if it does not already exist. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default CouchDbEndpointProducerBuilder createDatabase( |
| boolean createDatabase) { |
| setProperty("createDatabase", createDatabase); |
| return this; |
| } |
| /** |
| * Creates the database if it does not already exist. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default CouchDbEndpointProducerBuilder createDatabase( |
| String createDatabase) { |
| setProperty("createDatabase", createDatabase); |
| return this; |
| } |
| /** |
| * Whether the producer should be started lazy (on the first message). |
| * By starting lazy you can use this to allow CamelContext and routes to |
| * startup in situations where a producer may otherwise fail during |
| * starting and cause the route to fail being started. By deferring this |
| * startup to be lazy then the startup failure can be handled during |
| * routing messages via Camel's routing error handlers. Beware that when |
| * the first message is processed then creating and starting the |
| * producer may take a little time and prolong the total processing time |
| * of the processing. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: producer |
| */ |
| default CouchDbEndpointProducerBuilder lazyStartProducer( |
| boolean lazyStartProducer) { |
| setProperty("lazyStartProducer", lazyStartProducer); |
| return this; |
| } |
| /** |
| * Whether the producer should be started lazy (on the first message). |
| * By starting lazy you can use this to allow CamelContext and routes to |
| * startup in situations where a producer may otherwise fail during |
| * starting and cause the route to fail being started. By deferring this |
| * startup to be lazy then the startup failure can be handled during |
| * routing messages via Camel's routing error handlers. Beware that when |
| * the first message is processed then creating and starting the |
| * producer may take a little time and prolong the total processing time |
| * of the processing. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: producer |
| */ |
| default CouchDbEndpointProducerBuilder lazyStartProducer( |
| String lazyStartProducer) { |
| setProperty("lazyStartProducer", lazyStartProducer); |
| return this; |
| } |
| /** |
| * Password for authenticated databases. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default CouchDbEndpointProducerBuilder password(String password) { |
| setProperty("password", password); |
| return this; |
| } |
| /** |
| * Username in case of authenticated databases. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default CouchDbEndpointProducerBuilder username(String username) { |
| setProperty("username", username); |
| return this; |
| } |
| } |
| |
| /** |
| * Advanced builder for endpoint producers for the CouchDB component. |
| */ |
| public interface AdvancedCouchDbEndpointProducerBuilder |
| extends |
| EndpointProducerBuilder { |
| default CouchDbEndpointProducerBuilder basic() { |
| return (CouchDbEndpointProducerBuilder) this; |
| } |
| /** |
| * Whether the endpoint should use basic property binding (Camel 2.x) or |
| * the newer property binding with additional capabilities. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedCouchDbEndpointProducerBuilder basicPropertyBinding( |
| boolean basicPropertyBinding) { |
| setProperty("basicPropertyBinding", basicPropertyBinding); |
| return this; |
| } |
| /** |
| * Whether the endpoint should use basic property binding (Camel 2.x) or |
| * the newer property binding with additional capabilities. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedCouchDbEndpointProducerBuilder basicPropertyBinding( |
| String basicPropertyBinding) { |
| setProperty("basicPropertyBinding", basicPropertyBinding); |
| return this; |
| } |
| /** |
| * Sets whether synchronous processing should be strictly used, or Camel |
| * is allowed to use asynchronous processing (if supported). |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedCouchDbEndpointProducerBuilder synchronous( |
| boolean synchronous) { |
| setProperty("synchronous", synchronous); |
| return this; |
| } |
| /** |
| * Sets whether synchronous processing should be strictly used, or Camel |
| * is allowed to use asynchronous processing (if supported). |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedCouchDbEndpointProducerBuilder synchronous( |
| String synchronous) { |
| setProperty("synchronous", synchronous); |
| return this; |
| } |
| } |
| |
| /** |
| * Builder for endpoint for the CouchDB component. |
| */ |
| public interface CouchDbEndpointBuilder |
| extends |
| CouchDbEndpointConsumerBuilder, CouchDbEndpointProducerBuilder { |
| default AdvancedCouchDbEndpointBuilder advanced() { |
| return (AdvancedCouchDbEndpointBuilder) this; |
| } |
| /** |
| * Creates the database if it does not already exist. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default CouchDbEndpointBuilder createDatabase(boolean createDatabase) { |
| setProperty("createDatabase", createDatabase); |
| return this; |
| } |
| /** |
| * Creates the database if it does not already exist. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default CouchDbEndpointBuilder createDatabase(String createDatabase) { |
| setProperty("createDatabase", createDatabase); |
| return this; |
| } |
| /** |
| * Password for authenticated databases. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default CouchDbEndpointBuilder password(String password) { |
| setProperty("password", password); |
| return this; |
| } |
| /** |
| * Username in case of authenticated databases. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default CouchDbEndpointBuilder username(String username) { |
| setProperty("username", username); |
| return this; |
| } |
| } |
| |
| /** |
| * Advanced builder for endpoint for the CouchDB component. |
| */ |
| public interface AdvancedCouchDbEndpointBuilder |
| extends |
| AdvancedCouchDbEndpointConsumerBuilder, AdvancedCouchDbEndpointProducerBuilder { |
| default CouchDbEndpointBuilder basic() { |
| return (CouchDbEndpointBuilder) this; |
| } |
| /** |
| * Whether the endpoint should use basic property binding (Camel 2.x) or |
| * the newer property binding with additional capabilities. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedCouchDbEndpointBuilder basicPropertyBinding( |
| boolean basicPropertyBinding) { |
| setProperty("basicPropertyBinding", basicPropertyBinding); |
| return this; |
| } |
| /** |
| * Whether the endpoint should use basic property binding (Camel 2.x) or |
| * the newer property binding with additional capabilities. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedCouchDbEndpointBuilder basicPropertyBinding( |
| String basicPropertyBinding) { |
| setProperty("basicPropertyBinding", basicPropertyBinding); |
| return this; |
| } |
| /** |
| * Sets whether synchronous processing should be strictly used, or Camel |
| * is allowed to use asynchronous processing (if supported). |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedCouchDbEndpointBuilder synchronous(boolean synchronous) { |
| setProperty("synchronous", synchronous); |
| return this; |
| } |
| /** |
| * Sets whether synchronous processing should be strictly used, or Camel |
| * is allowed to use asynchronous processing (if supported). |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedCouchDbEndpointBuilder synchronous(String synchronous) { |
| setProperty("synchronous", synchronous); |
| return this; |
| } |
| } |
| /** |
| * CouchDB (camel-couchdb) |
| * The couchdb component is used for integrate with CouchDB databases. |
| * |
| * Category: database,nosql |
| * Available as of version: 2.11 |
| * Maven coordinates: org.apache.camel:camel-couchdb |
| * |
| * Syntax: <code>couchdb:protocol:hostname:port/database</code> |
| * |
| * Path parameter: protocol (required) |
| * The protocol to use for communicating with the database. |
| * The value can be one of: http, https |
| * |
| * Path parameter: hostname (required) |
| * Hostname of the running couchdb instance |
| * |
| * Path parameter: port |
| * Port number for the running couchdb instance |
| * Default value: 5984 |
| * |
| * Path parameter: database (required) |
| * Name of the database to use |
| */ |
| default CouchDbEndpointBuilder couchDb(String path) { |
| class CouchDbEndpointBuilderImpl extends AbstractEndpointBuilder implements CouchDbEndpointBuilder, AdvancedCouchDbEndpointBuilder { |
| public CouchDbEndpointBuilderImpl(String path) { |
| super("couchdb", path); |
| } |
| } |
| return new CouchDbEndpointBuilderImpl(path); |
| } |
| } |