You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2020/11/13 13:52:14 UTC

[camel] branch master updated (17ea438 -> 07af13b)

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

jamesnetherton pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 17ea438  Sync deps
     new 73dfdbe  CAMEL-15836: Add autowired metadata to camel-log exchangeFormatter option
     new 9414ce2  CAMEL-15836: Add autowired metadata to camel-bean-validator validatorFactory option
     new c1b075f  CAMEL-15836: Add autowired metadata to camel-elasticsearch-rest restClient option
     new e511e1f  CAMEL-15836: Add autowired metadata to camel-infinispan cacheContainer option
     new 64cd828  CAMEL-15836: Add autowired metadata to camel-influxdb influxDB option
     new 07af13b  CAMEL-15836: Add autowired metadata to camel-twilio restClient option

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../camel/catalog/components/bean-validator.json   |  2 +-
 .../catalog/components/elasticsearch-rest.json     |  2 +-
 .../camel/catalog/components/infinispan.json       |  4 +--
 .../apache/camel/catalog/components/influxdb.json  |  2 +-
 .../org/apache/camel/catalog/components/log.json   |  2 +-
 .../apache/camel/catalog/components/twilio.json    |  2 +-
 .../catalog/docs/bean-validator-component.adoc     |  2 +-
 .../catalog/docs/elasticsearch-rest-component.adoc |  2 +-
 .../camel/catalog/docs/infinispan-component.adoc   |  4 +--
 .../camel/catalog/docs/influxdb-component.adoc     |  2 +-
 .../apache/camel/catalog/docs/log-component.adoc   |  2 +-
 .../camel/catalog/docs/twilio-component.adoc       |  2 +-
 .../BeanValidatorComponentConfigurer.java          |  5 +++
 .../component/bean/validator/bean-validator.json   |  2 +-
 .../src/main/docs/bean-validator-component.adoc    |  2 +-
 .../bean/validator/BeanValidatorComponent.java     |  2 +-
 ...Test.java => ValidatorFactoryAutowireTest.java} | 23 ++------------
 ...Test.java => ValidatorFactoryRegistryTest.java} | 30 ++++++------------
 .../bean/validator/ValidatorFactoryTest.java       | 36 ----------------------
 .../ElasticsearchComponentConfigurer.java          |  5 +++
 .../elasticsearch/elasticsearch-rest.json          |  2 +-
 .../main/docs/elasticsearch-rest-component.adoc    |  2 +-
 .../elasticsearch/ElasticsearchComponent.java      |  2 +-
 .../infinispan/InfinispanComponentConfigurer.java  |  5 +++
 .../infinispan/InfinispanEndpointConfigurer.java   |  5 +++
 .../camel/component/infinispan/infinispan.json     |  4 +--
 .../src/main/docs/infinispan-component.adoc        |  4 +--
 .../infinispan/InfinispanConfiguration.java        |  2 ++
 .../influxdb/InfluxDbComponentConfigurer.java      |  5 +++
 .../apache/camel/component/influxdb/influxdb.json  |  2 +-
 .../src/main/docs/influxdb-component.adoc          |  2 +-
 .../component/influxdb/InfluxDbComponent.java      |  2 +-
 .../component/log/LogComponentConfigurer.java      |  5 +++
 .../org/apache/camel/component/log/log.json        |  2 +-
 .../camel-log/src/main/docs/log-component.adoc     |  2 +-
 .../apache/camel/component/log/LogComponent.java   |  2 +-
 .../twilio/TwilioComponentConfigurer.java          |  5 +++
 .../org/apache/camel/component/twilio/twilio.json  |  2 +-
 .../src/main/docs/twilio-component.adoc            |  2 +-
 .../camel/component/twilio/TwilioComponent.java    |  2 +-
 .../ROOT/pages/bean-validator-component.adoc       |  2 +-
 .../ROOT/pages/elasticsearch-rest-component.adoc   |  2 +-
 .../modules/ROOT/pages/infinispan-component.adoc   |  4 +--
 .../modules/ROOT/pages/influxdb-component.adoc     |  2 +-
 .../modules/ROOT/pages/log-component.adoc          |  2 +-
 .../modules/ROOT/pages/twilio-component.adoc       |  2 +-
 46 files changed, 89 insertions(+), 117 deletions(-)
 copy components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/{ValidatorFactoryTest.java => ValidatorFactoryAutowireTest.java} (67%)
 copy components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/{ValidatorFactoryTest.java => ValidatorFactoryRegistryTest.java} (66%)


[camel] 03/06: CAMEL-15836: Add autowired metadata to camel-elasticsearch-rest restClient option

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit c1b075fadcac326c21054f50a4c59e66ff87ad8f
Author: James Netherton <ja...@gmail.com>
AuthorDate: Fri Nov 13 10:48:32 2020 +0000

    CAMEL-15836: Add autowired metadata to camel-elasticsearch-rest restClient option
---
 .../org/apache/camel/catalog/components/elasticsearch-rest.json      | 2 +-
 .../org/apache/camel/catalog/docs/elasticsearch-rest-component.adoc  | 2 +-
 .../component/elasticsearch/ElasticsearchComponentConfigurer.java    | 5 +++++
 .../org/apache/camel/component/elasticsearch/elasticsearch-rest.json | 2 +-
 .../src/main/docs/elasticsearch-rest-component.adoc                  | 2 +-
 .../apache/camel/component/elasticsearch/ElasticsearchComponent.java | 2 +-
 docs/components/modules/ROOT/pages/elasticsearch-rest-component.adoc | 2 +-
 7 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/elasticsearch-rest.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/elasticsearch-rest.json
index 955586a..caa153a 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/elasticsearch-rest.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/elasticsearch-rest.json
@@ -24,7 +24,7 @@
   "componentProperties": {
     "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 [...]
     "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 [...]
-    "client": { "kind": "property", "displayName": "Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.elasticsearch.client.RestClient", "deprecated": false, "autowired": false, "secret": false, "description": "To use an existing configured Elasticsearch client, instead of creating a client per endpoint. This allow to customize the client with specific settings." },
+    "client": { "kind": "property", "displayName": "Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.elasticsearch.client.RestClient", "deprecated": false, "autowired": true, "secret": false, "description": "To use an existing configured Elasticsearch client, instead of creating a client per endpoint. This allow to customize the client with specific settings." },
     "connectionTimeout": { "kind": "property", "displayName": "Connection Timeout", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 30000, "description": "The time in ms to wait before connection will timeout." },
     "enableSniffer": { "kind": "property", "displayName": "Enable Sniffer", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "description": "Enable automatically discover nodes from a running Elasticsearch cluster" },
     "hostAddresses": { "kind": "property", "displayName": "Host Addresses", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Comma separated list with ip:port formatted remote transport addresses to use. The ip and port options must be left blank for hostAddresses to be considered instead." },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/elasticsearch-rest-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/elasticsearch-rest-component.adoc
index d48528c..e182ac7 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/elasticsearch-rest-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/elasticsearch-rest-component.adoc
@@ -52,7 +52,7 @@ The Elasticsearch Rest component supports 13 options, which are listed below.
 | Name | Description | Default | Type
 | *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 [...]
 | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
-| *client* (advanced) | To use an existing configured Elasticsearch client, instead of creating a client per endpoint. This allow to customize the client with specific settings. |  | RestClient
+| *client* (advanced) | *Autowired* To use an existing configured Elasticsearch client, instead of creating a client per endpoint. This allow to customize the client with specific settings. |  | RestClient
 | *connectionTimeout* (advanced) | The time in ms to wait before connection will timeout. | 30000 | int
 | *enableSniffer* (advanced) | Enable automatically discover nodes from a running Elasticsearch cluster | false | Boolean
 | *hostAddresses* (advanced) | Comma separated list with ip:port formatted remote transport addresses to use. The ip and port options must be left blank for hostAddresses to be considered instead. |  | String
diff --git a/components/camel-elasticsearch-rest/src/generated/java/org/apache/camel/component/elasticsearch/ElasticsearchComponentConfigurer.java b/components/camel-elasticsearch-rest/src/generated/java/org/apache/camel/component/elasticsearch/ElasticsearchComponentConfigurer.java
index ad7a662..6f97801 100644
--- a/components/camel-elasticsearch-rest/src/generated/java/org/apache/camel/component/elasticsearch/ElasticsearchComponentConfigurer.java
+++ b/components/camel-elasticsearch-rest/src/generated/java/org/apache/camel/component/elasticsearch/ElasticsearchComponentConfigurer.java
@@ -49,6 +49,11 @@ public class ElasticsearchComponentConfigurer extends PropertyConfigurerSupport
     }
 
     @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"client"};
