This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 4dcd32d CAMEL-15549: Polished 4dcd32d is described below commit 4dcd32de96893dcd1779d65db3162000a48fd164 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Mon Sep 21 10:26:34 2020 +0200 CAMEL-15549: Polished --- .../camel/catalog/docs/braintree-component.adoc | 61 +++------------------- .../camel/component/braintree/braintree.json | 2 +- .../src/main/docs/braintree-component.adoc | 61 +++------------------- .../braintree/BraintreeConfiguration.java | 5 +- .../builder/endpoint/StaticEndpointBuilders.java | 14 +++++ .../dsl/BraintreeEndpointBuilderFactory.java | 16 ++++++ .../modules/ROOT/pages/braintree-component.adoc | 61 +++------------------- 7 files changed, 59 insertions(+), 161 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/braintree-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/braintree-component.adoc index d467ef4..0670e62 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/braintree-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/braintree-component.adoc @@ -77,7 +77,7 @@ with the following path and query parameters: |=== | Name | Description | Default | Type | *apiName* | *Required* What kind of operation to perform. There are 17 enums and the value can be one of: ADD_ON, ADDRESS, CLIENT_TOKEN, CREDIT_CARD_VERIFICATION, CUSTOMER, DISCOUNT, DISPUTE, DOCUMENT_UPLOAD, MERCHANT_ACCOUNT, PAYMENT_METHOD, PAYMENT_METHOD_NONCE, PLAN, REPORT, SETTLEMENT_BATCH_SUMMARY, SUBSCRIPTION, TRANSACTION, WEBHOOK_NOTIFICATION | | BraintreeApiName -| *methodName* | *Required* What sub operation to use for the selected operation | | String +| *methodName* | *Required* What sub operation to use for the selected operation. There are 31 enums and the value can be one of: accept, addFileEvidence, addTextEvidence, cancel, cancelRelease, cloneTransaction, create, createForCurrency, credit, delete, fetchMerchantAccounts, finalize, find, generate, grant, holdInEscrow, parse, refund, releaseFromEscrow, removeEvidence, retryCharge, revoke, sale, search, submitForPartialSettlement, submitForSettlement, transactionLevelFees, update, up [...] |=== @@ -1064,62 +1064,12 @@ The `inBody` parameter overrides message header, i.e. the endpoint parameter `in would override a `CamelBraintree.myParameterNameHere` header. // endpoint options: END -== 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] - - -== 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] 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 *splitResults=true* to return a single exchange for -the entire list or array. - -== Message Headers - -Any URI option can be provided in a message header for producer -endpoints with a *CamelBraintree.* prefix. - -== 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. - - - - - == 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" @@ -1152,7 +1102,12 @@ body in the *inBody* endpoint parameter. </camelContext> </blueprint> --------------------------------------------------------------------------------------------------------------------------------------------- +---- + +== More Information + +For more information on the endpoints and options see Braintree +references at https://developers.braintreepayments.com/reference/overview[https://developers.braintreepayments.com/reference/overview] include::camel-spring-boot::page$braintree-starter.adoc[] diff --git a/components/camel-braintree/src/generated/resources/org/apache/camel/component/braintree/braintree.json b/components/camel-braintree/src/generated/resources/org/apache/camel/component/braintree/braintree.json index 34a9327..3cb92a3 100644 --- a/components/camel-braintree/src/generated/resources/org/apache/camel/component/braintree/braintree.json +++ b/components/camel-braintree/src/generated/resources/org/apache/camel/component/braintree/braintree.json @@ -29,7 +29,7 @@ }, "properties": { "apiName": { "kind": "path", "displayName": "Api Name", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.braintree.internal.BraintreeApiName", "enum": [ "ADD_ON", "ADDRESS", "CLIENT_TOKEN", "CREDIT_CARD_VERIFICATION", "CUSTOMER", "DISCOUNT", "DISPUTE", "DOCUMENT_UPLOAD", "MERCHANT_ACCOUNT", "PAYMENT_METHOD", "PAYMENT_METHOD_NONCE", "PLAN", "REPORT", "SETTLEMENT_BATCH_SUMMARY", "SUBSCRIPTION", "TRANSACTION", "WEBHOOK_NOTIFIC [...] - "methodName": { "kind": "path", "displayName": "Method Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "What sub operation to use for the selected operation" }, + "methodName": { "kind": "path", "displayName": "Method Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "enum": [ "accept", "addFileEvidence", "addTextEvidence", "cancel", "cancelRelease", "cloneTransaction", "create", "createForCurrency", "credit", "delete", "fetchMerchantAccounts", "finalize", "find", "generate", "grant", "holdInEscrow", "parse", "refund", "releaseFromEscrow", "removeEvidence", "retryCharge", "revoke", "sa [...] "environment": { "kind": "parameter", "displayName": "Environment", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "The environment Either SANDBOX or PRODUCTION" }, "inBody": { "kind": "parameter", "displayName": "In Body", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Sets the name of a parameter to be passed in the exchange In Body" }, "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "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 [...] diff --git a/components/camel-braintree/src/main/docs/braintree-component.adoc b/components/camel-braintree/src/main/docs/braintree-component.adoc index d467ef4..0670e62 100644 --- a/components/camel-braintree/src/main/docs/braintree-component.adoc +++ b/components/camel-braintree/src/main/docs/braintree-component.adoc @@ -77,7 +77,7 @@ with the following path and query parameters: |=== | Name | Description | Default | Type | *apiName* | *Required* What kind of operation to perform. There are 17 enums and the value can be one of: ADD_ON, ADDRESS, CLIENT_TOKEN, CREDIT_CARD_VERIFICATION, CUSTOMER, DISCOUNT, DISPUTE, DOCUMENT_UPLOAD, MERCHANT_ACCOUNT, PAYMENT_METHOD, PAYMENT_METHOD_NONCE, PLAN, REPORT, SETTLEMENT_BATCH_SUMMARY, SUBSCRIPTION, TRANSACTION, WEBHOOK_NOTIFICATION | | BraintreeApiName -| *methodName* | *Required* What sub operation to use for the selected operation | | String +| *methodName* | *Required* What sub operation to use for the selected operation. There are 31 enums and the value can be one of: accept, addFileEvidence, addTextEvidence, cancel, cancelRelease, cloneTransaction, create, createForCurrency, credit, delete, fetchMerchantAccounts, finalize, find, generate, grant, holdInEscrow, parse, refund, releaseFromEscrow, removeEvidence, retryCharge, revoke, sale, search, submitForPartialSettlement, submitForSettlement, transactionLevelFees, update, up [...] |=== @@ -1064,62 +1064,12 @@ The `inBody` parameter overrides message header, i.e. the endpoint parameter `in would override a `CamelBraintree.myParameterNameHere` header. // endpoint options: END -== 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] - - -== 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] 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 *splitResults=true* to return a single exchange for -the entire list or array. - -== Message Headers - -Any URI option can be provided in a message header for producer -endpoints with a *CamelBraintree.* prefix. - -== 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. - - - - - == 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" @@ -1152,7 +1102,12 @@ body in the *inBody* endpoint parameter. </camelContext> </blueprint> --------------------------------------------------------------------------------------------------------------------------------------------- +---- + +== More Information + +For more information on the endpoints and options see Braintree +references at https://developers.braintreepayments.com/reference/overview[https://developers.braintreepayments.com/reference/overview] include::camel-spring-boot::page$braintree-starter.adoc[] diff --git a/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeConfiguration.java b/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeConfiguration.java index d94b970..0e1ab84 100644 --- a/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeConfiguration.java +++ b/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeConfiguration.java @@ -46,7 +46,10 @@ public class BraintreeConfiguration { @UriPath @Metadata(required = true) private BraintreeApiName apiName; - @UriPath + @UriPath(enums = "accept,addFileEvidence,addTextEvidence,cancel,cancelRelease,cloneTransaction,create,createForCurrency" + + ",credit,delete,fetchMerchantAccounts,finalize,find,generate,grant,holdInEscrow,parse,refund,releaseFromEscrow" + + ",removeEvidence,retryCharge,revoke,sale,search,submitForPartialSettlement,submitForSettlement,transactionLevelFees" + + ",update,updateDetails,verify,voidTransaction") @Metadata(required = true) private String methodName; @UriParam diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java index 997964f..3a8a9b6 100644 --- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java +++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java @@ -2959,6 +2959,13 @@ public class StaticEndpointBuilders { * * Path parameter: methodName (required) * What sub operation to use for the selected operation + * There are 31 enums and the value can be one of: accept, addFileEvidence, + * addTextEvidence, cancel, cancelRelease, cloneTransaction, create, + * createForCurrency, credit, delete, fetchMerchantAccounts, finalize, find, + * generate, grant, holdInEscrow, parse, refund, releaseFromEscrow, + * removeEvidence, retryCharge, revoke, sale, search, + * submitForPartialSettlement, submitForSettlement, transactionLevelFees, + * update, updateDetails, verify, voidTransaction * * @param path apiName/methodName */ @@ -2986,6 +2993,13 @@ public class StaticEndpointBuilders { * * Path parameter: methodName (required) * What sub operation to use for the selected operation + * There are 31 enums and the value can be one of: accept, addFileEvidence, + * addTextEvidence, cancel, cancelRelease, cloneTransaction, create, + * createForCurrency, credit, delete, fetchMerchantAccounts, finalize, find, + * generate, grant, holdInEscrow, parse, refund, releaseFromEscrow, + * removeEvidence, retryCharge, revoke, sale, search, + * submitForPartialSettlement, submitForSettlement, transactionLevelFees, + * update, updateDetails, verify, voidTransaction * * @param componentName to use a custom component name for the endpoint * instead of the default name diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/BraintreeEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/BraintreeEndpointBuilderFactory.java index 9b70c39..1de532e 100644 --- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/BraintreeEndpointBuilderFactory.java +++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/BraintreeEndpointBuilderFactory.java @@ -349,6 +349,14 @@ public interface BraintreeEndpointBuilderFactory { * * Path parameter: methodName (required) * What sub operation to use for the selected operation + * There are 31 enums and the value can be one of: accept, + * addFileEvidence, addTextEvidence, cancel, cancelRelease, + * cloneTransaction, create, createForCurrency, credit, delete, + * fetchMerchantAccounts, finalize, find, generate, grant, holdInEscrow, + * parse, refund, releaseFromEscrow, removeEvidence, retryCharge, + * revoke, sale, search, submitForPartialSettlement, + * submitForSettlement, transactionLevelFees, update, updateDetails, + * verify, voidTransaction * * @param path apiName/methodName */ @@ -375,6 +383,14 @@ public interface BraintreeEndpointBuilderFactory { * * Path parameter: methodName (required) * What sub operation to use for the selected operation + * There are 31 enums and the value can be one of: accept, + * addFileEvidence, addTextEvidence, cancel, cancelRelease, + * cloneTransaction, create, createForCurrency, credit, delete, + * fetchMerchantAccounts, finalize, find, generate, grant, holdInEscrow, + * parse, refund, releaseFromEscrow, removeEvidence, retryCharge, + * revoke, sale, search, submitForPartialSettlement, + * submitForSettlement, transactionLevelFees, update, updateDetails, + * verify, voidTransaction * * @param componentName to use a custom component name for the endpoint * instead of the default name diff --git a/docs/components/modules/ROOT/pages/braintree-component.adoc b/docs/components/modules/ROOT/pages/braintree-component.adoc index c2c7349..f48f7c6 100644 --- a/docs/components/modules/ROOT/pages/braintree-component.adoc +++ b/docs/components/modules/ROOT/pages/braintree-component.adoc @@ -79,7 +79,7 @@ with the following path and query parameters: |=== | Name | Description | Default | Type | *apiName* | *Required* What kind of operation to perform. There are 17 enums and the value can be one of: ADD_ON, ADDRESS, CLIENT_TOKEN, CREDIT_CARD_VERIFICATION, CUSTOMER, DISCOUNT, DISPUTE, DOCUMENT_UPLOAD, MERCHANT_ACCOUNT, PAYMENT_METHOD, PAYMENT_METHOD_NONCE, PLAN, REPORT, SETTLEMENT_BATCH_SUMMARY, SUBSCRIPTION, TRANSACTION, WEBHOOK_NOTIFICATION | | BraintreeApiName -| *methodName* | *Required* What sub operation to use for the selected operation | | String +| *methodName* | *Required* What sub operation to use for the selected operation. There are 31 enums and the value can be one of: accept, addFileEvidence, addTextEvidence, cancel, cancelRelease, cloneTransaction, create, createForCurrency, credit, delete, fetchMerchantAccounts, finalize, find, generate, grant, holdInEscrow, parse, refund, releaseFromEscrow, removeEvidence, retryCharge, revoke, sale, search, submitForPartialSettlement, submitForSettlement, transactionLevelFees, update, up [...] |=== @@ -1066,62 +1066,12 @@ The `inBody` parameter overrides message header, i.e. the endpoint parameter `in would override a `CamelBraintree.myParameterNameHere` header. // endpoint options: END -== 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] - - -== 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] 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 *splitResults=true* to return a single exchange for -the entire list or array. - -== Message Headers - -Any URI option can be provided in a message header for producer -endpoints with a *CamelBraintree.* prefix. - -== 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. - - - - - == 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" @@ -1154,7 +1104,12 @@ body in the *inBody* endpoint parameter. </camelContext> </blueprint> --------------------------------------------------------------------------------------------------------------------------------------------- +---- + +== More Information + +For more information on the endpoints and options see Braintree +references at https://developers.braintreepayments.com/reference/overview[https://developers.braintreepayments.com/reference/overview] include::camel-spring-boot::page$braintree-starter.adoc[]