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
commit 7b38974703f0aa15c88fbcd7871596a533f8cb4f Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri Feb 14 15:22:40 2020 +0100 CAMEL-14565: Add docs for missing option --- .../braintree/BraintreeEndpointConfigurer.java | 22 ++++++++------- .../camel/component/braintree/braintree.json | 21 +++++++------- .../src/main/docs/braintree-component.adoc | 15 +++++----- .../component/braintree/BraintreeComponent.java | 6 +++- .../braintree/BraintreeConfiguration.java | 32 +++++++--------------- .../dsl/BraintreeComponentBuilderFactory.java | 2 +- 6 files changed, 47 insertions(+), 51 deletions(-) diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/BraintreeEndpointConfigurer.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/BraintreeEndpointConfigurer.java index dd426b3..54a1ea7 100644 --- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/BraintreeEndpointConfigurer.java +++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/BraintreeEndpointConfigurer.java @@ -20,10 +20,6 @@ public class BraintreeEndpointConfigurer extends PropertyConfigurerSupport imple case "inBody": target.setInBody(property(camelContext, java.lang.String.class, value)); return true; case "merchantid": case "merchantId": target.getConfiguration().setMerchantId(property(camelContext, java.lang.String.class, value)); return true; - case "privatekey": - case "privateKey": target.getConfiguration().setPrivateKey(property(camelContext, java.lang.String.class, value)); return true; - case "publickey": - case "publicKey": target.getConfiguration().setPublicKey(property(camelContext, java.lang.String.class, value)); return true; case "bridgeerrorhandler": case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true; case "sendemptymessagewhenidle": @@ -36,17 +32,11 @@ public class BraintreeEndpointConfigurer extends PropertyConfigurerSupport imple case "pollStrategy": target.setPollStrategy(property(camelContext, org.apache.camel.spi.PollingConsumerPollStrategy.class, value)); return true; case "lazystartproducer": case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true; - case "accesstoken": - case "accessToken": target.getConfiguration().setAccessToken(property(camelContext, java.lang.String.class, value)); return true; case "basicpropertybinding": case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true; case "httpreadtimeout": case "httpReadTimeout": target.getConfiguration().setHttpReadTimeout(property(camelContext, java.lang.Integer.class, value)); return true; case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true; - case "httploglevel": - case "httpLogLevel": target.getConfiguration().setHttpLogLevel(property(camelContext, java.lang.String.class, value)); return true; - case "loghandlerenabled": - case "logHandlerEnabled": target.getConfiguration().setLogHandlerEnabled(property(camelContext, boolean.class, value)); return true; case "backofferrorthreshold": case "backoffErrorThreshold": target.setBackoffErrorThreshold(property(camelContext, int.class, value)); return true; case "backoffidlethreshold": @@ -72,10 +62,22 @@ public class BraintreeEndpointConfigurer extends PropertyConfigurerSupport imple case "timeUnit": target.setTimeUnit(property(camelContext, java.util.concurrent.TimeUnit.class, value)); return true; case "usefixeddelay": case "useFixedDelay": target.setUseFixedDelay(property(camelContext, boolean.class, value)); return true; + case "httploglevel": + case "httpLogLevel": target.getConfiguration().setHttpLogLevel(property(camelContext, java.lang.String.class, value)); return true; + case "httplogname": + case "httpLogName": target.getConfiguration().setHttpLogName(property(camelContext, java.lang.String.class, value)); return true; + case "loghandlerenabled": + case "logHandlerEnabled": target.getConfiguration().setLogHandlerEnabled(property(camelContext, boolean.class, value)); return true; case "proxyhost": case "proxyHost": target.getConfiguration().setProxyHost(property(camelContext, java.lang.String.class, value)); return true; case "proxyport": case "proxyPort": target.getConfiguration().setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true; + case "accesstoken": + case "accessToken": target.getConfiguration().setAccessToken(property(camelContext, java.lang.String.class, value)); return true; + case "privatekey": + case "privateKey": target.getConfiguration().setPrivateKey(property(camelContext, java.lang.String.class, value)); return true; + case "publickey": + case "publicKey": target.getConfiguration().setPublicKey(property(camelContext, java.lang.String.class, value)); return true; default: return false; } } 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 4c95996..3088e47 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 @@ -19,11 +19,11 @@ "version": "3.1.0-SNAPSHOT" }, "componentProperties": { - "configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.component.braintree.BraintreeConfiguration", "deprecated": false, "secret": false, "description": "To use the shared configuration" }, + "configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.braintree.BraintreeConfiguration", "deprecated": false, "secret": false, "description": "To use the shared configuration" }, "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "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 [...] "lazyStartProducer": { "kind": "property", "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 r [...] "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }, - "logHandlerEnabled": { "kind": "property", "displayName": "Log Handler Enabled", "group": "logging", "label": "advanced,logging", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "description": "Sets whether to enable the BraintreeLogHandler. It may be desirable to set this to 'false' where an existing JUL - SLF4J logger bridge is on the classpath." } + "logHandlerEnabled": { "kind": "property", "displayName": "Log Handler Enabled", "group": "logging", "label": "advanced,logging", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "description": "Sets whether to enable the BraintreeLogHandler. It may be desirable to set this to false where an existing JUL - SLF4J logger bridge is on the classpath." } }, "properties": { "apiName": { "kind": "path", "displayName": "Api Name", "group": "common", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.braintree.internal.BraintreeApiName", "enum": [ "ADDON", "ADDRESS", "CLIENTTOKEN", "CREDITCARDVERIFICATION", "CUSTOMER", "DISCOUNT", "DISPUTE", "DOCUMENTUPLOAD", "MERCHANTACCOUNT", "PAYMENTMETHOD", "PAYMENTMETHODNONCE", "PLAN", "REPORT", "SETTLEMENTBATCHSUMMARY", "SUBSCRIPTION", "TRANSACTION", "WEBHOOKNOTIFICATION" ], "dep [...] @@ -31,20 +31,15 @@ "environment": { "kind": "parameter", "displayName": "Environment", "group": "common", "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": "common", "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" }, "merchantId": { "kind": "parameter", "displayName": "Merchant Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "The merchant id provided by Braintree." }, - "privateKey": { "kind": "parameter", "displayName": "Private Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "The private key provided by Braintree." }, - "publicKey": { "kind": "parameter", "displayName": "Public Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "The public key provided by Braintree." }, "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "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 b [...] "sendEmptyMessageWhenIdle": { "kind": "parameter", "displayName": "Send Empty Message When Idle", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead." }, "exceptionHandler": { "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with [...] "exchangePattern": { "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut", "InOptionalOut" ], "deprecated": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." }, "pollStrategy": { "kind": "parameter", "displayName": "Poll Strategy", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.PollingConsumerPollStrategy", "deprecated": false, "secret": false, "description": "A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange h [...] "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 [...] - "accessToken": { "kind": "parameter", "displayName": "Access Token", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "The access token granted by a merchant to another in order to process transactions on their behalf. Used in [...] "basicPropertyBinding": { "kind": "parameter", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }, - "httpReadTimeout": { "kind": "parameter", "displayName": "Http Read Timeout", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "Set read timeout for http calls." }, + "httpReadTimeout": { "kind": "parameter", "displayName": "Http Read Timeout", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "Set read timeout for http calls." }, "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." }, - "httpLogLevel": { "kind": "parameter", "displayName": "Http Log Level", "group": "logging", "label": "advanced,logging", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "Set logging level for http calls, see java.util.logging.Level" }, - "logHandlerEnabled": { "kind": "parameter", "displayName": "Log Handler Enabled", "group": "logging", "label": "advanced,logging", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "Sets whether to enable the BraintreeLogHandler. It may be desirable to [...] "backoffErrorThreshold": { "kind": "parameter", "displayName": "Backoff Error Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "secret": false, "description": "The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in." }, "backoffIdleThreshold": { "kind": "parameter", "displayName": "Backoff Idle Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "secret": false, "description": "The number of subsequent idle polls that should happen before the backoffMultipler should kick-in." }, "backoffMultiplier": { "kind": "parameter", "displayName": "Backoff Multiplier", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "secret": false, "description": "To let the scheduled polling consumer backoff if there has been a number of subsequent idles\/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option [...] @@ -59,7 +54,13 @@ "startScheduler": { "kind": "parameter", "displayName": "Start Scheduler", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "description": "Whether the scheduler should be auto started." }, "timeUnit": { "kind": "parameter", "displayName": "Time Unit", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "object", "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ], "deprecated": false, "secret": false, "defaultValue": "MILLISECONDS", "description": "Time unit for initialDelay and delay options." }, "useFixedDelay": { "kind": "parameter", "displayName": "Use Fixed Delay", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "description": "Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details." }, - "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "The proxy host" }, - "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "The proxy port" } + "httpLogLevel": { "kind": "parameter", "displayName": "Http Log Level", "group": "logging", "label": "logging", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "Set logging level for http calls, see java.util.logging.Level" }, + "httpLogName": { "kind": "parameter", "displayName": "Http Log Name", "group": "logging", "label": "logging", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "Braintree", "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "Set log category to use to log http calls." }, + "logHandlerEnabled": { "kind": "parameter", "displayName": "Log Handler Enabled", "group": "logging", "label": "logging", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "Sets whether to enable the BraintreeLogHandler. It may be desirable to set this to 'false' where an exi [...] + "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "The proxy host" }, + "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "The proxy port" }, + "accessToken": { "kind": "parameter", "displayName": "Access Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "The access token granted by a merchant to another in order to process transactions on their behalf. Used in place of environment, m [...] + "privateKey": { "kind": "parameter", "displayName": "Private Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "The private key provided by Braintree." }, + "publicKey": { "kind": "parameter", "displayName": "Public Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "The public key provided by Braintree." } } } diff --git a/components/camel-braintree/src/main/docs/braintree-component.adoc b/components/camel-braintree/src/main/docs/braintree-component.adoc index 1d1a5ba..2556376 100644 --- a/components/camel-braintree/src/main/docs/braintree-component.adoc +++ b/components/camel-braintree/src/main/docs/braintree-component.adoc @@ -51,7 +51,7 @@ The Braintree component supports 5 options, which are listed below. | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...] | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean -| *logHandlerEnabled* (logging) | Sets whether to enable the BraintreeLogHandler. It may be desirable to set this to 'false' where an existing JUL - SLF4J logger bridge is on the classpath. | true | boolean +| *logHandlerEnabled* (logging) | Sets whether to enable the BraintreeLogHandler. It may be desirable to set this to false where an existing JUL - SLF4J logger bridge is on the classpath. | true | boolean |=== // component options: END @@ -79,7 +79,7 @@ with the following path and query parameters: |=== -=== Query Parameters (33 parameters): +=== Query Parameters (34 parameters): [width="100%",cols="2,5,^1,2",options="header"] @@ -88,20 +88,15 @@ with the following path and query parameters: | *environment* (common) | The environment Either SANDBOX or PRODUCTION | | String | *inBody* (common) | Sets the name of a parameter to be passed in the exchange In Body | | String | *merchantId* (common) | The merchant id provided by Braintree. | | String -| *privateKey* (common) | The private key provided by Braintree. | | String -| *publicKey* (common) | The public key provided by Braintree. | | String | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean | *sendEmptyMessageWhenIdle* (consumer) | If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead. | false | boolean | *exceptionHandler* (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. | | ExceptionHandler | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. The value can be one of: InOnly, InOut, InOptionalOut | | ExchangePattern | *pollStrategy* (consumer) | A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. | | PollingConsumerPollStrategy | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...] -| *accessToken* (advanced) | The access token granted by a merchant to another in order to process transactions on their behalf. Used in place of environment, merchant id, public key and private key fields. | | String | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean | *httpReadTimeout* (advanced) | Set read timeout for http calls. | | Integer | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean -| *httpLogLevel* (logging) | Set logging level for http calls, see java.util.logging.Level | | String -| *logHandlerEnabled* (logging) | Sets whether to enable the BraintreeLogHandler. It may be desirable to set this to 'false' where an existing JUL - SLF4J logger bridge is on the classpath. This option can also be configured globally on the BraintreeComponent. | true | boolean | *backoffErrorThreshold* (scheduler) | The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in. | | int | *backoffIdleThreshold* (scheduler) | The number of subsequent idle polls that should happen before the backoffMultipler should kick-in. | | int | *backoffMultiplier* (scheduler) | To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured. | | int @@ -116,8 +111,14 @@ with the following path and query parameters: | *startScheduler* (scheduler) | Whether the scheduler should be auto started. | true | boolean | *timeUnit* (scheduler) | Time unit for initialDelay and delay options. The value can be one of: NANOSECONDS, MICROSECONDS, MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS | MILLISECONDS | TimeUnit | *useFixedDelay* (scheduler) | Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. | true | boolean +| *httpLogLevel* (logging) | Set logging level for http calls, see java.util.logging.Level | | String +| *httpLogName* (logging) | Set log category to use to log http calls. | Braintree | String +| *logHandlerEnabled* (logging) | Sets whether to enable the BraintreeLogHandler. It may be desirable to set this to 'false' where an existing JUL - SLF4J logger bridge is on the classpath. This option can also be configured globally on the BraintreeComponent. | true | boolean | *proxyHost* (proxy) | The proxy host | | String | *proxyPort* (proxy) | The proxy port | | Integer +| *accessToken* (security) | The access token granted by a merchant to another in order to process transactions on their behalf. Used in place of environment, merchant id, public key and private key fields. | | String +| *privateKey* (security) | The private key provided by Braintree. | | String +| *publicKey* (security) | The public key provided by Braintree. | | String |=== // endpoint options: END diff --git a/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeComponent.java b/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeComponent.java index e4219e1..a0e8b68 100644 --- a/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeComponent.java +++ b/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeComponent.java @@ -34,6 +34,9 @@ import org.apache.camel.support.component.AbstractApiComponent; @Component("braintree") public class BraintreeComponent extends AbstractApiComponent<BraintreeApiName, BraintreeConfiguration, BraintreeApiCollection> { + @Metadata + private BraintreeConfiguration configuration; + @Metadata(label = "advanced,logging", defaultValue = "true") private boolean logHandlerEnabled = true; @@ -59,6 +62,7 @@ public class BraintreeComponent extends AbstractApiComponent<BraintreeApiName, B endpointConfiguration.setApiName(apiName); endpointConfiguration.setMethodName(methodName); endpointConfiguration.setLogHandlerEnabled(logHandlerEnabled); + this.configuration = configuration; return new BraintreeEndpoint(uri, this, apiName, methodName, endpointConfiguration); } @@ -77,7 +81,7 @@ public class BraintreeComponent extends AbstractApiComponent<BraintreeApiName, B /** * Sets whether to enable the BraintreeLogHandler. It may be desirable to set this to - * 'false' where an existing JUL - SLF4J logger bridge is on the classpath. + * false where an existing JUL - SLF4J logger bridge is on the classpath. */ public void setLogHandlerEnabled(boolean logHandlerEnabled) { this.logHandlerEnabled = logHandlerEnabled; 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 b5a4c2a..1f50fcf 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 @@ -49,41 +49,29 @@ public class BraintreeConfiguration { @UriParam private String environment; - @UriParam private String merchantId; - @UriParam + @UriParam(label = "security", secret = true) private String publicKey; - - @UriParam + @UriParam(label = "security", secret = true) private String privateKey; - - @UriParam - @Metadata(label = "advanced") + @UriParam(label = "security", secret = true) private String accessToken; - @UriParam - @Metadata(label = "proxy") + @UriParam(label = "proxy") private String proxyHost; - - @UriParam - @Metadata(label = "proxy") + @UriParam(label = "proxy") private Integer proxyPort; - @UriParam(javaType = "java.lang.String") - @Metadata(label = "advanced,logging") + @UriParam(label = "logging", javaType = "java.lang.String") private Level httpLogLevel; - - @Metadata(label = "advanced,logging") + @UriParam(label = "logging", defaultValue = "Braintree") private String httpLogName; - - @UriParam(defaultValue = "true") - @Metadata(label = "advanced,logging") + @UriParam(label = "logging", defaultValue = "true") private boolean logHandlerEnabled = true; - @UriParam - @Metadata(label = "advanced") + @UriParam(label = "advanced") private Integer httpReadTimeout; public BraintreeApiName getApiName() { @@ -209,7 +197,7 @@ public class BraintreeConfiguration { } /** - * Set log category to use to log http calls, default "Braintree" + * Set log category to use to log http calls. */ public void setHttpLogName(String httpLogName) { this.httpLogName = httpLogName; diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/BraintreeComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/BraintreeComponentBuilderFactory.java index 2b0d506..49deeaf 100644 --- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/BraintreeComponentBuilderFactory.java +++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/BraintreeComponentBuilderFactory.java @@ -119,7 +119,7 @@ public interface BraintreeComponentBuilderFactory { } /** * Sets whether to enable the BraintreeLogHandler. It may be desirable - * to set this to 'false' where an existing JUL - SLF4J logger bridge is + * to set this to false where an existing JUL - SLF4J logger bridge is * on the classpath. * * The option is a: <code>boolean</code> type.