+    }
+
+    @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "autowiredenabled":
diff --git a/components/camel-elasticsearch-rest/src/generated/resources/org/apache/camel/component/elasticsearch/elasticsearch-rest.json b/components/camel-elasticsearch-rest/src/generated/resources/org/apache/camel/component/elasticsearch/elasticsearch-rest.json
index 955586a..caa153a 100644
--- a/components/camel-elasticsearch-rest/src/generated/resources/org/apache/camel/component/elasticsearch/elasticsearch-rest.json
+++ b/components/camel-elasticsearch-rest/src/generated/resources/org/apache/camel/component/elasticsearch/elasticsearch-rest.json
@@ -24,7 +24,7 @@
   "componentProperties": {
     "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 [...]
     "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 [...]
-    "client": { "kind": "property", "displayName": "Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.elasticsearch.client.RestClient", "deprecated": false, "autowired": false, "secret": false, "description": "To use an existing configured Elasticsearch client, instead of creating a client per endpoint. This allow to customize the client with specific settings." },
+    "client": { "kind": "property", "displayName": "Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.elasticsearch.client.RestClient", "deprecated": false, "autowired": true, "secret": false, "description": "To use an existing configured Elasticsearch client, instead of creating a client per endpoint. This allow to customize the client with specific settings." },
     "connectionTimeout": { "kind": "property", "displayName": "Connection Timeout", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 30000, "description": "The time in ms to wait before connection will timeout." },
     "enableSniffer": { "kind": "property", "displayName": "Enable Sniffer", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "description": "Enable automatically discover nodes from a running Elasticsearch cluster" },
     "hostAddresses": { "kind": "property", "displayName": "Host Addresses", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Comma separated list with ip:port formatted remote transport addresses to use. The ip and port options must be left blank for hostAddresses to be considered instead." },
diff --git a/components/camel-elasticsearch-rest/src/main/docs/elasticsearch-rest-component.adoc b/components/camel-elasticsearch-rest/src/main/docs/elasticsearch-rest-component.adoc
index d48528c..e182ac7 100644
--- a/components/camel-elasticsearch-rest/src/main/docs/elasticsearch-rest-component.adoc
+++ b/components/camel-elasticsearch-rest/src/main/docs/elasticsearch-rest-component.adoc
@@ -52,7 +52,7 @@ The Elasticsearch Rest component supports 13 options, which are listed below.
 | Name | Description | Default | Type
 | *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 [...]
 | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
-| *client* (advanced) | To use an existing configured Elasticsearch client, instead of creating a client per endpoint. This allow to customize the client with specific settings. |  | RestClient
+| *client* (advanced) | *Autowired* To use an existing configured Elasticsearch client, instead of creating a client per endpoint. This allow to customize the client with specific settings. |  | RestClient
 | *connectionTimeout* (advanced) | The time in ms to wait before connection will timeout. | 30000 | int
 | *enableSniffer* (advanced) | Enable automatically discover nodes from a running Elasticsearch cluster | false | Boolean
 | *hostAddresses* (advanced) | Comma separated list with ip:port formatted remote transport addresses to use. The ip and port options must be left blank for hostAddresses to be considered instead. |  | String
diff --git a/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchComponent.java b/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchComponent.java
index b094ec9..4db4909 100644
--- a/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchComponent.java
+++ b/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchComponent.java
@@ -36,7 +36,7 @@ import org.elasticsearch.client.RestClient;
 @Component("elasticsearch-rest")
 public class ElasticsearchComponent extends DefaultComponent {
 
-    @Metadata(label = "advanced")
+    @Metadata(label = "advanced", autowired = true)
     private RestClient client;
     @Metadata(label = "advanced")
     private String hostAddresses;
diff --git a/docs/components/modules/ROOT/pages/elasticsearch-rest-component.adoc b/docs/components/modules/ROOT/pages/elasticsearch-rest-component.adoc
index 9fbdebb..fc6b598 100644
--- a/docs/components/modules/ROOT/pages/elasticsearch-rest-component.adoc
+++ b/docs/components/modules/ROOT/pages/elasticsearch-rest-component.adoc
@@ -54,7 +54,7 @@ The Elasticsearch Rest component supports 13 options, which are listed below.
 | Name | Description | Default | Type
 | *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 [...]
 | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
-| *client* (advanced) | To use an existing configured Elasticsearch client, instead of creating a client per endpoint. This allow to customize the client with specific settings. |  | RestClient
+| *client* (advanced) | *Autowired* To use an existing configured Elasticsearch client, instead of creating a client per endpoint. This allow to customize the client with specific settings. |  | RestClient
 | *connectionTimeout* (advanced) | The time in ms to wait before connection will timeout. | 30000 | int
 | *enableSniffer* (advanced) | Enable automatically discover nodes from a running Elasticsearch cluster | false | Boolean
 | *hostAddresses* (advanced) | Comma separated list with ip:port formatted remote transport addresses to use. The ip and port options must be left blank for hostAddresses to be considered instead. |  | String


[camel] 01/06: CAMEL-15836: Add autowired metadata to camel-log exchangeFormatter option

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 73dfdbe50c82fd1fc045e0a6d8ebe485f3a6cc04
Author: James Netherton <ja...@gmail.com>
AuthorDate: Fri Nov 13 10:17:26 2020 +0000

    CAMEL-15836: Add autowired metadata to camel-log exchangeFormatter option
---
 .../generated/resources/org/apache/camel/catalog/components/log.json | 2 +-
 .../resources/org/apache/camel/catalog/docs/log-component.adoc       | 2 +-
 .../java/org/apache/camel/component/log/LogComponentConfigurer.java  | 5 +++++
 .../src/generated/resources/org/apache/camel/component/log/log.json  | 2 +-
 components/camel-log/src/main/docs/log-component.adoc                | 2 +-
 .../src/main/java/org/apache/camel/component/log/LogComponent.java   | 2 +-
 docs/components/modules/ROOT/pages/log-component.adoc                | 2 +-
 7 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/log.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/log.json
index 71ff537..dadc43e 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/log.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/log.json
@@ -24,7 +24,7 @@
   "componentProperties": {
     "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 [...]
     "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 [...]
-    "exchangeFormatter": { "kind": "property", "displayName": "Exchange Formatter", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExchangeFormatter", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter." }
+    "exchangeFormatter": { "kind": "property", "displayName": "Exchange Formatter", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExchangeFormatter", "deprecated": false, "autowired": true, "secret": false, "description": "Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter." }
   },
   "properties": {
     "loggerName": { "kind": "path", "displayName": "Logger Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the logging category to use" },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/log-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/log-component.adoc
index be6d0c9..188588c 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/log-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/log-component.adoc
@@ -82,7 +82,7 @@ The Log component supports 3 options, which are listed below.
 | Name | Description | Default | Type
 | *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 [...]
 | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
-| *exchangeFormatter* (advanced) | Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter. |  | ExchangeFormatter
+| *exchangeFormatter* (advanced) | *Autowired* Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter. |  | ExchangeFormatter
 |===
 // component options: END
 
diff --git a/components/camel-log/src/generated/java/org/apache/camel/component/log/LogComponentConfigurer.java b/components/camel-log/src/generated/java/org/apache/camel/component/log/LogComponentConfigurer.java
index ca6bf4e..8b2c6a2 100644
--- a/components/camel-log/src/generated/java/org/apache/camel/component/log/LogComponentConfigurer.java
+++ b/components/camel-log/src/generated/java/org/apache/camel/component/log/LogComponentConfigurer.java
@@ -32,6 +32,11 @@ public class LogComponentConfigurer extends PropertyConfigurerSupport implements
     }
 
     @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"exchangeFormatter"};
+    }
+
+    @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "autowiredenabled":
diff --git a/components/camel-log/src/generated/resources/org/apache/camel/component/log/log.json b/components/camel-log/src/generated/resources/org/apache/camel/component/log/log.json
index 71ff537..dadc43e 100644
--- a/components/camel-log/src/generated/resources/org/apache/camel/component/log/log.json
+++ b/components/camel-log/src/generated/resources/org/apache/camel/component/log/log.json
@@ -24,7 +24,7 @@
   "componentProperties": {
     "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 [...]
     "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 [...]
-    "exchangeFormatter": { "kind": "property", "displayName": "Exchange Formatter", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExchangeFormatter", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter." }
+    "exchangeFormatter": { "kind": "property", "displayName": "Exchange Formatter", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExchangeFormatter", "deprecated": false, "autowired": true, "secret": false, "description": "Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter." }
   },
   "properties": {
     "loggerName": { "kind": "path", "displayName": "Logger Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the logging category to use" },
diff --git a/components/camel-log/src/main/docs/log-component.adoc b/components/camel-log/src/main/docs/log-component.adoc
index be6d0c9..188588c 100644
--- a/components/camel-log/src/main/docs/log-component.adoc
+++ b/components/camel-log/src/main/docs/log-component.adoc
@@ -82,7 +82,7 @@ The Log component supports 3 options, which are listed below.
 | Name | Description | Default | Type
 | *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 [...]
 | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
-| *exchangeFormatter* (advanced) | Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter. |  | ExchangeFormatter
+| *exchangeFormatter* (advanced) | *Autowired* Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter. |  | ExchangeFormatter
 |===
 // component options: END
 
diff --git a/components/camel-log/src/main/java/org/apache/camel/component/log/LogComponent.java b/components/camel-log/src/main/java/org/apache/camel/component/log/LogComponent.java
index e46184b..b4e25b2 100644
--- a/components/camel-log/src/main/java/org/apache/camel/component/log/LogComponent.java
+++ b/components/camel-log/src/main/java/org/apache/camel/component/log/LogComponent.java
@@ -40,7 +40,7 @@ public class LogComponent extends DefaultComponent {
 
     private ExchangeFormatter defaultExchangeFormatter;
 
-    @Metadata(label = "advanced")
+    @Metadata(label = "advanced", autowired = true)
     private ExchangeFormatter exchangeFormatter;
 
     public LogComponent() {
diff --git a/docs/components/modules/ROOT/pages/log-component.adoc b/docs/components/modules/ROOT/pages/log-component.adoc
index 3d37e38..443e5a4 100644
--- a/docs/components/modules/ROOT/pages/log-component.adoc
+++ b/docs/components/modules/ROOT/pages/log-component.adoc
@@ -84,7 +84,7 @@ The Log component supports 3 options, which are listed below.
 | Name | Description | Default | Type
 | *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 [...]
 | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
-| *exchangeFormatter* (advanced) | Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter. |  | ExchangeFormatter
+| *exchangeFormatter* (advanced) | *Autowired* Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter. |  | ExchangeFormatter
 |===
 // component options: END
 


[camel] 06/06: CAMEL-15836: Add autowired metadata to camel-twilio restClient option

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 07af13b2e76aec812e79d6d43a4f241f5e60dd0b
Author: James Netherton <ja...@gmail.com>
AuthorDate: Fri Nov 13 11:06:15 2020 +0000

    CAMEL-15836: Add autowired metadata to camel-twilio restClient option
---
 .../resources/org/apache/camel/catalog/components/twilio.json        | 2 +-
 .../resources/org/apache/camel/catalog/docs/twilio-component.adoc    | 2 +-
 .../org/apache/camel/component/twilio/TwilioComponentConfigurer.java | 5 +++++
 .../resources/org/apache/camel/component/twilio/twilio.json          | 2 +-
 components/camel-twilio/src/main/docs/twilio-component.adoc          | 2 +-
 .../main/java/org/apache/camel/component/twilio/TwilioComponent.java | 2 +-
 docs/components/modules/ROOT/pages/twilio-component.adoc             | 2 +-
 7 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/twilio.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/twilio.json
index db96966..f98068c 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/twilio.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/twilio.json
@@ -27,7 +27,7 @@
     "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 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 me [...]
     "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 [...]
     "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 [...]
-    "restClient": { "kind": "property", "displayName": "Rest Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "com.twilio.http.TwilioRestClient", "deprecated": false, "autowired": false, "secret": false, "description": "To use the shared REST client" },
+    "restClient": { "kind": "property", "displayName": "Rest Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "com.twilio.http.TwilioRestClient", "deprecated": false, "autowired": true, "secret": false, "description": "To use the shared REST client" },
     "accountSid": { "kind": "property", "displayName": "Account Sid", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "The account SID to use." },
     "password": { "kind": "property", "displayName": "Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "Auth token for the account." },
     "username": { "kind": "property", "displayName": "Username", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "The account to use." }
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/twilio-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/twilio-component.adoc
index c49821f..34e368d 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/twilio-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/twilio-component.adoc
@@ -42,7 +42,7 @@ The Twilio component supports 8 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 [...]
 | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
-| *restClient* (advanced) | To use the shared REST client |  | TwilioRestClient
+| *restClient* (advanced) | *Autowired* To use the shared REST client |  | TwilioRestClient
 | *accountSid* (security) | The account SID to use. |  | String
 | *password* (security) | Auth token for the account. |  | String
 | *username* (security) | The account to use. |  | String
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/TwilioComponentConfigurer.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/TwilioComponentConfigurer.java
index a14e3b4..5b40960 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/TwilioComponentConfigurer.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/TwilioComponentConfigurer.java
@@ -58,6 +58,11 @@ public class TwilioComponentConfigurer extends PropertyConfigurerSupport impleme
     }
 
     @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"restClient"};
+    }
+
+    @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accountsid":
diff --git a/components/camel-twilio/src/generated/resources/org/apache/camel/component/twilio/twilio.json b/components/camel-twilio/src/generated/resources/org/apache/camel/component/twilio/twilio.json
index db96966..f98068c 100644
--- a/components/camel-twilio/src/generated/resources/org/apache/camel/component/twilio/twilio.json
+++ b/components/camel-twilio/src/generated/resources/org/apache/camel/component/twilio/twilio.json
@@ -27,7 +27,7 @@
     "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 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 me [...]
     "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 [...]
     "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 [...]
-    "restClient": { "kind": "property", "displayName": "Rest Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "com.twilio.http.TwilioRestClient", "deprecated": false, "autowired": false, "secret": false, "description": "To use the shared REST client" },
+    "restClient": { "kind": "property", "displayName": "Rest Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "com.twilio.http.TwilioRestClient", "deprecated": false, "autowired": true, "secret": false, "description": "To use the shared REST client" },
     "accountSid": { "kind": "property", "displayName": "Account Sid", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "The account SID to use." },
     "password": { "kind": "property", "displayName": "Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "Auth token for the account." },
     "username": { "kind": "property", "displayName": "Username", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "The account to use." }
diff --git a/components/camel-twilio/src/main/docs/twilio-component.adoc b/components/camel-twilio/src/main/docs/twilio-component.adoc
index c49821f..34e368d 100644
--- a/components/camel-twilio/src/main/docs/twilio-component.adoc
+++ b/components/camel-twilio/src/main/docs/twilio-component.adoc
@@ -42,7 +42,7 @@ The Twilio component supports 8 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 [...]
 | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
-| *restClient* (advanced) | To use the shared REST client |  | TwilioRestClient
+| *restClient* (advanced) | *Autowired* To use the shared REST client |  | TwilioRestClient
 | *accountSid* (security) | The account SID to use. |  | String
 | *password* (security) | Auth token for the account. |  | String
 | *username* (security) | The account to use. |  | String
diff --git a/components/camel-twilio/src/main/java/org/apache/camel/component/twilio/TwilioComponent.java b/components/camel-twilio/src/main/java/org/apache/camel/component/twilio/TwilioComponent.java
index a606379..8dae292 100644
--- a/components/camel-twilio/src/main/java/org/apache/camel/component/twilio/TwilioComponent.java
+++ b/components/camel-twilio/src/main/java/org/apache/camel/component/twilio/TwilioComponent.java
@@ -37,7 +37,7 @@ public class TwilioComponent extends AbstractApiComponent<TwilioApiName, TwilioC
     private String password;
     @Metadata(label = "common,security", secret = true)
     private String accountSid;
-    @Metadata(label = "advanced")
+    @Metadata(label = "advanced", autowired = true)
     private TwilioRestClient restClient;
 
     public TwilioComponent() {
diff --git a/docs/components/modules/ROOT/pages/twilio-component.adoc b/docs/components/modules/ROOT/pages/twilio-component.adoc
index 7572d51..986b57c 100644
--- a/docs/components/modules/ROOT/pages/twilio-component.adoc
+++ b/docs/components/modules/ROOT/pages/twilio-component.adoc
@@ -44,7 +44,7 @@ The Twilio component supports 8 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 [...]
 | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
-| *restClient* (advanced) | To use the shared REST client |  | TwilioRestClient
+| *restClient* (advanced) | *Autowired* To use the shared REST client |  | TwilioRestClient
 | *accountSid* (security) | The account SID to use. |  | String
 | *password* (security) | Auth token for the account. |  | String
 | *username* (security) | The account to use. |  | String


[camel] 04/06: CAMEL-15836: Add autowired metadata to camel-infinispan cacheContainer option

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit e511e1f5782dd810051b3f2b93ba15034dec03c4
Author: James Netherton <ja...@gmail.com>
AuthorDate: Fri Nov 13 11:00:52 2020 +0000

    CAMEL-15836: Add autowired metadata to camel-infinispan cacheContainer option
---
 .../resources/org/apache/camel/catalog/components/infinispan.json    | 4 ++--
 .../org/apache/camel/catalog/docs/infinispan-component.adoc          | 4 ++--
 .../camel/component/infinispan/InfinispanComponentConfigurer.java    | 5 +++++
 .../camel/component/infinispan/InfinispanEndpointConfigurer.java     | 5 +++++
 .../resources/org/apache/camel/component/infinispan/infinispan.json  | 4 ++--
 components/camel-infinispan/src/main/docs/infinispan-component.adoc  | 4 ++--
 .../apache/camel/component/infinispan/InfinispanConfiguration.java   | 2 ++
 docs/components/modules/ROOT/pages/infinispan-component.adoc         | 4 ++--
 8 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/infinispan.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/infinispan.json
index 2523a03..4a472bd 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/infinispan.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/infinispan.json
@@ -44,7 +44,7 @@
     "securityServerName": { "kind": "property", "displayName": "Security Server Name", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the security server name to access the infinispan instance" },
     "username": { "kind": "property", "displayName": "Username", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the username to access the infinispan instance" },
     "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 [...]
-    "cacheContainer": { "kind": "property", "displayName": "Cache Container", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.commons.api.BasicCacheContainer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Specifies the cache Container to connect" },
+    "cacheContainer": { "kind": "property", "displayName": "Cache Container", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.commons.api.BasicCacheContainer", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Specifies the cache Container to connect" },
     "cacheContainerConfiguration": { "kind": "property", "displayName": "Cache Container Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "The CacheContainer configuration. Uses if the cacheContainer is not defined. [...]
     "configurationProperties": { "kind": "property", "displayName": "Configuration Properties", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Implementation specific properties for the CacheManager" },
     "configurationUri": { "kind": "property", "displayName": "Configuration Uri", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "An implementation specific URI for the CacheManager" },
@@ -76,7 +76,7 @@
     "securityRealm": { "kind": "parameter", "displayName": "Security Realm", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the security realm to access the infinispan instance" },
     "securityServerName": { "kind": "parameter", "displayName": "Security Server Name", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the security server name to access the infinispan instance" },
     "username": { "kind": "parameter", "displayName": "Username", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the username to access the infinispan instance" },
-    "cacheContainer": { "kind": "parameter", "displayName": "Cache Container", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.commons.api.BasicCacheContainer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Specifies the cache Container to connect" },
+    "cacheContainer": { "kind": "parameter", "displayName": "Cache Container", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.commons.api.BasicCacheContainer", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Specifies the cache Container to connect" },
     "cacheContainerConfiguration": { "kind": "parameter", "displayName": "Cache Container Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "The CacheContainer configuration. Uses if the cacheContainer is not defined [...]
     "configurationProperties": { "kind": "parameter", "displayName": "Configuration Properties", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Implementation specific properties for the CacheMan [...]
     "configurationUri": { "kind": "parameter", "displayName": "Configuration Uri", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "An implementation specific URI for the CacheManager" },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/infinispan-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/infinispan-component.adoc
index 390f737..b97ace0 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/infinispan-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/infinispan-component.adoc
@@ -92,7 +92,7 @@ The Infinispan component supports 29 options, which are listed below.
 | *securityServerName* ( security) | Define the security server name to access the infinispan instance |  | String
 | *username* ( security) | Define the username to access the infinispan instance |  | String
 | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
-| *cacheContainer* (advanced) | Specifies the cache Container to connect |  | BasicCacheContainer
+| *cacheContainer* (advanced) | *Autowired* Specifies the cache Container to connect |  | BasicCacheContainer
 | *cacheContainerConfiguration* (advanced) | The CacheContainer configuration. Uses if the cacheContainer is not defined. Must be the following types: org.infinispan.client.hotrod.configuration.Configuration - for remote cache interaction configuration; org.infinispan.configuration.cache.Configuration - for embedded cache interaction configuration; |  | Object
 | *configurationProperties* (advanced) | Implementation specific properties for the CacheManager |  | Map
 | *configurationUri* (advanced) | An implementation specific URI for the CacheManager |  | String
@@ -152,7 +152,7 @@ with the following path and query parameters:
 | *securityRealm* ( security) | Define the security realm to access the infinispan instance |  | String
 | *securityServerName* ( security) | Define the security server name to access the infinispan instance |  | String
 | *username* ( security) | Define the username to access the infinispan instance |  | String
-| *cacheContainer* (advanced) | Specifies the cache Container to connect |  | BasicCacheContainer
+| *cacheContainer* (advanced) | *Autowired* Specifies the cache Container to connect |  | BasicCacheContainer
 | *cacheContainerConfiguration* (advanced) | The CacheContainer configuration. Uses if the cacheContainer is not defined. Must be the following types: org.infinispan.client.hotrod.configuration.Configuration - for remote cache interaction configuration; org.infinispan.configuration.cache.Configuration - for embedded cache interaction configuration; |  | Object
 | *configurationProperties* (advanced) | Implementation specific properties for the CacheManager |  | Map
 | *configurationUri* (advanced) | An implementation specific URI for the CacheManager |  | String
diff --git a/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanComponentConfigurer.java b/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanComponentConfigurer.java
index 9d610927..6d74576 100644
--- a/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanComponentConfigurer.java
+++ b/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanComponentConfigurer.java
@@ -80,6 +80,11 @@ public class InfinispanComponentConfigurer extends PropertyConfigurerSupport imp
     }
 
     @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"cacheContainer"};
+    }
+
+    @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "autowiredenabled":
diff --git a/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanEndpointConfigurer.java b/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanEndpointConfigurer.java
index df75074..58353c8 100644
--- a/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanEndpointConfigurer.java
+++ b/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanEndpointConfigurer.java
@@ -75,6 +75,11 @@ public class InfinispanEndpointConfigurer extends PropertyConfigurerSupport impl
     }
 
     @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"cacheContainer"};
+    }
+
+    @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "bridgeerrorhandler":
diff --git a/components/camel-infinispan/src/generated/resources/org/apache/camel/component/infinispan/infinispan.json b/components/camel-infinispan/src/generated/resources/org/apache/camel/component/infinispan/infinispan.json
index 2523a03..4a472bd 100644
--- a/components/camel-infinispan/src/generated/resources/org/apache/camel/component/infinispan/infinispan.json
+++ b/components/camel-infinispan/src/generated/resources/org/apache/camel/component/infinispan/infinispan.json
@@ -44,7 +44,7 @@
     "securityServerName": { "kind": "property", "displayName": "Security Server Name", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the security server name to access the infinispan instance" },
     "username": { "kind": "property", "displayName": "Username", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the username to access the infinispan instance" },
     "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 [...]
-    "cacheContainer": { "kind": "property", "displayName": "Cache Container", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.commons.api.BasicCacheContainer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Specifies the cache Container to connect" },
+    "cacheContainer": { "kind": "property", "displayName": "Cache Container", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.commons.api.BasicCacheContainer", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Specifies the cache Container to connect" },
     "cacheContainerConfiguration": { "kind": "property", "displayName": "Cache Container Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "The CacheContainer configuration. Uses if the cacheContainer is not defined. [...]
     "configurationProperties": { "kind": "property", "displayName": "Configuration Properties", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Implementation specific properties for the CacheManager" },
     "configurationUri": { "kind": "property", "displayName": "Configuration Uri", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "An implementation specific URI for the CacheManager" },
@@ -76,7 +76,7 @@
     "securityRealm": { "kind": "parameter", "displayName": "Security Realm", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the security realm to access the infinispan instance" },
     "securityServerName": { "kind": "parameter", "displayName": "Security Server Name", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the security server name to access the infinispan instance" },
     "username": { "kind": "parameter", "displayName": "Username", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the username to access the infinispan instance" },
-    "cacheContainer": { "kind": "parameter", "displayName": "Cache Container", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.commons.api.BasicCacheContainer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Specifies the cache Container to connect" },
+    "cacheContainer": { "kind": "parameter", "displayName": "Cache Container", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.commons.api.BasicCacheContainer", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Specifies the cache Container to connect" },
     "cacheContainerConfiguration": { "kind": "parameter", "displayName": "Cache Container Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "The CacheContainer configuration. Uses if the cacheContainer is not defined [...]
     "configurationProperties": { "kind": "parameter", "displayName": "Configuration Properties", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Implementation specific properties for the CacheMan [...]
     "configurationUri": { "kind": "parameter", "displayName": "Configuration Uri", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "An implementation specific URI for the CacheManager" },
diff --git a/components/camel-infinispan/src/main/docs/infinispan-component.adoc b/components/camel-infinispan/src/main/docs/infinispan-component.adoc
index 390f737..b97ace0 100644
--- a/components/camel-infinispan/src/main/docs/infinispan-component.adoc
+++ b/components/camel-infinispan/src/main/docs/infinispan-component.adoc
@@ -92,7 +92,7 @@ The Infinispan component supports 29 options, which are listed below.
 | *securityServerName* ( security) | Define the security server name to access the infinispan instance |  | String
 | *username* ( security) | Define the username to access the infinispan instance |  | String
 | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
-| *cacheContainer* (advanced) | Specifies the cache Container to connect |  | BasicCacheContainer
+| *cacheContainer* (advanced) | *Autowired* Specifies the cache Container to connect |  | BasicCacheContainer
 | *cacheContainerConfiguration* (advanced) | The CacheContainer configuration. Uses if the cacheContainer is not defined. Must be the following types: org.infinispan.client.hotrod.configuration.Configuration - for remote cache interaction configuration; org.infinispan.configuration.cache.Configuration - for embedded cache interaction configuration; |  | Object
 | *configurationProperties* (advanced) | Implementation specific properties for the CacheManager |  | Map
 | *configurationUri* (advanced) | An implementation specific URI for the CacheManager |  | String
@@ -152,7 +152,7 @@ with the following path and query parameters:
 | *securityRealm* ( security) | Define the security realm to access the infinispan instance |  | String
 | *securityServerName* ( security) | Define the security server name to access the infinispan instance |  | String
 | *username* ( security) | Define the username to access the infinispan instance |  | String
-| *cacheContainer* (advanced) | Specifies the cache Container to connect |  | BasicCacheContainer
+| *cacheContainer* (advanced) | *Autowired* Specifies the cache Container to connect |  | BasicCacheContainer
 | *cacheContainerConfiguration* (advanced) | The CacheContainer configuration. Uses if the cacheContainer is not defined. Must be the following types: org.infinispan.client.hotrod.configuration.Configuration - for remote cache interaction configuration; org.infinispan.configuration.cache.Configuration - for embedded cache interaction configuration; |  | Object
 | *configurationProperties* (advanced) | Implementation specific properties for the CacheManager |  | Map
 | *configurationUri* (advanced) | An implementation specific URI for the CacheManager |  | String
diff --git a/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java b/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
index 7671f02..c56c6ac 100644
--- a/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
+++ b/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
@@ -24,6 +24,7 @@ import java.util.Set;
 import java.util.function.BiFunction;
 
 import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
 import org.infinispan.commons.api.BasicCacheContainer;
@@ -62,6 +63,7 @@ public class InfinispanConfiguration implements Cloneable {
     private String configurationUri;
     @UriParam(label = "advanced")
     private Map<String, String> configurationProperties;
+    @Metadata(autowired = true)
     @UriParam(label = "advanced")
     private BasicCacheContainer cacheContainer;
     @UriParam(label = "advanced")
diff --git a/docs/components/modules/ROOT/pages/infinispan-component.adoc b/docs/components/modules/ROOT/pages/infinispan-component.adoc
index 153f0b7..1a072a3 100644
--- a/docs/components/modules/ROOT/pages/infinispan-component.adoc
+++ b/docs/components/modules/ROOT/pages/infinispan-component.adoc
@@ -94,7 +94,7 @@ The Infinispan component supports 29 options, which are listed below.
 | *securityServerName* ( security) | Define the security server name to access the infinispan instance |  | String
 | *username* ( security) | Define the username to access the infinispan instance |  | String
 | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
-| *cacheContainer* (advanced) | Specifies the cache Container to connect |  | BasicCacheContainer
+| *cacheContainer* (advanced) | *Autowired* Specifies the cache Container to connect |  | BasicCacheContainer
 | *cacheContainerConfiguration* (advanced) | The CacheContainer configuration. Uses if the cacheContainer is not defined. Must be the following types: org.infinispan.client.hotrod.configuration.Configuration - for remote cache interaction configuration; org.infinispan.configuration.cache.Configuration - for embedded cache interaction configuration; |  | Object
 | *configurationProperties* (advanced) | Implementation specific properties for the CacheManager |  | Map
 | *configurationUri* (advanced) | An implementation specific URI for the CacheManager |  | String
@@ -154,7 +154,7 @@ with the following path and query parameters:
 | *securityRealm* ( security) | Define the security realm to access the infinispan instance |  | String
 | *securityServerName* ( security) | Define the security server name to access the infinispan instance |  | String
 | *username* ( security) | Define the username to access the infinispan instance |  | String
-| *cacheContainer* (advanced) | Specifies the cache Container to connect |  | BasicCacheContainer
+| *cacheContainer* (advanced) | *Autowired* Specifies the cache Container to connect |  | BasicCacheContainer
 | *cacheContainerConfiguration* (advanced) | The CacheContainer configuration. Uses if the cacheContainer is not defined. Must be the following types: org.infinispan.client.hotrod.configuration.Configuration - for remote cache interaction configuration; org.infinispan.configuration.cache.Configuration - for embedded cache interaction configuration; |  | Object
 | *configurationProperties* (advanced) | Implementation specific properties for the CacheManager |  | Map
 | *configurationUri* (advanced) | An implementation specific URI for the CacheManager |  | String


[camel] 05/06: CAMEL-15836: Add autowired metadata to camel-influxdb influxDB option

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 64cd8286e466422493ec164aae0267a443f4d022
Author: James Netherton <ja...@gmail.com>
AuthorDate: Fri Nov 13 11:04:09 2020 +0000

    CAMEL-15836: Add autowired metadata to camel-influxdb influxDB option
---
 .../resources/org/apache/camel/catalog/components/influxdb.json      | 2 +-
 .../resources/org/apache/camel/catalog/docs/influxdb-component.adoc  | 2 +-
 .../apache/camel/component/influxdb/InfluxDbComponentConfigurer.java | 5 +++++
 .../resources/org/apache/camel/component/influxdb/influxdb.json      | 2 +-
 components/camel-influxdb/src/main/docs/influxdb-component.adoc      | 2 +-
 .../java/org/apache/camel/component/influxdb/InfluxDbComponent.java  | 2 +-
 docs/components/modules/ROOT/pages/influxdb-component.adoc           | 2 +-
 7 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/influxdb.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/influxdb.json
index c3b0749..7bfbf55 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/influxdb.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/influxdb.json
@@ -22,7 +22,7 @@
     "lenientProperties": false
   },
   "componentProperties": {
-    "influxDB": { "kind": "property", "displayName": "Influx DB", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.influxdb.InfluxDB", "deprecated": false, "autowired": false, "secret": false, "description": "The shared Influx DB to use for all endpoints" },
+    "influxDB": { "kind": "property", "displayName": "Influx DB", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.influxdb.InfluxDB", "deprecated": false, "autowired": true, "secret": false, "description": "The shared Influx DB to use for all endpoints" },
     "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 [...]
     "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 [...]
   },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/influxdb-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/influxdb-component.adoc
index 7215d88..0ceaa22 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/influxdb-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/influxdb-component.adoc
@@ -58,7 +58,7 @@ The InfluxDB component supports 3 options, which are listed below.
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *influxDB* (producer) | The shared Influx DB to use for all endpoints |  | InfluxDB
+| *influxDB* (producer) | *Autowired* The shared Influx DB to use for all endpoints |  | InfluxDB
 | *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 [...]
 | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
 |===
diff --git a/components/camel-influxdb/src/generated/java/org/apache/camel/component/influxdb/InfluxDbComponentConfigurer.java b/components/camel-influxdb/src/generated/java/org/apache/camel/component/influxdb/InfluxDbComponentConfigurer.java
index 21f11a8..4882ab0 100644
--- a/components/camel-influxdb/src/generated/java/org/apache/camel/component/influxdb/InfluxDbComponentConfigurer.java
+++ b/components/camel-influxdb/src/generated/java/org/apache/camel/component/influxdb/InfluxDbComponentConfigurer.java
@@ -32,6 +32,11 @@ public class InfluxDbComponentConfigurer extends PropertyConfigurerSupport imple
     }
 
     @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"influxDB"};
+    }
+
+    @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "autowiredenabled":
diff --git a/components/camel-influxdb/src/generated/resources/org/apache/camel/component/influxdb/influxdb.json b/components/camel-influxdb/src/generated/resources/org/apache/camel/component/influxdb/influxdb.json
index c3b0749..7bfbf55 100644
--- a/components/camel-influxdb/src/generated/resources/org/apache/camel/component/influxdb/influxdb.json
+++ b/components/camel-influxdb/src/generated/resources/org/apache/camel/component/influxdb/influxdb.json
@@ -22,7 +22,7 @@
     "lenientProperties": false
   },
   "componentProperties": {
-    "influxDB": { "kind": "property", "displayName": "Influx DB", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.influxdb.InfluxDB", "deprecated": false, "autowired": false, "secret": false, "description": "The shared Influx DB to use for all endpoints" },
+    "influxDB": { "kind": "property", "displayName": "Influx DB", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.influxdb.InfluxDB", "deprecated": false, "autowired": true, "secret": false, "description": "The shared Influx DB to use for all endpoints" },
     "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 [...]
     "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 [...]
   },
diff --git a/components/camel-influxdb/src/main/docs/influxdb-component.adoc b/components/camel-influxdb/src/main/docs/influxdb-component.adoc
index 7215d88..0ceaa22 100644
--- a/components/camel-influxdb/src/main/docs/influxdb-component.adoc
+++ b/components/camel-influxdb/src/main/docs/influxdb-component.adoc
@@ -58,7 +58,7 @@ The InfluxDB component supports 3 options, which are listed below.
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *influxDB* (producer) | The shared Influx DB to use for all endpoints |  | InfluxDB
+| *influxDB* (producer) | *Autowired* The shared Influx DB to use for all endpoints |  | InfluxDB
 | *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 [...]
 | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
 |===
diff --git a/components/camel-influxdb/src/main/java/org/apache/camel/component/influxdb/InfluxDbComponent.java b/components/camel-influxdb/src/main/java/org/apache/camel/component/influxdb/InfluxDbComponent.java
index 937d983..866eaa7 100644
--- a/components/camel-influxdb/src/main/java/org/apache/camel/component/influxdb/InfluxDbComponent.java
+++ b/components/camel-influxdb/src/main/java/org/apache/camel/component/influxdb/InfluxDbComponent.java
@@ -28,7 +28,7 @@ import org.influxdb.InfluxDB;
 @Component("influxdb")
 public class InfluxDbComponent extends DefaultComponent {
 
-    @Metadata
+    @Metadata(autowired = true)
     private InfluxDB influxDB;
 
     public InfluxDbComponent() {
diff --git a/docs/components/modules/ROOT/pages/influxdb-component.adoc b/docs/components/modules/ROOT/pages/influxdb-component.adoc
index f590360..2164f7e 100644
--- a/docs/components/modules/ROOT/pages/influxdb-component.adoc
+++ b/docs/components/modules/ROOT/pages/influxdb-component.adoc
@@ -60,7 +60,7 @@ The InfluxDB component supports 3 options, which are listed below.
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *influxDB* (producer) | The shared Influx DB to use for all endpoints |  | InfluxDB
+| *influxDB* (producer) | *Autowired* The shared Influx DB to use for all endpoints |  | InfluxDB
 | *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 [...]
 | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
 |===


[camel] 02/06: CAMEL-15836: Add autowired metadata to camel-bean-validator validatorFactory option

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 9414ce25b58002b14ffc718a8c0b25a7a5a72e0c
Author: James Netherton <ja...@gmail.com>
AuthorDate: Fri Nov 13 10:30:10 2020 +0000

    CAMEL-15836: Add autowired metadata to camel-bean-validator validatorFactory option
---
 .../camel/catalog/components/bean-validator.json   |  2 +-
 .../catalog/docs/bean-validator-component.adoc     |  2 +-
 .../BeanValidatorComponentConfigurer.java          |  5 +++
 .../component/bean/validator/bean-validator.json   |  2 +-
 .../src/main/docs/bean-validator-component.adoc    |  2 +-
 .../bean/validator/BeanValidatorComponent.java     |  2 +-
 ...Test.java => ValidatorFactoryAutowireTest.java} | 23 ++------------
 ...Test.java => ValidatorFactoryRegistryTest.java} | 30 ++++++------------
 .../bean/validator/ValidatorFactoryTest.java       | 36 ----------------------
 .../ROOT/pages/bean-validator-component.adoc       |  2 +-
 10 files changed, 23 insertions(+), 83 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/bean-validator.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/bean-validator.json
index 73a57b5..b5433b0 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/bean-validator.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/bean-validator.json
@@ -29,7 +29,7 @@
     "messageInterpolator": { "kind": "property", "displayName": "Message Interpolator", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "javax.validation.MessageInterpolator", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom MessageInterpolator" },
     "traversableResolver": { "kind": "property", "displayName": "Traversable Resolver", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "javax.validation.TraversableResolver", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom TraversableResolver" },
     "validationProviderResolver": { "kind": "property", "displayName": "Validation Provider Resolver", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "javax.validation.ValidationProviderResolver", "deprecated": false, "autowired": false, "secret": false, "description": "To use a a custom ValidationProviderResolver" },
-    "validatorFactory": { "kind": "property", "displayName": "Validator Factory", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "javax.validation.ValidatorFactory", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom ValidatorFactory" }
+    "validatorFactory": { "kind": "property", "displayName": "Validator Factory", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "javax.validation.ValidatorFactory", "deprecated": false, "autowired": true, "secret": false, "description": "To use a custom ValidatorFactory" }
   },
   "properties": {
     "label": { "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Where label is an arbitrary text value describing the endpoint" },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/bean-validator-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/bean-validator-component.adoc
index 0a9f803..fb708d5 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/bean-validator-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/bean-validator-component.adoc
@@ -68,7 +68,7 @@ The Bean Validator component supports 8 options, which are listed below.
 | *messageInterpolator* (advanced) | To use a custom MessageInterpolator |  | MessageInterpolator
 | *traversableResolver* (advanced) | To use a custom TraversableResolver |  | TraversableResolver
 | *validationProviderResolver* (advanced) | To use a a custom ValidationProviderResolver |  | ValidationProviderResolver
-| *validatorFactory* (advanced) | To use a custom ValidatorFactory |  | ValidatorFactory
+| *validatorFactory* (advanced) | *Autowired* To use a custom ValidatorFactory |  | ValidatorFactory
 |===
 // component options: END
 
diff --git a/components/camel-bean-validator/src/generated/java/org/apache/camel/component/bean/validator/BeanValidatorComponentConfigurer.java b/components/camel-bean-validator/src/generated/java/org/apache/camel/component/bean/validator/BeanValidatorComponentConfigurer.java
index 835d161..b794d83 100644
--- a/components/camel-bean-validator/src/generated/java/org/apache/camel/component/bean/validator/BeanValidatorComponentConfigurer.java
+++ b/components/camel-bean-validator/src/generated/java/org/apache/camel/component/bean/validator/BeanValidatorComponentConfigurer.java
@@ -42,6 +42,11 @@ public class BeanValidatorComponentConfigurer extends PropertyConfigurerSupport
     }
 
     @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"validatorFactory"};
+    }
+
+    @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "autowiredenabled":
diff --git a/components/camel-bean-validator/src/generated/resources/org/apache/camel/component/bean/validator/bean-validator.json b/components/camel-bean-validator/src/generated/resources/org/apache/camel/component/bean/validator/bean-validator.json
index 73a57b5..b5433b0 100644
--- a/components/camel-bean-validator/src/generated/resources/org/apache/camel/component/bean/validator/bean-validator.json
+++ b/components/camel-bean-validator/src/generated/resources/org/apache/camel/component/bean/validator/bean-validator.json
@@ -29,7 +29,7 @@
     "messageInterpolator": { "kind": "property", "displayName": "Message Interpolator", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "javax.validation.MessageInterpolator", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom MessageInterpolator" },
     "traversableResolver": { "kind": "property", "displayName": "Traversable Resolver", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "javax.validation.TraversableResolver", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom TraversableResolver" },
     "validationProviderResolver": { "kind": "property", "displayName": "Validation Provider Resolver", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "javax.validation.ValidationProviderResolver", "deprecated": false, "autowired": false, "secret": false, "description": "To use a a custom ValidationProviderResolver" },
-    "validatorFactory": { "kind": "property", "displayName": "Validator Factory", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "javax.validation.ValidatorFactory", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom ValidatorFactory" }
+    "validatorFactory": { "kind": "property", "displayName": "Validator Factory", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "javax.validation.ValidatorFactory", "deprecated": false, "autowired": true, "secret": false, "description": "To use a custom ValidatorFactory" }
   },
   "properties": {
     "label": { "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Where label is an arbitrary text value describing the endpoint" },
diff --git a/components/camel-bean-validator/src/main/docs/bean-validator-component.adoc b/components/camel-bean-validator/src/main/docs/bean-validator-component.adoc
index 0a9f803..fb708d5 100644
--- a/components/camel-bean-validator/src/main/docs/bean-validator-component.adoc
+++ b/components/camel-bean-validator/src/main/docs/bean-validator-component.adoc
@@ -68,7 +68,7 @@ The Bean Validator component supports 8 options, which are listed below.
 | *messageInterpolator* (advanced) | To use a custom MessageInterpolator |  | MessageInterpolator
 | *traversableResolver* (advanced) | To use a custom TraversableResolver |  | TraversableResolver
 | *validationProviderResolver* (advanced) | To use a a custom ValidationProviderResolver |  | ValidationProviderResolver
-| *validatorFactory* (advanced) | To use a custom ValidatorFactory |  | ValidatorFactory
+| *validatorFactory* (advanced) | *Autowired* To use a custom ValidatorFactory |  | ValidatorFactory
 |===
 // component options: END
 
diff --git a/components/camel-bean-validator/src/main/java/org/apache/camel/component/bean/validator/BeanValidatorComponent.java b/components/camel-bean-validator/src/main/java/org/apache/camel/component/bean/validator/BeanValidatorComponent.java
index 3e18c73..5e37cbf 100644
--- a/components/camel-bean-validator/src/main/java/org/apache/camel/component/bean/validator/BeanValidatorComponent.java
+++ b/components/camel-bean-validator/src/main/java/org/apache/camel/component/bean/validator/BeanValidatorComponent.java
@@ -46,7 +46,7 @@ public class BeanValidatorComponent extends DefaultComponent {
     private TraversableResolver traversableResolver;
     @Metadata(label = "advanced")
     private ConstraintValidatorFactory constraintValidatorFactory;
-    @Metadata(label = "advanced")
+    @Metadata(label = "advanced", autowired = true)
     private ValidatorFactory validatorFactory;
 
     public BeanValidatorComponent() {
diff --git a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryTest.java b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryAutowireTest.java
similarity index 67%
copy from components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryTest.java
copy to components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryAutowireTest.java
index c041c49..de09a08 100644
--- a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryTest.java
+++ b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryAutowireTest.java
@@ -26,13 +26,10 @@ import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.condition.DisabledOnOs;
 
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertNotSame;
-import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertSame;
 import static org.junit.jupiter.api.condition.OS.AIX;
 
-public class ValidatorFactoryTest extends CamelTestSupport {
+public class ValidatorFactoryAutowireTest extends CamelTestSupport {
 
     @BindToRegistry("myValidatorFactory")
     private ValidatorFactory validatorFactory;
@@ -50,26 +47,12 @@ public class ValidatorFactoryTest extends CamelTestSupport {
 
     @DisabledOnOs(AIX)
     @Test
-    void configureValidatorFactoryFromRegistry() throws Exception {
-
+    void configureValidatorFactoryAutowired() throws Exception {
         BeanValidatorEndpoint endpoint
-                = context.getEndpoint("bean-validator:dummy?validatorFactory=#myValidatorFactory", BeanValidatorEndpoint.class);
+                = context.getEndpoint("bean-validator:dummy", BeanValidatorEndpoint.class);
         BeanValidatorProducer producer = (BeanValidatorProducer) endpoint.createProducer();
 
         assertSame(this.validatorFactory, endpoint.getValidatorFactory());
         assertSame(this.validatorFactory, producer.getValidatorFactory());
     }
-
-    @DisabledOnOs(AIX)
-    @Test
-    void configureValidatorFactory() throws Exception {
-
-        BeanValidatorEndpoint endpoint = context.getEndpoint("bean-validator:dummy", BeanValidatorEndpoint.class);
-        BeanValidatorProducer producer = (BeanValidatorProducer) endpoint.createProducer();
-
-        assertNull(endpoint.getValidatorFactory());
-        assertNotSame(this.validatorFactory, endpoint.getValidatorFactory());
-        assertNotNull(producer.getValidatorFactory());
-        assertNotSame(this.validatorFactory, producer.getValidatorFactory());
-    }
 }
diff --git a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryTest.java b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryRegistryTest.java
similarity index 66%
copy from components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryTest.java
copy to components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryRegistryTest.java
index c041c49..965de43 100644
--- a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryTest.java
+++ b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryRegistryTest.java
@@ -26,17 +26,17 @@ import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.condition.DisabledOnOs;
 
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertNotSame;
-import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertSame;
 import static org.junit.jupiter.api.condition.OS.AIX;
 
-public class ValidatorFactoryTest extends CamelTestSupport {
+public class ValidatorFactoryRegistryTest extends CamelTestSupport {
 
     @BindToRegistry("myValidatorFactory")
     private ValidatorFactory validatorFactory;
 
+    @BindToRegistry("otherValidatorFactory")
+    private ValidatorFactory otherValidatorFactory;
+
     @Override
     @BeforeEach
     public void setUp() throws Exception {
@@ -44,6 +44,7 @@ public class ValidatorFactoryTest extends CamelTestSupport {
         bootstrap.providerResolver(new HibernateValidationProviderResolver());
 
         this.validatorFactory = bootstrap.configure().buildValidatorFactory();
+        this.otherValidatorFactory = bootstrap.configure().buildValidatorFactory();
 
         super.setUp();
     }
@@ -51,25 +52,12 @@ public class ValidatorFactoryTest extends CamelTestSupport {
     @DisabledOnOs(AIX)
     @Test
     void configureValidatorFactoryFromRegistry() throws Exception {
-
         BeanValidatorEndpoint endpoint
-                = context.getEndpoint("bean-validator:dummy?validatorFactory=#myValidatorFactory", BeanValidatorEndpoint.class);
-        BeanValidatorProducer producer = (BeanValidatorProducer) endpoint.createProducer();
-
-        assertSame(this.validatorFactory, endpoint.getValidatorFactory());
-        assertSame(this.validatorFactory, producer.getValidatorFactory());
-    }
-
-    @DisabledOnOs(AIX)
-    @Test
-    void configureValidatorFactory() throws Exception {
-
-        BeanValidatorEndpoint endpoint = context.getEndpoint("bean-validator:dummy", BeanValidatorEndpoint.class);
+                = context.getEndpoint("bean-validator:dummy?validatorFactory=#otherValidatorFactory",
+                        BeanValidatorEndpoint.class);
         BeanValidatorProducer producer = (BeanValidatorProducer) endpoint.createProducer();
 
-        assertNull(endpoint.getValidatorFactory());
-        assertNotSame(this.validatorFactory, endpoint.getValidatorFactory());
-        assertNotNull(producer.getValidatorFactory());
-        assertNotSame(this.validatorFactory, producer.getValidatorFactory());
+        assertSame(this.otherValidatorFactory, endpoint.getValidatorFactory());
+        assertSame(this.otherValidatorFactory, producer.getValidatorFactory());
     }
 }
diff --git a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryTest.java b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryTest.java
index c041c49..4477de3 100644
--- a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryTest.java
+++ b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryTest.java
@@ -16,50 +16,16 @@
  */
 package org.apache.camel.component.bean.validator;
 
-import javax.validation.Validation;
-import javax.validation.ValidatorFactory;
-import javax.validation.bootstrap.GenericBootstrap;
-
-import org.apache.camel.BindToRegistry;
 import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.condition.DisabledOnOs;
 
 import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertNotSame;
 import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.junit.jupiter.api.Assertions.assertSame;
 import static org.junit.jupiter.api.condition.OS.AIX;
 
 public class ValidatorFactoryTest extends CamelTestSupport {
 
-    @BindToRegistry("myValidatorFactory")
-    private ValidatorFactory validatorFactory;
-
-    @Override
-    @BeforeEach
-    public void setUp() throws Exception {
-        GenericBootstrap bootstrap = Validation.byDefaultProvider();
-        bootstrap.providerResolver(new HibernateValidationProviderResolver());
-
-        this.validatorFactory = bootstrap.configure().buildValidatorFactory();
-
-        super.setUp();
-    }
-
-    @DisabledOnOs(AIX)
-    @Test
-    void configureValidatorFactoryFromRegistry() throws Exception {
-
-        BeanValidatorEndpoint endpoint
-                = context.getEndpoint("bean-validator:dummy?validatorFactory=#myValidatorFactory", BeanValidatorEndpoint.class);
-        BeanValidatorProducer producer = (BeanValidatorProducer) endpoint.createProducer();
-
-        assertSame(this.validatorFactory, endpoint.getValidatorFactory());
-        assertSame(this.validatorFactory, producer.getValidatorFactory());
-    }
-
     @DisabledOnOs(AIX)
     @Test
     void configureValidatorFactory() throws Exception {
@@ -68,8 +34,6 @@ public class ValidatorFactoryTest extends CamelTestSupport {
         BeanValidatorProducer producer = (BeanValidatorProducer) endpoint.createProducer();
 
         assertNull(endpoint.getValidatorFactory());
-        assertNotSame(this.validatorFactory, endpoint.getValidatorFactory());
         assertNotNull(producer.getValidatorFactory());
-        assertNotSame(this.validatorFactory, producer.getValidatorFactory());
     }
 }
diff --git a/docs/components/modules/ROOT/pages/bean-validator-component.adoc b/docs/components/modules/ROOT/pages/bean-validator-component.adoc
index 09acc6b..f731aac 100644
--- a/docs/components/modules/ROOT/pages/bean-validator-component.adoc
+++ b/docs/components/modules/ROOT/pages/bean-validator-component.adoc
@@ -70,7 +70,7 @@ The Bean Validator component supports 8 options, which are listed below.
 | *messageInterpolator* (advanced) | To use a custom MessageInterpolator |  | MessageInterpolator
 | *traversableResolver* (advanced) | To use a custom TraversableResolver |  | TraversableResolver
 | *validationProviderResolver* (advanced) | To use a a custom ValidationProviderResolver |  | ValidationProviderResolver
-| *validatorFactory* (advanced) | To use a custom ValidatorFactory |  | ValidatorFactory
+| *validatorFactory* (advanced) | *Autowired* To use a custom ValidatorFactory |  | ValidatorFactory
 |===
 // component options: END