camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [34/51] [partial] camel git commit: CAMEL-9541: Use -component as suffix for component docs.
Date Tue, 16 Aug 2016 08:03:58 GMT
http://git-wip-us.apache.org/repos/asf/camel/blob/9c0b7baf/components/camel-braintree/src/main/docs/braintree-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-braintree/src/main/docs/braintree-component.adoc b/components/camel-braintree/src/main/docs/braintree-component.adoc
new file mode 100644
index 0000000..054919e
--- /dev/null
+++ b/components/camel-braintree/src/main/docs/braintree-component.adoc
@@ -0,0 +1,775 @@
+[[Braintree-BraintreeComponent]]
+Braintree Component
+~~~~~~~~~~~~~~~~~~~
+
+*Available as of Camel 2.17*
+
+The Braintree component provides access to
+https://www.braintreepayments.com/[Braintree Payments] trough through
+theirs https://developers.braintreepayments.com/start/hello-server/java[Java
+SDK].
+
+All client applications need API credential in order to process
+payments. In order to use camel-braintree with your account, you'll need
+to create a new
+https://www.braintreepayments.com/get-started[Sandbox] or https://www.braintreepayments.com/signup[Production]
+account.
+
+
+Maven users will need to add the following dependency to their pom.xml
+for this component:
+
+
+[source,xml]
+--------------------------------------------
+<dependency>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>camel-braintree</artifactId>
+    <version>${camel-version}</version>
+</dependency>
+--------------------------------------------
+
+ 
+
+[[Braintree-Options]]
+Braintree Options
+^^^^^^^^^^^^^^^^^
+
+
+
+// component options: START
+The Braintree component supports 12 options which are listed below.
+
+
+
+{% raw %}
+[width="100%",cols="2s,1m,8",options="header"]
+|=======================================================================
+| Name | Java Type | Description
+| configuration | BraintreeConfiguration | To use the shared configuration. Properties of the shared configuration can also be set individually.
+| apiName | BraintreeApiName | What kind of operation to perform
+| methodName | String | What sub operation to use for the selected operation
+| environment | String | The environment Either SANDBOX or PRODUCTION
+| merchantId | String | The merchant id provided by Braintree.
+| publicKey | String | The public key provided by Braintree.
+| privateKey | String | The private key provided by Braintree.
+| proxyHost | String | The proxy host
+| proxyPort | Integer | The proxy port
+| httpLogLevel | String | Set logging level for http calls see java.util.logging.Level
+| httpLogName | String | Set log category to use to log http calls default Braintree
+| httpReadTimeout | Integer | Set read timeout for http calls.
+|=======================================================================
+{% endraw %}
+// component options: END
+
+
+
+
+// endpoint options: START
+The Braintree component supports 15 endpoint options which are listed below:
+
+{% raw %}
+[width="100%",cols="2s,1,1m,1m,5",options="header"]
+|=======================================================================
+| Name | Group | Default | Java Type | Description
+| apiName | common |  | BraintreeApiName | *Required* What kind of operation to perform
+| methodName | common |  | String | What sub operation to use for the selected operation
+| environment | common |  | String | *Required* The environment Either SANDBOX or PRODUCTION
+| inBody | common |  | String | Sets the name of a parameter to be passed in the exchange In Body
+| merchantId | common |  | String | *Required* The merchant id provided by Braintree.
+| privateKey | common |  | String | *Required* The private key provided by Braintree.
+| publicKey | common |  | String | *Required* The public key provided by Braintree.
+| bridgeErrorHandler | consumer | false | boolean | 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/ERROR level and ignored.
+| exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
+| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange
+| httpReadTimeout | advanced |  | Integer | Set read timeout for http calls.
+| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
+| httpLogLevel | logging |  | String | Set logging level for http calls see java.util.logging.Level
+| proxyHost | proxy |  | String | The proxy host
+| proxyPort | proxy |  | Integer | The proxy port
+|=======================================================================
+{% endraw %}
+// endpoint options: END
+
+
+[[Braintree-URIformat]]
+URI format
+^^^^^^^^^^
+
+ 
+
+[source,java]
+---------------------------------------------
+braintree://endpoint-prefix/endpoint?[options]
+---------------------------------------------
+
+ 
+
+Endpoint prefix can be one of:
+
+* addOn
+* address
+* clientToken
+* creditCardverification
+* customer
+* discount
+* merchantAccount
+* paymentmethod
+* paymentmethodNonce
+* plan
+* settlementBatchSummary
+* subscription
+* transaction
+* webhookNotification
+
+ 
+
+[[Braintree-BraintreeComponent.1]]
+BraintreeComponent
+^^^^^^^^^^^^^^^^^^
+
+The Braintree Component can be configured with the options below. These
+options can be provided using the component's bean
+property *configuration* of
+type *org.apache.camel.component.braintree.BraintreeConfiguration*.
+
+[cols="<,<,<",options="header",]
+|=======================================================================
+|Option |Type |Description
+|environment |String |value that specifies where requests should be
+directed – sandbox or production
+
+|merchantId |String |a unique identifier for your gateway account, which
+is different than your merchant account ID
+
+|publicKey |String |user-specific public identifier
+
+|privateKey |String |user-specific secure identifier that should not be
+shared – even with us!
+|=======================================================================
+
+All the options above are provided by Braintree Payments
+
+[[Braintree-ProducerEndpoints:]]
+Producer Endpoints:
+^^^^^^^^^^^^^^^^^^^
+
+Producer endpoints can use endpoint prefixes followed by endpoint names
+and associated options described next. A shorthand alias can be used for
+some endpoints. The endpoint URI MUST contain a prefix.
+
+Endpoint options that are not mandatory are denoted by []. When there
+are no mandatory options for an endpoint, one of the set of [] options
+MUST be provided. Producer endpoints can also use a special
+option *inBody* that in turn should contain the name of the endpoint
+option whose value will be contained in the Camel Exchange In message.
+
+Any of the endpoint options can be provided in either the endpoint URI,
+or dynamically in a message header. The message header name must be of
+the format *CamelBraintree.<option>*. Note that the *inBody* option
+overrides message header, i.e. the endpoint option *inBody=option* would
+override a *CamelBraintree.option* header.
+
+For more information on the endpoints and options see Braintree
+references
+at https://developers.braintreepayments.com/reference/overview[https://developers.braintreepayments.com/reference/overview]
+
+ 
+
+[[Braintree-EndpointprefixaddOn]]
+Endpoint prefix _addOn_
++++++++++++++++++++++++
+
+The following endpoints can be invoked with the prefix *addOn* as
+follows:
+
+ 
+
+[source,java]
+--------------------------
+braintree://addOn/endpoint
+--------------------------
+
+[cols="<,<,<,<",options="header",]
+|====================================================
+|Endpoint |Shorthand Alias |Options |Result Body Type
+|all |  |  |List<com.braintreegateway.Addon>
+|====================================================
+
+[[Braintree-Endpointprefixaddress]]
+Endpoint prefix _address_
++++++++++++++++++++++++++
+
+The following endpoints can be invoked with the prefix *address* as
+follows:
+
+ 
+
+[source,java]
+--------------------------------------
+braintree://address/endpoint?[options]
+--------------------------------------
+
+[cols="<,<,<,<",options="header",]
+|=======================================================================
+|Endpoint |Shorthand Alias |Options |Result Body Type
+|create |  |customerId, request
+|com.braintreegateway.Result<com.braintreegateway.Address>
+
+|delete |  |customerId, id
+|com.braintreegateway.Result<com.braintreegateway.Address> 
+
+|find |  |customerId, id |com.braintreegateway.Address
+
+|update |  |customerId, id, request
+|com.braintreegateway.Result<com.braintreegateway.Address> 
+|=======================================================================
+
+[[Braintree-URIOptionsforaddress]]
+URI Options for _address_
+
+[cols="<,<",options="header",]
+|============================================
+|Name |Type
+|customerId |String
+|request |com.braintreegateway.AddressRequest
+|id |String
+|============================================
+
+[[Braintree-EndpointprefixclientToken]]
+Endpoint prefix _clientToken_
++++++++++++++++++++++++++++++
+
+The following endpoints can be invoked with the prefix *clientToken* as
+follows:
+
+ 
+
+[source,java]
+------------------------------------------
+braintree://clientToken/endpoint?[options]
+------------------------------------------
+
+[cols="<,<,<,<",options="header",]
+|====================================================
+|Endpoint |Shorthand Alias |Options |Result Body Type
+|generate |  | request |String
+|====================================================
+
+[[Braintree-URIOptionsforclientToken]]
+URI Options for _clientToken_
+
+[cols="<,<",options="header",]
+|================================================
+|Name |Type
+|request |com.braintreegateway.ClientTokenrequest
+|================================================
+
+[[Braintree-EndpointprefixcreditCardVerification]]
+Endpoint prefix _creditCardVerification_
+++++++++++++++++++++++++++++++++++++++++
+
+The following endpoints can be invoked with the
+prefix *creditCardverification* as follows:
+
+ 
+
+[source,java]
+-----------------------------------------------------
+braintree://creditCardVerification/endpoint?[options]
+-----------------------------------------------------
+
+[cols="<,<,<,<",options="header",]
+|=======================================================================
+|Endpoint |Shorthand Alias |Options |Result Body Type
+|find |  | id |com.braintreegateway.CreditCardVerification
+
+|search |  |query
+|com.braintreegateway.ResourceCollection<com.braintreegateway.CreditCardVerification>
+|=======================================================================
+
+[[Braintree-URIOptionsforcreditCardVerification]]
+URI Options for _creditCardVerification_
+
+[cols="<,<",options="header",]
+|===============================================================
+|Name |Type
+|id |String
+|query |com.braintreegateway.CreditCardVerificationSearchRequest
+|===============================================================
+
+[[Braintree-Endpointprefixcustomer]]
+Endpoint prefix _customer_
+++++++++++++++++++++++++++
+
+The following endpoints can be invoked with the prefix *customer* as
+follows:
+
+ 
+
+[source,java]
+---------------------------------------
+braintree://customer/endpoint?[options]
+---------------------------------------
+
+[cols="<,<,<,<",options="header",]
+|=======================================================================
+|Endpoint |Shorthand Alias |Options |Result Body Type
+|all |  |  | 
+
+|create |  |request
+|com.braintreegateway.Result<com.braintreegateway.Customer>
+
+|delete |  |id
+|com.braintreegateway.Result<com.braintreegateway.Customer>
+
+|find |  |id |com.braintreegateway.Customer
+
+|search |  |query
+|com.braintreegateway.ResourceCollection<com.braintreegateway.Customer>
+
+|update |  |id, request
+|com.braintreegateway.Result<com.braintreegateway.Customer>
+|=======================================================================
+
+[[Braintree-URIOptionsforcustomer]]
+URI Options for _customer_
+
+[cols="<,<",options="header",]
+|=================================================
+|Name |Type
+|id |String
+|request |com.braintreegateway.CustomerRequest
+|query |com.braintreegateway.CustomerSearchRequest
+|=================================================
+
+[[Braintree-Endpointprefixdiscount]]
+Endpoint prefix _discount_
+++++++++++++++++++++++++++
+
+The following endpoints can be invoked with the prefix *discount* as
+follows:
+
+ 
+
+[source,java]
+-----------------------------
+braintree://discount/endpoint
+-----------------------------
+
+[cols="<,<,<,<",options="header",]
+|====================================================
+|Endpoint |Shorthand Alias |Options |Result Body Type
+|all |  |  |List<com.braintreegateway.Discount>
+|====================================================
+
+ +
+
+ +
+
+[[Braintree-EndpointprefixmerchantAccount]]
+Endpoint prefix _merchantAccount_
++++++++++++++++++++++++++++++++++
+
+The following endpoints can be invoked with the
+prefix *merchantAccount* as follows:
+
+ 
+
+[source,java]
+----------------------------------------------
+braintree://merchantAccount/endpoint?[options]
+----------------------------------------------
+
+[cols="<,<,<,<",options="header",]
+|=======================================================================
+|Endpoint |Shorthand Alias |Options |Result Body Type
+|create |  |request
+|com.braintreegateway.Result<com.braintreegateway.MerchantAccount>
+
+|find |  |id |com.braintreegateway.MerchantAccount
+
+|update |  |id, request
+|com.braintreegateway.Result<com.braintreegateway.MerchantAccount>
+|=======================================================================
+
+[[Braintree-URIOptionsformerchantAccount]]
+URI Options for _merchantAccount_
+
+[cols="<,<",options="header",]
+|====================================================
+|Name |Type
+|id |String
+|request |com.braintreegateway.MerchantAccountRequest
+|====================================================
+
+[[Braintree-EndpointprefixpaymentMethod]]
+Endpoint prefix _paymentMethod_
++++++++++++++++++++++++++++++++
+
+The following endpoints can be invoked with the
+prefix *paymentMethod* as follows:
+
+ 
+
+[source,java]
+--------------------------------------------
+braintree://paymentMethod/endpoint?[options]
+--------------------------------------------
+
+[cols="<,<,<,<",options="header",]
+|=======================================================================
+|Endpoint |Shorthand Alias |Options |Result Body Type
+|create |  |request
+|com.braintreegateway.Result<com.braintreegateway.PaymentMethod>
+
+|delete |  |token
+|com.braintreegateway.Result<com.braintreegateway.PaymentMethod>
+
+|find |  |token |com.braintreegateway.PaymentMethod
+
+|update |  |token, request
+|com.braintreegateway.Result<com.braintreegateway.PaymentMethod>
+|=======================================================================
+
+[[Braintree-URIOptionsforpaymentMethod]]
+URI Options for _paymentMethod_
+
+[cols="<,<",options="header",]
+|==================================================
+|Name |Type
+|token |String
+|request |com.braintreegateway.PaymentMethodRequest
+|==================================================
+
+[[Braintree-EndpointprefixpaymentMethodNonce]]
+Endpoint prefix _paymentMethodNonce_
+++++++++++++++++++++++++++++++++++++
+
+The following endpoints can be invoked with the
+prefix *paymentMethodNonce* as follows:
+
+ 
+
+[source,java]
+-------------------------------------------------
+braintree://paymentMethodNonce/endpoint?[options]
+-------------------------------------------------
+
+[cols="<,<,<,<",options="header",]
+|=======================================================================
+|Endpoint |Shorthand Alias |Options |Result Body Type
+|create |  |paymentMethodToken
+|com.braintreegateway.Result<com.braintreegateway.PaymentMethodNonce>
+
+|find |  |paymentMethodNonce |com.braintreegateway.PaymentMethodNonce
+|=======================================================================
+
+[[Braintree-URIOptionsforpaymentMethodNonce]]
+URI Options for _paymentMethodNonce_
+
+[cols="<,<",options="header",]
+|==========================
+|Name |Type
+|paymentMethodToken |String
+|paymentMethodNonce |String
+|==========================
+
+[[Braintree-Endpointprefixplan]]
+Endpoint prefix _plan_
+++++++++++++++++++++++
+
+The following endpoints can be invoked with the prefix *plan* as
+follows:
+
+ 
+
+[source,java]
+-------------------------
+braintree://plan/endpoint
+-------------------------
+
+[cols="<,<,<,<",options="header",]
+|====================================================
+|Endpoint |Shorthand Alias |Options |Result Body Type
+|all |  |  |List<com.braintreegateway.Plan>
+|====================================================
+
+ 
+
+[[Braintree-EndpointprefixsettlementBatchSummary]]
+Endpoint prefix _settlementBatchSummary_
+++++++++++++++++++++++++++++++++++++++++
+
+The following endpoints can be invoked with the
+prefix *settlementBatchSummary* as follows:
+
+ 
+
+[source,java]
+-----------------------------------------------------
+braintree://settlementBatchSummary/endpoint?[options]
+-----------------------------------------------------
+
+[cols="<,<,<,<",options="header",]
+|=======================================================================
+|Endpoint |Shorthand Alias |Options |Result Body Type
+|generate |  | request
+|com.braintreegateway.Result<com.braintreegateway.SettlementBatchSummary>
+|=======================================================================
+
+[[Braintree-URIOptionsforsettlementBatchSummary]]
+URI Options for _settlementBatchSummary_
+
+[cols="<,<",options="header",]
+|==========================
+|Name |Type
+|settlementDate |Calendar
+|groupByCustomField |String
+|==========================
+
+[[Braintree-Endpointprefixsubscription]]
+Endpoint prefix _subscription_
+++++++++++++++++++++++++++++++
+
+The following endpoints can be invoked with the prefix *subscription* as
+follows:
+
+ 
+
+[source,java]
+-------------------------------------------
+braintree://subscription/endpoint?[options]
+-------------------------------------------
+
+[cols="<,<,<,<",options="header",]
+|=======================================================================
+|Endpoint |Shorthand Alias |Options |Result Body Type
+|cancel |  | id
+| com.braintreegateway.Result<com.braintreegateway.Subscription>
+
+|create |  |request
+|com.braintreegateway.Result<com.braintreegateway.Subscription>
+
+|delete |  |customerId, id
+|com.braintreegateway.Result<com.braintreegateway.Subscription>
+
+|find |  |id |com.braintreegateway.Subscription
+
+|retryCharge |  |subscriptionId, amount
+|com.braintreegateway.Result<com.braintreegateway.Transaction>
+
+|search |  |searchRequest
+|com.braintreegateway.ResourceCollection<com.braintreegateway.Subscription>
+
+|update |  |id, request
+|com.braintreegateway.Result<com.braintreegateway.Subscription>
+|=======================================================================
+
+[[Braintree-URIOptionsforsubscription]]
+URI Options for _subscription_
+
+[cols="<,<",options="header",]
+|==============================================================
+|Name |Type
+|id |String
+|request |com.braintreegateway.SubscriptionRequest
+|customerId |String
+|subscriptionId |String
+|amount |BigDecimal
+|searchRequest |com.braintreegateway.SubscriptionSearchRequest.
+|==============================================================
+
+ 
+
+[[Braintree-Endpointprefixtransaction]]
+Endpoint prefix _transaction_
++++++++++++++++++++++++++++++
+
+The following endpoints can be invoked with the prefix *transaction* as
+follows:
+
+ 
+
+[source,java]
+------------------------------------------
+braintree://transaction/endpoint?[options]
+------------------------------------------
+
+[cols="<,<,<,<",options="header",]
+|=======================================================================
+|Endpoint |Shorthand Alias |Options |Result Body Type
+|cancelRelease |  |id
+|com.braintreegateway.Result<com.braintreegateway.Transaction>
+
+|cloneTransaction |  |id, cloneRequest
+|com.braintreegateway.Result<com.braintreegateway.Transaction>
+
+|credit |  |request
+|com.braintreegateway.Result<com.braintreegateway.Transaction>
+
+|find |  |id |com.braintreegateway.Transaction
+
+|holdInEscrow |  |id
+|com.braintreegateway.Result<com.braintreegateway.Transaction>
+
+|releaseFromEscrow |  |id
+|com.braintreegateway.Result<com.braintreegateway.Transaction>
+
+|refund |  |id, amount
+|com.braintreegateway.Result<com.braintreegateway.Transaction>
+
+|sale |  |request
+|com.braintreegateway.Result<com.braintreegateway.Transaction>
+
+|search |  |query
+|com.braintreegateway.ResourceCollection<com.braintreegateway.Transaction>
+
+|submitForPartialSettlement |  |id, amount
+|com.braintreegateway.Result<com.braintreegateway.Transaction>
+
+|submitForSettlement |  |id, amount, request
+|com.braintreegateway.Result<com.braintreegateway.Transaction>
+
+|voidTransaction |  |id
+|com.braintreegateway.Result<com.braintreegateway.Transaction>
+|=======================================================================
+
+[[Braintree-URIOptionsfortransaction]]
+URI Options for _transaction_
+
+[cols="<,<",options="header",]
+|==========================================================
+|Name |Type
+|id |String
+|request |com.braintreegateway.TransactionCloneRequest
+|cloneRequest |com.braintreegateway.TransactionCloneRequest
+|amount |BigDecimal
+|query |com.braintreegateway.TransactionSearchRequest
+|==========================================================
+
+[[Braintree-EndpointprefixwebhookNotification]]
+Endpoint prefix _webhookNotification_
++++++++++++++++++++++++++++++++++++++
+
+The following endpoints can be invoked with the
+prefix *webhookNotification* as follows:
+
+ 
+
+[source,java]
+--------------------------------------------------
+braintree://webhookNotification/endpoint?[options]
+--------------------------------------------------
+
+[cols="<,<,<,<",options="header",]
+|=======================================================================
+|Endpoint |Shorthand Alias |Options |Result Body Type
+|parse |  | signature, payload |com.braintreegateway.WebhookNotification
+|verify |  |challenge |String
+|=======================================================================
+
+[[Braintree-URIOptionsforwebhookNotification]]
+URI Options for _webhookNotification_
+
+[cols="<,<",options="header",]
+|=================
+|Name |Type
+|signature |String
+|payload |String
+|challenge |String
+|=================
+
+ 
+
+[[Braintree-ConsumerEndpoints]]
+Consumer Endpoints
+^^^^^^^^^^^^^^^^^^
+
+Any of the producer endpoints can be used as a consumer endpoint.
+Consumer endpoints can
+use http://camel.apache.org/polling-consumer.html#PollingConsumer-ScheduledPollConsumerOptions[Scheduled
+Poll Consumer Options] with a *consumer.* prefix to schedule endpoint
+invocation. By default Consumer endpoints that return an array or
+collection will generate one exchange per element, and their routes will
+be executed once for each exchange. To change this behavior use the
+property *consumer.splitResults=true* to return a single exchange for
+the entire list or array. 
+
+[[Braintree-MessageHeaders]]
+Message Headers
+^^^^^^^^^^^^^^^
+
+Any URI option can be provided in a message header for producer
+endpoints with a *CamelBraintree.* prefix.
+
+[[Braintree-Messagebody]]
+Message body
+^^^^^^^^^^^^
+
+All result message bodies utilize objects provided by the Braintree Java
+SDK. Producer endpoints can specify the option name for incoming message
+body in the *inBody* endpoint parameter.
+
+ 
+
+ 
+
+[[Braintree-Examples]]
+Examples
+^^^^^^^^
+
+*Blueprint*
+
+[source,xml]
+--------------------------------------------------------------------------------------------------------------------------------------------
+<?xml version="1.0"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
+           xsi:schemaLocation="
+             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
+             http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
+
+
+    <cm:property-placeholder id="placeholder" persistent-id="camel.braintree">
+    </cm:property-placeholder>
+
+    <bean id="braintree" class="org.apache.camel.component.braintree.BraintreeComponent">
+        <property name="configuration">
+            <bean class="org.apache.camel.component.braintree.BraintreeConfiguration">
+                <property name="environment" value="${environment}"/>
+                <property name="merchantId" value="${merchantId}"/>
+                <property name="publicKey" value="${publicKey}"/>
+                <property name="privateKey" value="${privateKey}"/>
+            </bean>
+        </property>
+    </bean>
+
+    <camelContext trace="true" xmlns="http://camel.apache.org/schema/blueprint" id="braintree-example-context">
+        <route id="braintree-example-route">
+            <from uri="direct:generateClientToken"/>
+            <to uri="braintree://clientToken/generate"/>
+            <to uri="stream:out"/>
+        </route>
+    </camelContext>
+
+</blueprint>
+--------------------------------------------------------------------------------------------------------------------------------------------
+
+[[Braintree-SeeAlso]]
+See Also
+^^^^^^^^
+
+*
+https://cwiki.apache.org/confluence/display/CAMEL/Configuring+Camel[Configuring
+Camel]
+* https://cwiki.apache.org/confluence/display/CAMEL/Component[Component]
+* https://cwiki.apache.org/confluence/display/CAMEL/Endpoint[Endpoint]
+*
+https://cwiki.apache.org/confluence/display/CAMEL/Getting+Started[Getting
+Started]
+
+ 
+
+https://cwiki.apache.org/confluence/display/CAMEL/AMQP[ ]

