You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/11/16 08:28:00 UTC

[camel] branch master updated (5e47682 -> b467c60)

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

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


    from 5e47682  Camel-AWS2-MQ: Don't use ActiveMQ as default EngineType in createBroker operation, since now there is also RabbitMQ as supported engine
     new 3677870  CAMEL-15836 - Camel-AWS2-Eventbridge: enable autowire on the Eventbridge client
     new e734ccf  CAMEL-15836 - Camel-AWS2-Eventbridge: enable autowire on the Eventbridge client, regen configurers and component
     new 375d99a  Camel-AWS2-Eventbridge: The eventbusname should be annotated with Uripath and default value is default
     new dd37bba  Camel-AWS2-Evenbridge: Regen component and configurers
     new 6a75182  Camel-AWS2-Eventbridge: Regen catalog
     new b467c60  CAMEL-15836 - Camel-AWS2-Eventbridge: enable autowire on the Eventbridge client, added a note to migration guide

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/aws2-eventbridge.json |  7 ++--
 .../catalog/docs/aws2-eventbridge-component.adoc   | 13 ++++----
 .../EventbridgeComponentConfigurer.java            | 11 +++----
 .../eventbridge/EventbridgeEndpointConfigurer.java | 11 +++----
 .../eventbridge/EventbridgeEndpointUriFactory.java |  3 +-
 .../aws2/eventbridge/aws2-eventbridge.json         |  7 ++--
 .../src/main/docs/aws2-eventbridge-component.adoc  | 13 ++++----
 .../aws2/eventbridge/EventbridgeComponent.java     | 21 ------------
 .../aws2/eventbridge/EventbridgeConfiguration.java | 18 +++-------
 .../Aws2EventbridgeComponentBuilderFactory.java    | 16 ---------
 .../builder/endpoint/StaticEndpointBuilders.java   |  8 +++++
 .../dsl/EventbridgeEndpointBuilderFactory.java     | 38 +++++-----------------
 .../ROOT/pages/aws2-eventbridge-component.adoc     | 13 ++++----
 .../ROOT/pages/camel-3x-upgrade-guide-3_7.adoc     |  5 +++
 14 files changed, 61 insertions(+), 123 deletions(-)


[camel] 02/06: CAMEL-15836 - Camel-AWS2-Eventbridge: enable autowire on the Eventbridge client, regen configurers and component

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

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

commit e734ccfbf4eee869d1f1c66a9dae13652157badd
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 16 09:17:44 2020 +0100

    CAMEL-15836 - Camel-AWS2-Eventbridge: enable autowire on the Eventbridge client, regen configurers and component
---
 .../catalog/docs/aws2-eventbridge-component.adoc   | 10 +++-----
 .../EventbridgeComponentConfigurer.java            | 11 ++++----
 .../eventbridge/EventbridgeEndpointConfigurer.java | 11 ++++----
 .../eventbridge/EventbridgeEndpointUriFactory.java |  3 +--
 .../aws2/eventbridge/aws2-eventbridge.json         |  6 ++---
 .../src/main/docs/aws2-eventbridge-component.adoc  | 10 +++-----
 .../aws2/eventbridge/EventbridgeComponent.java     |  3 ---
 .../aws2/eventbridge/EventbridgeConfiguration.java |  2 --
 .../Aws2EventbridgeComponentBuilderFactory.java    | 16 ------------
 .../dsl/EventbridgeEndpointBuilderFactory.java     | 30 ----------------------
 .../ROOT/pages/aws2-eventbridge-component.adoc     | 10 +++-----
 11 files changed, 25 insertions(+), 87 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc
index c119043..9065704 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc
@@ -47,16 +47,15 @@ You can append query options to the URI in the following format,
 
 
 // component options: START
-The AWS 2 Eventbridge component supports 15 options, which are listed below.
+The AWS 2 Eventbridge component supports 14 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean
 | *configuration* (producer) | Component configuration |  | EventbridgeConfiguration
