This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/master by this push:
     new 51b8e48  CAMEL-16171 - Add uri-endpoint-override options to all AWS2 
components - AWS2-Translate component
51b8e48 is described below

commit 51b8e48e5bead8af2a324e33524b9a00a8647d7c
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Fri Mar 5 09:15:37 2021 +0100

    CAMEL-16171 - Add uri-endpoint-override options to all AWS2 components - 
AWS2-Translate component
---
 .../catalog/components/aws2-translate.json         |  4 ++++
 .../catalog/components/spring-rabbitmq.json        |  1 +
 .../src/main/docs/aws2-translate-starter.adoc      |  4 +++-
 .../Translate2ComponentConfiguration.java          | 26 ++++++++++++++++++++++
 .../modules/ROOT/pages/aws2-translate-starter.adoc |  4 +++-
 5 files changed, 37 insertions(+), 2 deletions(-)

diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/aws2-translate.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/aws2-translate.json
index 85414af..d5a1f66 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/aws2-translate.json
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/aws2-translate.json
@@ -26,6 +26,7 @@
     "configuration": { "kind": "property", "displayName": "Configuration", 
"group": "producer", "label": "", "required": false, "type": "object", 
"javaType": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"deprecated": false, "autowired": false, "secret": false, "description": 
"Component configuration" },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start 
Producer", "group": "producer", "label": "producer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": 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 star [...]
     "operation": { "kind": "property", "displayName": "Operation", "group": 
"producer", "label": "", "required": true, "type": "object", "javaType": 
"org.apache.camel.component.aws2.translate.Translate2Operations", "enum": [ 
"translateText" ], "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "defaultValue": "translateText", "configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "des [...]
+    "overrideEndpoint": { "kind": "property", "displayName": "Override 
Endpoint", "group": "producer", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "Set the need for 
overidding the endpoint. This option needs to be used in combination wi [...]
     "pojoRequest": { "kind": "property", "displayName": "Pojo Request", 
"group": "producer", "label": "", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "If we want to use a POJO 
request as body or not" },
     "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": 
"producer", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "To define a proxy host 
when instantiating the Translate client" },
     "proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": 
"producer", "label": "", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "To define a proxy port 
when instantiating the Translate client" },
@@ -35,6 +36,7 @@
     "targetLanguage": { "kind": "property", "displayName": "Target Language", 
"group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "Target language to use" 
},
     "translateClient": { "kind": "property", "displayName": "Translate 
Client", "group": "producer", "label": "", "required": false, "type": "object", 
"javaType": "software.amazon.awssdk.services.translate.TranslateClient", 
"deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "To use a existing 
configured AWS Translate [...]
     "trustAllCertificates": { "kind": "property", "displayName": "Trust All 
Certificates", "group": "producer", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "If we want to trust all 
certificates in case of overriding the endpoint" },
+    "uriEndpointOverride": { "kind": "property", "displayName": "Uri Endpoint 
Override", "group": "producer", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "Set the overriding uri 
endpoint. This option needs to be used in combination with overrideEndpoi [...]
     "autowiredEnabled": { "kind": "property", "displayName": "Autowired 
Enabled", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": true, "description": "Whether autowiring is 
enabled. This is used for automatic autowiring options (the option must be 
marked as autowired) by looking up in the registry to find if there is a single 
instance of matching type, which t [...]
     "accessKey": { "kind": "property", "displayName": "Access Key", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "Amazon AWS Access Key" },
     "secretKey": { "kind": "property", "displayName": "Secret Key", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "Amazon AWS Secret Key" }
@@ -44,6 +46,7 @@
     "autodetectSourceLanguage": { "kind": "parameter", "displayName": 
"Autodetect Source Language", "group": "producer", "label": "", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "Being able to autodetect 
the source language" },
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start 
Producer", "group": "producer", "label": "producer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": 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 sta [...]
     "operation": { "kind": "parameter", "displayName": "Operation", "group": 
"producer", "label": "", "required": true, "type": "object", "javaType": 
"org.apache.camel.component.aws2.translate.Translate2Operations", "enum": [ 
"translateText" ], "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "defaultValue": "translateText", "configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "de [...]
+    "overrideEndpoint": { "kind": "parameter", "displayName": "Override 
Endpoint", "group": "producer", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "Set the need for 
overidding the endpoint. This option needs to be used in combination w [...]
     "pojoRequest": { "kind": "parameter", "displayName": "Pojo Request", 
"group": "producer", "label": "", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "If we want to use a POJO 
request as body or not" },
     "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": 
"producer", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "To define a proxy host 
when instantiating the Translate client" },
     "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": 
"producer", "label": "", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "To define a proxy port 
when instantiating the Translate client" },
@@ -53,6 +56,7 @@
     "targetLanguage": { "kind": "parameter", "displayName": "Target Language", 
"group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "Target language to use" 
},
     "translateClient": { "kind": "parameter", "displayName": "Translate 
Client", "group": "producer", "label": "", "required": false, "type": "object", 
"javaType": "software.amazon.awssdk.services.translate.TranslateClient", 
"deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "To use a existing 
configured AWS Translat [...]
     "trustAllCertificates": { "kind": "parameter", "displayName": "Trust All 
Certificates", "group": "producer", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "If we want to trust all 
certificates in case of overriding the endpoint" },
+    "uriEndpointOverride": { "kind": "parameter", "displayName": "Uri Endpoint 
Override", "group": "producer", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "Set the overriding uri 
endpoint. This option needs to be used in combination with overrideEndpo [...]
     "accessKey": { "kind": "parameter", "displayName": "Access Key", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "Amazon AWS Access Key" },
     "secretKey": { "kind": "parameter", "displayName": "Secret Key", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.aws2.translate.Translate2Configuration", 
"configurationField": "configuration", "description": "Amazon AWS Secret Key" }
   }
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/spring-rabbitmq.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/spring-rabbitmq.json
index 86aa3cf..10fef0a 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/spring-rabbitmq.json
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/spring-rabbitmq.json
@@ -64,6 +64,7 @@
     "queues": { "kind": "parameter", "displayName": "Queues", "group": 
"consumer", "label": "consumer", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": false, "description": "The queue(s) to use for 
consuming messages. Multiple queue names can be separated by comma. If none has 
been configured then Camel will generate an unique id as the queue name for the 
consumer." },
     "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, "autowired": 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 
con [...]
     "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, "autowired": false, "secret": false, 
"description": "Sets the exchange pattern when the consumer creates an 
exchange." },
+    "prefetchCount": { "kind": "parameter", "displayName": "Prefetch Count", 
"group": "consumer (advanced)", "label": "consumer,advanced", "required": 
false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, 
"autowired": false, "secret": false, "description": "Tell the broker how many 
messages to send in a single request. Often this can be set quite high to 
improve throughput." },
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start 
Producer", "group": "producer", "label": "producer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": 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 sta [...]
     "replyTimeout": { "kind": "parameter", "displayName": "Reply Timeout", 
"group": "producer", "label": "producer", "required": false, "type": 
"duration", "javaType": "long", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": "5000", "description": "Specify the timeout in 
milliseconds to be used when waiting for a reply message when doing 
request\/reply messaging. The default value is 5 seconds. A negative value 
indicates an indefinite timeout." },
     "usePublisherConnection": { "kind": "parameter", "displayName": "Use 
Publisher Connection", "group": "producer", "label": "producer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": "Use 
a separate connection for publishers and consumers" },
diff --git 
a/components-starter/camel-aws2-translate-starter/src/main/docs/aws2-translate-starter.adoc
 
b/components-starter/camel-aws2-translate-starter/src/main/docs/aws2-translate-starter.adoc
index 9561e4f..5d2c91b 100644
--- 
a/components-starter/camel-aws2-translate-starter/src/main/docs/aws2-translate-starter.adoc
+++ 
b/components-starter/camel-aws2-translate-starter/src/main/docs/aws2-translate-starter.adoc
@@ -17,7 +17,7 @@ When using aws2-translate with Spring Boot make sure to use 
the following Maven
 ----
 
 
-The component supports 17 options, which are listed below.
+The component supports 19 options, which are listed below.
 
 
 
@@ -31,6 +31,7 @@ The component supports 17 options, which are listed below.
 | *camel.component.aws2-translate.enabled* | Whether to enable auto 
configuration of the aws2-translate component. This is enabled by default. |  | 
Boolean
 | *camel.component.aws2-translate.lazy-start-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 proce [...]
 | *camel.component.aws2-translate.operation* | The operation to perform |  | 
Translate2Operations
+| *camel.component.aws2-translate.override-endpoint* | Set the need for 
overidding the endpoint. This option needs to be used in combination with 
uriEndpointOverride option | false | Boolean
 | *camel.component.aws2-translate.pojo-request* | If we want to use a POJO 
request as body or not | false | Boolean
 | *camel.component.aws2-translate.proxy-host* | To define a proxy host when 
instantiating the Translate client |  | String
 | *camel.component.aws2-translate.proxy-port* | To define a proxy port when 
instantiating the Translate client |  | Integer
@@ -41,5 +42,6 @@ The component supports 17 options, which are listed below.
 | *camel.component.aws2-translate.target-language* | Target language to use |  
| String
 | *camel.component.aws2-translate.translate-client* | To use a existing 
configured AWS Translate as client. The option is a 
software.amazon.awssdk.services.translate.TranslateClient type. |  | 
TranslateClient
 | *camel.component.aws2-translate.trust-all-certificates* | If we want to 
trust all certificates in case of overriding the endpoint | false | Boolean
+| *camel.component.aws2-translate.uri-endpoint-override* | Set the overriding 
uri endpoint. This option needs to be used in combination with overrideEndpoint 
option |  | String
 |===
 // spring-boot-auto-configure options: END
diff --git 
a/components-starter/camel-aws2-translate-starter/src/main/java/org/apache/camel/component/aws2/translate/springboot/Translate2ComponentConfiguration.java
 
b/components-starter/camel-aws2-translate-starter/src/main/java/org/apache/camel/component/aws2/translate/springboot/Translate2ComponentConfiguration.java
index 493ad7b..f6be983 100644
--- 
a/components-starter/camel-aws2-translate-starter/src/main/java/org/apache/camel/component/aws2/translate/springboot/Translate2ComponentConfiguration.java
+++ 
b/components-starter/camel-aws2-translate-starter/src/main/java/org/apache/camel/component/aws2/translate/springboot/Translate2ComponentConfiguration.java
@@ -66,6 +66,11 @@ public class Translate2ComponentConfiguration
      */
     private Translate2Operations operation = 
Translate2Operations.translateText;
     /**
+     * Set the need for overidding the endpoint. This option needs to be used 
in
+     * combination with uriEndpointOverride option
+     */
+    private Boolean overrideEndpoint = false;
+    /**
      * If we want to use a POJO request as body or not
      */
     private Boolean pojoRequest = false;
@@ -105,6 +110,11 @@ public class Translate2ComponentConfiguration
      */
     private Boolean trustAllCertificates = false;
     /**
+     * Set the overriding uri endpoint. This option needs to be used in
+     * combination with overrideEndpoint option
+     */
+    private String uriEndpointOverride;
+    /**
      * Whether autowiring is enabled. This is used for automatic autowiring
      * options (the option must be marked as autowired) by looking up in the
      * registry to find if there is a single instance of matching type, which
@@ -154,6 +164,14 @@ public class Translate2ComponentConfiguration
         this.operation = operation;
     }
 
+    public Boolean getOverrideEndpoint() {
+        return overrideEndpoint;
+    }
+
+    public void setOverrideEndpoint(Boolean overrideEndpoint) {
+        this.overrideEndpoint = overrideEndpoint;
+    }
+
     public Boolean getPojoRequest() {
         return pojoRequest;
     }
@@ -226,6 +244,14 @@ public class Translate2ComponentConfiguration
         this.trustAllCertificates = trustAllCertificates;
     }
 
+    public String getUriEndpointOverride() {
+        return uriEndpointOverride;
+    }
+
+    public void setUriEndpointOverride(String uriEndpointOverride) {
+        this.uriEndpointOverride = uriEndpointOverride;
+    }
+
     public Boolean getAutowiredEnabled() {
         return autowiredEnabled;
     }
diff --git a/docs/modules/ROOT/pages/aws2-translate-starter.adoc 
b/docs/modules/ROOT/pages/aws2-translate-starter.adoc
index 9561e4f..5d2c91b 100644
--- a/docs/modules/ROOT/pages/aws2-translate-starter.adoc
+++ b/docs/modules/ROOT/pages/aws2-translate-starter.adoc
@@ -17,7 +17,7 @@ When using aws2-translate with Spring Boot make sure to use 
the following Maven
 ----
 
 
-The component supports 17 options, which are listed below.
+The component supports 19 options, which are listed below.
 
 
 
@@ -31,6 +31,7 @@ The component supports 17 options, which are listed below.
 | *camel.component.aws2-translate.enabled* | Whether to enable auto 
configuration of the aws2-translate component. This is enabled by default. |  | 
Boolean
 | *camel.component.aws2-translate.lazy-start-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 proce [...]
 | *camel.component.aws2-translate.operation* | The operation to perform |  | 
Translate2Operations
+| *camel.component.aws2-translate.override-endpoint* | Set the need for 
overidding the endpoint. This option needs to be used in combination with 
uriEndpointOverride option | false | Boolean
 | *camel.component.aws2-translate.pojo-request* | If we want to use a POJO 
request as body or not | false | Boolean
 | *camel.component.aws2-translate.proxy-host* | To define a proxy host when 
instantiating the Translate client |  | String
 | *camel.component.aws2-translate.proxy-port* | To define a proxy port when 
instantiating the Translate client |  | Integer
@@ -41,5 +42,6 @@ The component supports 17 options, which are listed below.
 | *camel.component.aws2-translate.target-language* | Target language to use |  
| String
 | *camel.component.aws2-translate.translate-client* | To use a existing 
configured AWS Translate as client. The option is a 
software.amazon.awssdk.services.translate.TranslateClient type. |  | 
TranslateClient
 | *camel.component.aws2-translate.trust-all-certificates* | If we want to 
trust all certificates in case of overriding the endpoint | false | Boolean
+| *camel.component.aws2-translate.uri-endpoint-override* | Set the overriding 
uri endpoint. This option needs to be used in combination with overrideEndpoint 
option |  | String
 |===
 // spring-boot-auto-configure options: END

Reply via email to