http://git-wip-us.apache.org/repos/asf/camel/blob/9c0b7baf/components/camel-braintree/src/main/docs/braintree.adoc
----------------------------------------------------------------------
diff --git a/components/camel-braintree/src/main/docs/braintree.adoc b/components/camel-braintree/src/main/docs/braintree.adoc
deleted file mode 100644
index 054919e..0000000
--- a/components/camel-braintree/src/main/docs/braintree.adoc
+++ /dev/null
@@ -1,775 +0,0 @@
-[[Braintree-BraintreeComponent]]
-Braintree Component
-~~~~~~~~~~~~~~~~~~~
-
-*Available as of Camel 2.17*
-
-The Braintree component provides access to
-https://www.braintreepayments.com/[Braintree Payments] trough through
-theirs https://developers.braintreepayments.com/start/hello-server/java[Java
-SDK].
-
-All client applications need API credential in order to process
-payments. In order to use camel-braintree with your account, you'll need
-to create a new
-https://www.braintreepayments.com/get-started[Sandbox] or https://www.braintreepayments.com/signup[Production]
-account.
-
-
-Maven users will need to add the following dependency to their pom.xml
-for this component:
-
-
-[source,xml]
---------------------------------------------
-<dependency>
-    <groupId>org.apache.camel</groupId>
-    <artifactId>camel-braintree</artifactId>
-    <version>${camel-version}</version>
-</dependency>
---------------------------------------------
-
- 
-
-[[Braintree-Options]]
-Braintree Options
-^^^^^^^^^^^^^^^^^
-
-
-
-// component options: START
-The Braintree component supports 12 options which are listed below.
-
-
-
-{% raw %}
-[width="100%",cols="2s,1m,8",options="header"]
-|=======================================================================
-| Name | Java Type | Description
-| configuration | BraintreeConfiguration | To use the shared configuration. Properties of the shared configuration can also be set individually.
-| apiName | BraintreeApiName | What kind of operation to perform
-| methodName | String | What sub operation to use for the selected operation
-| environment | String | The environment Either SANDBOX or PRODUCTION
-| merchantId | String | The merchant id provided by Braintree.
-| publicKey | String | The public key provided by Braintree.
-| privateKey | String | The private key provided by Braintree.
-| proxyHost | String | The proxy host
-| proxyPort | Integer | The proxy port
-| httpLogLevel | String | Set logging level for http calls see java.util.logging.Level
-| httpLogName | String | Set log category to use to log http calls default Braintree
-| httpReadTimeout | Integer | Set read timeout for http calls.
-|=======================================================================
-{% endraw %}
-// component options: END
-
-
-
-
-// endpoint options: START
-The Braintree component supports 15 endpoint options which are listed below:
-
-{% raw %}
-[width="100%",cols="2s,1,1m,1m,5",options="header"]
-|=======================================================================
-| Name | Group | Default | Java Type | Description
-| apiName | common |  | BraintreeApiName | *Required* What kind of operation to perform
-| methodName | common |  | String | What sub operation to use for the selected operation
-| environment | common |  | String | *Required* The environment Either SANDBOX or PRODUCTION
-| inBody | common |  | String | Sets the name of a parameter to be passed in the exchange In Body
-| merchantId | common |  | String | *Required* The merchant id provided by Braintree.
-| privateKey | common |  | String | *Required* The private key provided by Braintree.
-| publicKey | common |  | String | *Required* The public key provided by Braintree.
-| bridgeErrorHandler | consumer | false | boolean | 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/ERROR level and ignored.
-| exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
-| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange
-| httpReadTimeout | advanced |  | Integer | Set read timeout for http calls.
-| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
-| httpLogLevel | logging |  | String | Set logging level for http calls see java.util.logging.Level
-| proxyHost | proxy |  | String | The proxy host
-| proxyPort | proxy |  | Integer | The proxy port
-|=======================================================================
-{% endraw %}
-// endpoint options: END
-
-
-[[Braintree-URIformat]]
-URI format
-^^^^^^^^^^
-
- 
-
-[source,java]
----------------------------------------------
-braintree://endpoint-prefix/endpoint?[options]
----------------------------------------------
-
- 
-
-Endpoint prefix can be one of:
-
-* addOn
-* address
-* clientToken
-* creditCardverification
-* customer
-* discount
-* merchantAccount
-* paymentmethod
-* paymentmethodNonce
-* plan
-* settlementBatchSummary
-* subscription
-* transaction
-* webhookNotification
-
- 
-
-[[Braintree-BraintreeComponent.1]]
-BraintreeComponent
-^^^^^^^^^^^^^^^^^^
-
-The Braintree Component can be configured with the options below. These
-options can be provided using the component's bean
-property *configuration* of
-type *org.apache.camel.component.braintree.BraintreeConfiguration*.
-
-[cols="<,<,<",options="header",]
-|=======================================================================
-|Option |Type |Description
-|environment |String |value that specifies where requests should be
-directed – sandbox or production
-
-|merchantId |String |a unique identifier for your gateway account, which
-is different than your merchant account ID
-
-|publicKey |String |user-specific public identifier
-
-|privateKey |String |user-specific secure identifier that should not be
-shared – even with us!
-|=======================================================================
-
-All the options above are provided by Braintree Payments
-
-[[Braintree-ProducerEndpoints:]]
-Producer Endpoints:
-^^^^^^^^^^^^^^^^^^^
-
-Producer endpoints can use endpoint prefixes followed by endpoint names
-and associated options described next. A shorthand alias can be used for
-some endpoints. The endpoint URI MUST contain a prefix.
-
-Endpoint options that are not mandatory are denoted by []. When there
-are no mandatory options for an endpoint, one of the set of [] options
-MUST be provided. Producer endpoints can also use a special
-option *inBody* that in turn should contain the name of the endpoint
-option whose value will be contained in the Camel Exchange In message.
-
-Any of the endpoint options can be provided in either the endpoint URI,
-or dynamically in a message header. The message header name must be of
-the format *CamelBraintree.<option>*. Note that the *inBody* option
-overrides message header, i.e. the endpoint option *inBody=option* would
-override a *CamelBraintree.option* header.
-
-For more information on the endpoints and options see Braintree
-references
-at https://developers.braintreepayments.com/reference/overview[https://developers.braintreepayments.com/reference/overview]
-
- 
-
-[[Braintree-EndpointprefixaddOn]]
-Endpoint prefix _addOn_
-+++++++++++++++++++++++
-
-The following endpoints can be invoked with the prefix *addOn* as
-follows:
-
- 
-
-[source,java]
---------------------------
-braintree://addOn/endpoint
---------------------------
-
-[cols="<,<,<,<",options="header",]
-|====================================================
-|Endpoint |Shorthand Alias |Options |Result Body Type
-|all |  |  |List<com.braintreegateway.Addon>
-|====================================================
-
-[[Braintree-Endpointprefixaddress]]
-Endpoint prefix _address_
-+++++++++++++++++++++++++
-
-The following endpoints can be invoked with the prefix *address* as
-follows:
-
- 
-
-[source,java]
---------------------------------------
-braintree://address/endpoint?[options]
---------------------------------------
-
-[cols="<,<,<,<",options="header",]
-|=======================================================================
-|Endpoint |Shorthand Alias |Options |Result Body Type
-|create |  |customerId, request
-|com.braintreegateway.Result<com.braintreegateway.Address>
-
-|delete |  |customerId, id
-|com.braintreegateway.Result<com.braintreegateway.Address> 
-
-|find |  |customerId, id |com.braintreegateway.Address
-
-|update |  |customerId, id, request
-|com.braintreegateway.Result<com.braintreegateway.Address> 
-|=======================================================================
-
-[[Braintree-URIOptionsforaddress]]
-URI Options for _address_
-
-[cols="<,<",options="header",]
-|============================================
-|Name |Type
-|customerId |String
-|request |com.braintreegateway.AddressRequest
-|id |String
-|============================================
-
-[[Braintree-EndpointprefixclientToken]]
-Endpoint prefix _clientToken_
-+++++++++++++++++++++++++++++
-
-The following endpoints can be invoked with the prefix *clientToken* as
-follows:
-
- 
-
-[source,java]
-------------------------------------------
-braintree://clientToken/endpoint?[options]
-------------------------------------------
-
-[cols="<,<,<,<",options="header",]
-|====================================================
-|Endpoint |Shorthand Alias |Options |Result Body Type
-|generate |  | request |String
-|====================================================
-
-[[Braintree-URIOptionsforclientToken]]
-URI Options for _clientToken_
-
-[cols="<,<",options="header",]
-|================================================
-|Name |Type
-|request |com.braintreegateway.ClientTokenrequest
-|================================================
-
-[[Braintree-EndpointprefixcreditCardVerification]]
-Endpoint prefix _creditCardVerification_
-++++++++++++++++++++++++++++++++++++++++
-
-The following endpoints can be invoked with the
-prefix *creditCardverification* as follows:
-
- 
-
-[source,java]
------------------------------------------------------
-braintree://creditCardVerification/endpoint?[options]
------------------------------------------------------
-
-[cols="<,<,<,<",options="header",]
-|=======================================================================
-|Endpoint |Shorthand Alias |Options |Result Body Type
-|find |  | id |com.braintreegateway.CreditCardVerification
-
-|search |  |query
-|com.braintreegateway.ResourceCollection<com.braintreegateway.CreditCardVerification>
-|=======================================================================
-
-[[Braintree-URIOptionsforcreditCardVerification]]
-URI Options for _creditCardVerification_
-
-[cols="<,<",options="header",]
-|===============================================================
-|Name |Type
-|id |String
-|query |com.braintreegateway.CreditCardVerificationSearchRequest
-|===============================================================
-
-[[Braintree-Endpointprefixcustomer]]
-Endpoint prefix _customer_
-++++++++++++++++++++++++++
-
-The following endpoints can be invoked with the prefix *customer* as
-follows:
-
- 
-
-[source,java]
----------------------------------------
-braintree://customer/endpoint?[options]
----------------------------------------
-
-[cols="<,<,<,<",options="header",]
-|=======================================================================
-|Endpoint |Shorthand Alias |Options |Result Body Type
-|all |  |  | 
-
-|create |  |request
-|com.braintreegateway.Result<com.braintreegateway.Customer>
-
-|delete |  |id
-|com.braintreegateway.Result<com.braintreegateway.Customer>
-
-|find |  |id |com.braintreegateway.Customer
-
-|search |  |query
-|com.braintreegateway.ResourceCollection<com.braintreegateway.Customer>
-
-|update |  |id, request
-|com.braintreegateway.Result<com.braintreegateway.Customer>
-|=======================================================================
-
-[[Braintree-URIOptionsforcustomer]]
-URI Options for _customer_
-
-[cols="<,<",options="header",]
-|=================================================
-|Name |Type
-|id |String
-|request |com.braintreegateway.CustomerRequest
-|query |com.braintreegateway.CustomerSearchRequest
-|=================================================
-
-[[Braintree-Endpointprefixdiscount]]
-Endpoint prefix _discount_
-++++++++++++++++++++++++++
-
-The following endpoints can be invoked with the prefix *discount* as
-follows:
-
- 
-
-[source,java]
------------------------------
-braintree://discount/endpoint
------------------------------
-
-[cols="<,<,<,<",options="header",]
-|====================================================
-|Endpoint |Shorthand Alias |Options |Result Body Type
-|all |  |  |List<com.braintreegateway.Discount>
-|====================================================
-
- +
-
- +
-
-[[Braintree-EndpointprefixmerchantAccount]]
-Endpoint prefix _merchantAccount_
-+++++++++++++++++++++++++++++++++
-
-The following endpoints can be invoked with the
-prefix *merchantAccount* as follows:
-
- 
-
-[source,java]
-----------------------------------------------
-braintree://merchantAccount/endpoint?[options]
-----------------------------------------------
-
-[cols="<,<,<,<",options="header",]
-|=======================================================================
-|Endpoint |Shorthand Alias |Options |Result Body Type
-|create |  |request
-|com.braintreegateway.Result<com.braintreegateway.MerchantAccount>
-
-|find |  |id |com.braintreegateway.MerchantAccount
-
-|update |  |id, request
-|com.braintreegateway.Result<com.braintreegateway.MerchantAccount>
-|=======================================================================
-
-[[Braintree-URIOptionsformerchantAccount]]
-URI Options for _merchantAccount_
-
-[cols="<,<",options="header",]
-|====================================================
-|Name |Type
-|id |String
-|request |com.braintreegateway.MerchantAccountRequest
-|====================================================
-
-[[Braintree-EndpointprefixpaymentMethod]]
-Endpoint prefix _paymentMethod_
-+++++++++++++++++++++++++++++++
-
-The following endpoints can be invoked with the
-prefix *paymentMethod* as follows:
-
- 
-
-[source,java]
---------------------------------------------
-braintree://paymentMethod/endpoint?[options]
---------------------------------------------
-
-[cols="<,<,<,<",options="header",]
-|=======================================================================
-|Endpoint |Shorthand Alias |Options |Result Body Type
-|create |  |request
-|com.braintreegateway.Result<com.braintreegateway.PaymentMethod>
-
-|delete |  |token
-|com.braintreegateway.Result<com.braintreegateway.PaymentMethod>
-
-|find |  |token |com.braintreegateway.PaymentMethod
-
-|update |  |token, request
-|com.braintreegateway.Result<com.braintreegateway.PaymentMethod>
-|=======================================================================
-
-[[Braintree-URIOptionsforpaymentMethod]]
-URI Options for _paymentMethod_
-
-[cols="<,<",options="header",]
-|==================================================
-|Name |Type
-|token |String
-|request |com.braintreegateway.PaymentMethodRequest
-|==================================================
-
-[[Braintree-EndpointprefixpaymentMethodNonce]]
-Endpoint prefix _paymentMethodNonce_
-++++++++++++++++++++++++++++++++++++
-
-The following endpoints can be invoked with the
-prefix *paymentMethodNonce* as follows:
-
- 
-
-[source,java]
--------------------------------------------------
-braintree://paymentMethodNonce/endpoint?[options]
--------------------------------------------------
-
-[cols="<,<,<,<",options="header",]
-|=======================================================================
-|Endpoint |Shorthand Alias |Options |Result Body Type
-|create |  |paymentMethodToken
-|com.braintreegateway.Result<com.braintreegateway.PaymentMethodNonce>
-
-|find |  |paymentMethodNonce |com.braintreegateway.PaymentMethodNonce
-|=======================================================================
-
-[[Braintree-URIOptionsforpaymentMethodNonce]]
-URI Options for _paymentMethodNonce_
-
-[cols="<,<",options="header",]
-|==========================
-|Name |Type
-|paymentMethodToken |String
-|paymentMethodNonce |String
-|==========================
-
-[[Braintree-Endpointprefixplan]]
-Endpoint prefix _plan_
-++++++++++++++++++++++
-
-The following endpoints can be invoked with the prefix *plan* as
-follows:
-
- 
-
-[source,java]
--------------------------
-braintree://plan/endpoint
--------------------------
-
-[cols="<,<,<,<",options="header",]
-|====================================================
-|Endpoint |Shorthand Alias |Options |Result Body Type
-|all |  |  |List<com.braintreegateway.Plan>
-|====================================================
-
- 
-
-[[Braintree-EndpointprefixsettlementBatchSummary]]
-Endpoint prefix _settlementBatchSummary_
-++++++++++++++++++++++++++++++++++++++++
-
-The following endpoints can be invoked with the
-prefix *settlementBatchSummary* as follows:
-
- 
-
-[source,java]
------------------------------------------------------
-braintree://settlementBatchSummary/endpoint?[options]
------------------------------------------------------
-
-[cols="<,<,<,<",options="header",]
-|=======================================================================
-|Endpoint |Shorthand Alias |Options |Result Body Type
-|generate |  | request
-|com.braintreegateway.Result<com.braintreegateway.SettlementBatchSummary>
-|=======================================================================
-
-[[Braintree-URIOptionsforsettlementBatchSummary]]
-URI Options for _settlementBatchSummary_
-
-[cols="<,<",options="header",]
-|==========================
-|Name |Type
-|settlementDate |Calendar
-|groupByCustomField |String
-|==========================
-
-[[Braintree-Endpointprefixsubscription]]
-Endpoint prefix _subscription_
-++++++++++++++++++++++++++++++
-
-The following endpoints can be invoked with the prefix *subscription* as
-follows:
-
- 
-
-[source,java]
--------------------------------------------
-braintree://subscription/endpoint?[options]
--------------------------------------------
-
-[cols="<,<,<,<",options="header",]
-|=======================================================================
-|Endpoint |Shorthand Alias |Options |Result Body Type
-|cancel |  | id
-| com.braintreegateway.Result<com.braintreegateway.Subscription>
-
-|create |  |request
-|com.braintreegateway.Result<com.braintreegateway.Subscription>
-
-|delete |  |customerId, id
-|com.braintreegateway.Result<com.braintreegateway.Subscription>
-
-|find |  |id |com.braintreegateway.Subscription
-
-|retryCharge |  |subscriptionId, amount
-|com.braintreegateway.Result<com.braintreegateway.Transaction>
-
-|search |  |searchRequest
-|com.braintreegateway.ResourceCollection<com.braintreegateway.Subscription>
-
-|update |  |id, request
-|com.braintreegateway.Result<com.braintreegateway.Subscription>
-|=======================================================================
-
-[[Braintree-URIOptionsforsubscription]]
-URI Options for _subscription_
-
-[cols="<,<",options="header",]
-|==============================================================
-|Name |Type
-|id |String
-|request |com.braintreegateway.SubscriptionRequest
-|customerId |String
-|subscriptionId |String
-|amount |BigDecimal
-|searchRequest |com.braintreegateway.SubscriptionSearchRequest.
-|==============================================================
-
- 
-
-[[Braintree-Endpointprefixtransaction]]
-Endpoint prefix _transaction_
-+++++++++++++++++++++++++++++
-
-The following endpoints can be invoked with the prefix *transaction* as
-follows:
-
- 
-
-[source,java]
-------------------------------------------
-braintree://transaction/endpoint?[options]
-------------------------------------------
-
-[cols="<,<,<,<",options="header",]
-|=======================================================================
-|Endpoint |Shorthand Alias |Options |Result Body Type
-|cancelRelease |  |id
-|com.braintreegateway.Result<com.braintreegateway.Transaction>
-
-|cloneTransaction |  |id, cloneRequest
-|com.braintreegateway.Result<com.braintreegateway.Transaction>
-
-|credit |  |request
-|com.braintreegateway.Result<com.braintreegateway.Transaction>
-
-|find |  |id |com.braintreegateway.Transaction
-
-|holdInEscrow |  |id
-|com.braintreegateway.Result<com.braintreegateway.Transaction>
-
-|releaseFromEscrow |  |id
-|com.braintreegateway.Result<com.braintreegateway.Transaction>
-
-|refund |  |id, amount
-|com.braintreegateway.Result<com.braintreegateway.Transaction>
-
-|sale |  |request
-|com.braintreegateway.Result<com.braintreegateway.Transaction>
-
-|search |  |query
-|com.braintreegateway.ResourceCollection<com.braintreegateway.Transaction>
-
-|submitForPartialSettlement |  |id, amount
-|com.braintreegateway.Result<com.braintreegateway.Transaction>
-
-|submitForSettlement |  |id, amount, request
-|com.braintreegateway.Result<com.braintreegateway.Transaction>
-
-|voidTransaction |  |id
-|com.braintreegateway.Result<com.braintreegateway.Transaction>
-|=======================================================================
-
-[[Braintree-URIOptionsfortransaction]]
-URI Options for _transaction_
-
-[cols="<,<",options="header",]
-|==========================================================
-|Name |Type
-|id |String
-|request |com.braintreegateway.TransactionCloneRequest
-|cloneRequest |com.braintreegateway.TransactionCloneRequest
-|amount |BigDecimal
-|query |com.braintreegateway.TransactionSearchRequest
-|==========================================================
-
-[[Braintree-EndpointprefixwebhookNotification]]
-Endpoint prefix _webhookNotification_
-+++++++++++++++++++++++++++++++++++++
-
-The following endpoints can be invoked with the
-prefix *webhookNotification* as follows:
-
- 
-
-[source,java]
---------------------------------------------------
-braintree://webhookNotification/endpoint?[options]
---------------------------------------------------
-
-[cols="<,<,<,<",options="header",]
-|=======================================================================
-|Endpoint |Shorthand Alias |Options |Result Body Type
-|parse |  | signature, payload |com.braintreegateway.WebhookNotification
-|verify |  |challenge |String
-|=======================================================================
-
-[[Braintree-URIOptionsforwebhookNotification]]
-URI Options for _webhookNotification_
-
-[cols="<,<",options="header",]
-|=================
-|Name |Type
-|signature |String
-|payload |String
-|challenge |String
-|=================
-
- 
-
-[[Braintree-ConsumerEndpoints]]
-Consumer Endpoints
-^^^^^^^^^^^^^^^^^^
-
-Any of the producer endpoints can be used as a consumer endpoint.
-Consumer endpoints can
-use http://camel.apache.org/polling-consumer.html#PollingConsumer-ScheduledPollConsumerOptions[Scheduled
-Poll Consumer Options] with a *consumer.* prefix to schedule endpoint
-invocation. By default Consumer endpoints that return an array or
-collection will generate one exchange per element, and their routes will
-be executed once for each exchange. To change this behavior use the
-property *consumer.splitResults=true* to return a single exchange for
-the entire list or array. 
-
-[[Braintree-MessageHeaders]]
-Message Headers
-^^^^^^^^^^^^^^^
-
-Any URI option can be provided in a message header for producer
-endpoints with a *CamelBraintree.* prefix.
-
-[[Braintree-Messagebody]]
-Message body
-^^^^^^^^^^^^
-
-All result message bodies utilize objects provided by the Braintree Java
-SDK. Producer endpoints can specify the option name for incoming message
-body in the *inBody* endpoint parameter.
-
- 
-
- 
-
-[[Braintree-Examples]]
-Examples
-^^^^^^^^
-
-*Blueprint*
-
-[source,xml]
---------------------------------------------------------------------------------------------------------------------------------------------
-<?xml version="1.0"?>
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
-           xsi:schemaLocation="
-             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
-             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
-             http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
-
-
-    <cm:property-placeholder id="placeholder" persistent-id="camel.braintree">
-    </cm:property-placeholder>
-
-    <bean id="braintree" class="org.apache.camel.component.braintree.BraintreeComponent">
-        <property name="configuration">
-            <bean class="org.apache.camel.component.braintree.BraintreeConfiguration">
-                <property name="environment" value="${environment}"/>
-                <property name="merchantId" value="${merchantId}"/>
-                <property name="publicKey" value="${publicKey}"/>
-                <property name="privateKey" value="${privateKey}"/>
-            </bean>
-        </property>
-    </bean>
-
-    <camelContext trace="true" xmlns="http://camel.apache.org/schema/blueprint" id="braintree-example-context">
-        <route id="braintree-example-route">
-            <from uri="direct:generateClientToken"/>
-            <to uri="braintree://clientToken/generate"/>
-            <to uri="stream:out"/>
-        </route>
-    </camelContext>
-
-</blueprint>
---------------------------------------------------------------------------------------------------------------------------------------------
-
-[[Braintree-SeeAlso]]
-See Also
-^^^^^^^^
-
-*
-https://cwiki.apache.org/confluence/display/CAMEL/Configuring+Camel[Configuring
-Camel]
-* https://cwiki.apache.org/confluence/display/CAMEL/Component[Component]
-* https://cwiki.apache.org/confluence/display/CAMEL/Endpoint[Endpoint]
-*
-https://cwiki.apache.org/confluence/display/CAMEL/Getting+Started[Getting
-Started]
-
- 
-
-https://cwiki.apache.org/confluence/display/CAMEL/AMQP[ ]