-| *eventbridgeClient* (producer) | To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
+| *eventbridgeClient* (producer) | *Autowired* To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
 | *eventPatternFile* (producer) | EventPattern File |  | String
 | *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 [...]
 | *operation* (producer) | *Required* The operation to perform. There are 10 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule, listRuleNamesByTarget | putRule | EventbridgeOperations
@@ -94,14 +93,13 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (14 parameters):
+=== Query Parameters (13 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean
-| *eventbridgeClient* (producer) | To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
+| *eventbridgeClient* (producer) | *Autowired* To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
 | *eventPatternFile* (producer) | EventPattern File |  | String
 | *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 [...]
 | *operation* (producer) | *Required* The operation to perform. There are 10 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule, listRuleNamesByTarget | putRule | EventbridgeOperations
diff --git a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurer.java b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurer.java
index eb95381..b7eabcf 100644
--- a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurer.java
+++ b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurer.java
@@ -30,8 +30,6 @@ public class EventbridgeComponentConfigurer extends PropertyConfigurerSupport im
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
         case "accessKey": getOrCreateConfiguration(target).setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
-        case "autodiscoverclient":
-        case "autoDiscoverClient": getOrCreateConfiguration(target).setAutoDiscoverClient(property(camelContext, boolean.class, value)); return true;
         case "autowiredenabled":
         case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
         case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration.class, value)); return true;
@@ -60,12 +58,15 @@ public class EventbridgeComponentConfigurer extends PropertyConfigurerSupport im
     }
 
     @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"eventbridgeClient"};
+    }
+
+    @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
         case "accessKey": return java.lang.String.class;
-        case "autodiscoverclient":
-        case "autoDiscoverClient": return boolean.class;
         case "autowiredenabled":
         case "autowiredEnabled": return boolean.class;
         case "configuration": return org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration.class;
@@ -99,8 +100,6 @@ public class EventbridgeComponentConfigurer extends PropertyConfigurerSupport im
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
         case "accessKey": return getOrCreateConfiguration(target).getAccessKey();
-        case "autodiscoverclient":
-        case "autoDiscoverClient": return getOrCreateConfiguration(target).isAutoDiscoverClient();
         case "autowiredenabled":
         case "autowiredEnabled": return target.isAutowiredEnabled();
         case "configuration": return target.getConfiguration();
diff --git a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointConfigurer.java b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointConfigurer.java
index 283476c..103a589 100644
--- a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointConfigurer.java
+++ b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointConfigurer.java
@@ -23,8 +23,6 @@ public class EventbridgeEndpointConfigurer extends PropertyConfigurerSupport imp
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
         case "accessKey": target.getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
-        case "autodiscoverclient":
-        case "autoDiscoverClient": target.getConfiguration().setAutoDiscoverClient(property(camelContext, boolean.class, value)); return true;
         case "eventpatternfile":
         case "eventPatternFile": target.getConfiguration().setEventPatternFile(property(camelContext, java.lang.String.class, value)); return true;
         case "eventbridgeclient":
@@ -51,12 +49,15 @@ public class EventbridgeEndpointConfigurer extends PropertyConfigurerSupport imp
     }
 
     @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"eventbridgeClient"};
+    }
+
+    @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
         case "accessKey": return java.lang.String.class;
-        case "autodiscoverclient":
-        case "autoDiscoverClient": return boolean.class;
         case "eventpatternfile":
         case "eventPatternFile": return java.lang.String.class;
         case "eventbridgeclient":
@@ -88,8 +89,6 @@ public class EventbridgeEndpointConfigurer extends PropertyConfigurerSupport imp
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
         case "accessKey": return target.getConfiguration().getAccessKey();
-        case "autodiscoverclient":
-        case "autoDiscoverClient": return target.getConfiguration().isAutoDiscoverClient();
         case "eventpatternfile":
         case "eventPatternFile": return target.getConfiguration().getEventPatternFile();
         case "eventbridgeclient":
diff --git a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointUriFactory.java b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointUriFactory.java
index e15888d..8176d56 100644
--- a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointUriFactory.java
+++ b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointUriFactory.java
@@ -20,8 +20,7 @@ public class EventbridgeEndpointUriFactory extends org.apache.camel.support.comp
     private static final Set<String> PROPERTY_NAMES;
     private static final Set<String> SECRET_PROPERTY_NAMES;
     static {
-        Set<String> props = new HashSet<>(15);
-        props.add("autoDiscoverClient");
+        Set<String> props = new HashSet<>(14);
         props.add("proxyProtocol");
         props.add("secretKey");
         props.add("synchronous");
diff --git a/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json b/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json
index 8c98e32..d99577a 100644
--- a/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json
+++ b/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json
@@ -22,9 +22,8 @@
     "lenientProperties": false
   },
   "componentProperties": {
-    "autoDiscoverClient": { "kind": "property", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look fo [...]
     "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" },
-    "eventbridgeClient": { "kind": "property", "displayName": "Eventbridge Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.eventbridge.EventBridgeClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured AWS Eventbridge as client" },
+    "eventbridgeClient": { "kind": "property", "displayName": "Eventbridge Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.eventbridge.EventBridgeClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured AW [...]
     "eventPatternFile": { "kind": "property", "displayName": "Event Pattern File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "EventPattern File" },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...]
     "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeOperations", "enum": [ "putRule", "putTargets", "removeTargets", "deleteRule", "enableRule", "disableRule", "describeRule", "listRules", "listTargetsByRule", "listRuleNamesByTarget" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "putR [...]
@@ -40,8 +39,7 @@
   },
   "properties": {
     "eventbusNameOrArn": { "kind": "path", "displayName": "Eventbus Name Or Arn", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Event bus name or ARN" },
-    "autoDiscoverClient": { "kind": "parameter", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look f [...]
-    "eventbridgeClient": { "kind": "parameter", "displayName": "Eventbridge Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.eventbridge.EventBridgeClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured AWS Eventbridge as client" },
+    "eventbridgeClient": { "kind": "parameter", "displayName": "Eventbridge Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.eventbridge.EventBridgeClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured A [...]
     "eventPatternFile": { "kind": "parameter", "displayName": "Event Pattern File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "EventPattern File" },
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during sta [...]
     "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeOperations", "enum": [ "putRule", "putTargets", "removeTargets", "deleteRule", "enableRule", "disableRule", "describeRule", "listRules", "listTargetsByRule", "listRuleNamesByTarget" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "put [...]
diff --git a/components/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc b/components/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc
index c119043..9065704 100644
--- a/components/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc
+++ b/components/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc
@@ -47,16 +47,15 @@ You can append query options to the URI in the following format,
 
 
 // component options: START
-The AWS 2 Eventbridge component supports 15 options, which are listed below.
+The AWS 2 Eventbridge component supports 14 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean
 | *configuration* (producer) | Component configuration |  | EventbridgeConfiguration
-| *eventbridgeClient* (producer) | To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
+| *eventbridgeClient* (producer) | *Autowired* To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
 | *eventPatternFile* (producer) | EventPattern File |  | String
 | *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 [...]
 | *operation* (producer) | *Required* The operation to perform. There are 10 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule, listRuleNamesByTarget | putRule | EventbridgeOperations
@@ -94,14 +93,13 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (14 parameters):
+=== Query Parameters (13 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean
-| *eventbridgeClient* (producer) | To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
+| *eventbridgeClient* (producer) | *Autowired* To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
 | *eventPatternFile* (producer) | EventPattern File |  | String
 | *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 [...]
 | *operation* (producer) | *Required* The operation to perform. There are 10 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule, listRuleNamesByTarget | putRule | EventbridgeOperations
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponent.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponent.java
index 5c66f1a..9d29b5f 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponent.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponent.java
@@ -17,17 +17,14 @@
 package org.apache.camel.component.aws2.eventbridge;
 
 import java.util.Map;
-import java.util.Set;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.annotations.Component;
 import org.apache.camel.support.DefaultComponent;
-import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import software.amazon.awssdk.services.eventbridge.EventBridgeClient;
 
 /**
  * For working with Amazon Eventbridge SDK v2.
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
index f456db4..aedf949 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
@@ -49,8 +49,6 @@ public class EventbridgeConfiguration implements Cloneable {
     private boolean pojoRequest;
     @UriParam(defaultValue = "false")
     private boolean trustAllCertificates;
-    @UriParam(label = "common", defaultValue = "true")
-    private boolean autoDiscoverClient = true;
     @UriParam
     private String eventPatternFile;
 
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2EventbridgeComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2EventbridgeComponentBuilderFactory.java
index e1cbc87..3acbc16 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2EventbridgeComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2EventbridgeComponentBuilderFactory.java
@@ -49,21 +49,6 @@ public interface Aws2EventbridgeComponentBuilderFactory {
             extends
                 ComponentBuilder<EventbridgeComponent> {
         /**
-         * Setting the autoDiscoverClient mechanism, if true, the component will
-         * look for a client instance in the registry automatically otherwise it
-         * will skip that checking.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Default: true
-         * Group: common
-         */
-        default Aws2EventbridgeComponentBuilder autoDiscoverClient(
-                boolean autoDiscoverClient) {
-            doSetProperty("autoDiscoverClient", autoDiscoverClient);
-            return this;
-        }
-        /**
          * Component configuration.
          * 
          * The option is a:
@@ -280,7 +265,6 @@ public interface Aws2EventbridgeComponentBuilderFactory {
                 String name,
                 Object value) {
             switch (name) {
-            case "autoDiscoverClient": getOrCreateConfiguration((EventbridgeComponent) component).setAutoDiscoverClient((boolean) value); return true;
             case "configuration": ((EventbridgeComponent) component).setConfiguration((org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration) value); return true;
             case "eventbridgeClient": getOrCreateConfiguration((EventbridgeComponent) component).setEventbridgeClient((software.amazon.awssdk.services.eventbridge.EventBridgeClient) value); return true;
             case "eventPatternFile": getOrCreateConfiguration((EventbridgeComponent) component).setEventPatternFile((java.lang.String) value); return true;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java
index 7202022..e9c468f 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java
@@ -40,36 +40,6 @@ public interface EventbridgeEndpointBuilderFactory {
             return (AdvancedEventbridgeEndpointBuilder) this;
         }
         /**
-         * Setting the autoDiscoverClient mechanism, if true, the component will
-         * look for a client instance in the registry automatically otherwise it
-         * will skip that checking.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Default: true
-         * Group: common
-         */
-        default EventbridgeEndpointBuilder autoDiscoverClient(
-                boolean autoDiscoverClient) {
-            doSetProperty("autoDiscoverClient", autoDiscoverClient);
-            return this;
-        }
-        /**
-         * Setting the autoDiscoverClient mechanism, if true, the component will
-         * look for a client instance in the registry automatically otherwise it
-         * will skip that checking.
-         * 
-         * The option will be converted to a <code>boolean</code> type.
-         * 
-         * Default: true
-         * Group: common
-         */
-        default EventbridgeEndpointBuilder autoDiscoverClient(
-                String autoDiscoverClient) {
-            doSetProperty("autoDiscoverClient", autoDiscoverClient);
-            return this;
-        }
-        /**
          * To use a existing configured AWS Eventbridge as client.
          * 
          * The option is a:
diff --git a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
index 392d000..7648df0 100644
--- a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
@@ -49,16 +49,15 @@ You can append query options to the URI in the following format,
 
 
 // component options: START
-The AWS 2 Eventbridge component supports 15 options, which are listed below.
+The AWS 2 Eventbridge component supports 14 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean
 | *configuration* (producer) | Component configuration |  | EventbridgeConfiguration
-| *eventbridgeClient* (producer) | To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
+| *eventbridgeClient* (producer) | *Autowired* To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
 | *eventPatternFile* (producer) | EventPattern File |  | String
 | *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 [...]
 | *operation* (producer) | *Required* The operation to perform. There are 10 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule, listRuleNamesByTarget | putRule | EventbridgeOperations
@@ -96,14 +95,13 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (14 parameters):
+=== Query Parameters (13 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean
-| *eventbridgeClient* (producer) | To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
+| *eventbridgeClient* (producer) | *Autowired* To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
 | *eventPatternFile* (producer) | EventPattern File |  | String
 | *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 [...]
 | *operation* (producer) | *Required* The operation to perform. There are 10 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule, listRuleNamesByTarget | putRule | EventbridgeOperations


[camel] 06/06: CAMEL-15836 - Camel-AWS2-Eventbridge: enable autowire on the Eventbridge client, added a note to migration guide

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

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

commit b467c60a02f17000934cc3ad99e660258368ec1d
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 16 09:27:20 2020 +0100

    CAMEL-15836 - Camel-AWS2-Eventbridge: enable autowire on the Eventbridge client, added a note to migration guide
---
 docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_7.adoc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_7.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_7.adoc
index f6dde65..3011fed 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_7.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_7.adoc
@@ -191,6 +191,11 @@ In this context, it wasn't having any sense to maintain the autodiscoverClient o
 The camel-aws2-eks has now support for autowiring the eksClient option with EksClient instance coming from the registry.
 In this context, it wasn't having any sense to maintain the autodiscoverClient option, which has been now removed.
 
+=== Camel-AWS2-Eventbridge Autowire support
+
+The camel-aws2-eventbridge has now support for autowiring the eventBridgeClient option with EventBridgeClient instance coming from the registry.
+In this context, it wasn't having any sense to maintain the autodiscoverClient option, which has been now removed.
+
 === Camel-AWS2-MQ Autowire support
 
 The camel-aws2-mq has now support for autowiring the amazonMqClient option with MqClient instance coming from the registry.


[camel] 05/06: Camel-AWS2-Eventbridge: Regen catalog

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

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

commit 6a75182cc9f2ba941d661cd3e792e914f4467ba2
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 16 09:26:22 2020 +0100

    Camel-AWS2-Eventbridge: Regen catalog
---
 .../org/apache/camel/catalog/components/aws2-eventbridge.json      | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-eventbridge.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-eventbridge.json
index 8c98e32..03af12c 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-eventbridge.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-eventbridge.json
@@ -22,9 +22,8 @@
     "lenientProperties": false
   },
   "componentProperties": {
-    "autoDiscoverClient": { "kind": "property", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look fo [...]
     "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" },
-    "eventbridgeClient": { "kind": "property", "displayName": "Eventbridge Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.eventbridge.EventBridgeClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured AWS Eventbridge as client" },
+    "eventbridgeClient": { "kind": "property", "displayName": "Eventbridge Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.eventbridge.EventBridgeClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured AW [...]
     "eventPatternFile": { "kind": "property", "displayName": "Event Pattern File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "EventPattern File" },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...]
     "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeOperations", "enum": [ "putRule", "putTargets", "removeTargets", "deleteRule", "enableRule", "disableRule", "describeRule", "listRules", "listTargetsByRule", "listRuleNamesByTarget" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "putR [...]
@@ -40,8 +39,8 @@
   },
   "properties": {
     "eventbusNameOrArn": { "kind": "path", "displayName": "Eventbus Name Or Arn", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Event bus name or ARN" },
-    "autoDiscoverClient": { "kind": "parameter", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look f [...]
-    "eventbridgeClient": { "kind": "parameter", "displayName": "Eventbridge Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.eventbridge.EventBridgeClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured AWS Eventbridge as client" },
+    "eventbusName": { "kind": "path", "displayName": "Eventbus Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "default", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "Logical name" },
+    "eventbridgeClient": { "kind": "parameter", "displayName": "Eventbridge Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.eventbridge.EventBridgeClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured A [...]
     "eventPatternFile": { "kind": "parameter", "displayName": "Event Pattern File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "EventPattern File" },
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during sta [...]
     "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeOperations", "enum": [ "putRule", "putTargets", "removeTargets", "deleteRule", "enableRule", "disableRule", "describeRule", "listRules", "listTargetsByRule", "listRuleNamesByTarget" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "put [...]


[camel] 03/06: Camel-AWS2-Eventbridge: The eventbusname should be annotated with Uripath and default value is default

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

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

commit 375d99af10e84372d28e139dccf4b7c16cd3e7b9
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 16 09:18:46 2020 +0100

    Camel-AWS2-Eventbridge: The eventbusname should be annotated with Uripath and default value is default
---
 .../camel/component/aws2/eventbridge/EventbridgeConfiguration.java    | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
index aedf949..70b2e8c 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
@@ -20,12 +20,16 @@ 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.apache.camel.spi.UriPath;
+
 import software.amazon.awssdk.core.Protocol;
 import software.amazon.awssdk.services.eventbridge.EventBridgeClient;
 
 @UriParams
 public class EventbridgeConfiguration implements Cloneable {
 
+    @UriPath(description = "Logical name", defaultValue = "default")
+    @Metadata(required = true)
     private String eventbusName = "default";
     @UriParam
     @Metadata(autowired = true)


[camel] 04/06: Camel-AWS2-Evenbridge: Regen component and configurers

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

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

commit dd37bba9fc3bd2bcf58d2c563023f49451005476
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 16 09:23:30 2020 +0100

    Camel-AWS2-Evenbridge: Regen component and configurers
---
 .../org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc | 3 ++-
 .../component/aws2/eventbridge/EventbridgeEndpointUriFactory.java | 4 +++-
 .../apache/camel/component/aws2/eventbridge/aws2-eventbridge.json | 1 +
 .../src/main/docs/aws2-eventbridge-component.adoc                 | 3 ++-
 .../component/aws2/eventbridge/EventbridgeConfiguration.java      | 1 -
 .../org/apache/camel/builder/endpoint/StaticEndpointBuilders.java | 8 ++++++++
 .../builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java   | 8 ++++++++
 .../components/modules/ROOT/pages/aws2-eventbridge-component.adoc | 3 ++-
 8 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc
index 9065704..caa7bc4 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc
@@ -83,13 +83,14 @@ aws2-eventbridge://eventbusNameOrArn
 
 with the following path and query parameters:
 
-=== Path Parameters (1 parameters):
+=== Path Parameters (2 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
 | *eventbusNameOrArn* | *Required* Event bus name or ARN |  | String
+| *eventbusName* | *Required* Logical name | default | String
 |===
 
 
diff --git a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointUriFactory.java b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointUriFactory.java
index 8176d56..b237313 100644
--- a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointUriFactory.java
+++ b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointUriFactory.java
@@ -20,7 +20,7 @@ public class EventbridgeEndpointUriFactory extends org.apache.camel.support.comp
     private static final Set<String> PROPERTY_NAMES;
     private static final Set<String> SECRET_PROPERTY_NAMES;
     static {
-        Set<String> props = new HashSet<>(14);
+        Set<String> props = new HashSet<>(15);
         props.add("proxyProtocol");
         props.add("secretKey");
         props.add("synchronous");
@@ -33,6 +33,7 @@ public class EventbridgeEndpointUriFactory extends org.apache.camel.support.comp
         props.add("eventbusNameOrArn");
         props.add("accessKey");
         props.add("eventbridgeClient");
+        props.add("eventbusName");
         props.add("region");
         props.add("operation");
         PROPERTY_NAMES = Collections.unmodifiableSet(props);
@@ -55,6 +56,7 @@ public class EventbridgeEndpointUriFactory extends org.apache.camel.support.comp
         Map<String, Object> copy = new HashMap<>(properties);
 
         uri = buildPathParameter(syntax, uri, "eventbusNameOrArn", null, true, copy);
+        uri = buildPathParameter(syntax, uri, "eventbusName", "default", true, copy);
         uri = buildQueryParameters(uri, copy, encode);
         return uri;
     }
diff --git a/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json b/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json
index d99577a..03af12c 100644
--- a/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json
+++ b/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json
@@ -39,6 +39,7 @@
   },
   "properties": {
     "eventbusNameOrArn": { "kind": "path", "displayName": "Eventbus Name Or Arn", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Event bus name or ARN" },
+    "eventbusName": { "kind": "path", "displayName": "Eventbus Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "default", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "Logical name" },
     "eventbridgeClient": { "kind": "parameter", "displayName": "Eventbridge Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.eventbridge.EventBridgeClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured A [...]
     "eventPatternFile": { "kind": "parameter", "displayName": "Event Pattern File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "EventPattern File" },
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during sta [...]
diff --git a/components/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc b/components/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc
index 9065704..caa7bc4 100644
--- a/components/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc
+++ b/components/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc
@@ -83,13 +83,14 @@ aws2-eventbridge://eventbusNameOrArn
 
 with the following path and query parameters:
 
-=== Path Parameters (1 parameters):
+=== Path Parameters (2 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
 | *eventbusNameOrArn* | *Required* Event bus name or ARN |  | String
+| *eventbusName* | *Required* Logical name | default | String
 |===
 
 
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
index 70b2e8c..7c26c48 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
@@ -21,7 +21,6 @@ import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
 import org.apache.camel.spi.UriPath;
-
 import software.amazon.awssdk.core.Protocol;
 import software.amazon.awssdk.services.eventbridge.EventBridgeClient;
 
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index be79eb2..5237a1c 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -1182,6 +1182,10 @@ public class StaticEndpointBuilders {
      * Path parameter: eventbusNameOrArn (required)
      * Event bus name or ARN
      * 
+     * Path parameter: eventbusName (required)
+     * Logical name
+     * Default value: default
+     * 
      * @param path //eventbusNameOrArn
      */
     public static org.apache.camel.builder.endpoint.dsl.EventbridgeEndpointBuilderFactory.EventbridgeEndpointBuilder aws2Eventbridge(
@@ -1201,6 +1205,10 @@ public class StaticEndpointBuilders {
      * Path parameter: eventbusNameOrArn (required)
      * Event bus name or ARN
      * 
+     * Path parameter: eventbusName (required)
+     * Logical name
+     * Default value: default
+     * 
      * @param componentName to use a custom component name for the endpoint
      * instead of the default name
      * @param path //eventbusNameOrArn
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java
index e9c468f..185171c 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java
@@ -376,6 +376,10 @@ public interface EventbridgeEndpointBuilderFactory {
          * Path parameter: eventbusNameOrArn (required)
          * Event bus name or ARN
          * 
+         * Path parameter: eventbusName (required)
+         * Logical name
+         * Default value: default
+         * 
          * @param path //eventbusNameOrArn
          */
         default EventbridgeEndpointBuilder aws2Eventbridge(String path) {
@@ -394,6 +398,10 @@ public interface EventbridgeEndpointBuilderFactory {
          * Path parameter: eventbusNameOrArn (required)
          * Event bus name or ARN
          * 
+         * Path parameter: eventbusName (required)
+         * Logical name
+         * Default value: default
+         * 
          * @param componentName to use a custom component name for the endpoint
          * instead of the default name
          * @param path //eventbusNameOrArn
diff --git a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
index 7648df0..bfe06be 100644
--- a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
@@ -85,13 +85,14 @@ aws2-eventbridge://eventbusNameOrArn
 
 with the following path and query parameters:
 
-=== Path Parameters (1 parameters):
+=== Path Parameters (2 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
 | *eventbusNameOrArn* | *Required* Event bus name or ARN |  | String
+| *eventbusName* | *Required* Logical name | default | String
 |===
 
 


[camel] 01/06: CAMEL-15836 - Camel-AWS2-Eventbridge: enable autowire on the Eventbridge client

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

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

commit 36778704773b7a8673b9cbd70435a18e338648af
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 16 09:11:51 2020 +0100

    CAMEL-15836 - Camel-AWS2-Eventbridge: enable autowire on the Eventbridge client
---
 .../aws2/eventbridge/EventbridgeComponent.java         | 18 ------------------
 .../aws2/eventbridge/EventbridgeConfiguration.java     | 13 +------------
 2 files changed, 1 insertion(+), 30 deletions(-)

diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponent.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponent.java
index 1547925..5c66f1a 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponent.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponent.java
@@ -60,9 +60,6 @@ public class EventbridgeComponent extends DefaultComponent {
         configuration.setEventbusName(remaining);
         EventbridgeEndpoint endpoint = new EventbridgeEndpoint(uri, this, configuration);
         setProperties(endpoint, parameters);
-        if (endpoint.getConfiguration().isAutoDiscoverClient()) {
-            checkAndSetRegistryClient(configuration, endpoint);
-        }
         if (configuration.getEventbridgeClient() == null
                 && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
             throw new IllegalArgumentException("Amazon Eventbridge client or accessKey and secretKey must be specified");
@@ -81,19 +78,4 @@ public class EventbridgeComponent extends DefaultComponent {
     public void setConfiguration(EventbridgeConfiguration configuration) {
         this.configuration = configuration;
     }
-
-    private void checkAndSetRegistryClient(EventbridgeConfiguration configuration, EventbridgeEndpoint endpoint) {
-        if (ObjectHelper.isEmpty(endpoint.getConfiguration().getEventbridgeClient())) {
-            LOG.debug("Looking for an EventBridgeClient instance in the registry");
-            Set<EventBridgeClient> clients = getCamelContext().getRegistry().findByType(EventBridgeClient.class);
-            if (clients.size() == 1) {
-                LOG.debug("Found exactly one EventBridgeClient instance in the registry");
-                configuration.setEventbridgeClient(clients.stream().findFirst().get());
-            } else {
-                LOG.debug("No EventbridgeClient instance in the registry");
-            }
-        } else {
-            LOG.debug("EventbridgeClient instance is already set at endpoint level: skipping the check in the registry");
-        }
-    }
 }
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
index 2666ee3..f456db4 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
@@ -28,6 +28,7 @@ public class EventbridgeConfiguration implements Cloneable {
 
     private String eventbusName = "default";
     @UriParam
+    @Metadata(autowired = true)
     private EventBridgeClient eventbridgeClient;
     @UriParam(label = "security", secret = true)
     private String accessKey;
@@ -164,18 +165,6 @@ public class EventbridgeConfiguration implements Cloneable {
         this.trustAllCertificates = trustAllCertificates;
     }
 
-    public boolean isAutoDiscoverClient() {
-        return autoDiscoverClient;
-    }
-
-    /**
-     * Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry
-     * automatically otherwise it will skip that checking.
-     */
-    public void setAutoDiscoverClient(boolean autoDiscoverClient) {
-        this.autoDiscoverClient = autoDiscoverClient;
-    }
-
     public String getEventPatternFile() {
         return eventPatternFile;
     }