http://git-wip-us.apache.org/repos/asf/camel/blob/9c0b7baf/components/camel-cache/src/main/docs/cache-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-cache/src/main/docs/cache-component.adoc b/components/camel-cache/src/main/docs/cache-component.adoc
new file mode 100644
index 0000000..71ab13c
--- /dev/null
+++ b/components/camel-cache/src/main/docs/cache-component.adoc
@@ -0,0 +1,497 @@
+[[Cache-CacheComponent]]
+Cache Component
+~~~~~~~~~~~~~~~
+
+*Available as of Camel 2.1*
+
+The *cache* component enables you to perform caching operations using
+EHCache as the Cache Implementation. The cache itself is created on
+demand or if a cache of that name already exists then it is simply
+utilized with its original settings.
+
+This component supports producer and event based consumer endpoints.
+
+The Cache consumer is an event based consumer and can be used to listen
+and respond to specific cache activities. If you need to perform
+selections from a pre-existing cache, use the processors defined for the
+cache component.
+
+Maven users will need to add the following dependency to their `pom.xml`
+for this component:
+
+[source,xml]
+------------------------------------------------------------
+<dependency>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>camel-cache</artifactId>
+    <version>x.x.x</version>
+    <!-- use the same version as your Camel core version -->
+</dependency>
+------------------------------------------------------------
+
+[[Cache-URIformat]]
+URI format
+^^^^^^^^^^
+
+[source,java]
+---------------------------
+cache://cacheName[?options]
+---------------------------
+
+You can append query options to the URI in the following format,
+`?option=value&option=#beanRef&...`
+
+[[Cache-Options]]
+Options
+^^^^^^^
+
+
+
+
+// component options: START
+The EHCache component supports 15 options which are listed below.
+
+
+
+{% raw %}
+[width="100%",cols="2s,1m,8",options="header"]
+|=======================================================================
+| Name | Java Type | Description
+| cacheManagerFactory | CacheManagerFactory | To use the given CacheManagerFactory for creating the CacheManager. By default the DefaultCacheManagerFactory is used.
+| configuration | CacheConfiguration | Sets the Cache configuration. Properties of the shared configuration can also be set individually.
+| configurationFile | String | Sets the location of the ehcache.xml file to load from classpath or file system. By default the file is loaded from classpath:ehcache.xml
+| cacheName | String | Name of the cache
+| maxElementsInMemory | int | The number of elements that may be stored in the defined cache in memory.
+| memoryStoreEvictionPolicy | MemoryStoreEvictionPolicy | Which eviction strategy to use when maximum number of elements in memory is reached. The strategy defines which elements to be removed. LRU - Lest Recently Used LFU - Lest Frequently Used FIFO - First In First Out
+| overflowToDisk | boolean | Specifies whether cache may overflow to disk
+| eternal | boolean | Sets whether elements are eternal. If eternal timeouts are ignored and the element never expires.
+| timeToLiveSeconds | long | The maximum time between creation time and when an element expires. Is used only if the element is not eternal
+| timeToIdleSeconds | long | The maximum amount of time between accesses before an element expires
+| diskPersistent | boolean | Whether the disk store persists between restarts of the application.
+| diskExpiryThreadIntervalSeconds | long | The number of seconds between runs of the disk expiry thread.
+| eventListenerRegistry | CacheEventListenerRegistry | To configure event listeners using the CacheEventListenerRegistry
+| cacheLoaderRegistry | CacheLoaderRegistry | To configure cache loader using the CacheLoaderRegistry
+| objectCache | boolean | Whether to turn on allowing to store non serializable objects in the cache. If this option is enabled then overflow to disk cannot be enabled as well.
+|=======================================================================
+{% endraw %}
+// component options: END
+
+
+
+
+
+// endpoint options: START
+The EHCache component supports 20 endpoint options which are listed below:
+
+{% raw %}
+[width="100%",cols="2s,1,1m,1m,5",options="header"]
+|=======================================================================
+| Name | Group | Default | Java Type | Description
+| cacheName | common |  | String | *Required* Name of the cache
+| diskExpiryThreadIntervalSeconds | common |  | long | The number of seconds between runs of the disk expiry thread.
+| diskPersistent | common | false | boolean | Whether the disk store persists between restarts of the application.
+| diskStorePath | common |  | String | This parameter is ignored. CacheManager sets it using setter injection.
+| eternal | common | false | boolean | Sets whether elements are eternal. If eternal timeouts are ignored and the element never expires.
+| key | common |  | String | The default key to use. If a key is provided in the message header then the key from the header takes precedence.
+| maxElementsInMemory | common | 1000 | int | The number of elements that may be stored in the defined cache in memory.
+| memoryStoreEvictionPolicy | common | LFU | MemoryStoreEvictionPolicy | Which eviction strategy to use when maximum number of elements in memory is reached. The strategy defines which elements to be removed. LRU - Lest Recently Used LFU - Lest Frequently Used FIFO - First In First Out
+| objectCache | common | false | boolean | Whether to turn on allowing to store non serializable objects in the cache. If this option is enabled then overflow to disk cannot be enabled as well.
+| operation | common |  | String | The default cache operation to use. If an operation in the message header then the operation from the header takes precedence.
+| overflowToDisk | common | true | boolean | Specifies whether cache may overflow to disk
+| timeToIdleSeconds | common | 300 | long | The maximum amount of time between accesses before an element expires
+| timeToLiveSeconds | common | 300 | long | The maximum time between creation time and when an element expires. Is used only if the element is not eternal
+| bridgeErrorHandler | consumer | false | boolean | 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/ERROR level and ignored.
+| exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
+| cacheLoaderRegistry | advanced |  | CacheLoaderRegistry | To configure cache loader using the CacheLoaderRegistry
+| cacheManagerFactory | advanced |  | CacheManagerFactory | To use a custom CacheManagerFactory for creating the CacheManager to be used by this endpoint. By default the CacheManagerFactory configured on the component is used.
+| eventListenerRegistry | advanced |  | CacheEventListenerRegistry | To configure event listeners using the CacheEventListenerRegistry
+| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange
+| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
+|=======================================================================
+{% endraw %}
+// endpoint options: END
+
+
+[[Cache-SendingReceivingMessagestofromthecache]]
+Sending/Receiving Messages to/from the cache
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+[[Cache-MessageHeadersuptoCamel2.7]]
+Message Headers up to Camel 2.7
++++++++++++++++++++++++++++++++
+
+[width="100%",cols="20%,80%",options="header",]
+|=======================================================================
+|Header |Description
+
+|`CACHE_OPERATION` |The operation to be performed on the cache. Valid options are
+
+* GET
+* CHECK
+* ADD
+* UPDATE
+* DELETE
+* DELETEALL +
+ `GET` and `CHECK` requires *Camel 2.3* onwards.
+
+|`CACHE_KEY` |The cache key used to store the Message in the cache. The cache key is
+optional if the CACHE_OPERATION is DELETEALL
+|=======================================================================
+[[Cache-MessageHeadersCamel2.8]]
+Message Headers Camel 2.8+
+++++++++++++++++++++++++++
+
+[Info]
+====
+Header changes in Camel 2.8
+
+The header names and supported values have changed to be prefixed with
+'CamelCache' and use mixed case. This makes them easier to identify and
+keep separate from other headers. The CacheConstants variable names
+remain unchanged, just their values have been changed. Also, these
+headers are now removed from the exchange after the cache operation is
+performed.
+
+====
+
+[width="100%",cols="20%,80%",options="header",]
+|=======================================================================
+|Header |Description
+
+|`CamelCacheOperation` |The operation to be performed on the cache. The valid options are
+
+* CamelCacheGet
+* CamelCacheCheck
+* CamelCacheAdd
+* CamelCacheUpdate
+* CamelCacheDelete
+* CamelCacheDeleteAll
+
+|`CamelCacheKey` |The cache key used to store the Message in the cache. The cache key is
+optional if the CamelCacheOperation is CamelCacheDeleteAll
+|=======================================================================
+
+The `CamelCacheAdd` and `CamelCacheUpdate` operations support additional
+headers:
+
+[width="100%",cols="10%,10%,80%",options="header",]
+|=======================================================================
+|Header |Type |Description
+
+|`CamelCacheTimeToLive` |`Integer` |*Camel 2.11:* Time to live in seconds.
+
+|`CamelCacheTimeToIdle` |`Integer` |*Camel 2.11:* Time to idle in seconds.
+
+|`CamelCacheEternal` |`Boolean` |*Camel 2.11:* Whether the content is eternal.
+|=======================================================================
+
+[[Cache-CacheProducer]]
+Cache Producer
+++++++++++++++
+
+Sending data to the cache involves the ability to direct payloads in
+exchanges to be stored in a pre-existing or created-on-demand cache. The
+mechanics of doing this involve
+
+* setting the Message Exchange Headers shown above.
+* ensuring that the Message Exchange Body contains the message directed
+to the cache
+
+[[Cache-CacheConsumer]]
+Cache Consumer
+++++++++++++++
+
+Receiving data from the cache involves the ability of the CacheConsumer
+to listen on a pre-existing or created-on-demand Cache using an event
+Listener and receive automatic notifications when any cache activity
+take place (i.e
+CamelCacheGet/CamelCacheUpdate/CamelCacheDelete/CamelCacheDeleteAll).
+Upon such an activity taking place
+
+* an exchange containing Message Exchange Headers and a Message Exchange
+Body containing the just added/updated payload is placed and sent.
+* in case of a CamelCacheDeleteAll operation, the Message Exchange
+Header CamelCacheKey and the Message Exchange Body are not populated.
+
+[[Cache-CacheProcessors]]
+Cache Processors
+++++++++++++++++
+
+There are a set of nice processors with the ability to perform cache
+lookups and selectively replace payload content at the
+
+* body
+* token
+* xpath level
+
+[[Cache-CacheUsageSamples]]
+Cache Usage Samples
+^^^^^^^^^^^^^^^^^^^
+
+[[Cache-Example1:Configuringthecache]]
+Example 1: Configuring the cache
+++++++++++++++++++++++++++++++++
+
+[source,java]
+-------------------------------------------------
+from("cache://MyApplicationCache" +
+          "?maxElementsInMemory=1000" +
+          "&memoryStoreEvictionPolicy=" +
+              "MemoryStoreEvictionPolicy.LFU" +
+          "&overflowToDisk=true" +
+          "&eternal=true" +
+          "&timeToLiveSeconds=300" +
+          "&timeToIdleSeconds=true" +
+          "&diskPersistent=true" +
+          "&diskExpiryThreadIntervalSeconds=300")
+-------------------------------------------------
+
+[[Cache-Example2:Addingkeystothecache]]
+Example 2: Adding keys to the cache
++++++++++++++++++++++++++++++++++++
+
+[source,java]
+---------------------------------------------------------------------------------------------
+RouteBuilder builder = new RouteBuilder() {
+    public void configure() {
+     from("direct:start")
+     .setHeader(CacheConstants.CACHE_OPERATION, constant(CacheConstants.CACHE_OPERATION_ADD))
+     .setHeader(CacheConstants.CACHE_KEY, constant("Ralph_Waldo_Emerson"))
+     .to("cache://TestCache1")
+   }
+};
+---------------------------------------------------------------------------------------------
+
+[[Cache-Example2:Updatingexistingkeysinacache]]
+Example 2: Updating existing keys in a cache
+++++++++++++++++++++++++++++++++++++++++++++
+
+[source,java]
+------------------------------------------------------------------------------------------------
+RouteBuilder builder = new RouteBuilder() {
+    public void configure() {
+     from("direct:start")
+     .setHeader(CacheConstants.CACHE_OPERATION, constant(CacheConstants.CACHE_OPERATION_UPDATE))
+     .setHeader(CacheConstants.CACHE_KEY, constant("Ralph_Waldo_Emerson"))
+     .to("cache://TestCache1")
+   }
+};
+------------------------------------------------------------------------------------------------
+
+[[Cache-Example3:Deletingexistingkeysinacache]]
+Example 3: Deleting existing keys in a cache
+++++++++++++++++++++++++++++++++++++++++++++
+
+[source,java]
+--------------------------------------------------------------------------------------
+RouteBuilder builder = new RouteBuilder() {
+    public void configure() {
+     from("direct:start")
+     .setHeader(CacheConstants.CACHE_OPERATION, constant(CacheConstants.CACHE_DELETE))
+     .setHeader(CacheConstants.CACHE_KEY", constant("Ralph_Waldo_Emerson"))
+     .to("cache://TestCache1")
+   }
+};
+--------------------------------------------------------------------------------------
+
+[[Cache-Example4:Deletingallexistingkeysinacache]]
+Example 4: Deleting all existing keys in a cache
+++++++++++++++++++++++++++++++++++++++++++++++++
+
+[source,java]
+-----------------------------------------------------------------------------------------
+RouteBuilder builder = new RouteBuilder() {
+    public void configure() {
+     from("direct:start")
+     .setHeader(CacheConstants.CACHE_OPERATION, constant(CacheConstants.CACHE_DELETEALL))
+     .to("cache://TestCache1");
+    }
+};
+-----------------------------------------------------------------------------------------
+
+[[Cache-Example5:NotifyinganychangesregisteringinaCachetoProcessorsandotherProducers]]
+Example 5: Notifying any changes registering in a Cache to Processors and other Producers
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+[source,java]
+--------------------------------------------------------------------------------------------------
+RouteBuilder builder = new RouteBuilder() {
+    public void configure() {
+     from("cache://TestCache1")
+     .process(new Processor() {
+        public void process(Exchange exchange)
+               throws Exception {
+           String operation = (String) exchange.getIn().getHeader(CacheConstants.CACHE_OPERATION);
+           String key = (String) exchange.getIn().getHeader(CacheConstants.CACHE_KEY);
+           Object body = exchange.getIn().getBody();
+           // Do something
+        }
+     })
+   }
+};
+--------------------------------------------------------------------------------------------------
+
+[[Cache-Example6:UsingProcessorstoselectivelyreplacepayloadwithcachevalues]]
+Example 6: Using Processors to selectively replace payload with cache values
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+[source,java]
+---------------------------------------------------------------------------------------
+RouteBuilder builder = new RouteBuilder() {
+   public void configure() {
+     //Message Body Replacer
+     from("cache://TestCache1")
+     .filter(header(CacheConstants.CACHE_KEY).isEqualTo("greeting"))
+     .process(new CacheBasedMessageBodyReplacer("cache://TestCache1","farewell"))
+     .to("direct:next");
+
+    //Message Token replacer
+    from("cache://TestCache1")
+    .filter(header(CacheConstants.CACHE_KEY).isEqualTo("quote"))
+    .process(new CacheBasedTokenReplacer("cache://TestCache1","novel","#novel#"))
+    .process(new CacheBasedTokenReplacer("cache://TestCache1","author","#author#"))
+    .process(new CacheBasedTokenReplacer("cache://TestCache1","number","#number#"))
+    .to("direct:next");
+
+    //Message XPath replacer
+    from("cache://TestCache1").
+    .filter(header(CacheConstants.CACHE_KEY).isEqualTo("XML_FRAGMENT"))
+    .process(new CacheBasedXPathReplacer("cache://TestCache1","book1","/books/book1"))
+    .process (new CacheBasedXPathReplacer("cache://TestCache1","book2","/books/book2"))
+    .to("direct:next");
+   }
+};
+---------------------------------------------------------------------------------------
+
+[[Cache-Example7:GettinganentryfromtheCache]]
+Example 7: Getting an entry from the Cache
+++++++++++++++++++++++++++++++++++++++++++
+
+[source,java]
+------------------------------------------------------------------------------------------------
+from("direct:start")
+    // Prepare headers
+    .setHeader(CacheConstants.CACHE_OPERATION, constant(CacheConstants.CACHE_OPERATION_GET))
+    .setHeader(CacheConstants.CACHE_KEY, constant("Ralph_Waldo_Emerson")).
+    .to("cache://TestCache1").
+    // Check if entry was not found
+    .choice().when(header(CacheConstants.CACHE_ELEMENT_WAS_FOUND).isNull()).
+        // If not found, get the payload and put it to cache
+        .to("cxf:bean:someHeavyweightOperation").
+        .setHeader(CacheConstants.CACHE_OPERATION, constant(CacheConstants.CACHE_OPERATION_ADD))
+        .setHeader(CacheConstants.CACHE_KEY, constant("Ralph_Waldo_Emerson"))
+        .to("cache://TestCache1")
+    .end()
+    .to("direct:nextPhase");
+------------------------------------------------------------------------------------------------
+
+[[Cache-Example8:CheckingforanentryintheCache]]
+Example 8: Checking for an entry in the Cache
++++++++++++++++++++++++++++++++++++++++++++++
+
+Note: The CHECK command tests existence of an entry in the cache but
+doesn't place a message in the body.
+
+[source,java]
+------------------------------------------------------------------------------------------------
+from("direct:start")
+    // Prepare headers
+    .setHeader(CacheConstants.CACHE_OPERATION, constant(CacheConstants.CACHE_OPERATION_CHECK))
+    .setHeader(CacheConstants.CACHE_KEY, constant("Ralph_Waldo_Emerson")).
+    .to("cache://TestCache1").
+    // Check if entry was not found
+    .choice().when(header(CacheConstants.CACHE_ELEMENT_WAS_FOUND).isNull()).
+        // If not found, get the payload and put it to cache
+        .to("cxf:bean:someHeavyweightOperation").
+        .setHeader(CacheConstants.CACHE_OPERATION, constant(CacheConstants.CACHE_OPERATION_ADD))
+        .setHeader(CacheConstants.CACHE_KEY, constant("Ralph_Waldo_Emerson"))
+        .to("cache://TestCache1")
+    .end();
+------------------------------------------------------------------------------------------------
+
+[[Cache-ManagementofEHCache]]
+Management of EHCache
+^^^^^^^^^^^^^^^^^^^^^
+
+http://ehcache.org/[EHCache] has its own statistics and management from
+link:camel-jmx.html[JMX].
+
+Here's a snippet on how to expose them via JMX in a Spring application
+context:
+
+[source,xml]
+-----------------------------------------------------------------------------------------------------------------------------
+<bean id="ehCacheManagementService" class="net.sf.ehcache.management.ManagementService" init-method="init" lazy-init="false">
+  <constructor-arg>
+    <bean class="net.sf.ehcache.CacheManager" factory-method="getInstance"/>
+  </constructor-arg>
+  <constructor-arg>
+    <bean class="org.springframework.jmx.support.JmxUtils" factory-method="locateMBeanServer"/>
+  </constructor-arg>
+  <constructor-arg value="true"/>
+  <constructor-arg value="true"/>
+  <constructor-arg value="true"/>
+  <constructor-arg value="true"/>
+</bean>
+-----------------------------------------------------------------------------------------------------------------------------
+
+Of course you can do the same thing in straight Java:
+
+[source,java]
+--------------------------------------------------------------------------------------------------
+ManagementService.registerMBeans(CacheManager.getInstance(), mbeanServer, true, true, true, true);
+--------------------------------------------------------------------------------------------------
+
+You can get cache hits, misses, in-memory hits, disk hits, size stats
+this way. You can also change CacheConfiguration parameters on the fly.
+
+[[Cache-CachereplicationCamel2.8]]
+Cache replication Camel 2.8
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The Camel Cache component is able to distribute a cache across server
+nodes using several different replication mechanisms including: RMI,
+JGroups, JMS and Cache Server.
+
+There are two different ways to make it work:
+
+*1.* You can configure `ehcache.xml` manually
+
+OR
+
+*2.* You can configure these three options:
+
+* cacheManagerFactory
+* eventListenerRegistry
+* cacheLoaderRegistry
+
+Configuring Camel Cache replication using the first option is a bit of
+hard work as you have to configure all caches separately. So in a
+situation when the all names of caches are not known, using
+`ehcache.xml` is not a good idea.
+
+The second option is much better when you want to use many different
+caches as you do not need to define options per cache. This is because
+replication options are set per `CacheManager` and per `CacheEndpoint`.
+Also it is the only way when cache names are not know at the development
+phase.
+
+[Note]
+====
+
+
+It might be useful to read the http://ehcache.org/documentation[EHCache
+manual] to get a better understanding of the Camel Cache replication
+mechanism.
+
+====
+
+[[Cache-Example:JMScachereplication]]
+Example: JMS cache replication
+++++++++++++++++++++++++++++++
+
+JMS replication is the most powerful and secured replication method.
+Used together with Camel Cache replication makes it also rather
+simple. An example is available on link:cachereplicationjmsexample.html[a
+separate page].
+


Mime
View raw message