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/09/23 06:49:02 UTC

[camel] branch master updated (9f5a153 -> c42e30f)

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 9f5a153  Sync Properties
     new c4cd4c5  Camel-AWS2-Eventbridge: Support eventbusNameOrArn like the other AWS* components
     new bf73081  Camel-AWS2-Eventbridge: Support eventbusNameOrArn like the other AWS* components
     new c531c0f  Camel-AWS2-Eventbridge: Support eventbusNameOrArn like the other AWS* components
     new bb41134  Camel-AWS2-Eventbridge: Support eventbusNameOrArn like the other AWS* components
     new 1b5d8ef  Camel-AWS2-Eventbridge: Regen
     new c42e30f  Regen catalog

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 |  6 ++---
 .../catalog/docs/aws2-eventbridge-component.adoc   | 10 +++-----
 .../EventbridgeComponentConfigurer.java            |  5 ----
 .../eventbridge/EventbridgeEndpointConfigurer.java |  5 ----
 .../aws2/eventbridge/aws2-eventbridge.json         |  6 ++---
 .../src/main/docs/aws2-eventbridge-component.adoc  | 10 +++-----
 .../aws2/eventbridge/EventbridgeComponent.java     |  4 +++
 .../aws2/eventbridge/EventbridgeConfiguration.java |  7 +-----
 .../aws2/eventbridge/EventbridgeEndpoint.java      |  7 +++++-
 .../EventbridgePutRuleIntegrationTest.java         |  6 ++---
 .../Aws2EventbridgeComponentBuilderFactory.java    | 15 -----------
 .../src/generated/resources/metadata.json          |  2 +-
 .../builder/endpoint/StaticEndpointBuilders.java   | 16 ++++++------
 .../dsl/EventbridgeEndpointBuilderFactory.java     | 29 ++++++----------------
 .../ROOT/pages/aws2-eventbridge-component.adoc     | 10 +++-----
 15 files changed, 47 insertions(+), 91 deletions(-)


[camel] 03/06: Camel-AWS2-Eventbridge: Support eventbusNameOrArn like the other AWS* components

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 c531c0f2c48398b39a0a6f2085f416671aff9ecd
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 23 08:43:02 2020 +0200

    Camel-AWS2-Eventbridge: Support eventbusNameOrArn like the other AWS* components
---
 .../org/apache/camel/catalog/components/aws2-eventbridge.json         | 4 +---
 .../apache/camel/component/aws2/eventbridge/EventbridgeComponent.java | 3 ---
 .../eventbridge/integration/EventbridgePutRuleIntegrationTest.java    | 2 +-
 3 files changed, 2 insertions(+), 7 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 787ca71..14b2c20 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
@@ -25,7 +25,6 @@
     "autoDiscoverClient": { "kind": "property", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 for a client instanc [...]
     "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "deprecated": 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, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured AWS Eventbridge as client" },
-    "eventbusName": { "kind": "property", "displayName": "Eventbus Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "default", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "The eventbus name, the default value is default and this means it will be the AWS event bus of your a [...]
     "eventPatternFile": { "kind": "property", "displayName": "Event Pattern File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": 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, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the r [...]
     "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeOperations", "enum": [ "putRule", "putTargets", "removeTargets" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", [...]
@@ -40,10 +39,9 @@
     "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
   },
   "properties": {
-    "label": { "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "Logical name" },
+    "eventbusNameOrArn": { "kind": "path", "displayName": "Eventbus Name Or Arn", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "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, "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 for a client instan [...]
     "eventbridgeClient": { "kind": "parameter", "displayName": "Eventbridge Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.eventbridge.EventBridgeClient", "deprecated": 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": "parameter", "displayName": "Eventbus Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "default", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "The eventbus name, the default value is default and this means it will be the AWS event bus of your  [...]
     "eventPatternFile": { "kind": "parameter", "displayName": "Event Pattern File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": 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, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the  [...]
     "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeOperations", "enum": [ "putRule", "putTargets", "removeTargets" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration" [...]
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 d8d0ec4..1547925 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
@@ -55,9 +55,6 @@ public class EventbridgeComponent extends DefaultComponent {
         if (remaining == null || remaining.trim().length() == 0) {
             throw new IllegalArgumentException("Event bus name must be specified.");
         }
-        if (remaining.startsWith("arn:")) {
-            remaining = remaining.substring(remaining.lastIndexOf(':') + 1, remaining.length());
-        }
         EventbridgeConfiguration configuration
                 = this.configuration != null ? this.configuration.copy() : new EventbridgeConfiguration();
         configuration.setEventbusName(remaining);
diff --git a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/integration/EventbridgePutRuleIntegrationTest.java b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/integration/EventbridgePutRuleIntegrationTest.java
index 8c5cf75..d1ca459 100644
--- a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/integration/EventbridgePutRuleIntegrationTest.java
+++ b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/integration/EventbridgePutRuleIntegrationTest.java
@@ -43,7 +43,7 @@ public class EventbridgePutRuleIntegrationTest extends CamelTestSupport {
     EventBridgeClient client
             = EventBridgeClient.builder()
                     .credentialsProvider(StaticCredentialsProvider.create(
-                            AwsBasicCredentials.create("xxxx", "yyyy")))
+                            AwsBasicCredentials.create("xxxxx", "yyyy")))
                     .region(Region.EU_WEST_1).build();
 
     @EndpointInject


[camel] 04/06: Camel-AWS2-Eventbridge: Support eventbusNameOrArn like the other AWS* components

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 bb4113454fc73c2b3ae4ab24f337ded4885002c6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 23 08:45:26 2020 +0200

    Camel-AWS2-Eventbridge: Support eventbusNameOrArn like the other AWS* components
---
 .../apache/camel/component/aws2/eventbridge/EventbridgeEndpoint.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpoint.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpoint.java
index 4796f36..03644c0 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpoint.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpoint.java
@@ -44,7 +44,7 @@ import software.amazon.awssdk.utils.AttributeMap;
  * Manage AWS Eventbridge cluster instances using AWS SDK version 2.x.
  */
 @UriEndpoint(firstVersion = "3.6.0", scheme = "aws2-eventbridge", title = "AWS 2 Eventbridge",
-             syntax = "aws2-eventbridge:label", producerOnly = true, category = {
+             syntax = "aws2-eventbridge://eventbusNameOrArn", producerOnly = true, category = {
                      Category.CLOUD,
                      Category.MANAGEMENT })
 public class EventbridgeEndpoint extends DefaultEndpoint {


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

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 1b5d8ef9a2f73a0dd8eb9d4e2429711d2e8305f4
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 23 08:45:57 2020 +0200

    Camel-AWS2-Eventbridge: Regen
---
 .../org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc | 2 +-
 .../apache/camel/component/aws2/eventbridge/aws2-eventbridge.json | 2 +-
 .../src/main/docs/aws2-eventbridge-component.adoc                 | 2 +-
 core/camel-componentdsl/src/generated/resources/metadata.json     | 2 +-
 .../org/apache/camel/builder/endpoint/StaticEndpointBuilders.java | 8 ++++----
 .../builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java   | 8 ++++----
 .../components/modules/ROOT/pages/aws2-eventbridge-component.adoc | 2 +-
 7 files changed, 13 insertions(+), 13 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 0d0feb8..890a453 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
@@ -78,7 +78,7 @@ The AWS 2 Eventbridge component supports 15 options, which are listed below.
 The AWS 2 Eventbridge endpoint is configured using URI syntax:
 
 ----
-aws2-eventbridge:label
+aws2-eventbridge://eventbusNameOrArn
 ----
 
 with the following path and query parameters:
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 14b2c20..2355df5 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
@@ -14,7 +14,7 @@
     "version": "3.6.0-SNAPSHOT",
     "scheme": "aws2-eventbridge",
     "extendsScheme": "",
-    "syntax": "aws2-eventbridge:label",
+    "syntax": "aws2-eventbridge:\/\/eventbusNameOrArn",
     "async": false,
     "api": false,
     "consumerOnly": false,
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 0d0feb8..890a453 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
@@ -78,7 +78,7 @@ The AWS 2 Eventbridge component supports 15 options, which are listed below.
 The AWS 2 Eventbridge endpoint is configured using URI syntax:
 
 ----
-aws2-eventbridge:label
+aws2-eventbridge://eventbusNameOrArn
 ----
 
 with the following path and query parameters:
diff --git a/core/camel-componentdsl/src/generated/resources/metadata.json b/core/camel-componentdsl/src/generated/resources/metadata.json
index f7e8c15..3345b01 100644
--- a/core/camel-componentdsl/src/generated/resources/metadata.json
+++ b/core/camel-componentdsl/src/generated/resources/metadata.json
@@ -591,7 +591,7 @@
     "version": "3.6.0-SNAPSHOT",
     "scheme": "aws2-eventbridge",
     "extendsScheme": "",
-    "syntax": "aws2-eventbridge:label",
+    "syntax": "aws2-eventbridge:\/\/eventbusNameOrArn",
     "async": false,
     "api": false,
     "consumerOnly": false,
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 d175549..5d50e4a 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
@@ -1128,12 +1128,12 @@ public class StaticEndpointBuilders {
      * Since: 3.6
      * Maven coordinates: org.apache.camel:camel-aws2-eventbridge
      * 
-     * Syntax: <code>aws2-eventbridge:label</code>
+     * Syntax: <code>aws2-eventbridge://eventbusNameOrArn</code>
      * 
      * Path parameter: eventbusNameOrArn (required)
      * Event bus name or ARN
      * 
-     * @param path label
+     * @param path //eventbusNameOrArn
      */
     public static org.apache.camel.builder.endpoint.dsl.EventbridgeEndpointBuilderFactory.EventbridgeEndpointBuilder aws2Eventbridge(
             String path) {
@@ -1147,14 +1147,14 @@ public class StaticEndpointBuilders {
      * Since: 3.6
      * Maven coordinates: org.apache.camel:camel-aws2-eventbridge
      * 
-     * Syntax: <code>aws2-eventbridge:label</code>
+     * Syntax: <code>aws2-eventbridge://eventbusNameOrArn</code>
      * 
      * Path parameter: eventbusNameOrArn (required)
      * Event bus name or ARN
      * 
      * @param componentName to use a custom component name for the endpoint
      * instead of the default name
-     * @param path label
+     * @param path //eventbusNameOrArn
      */
     public static org.apache.camel.builder.endpoint.dsl.EventbridgeEndpointBuilderFactory.EventbridgeEndpointBuilder aws2Eventbridge(
             String componentName,
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 50329c9..2c02b55 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
@@ -422,12 +422,12 @@ public interface EventbridgeEndpointBuilderFactory {
          * Since: 3.6
          * Maven coordinates: org.apache.camel:camel-aws2-eventbridge
          * 
-         * Syntax: <code>aws2-eventbridge:label</code>
+         * Syntax: <code>aws2-eventbridge://eventbusNameOrArn</code>
          * 
          * Path parameter: eventbusNameOrArn (required)
          * Event bus name or ARN
          * 
-         * @param path label
+         * @param path //eventbusNameOrArn
          */
         default EventbridgeEndpointBuilder aws2Eventbridge(String path) {
             return EventbridgeEndpointBuilderFactory.endpointBuilder("aws2-eventbridge", path);
@@ -440,14 +440,14 @@ public interface EventbridgeEndpointBuilderFactory {
          * Since: 3.6
          * Maven coordinates: org.apache.camel:camel-aws2-eventbridge
          * 
-         * Syntax: <code>aws2-eventbridge:label</code>
+         * Syntax: <code>aws2-eventbridge://eventbusNameOrArn</code>
          * 
          * Path parameter: eventbusNameOrArn (required)
          * Event bus name or ARN
          * 
          * @param componentName to use a custom component name for the endpoint
          * instead of the default name
-         * @param path label
+         * @param path //eventbusNameOrArn
          */
         default EventbridgeEndpointBuilder aws2Eventbridge(
                 String componentName,
diff --git a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
index cfbdb92..b602cc2 100644
--- a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
@@ -80,7 +80,7 @@ The AWS 2 Eventbridge component supports 15 options, which are listed below.
 The AWS 2 Eventbridge endpoint is configured using URI syntax:
 
 ----
-aws2-eventbridge:label
+aws2-eventbridge://eventbusNameOrArn
 ----
 
 with the following path and query parameters:


[camel] 06/06: 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 c42e30f3ff0584ca86443328d3558fc3efe9d2f8
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 23 08:48:30 2020 +0200

    Regen catalog
---
 .../resources/org/apache/camel/catalog/components/aws2-eventbridge.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 14b2c20..2355df5 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
@@ -14,7 +14,7 @@
     "version": "3.6.0-SNAPSHOT",
     "scheme": "aws2-eventbridge",
     "extendsScheme": "",
-    "syntax": "aws2-eventbridge:label",
+    "syntax": "aws2-eventbridge:\/\/eventbusNameOrArn",
     "async": false,
     "api": false,
     "consumerOnly": false,


[camel] 01/06: Camel-AWS2-Eventbridge: Support eventbusNameOrArn like the other AWS* components

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 c4cd4c5e2147cf39656e6bacf6f1a7ef3d2f7d4a
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 23 08:24:58 2020 +0200

    Camel-AWS2-Eventbridge: Support eventbusNameOrArn like the other AWS* components
---
 .../catalog/docs/aws2-eventbridge-component.adoc    |  8 +++-----
 .../eventbridge/EventbridgeComponentConfigurer.java |  5 -----
 .../eventbridge/EventbridgeEndpointConfigurer.java  |  5 -----
 .../aws2/eventbridge/aws2-eventbridge.json          |  4 +---
 .../src/main/docs/aws2-eventbridge-component.adoc   |  8 +++-----
 .../aws2/eventbridge/EventbridgeComponent.java      |  6 ++++++
 .../aws2/eventbridge/EventbridgeConfiguration.java  |  7 +------
 .../aws2/eventbridge/EventbridgeEndpoint.java       |  5 +++++
 .../dsl/Aws2EventbridgeComponentBuilderFactory.java | 15 ---------------
 .../builder/endpoint/StaticEndpointBuilders.java    |  8 ++++----
 .../dsl/EventbridgeEndpointBuilderFactory.java      | 21 ++++-----------------
 .../ROOT/pages/aws2-eventbridge-component.adoc      |  8 +++-----
 12 files changed, 30 insertions(+), 70 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 930dd53..0d0feb8 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
@@ -46,7 +46,7 @@ You can append query options to the URI in the following format,
 
 
 // component options: START
-The AWS 2 Eventbridge component supports 16 options, which are listed below.
+The AWS 2 Eventbridge component supports 15 options, which are listed below.
 
 
 
@@ -56,7 +56,6 @@ The AWS 2 Eventbridge component supports 16 options, which are listed below.
 | *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
-| *eventbusName* (producer) | The eventbus name, the default value is default and this means it will be the AWS event bus of your account. | default | String
 | *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 3 enums and the value can be one of: putRule, putTargets, removeTargets | putRule | EventbridgeOperations
@@ -90,11 +89,11 @@ with the following path and query parameters:
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *label* | *Required* Logical name |  | String
+| *eventbusNameOrArn* | *Required* Event bus name or ARN |  | String
 |===
 
 
-=== Query Parameters (16 parameters):
+=== Query Parameters (15 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -102,7 +101,6 @@ with the following path and query parameters:
 | 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
-| *eventbusName* (producer) | The eventbus name, the default value is default and this means it will be the AWS event bus of your account. | default | String
 | *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 3 enums and the value can be one of: putRule, putTargets, removeTargets | 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 6edce80..b9c00a1 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
@@ -37,8 +37,6 @@ public class EventbridgeComponentConfigurer extends PropertyConfigurerSupport im
         case "eventPatternFile": getOrCreateConfiguration(target).setEventPatternFile(property(camelContext, java.lang.String.class, value)); return true;
         case "eventbridgeclient":
         case "eventbridgeClient": getOrCreateConfiguration(target).setEventbridgeClient(property(camelContext, software.amazon.awssdk.services.eventbridge.EventBridgeClient.class, value)); return true;
-        case "eventbusname":
-        case "eventbusName": getOrCreateConfiguration(target).setEventbusName(property(camelContext, java.lang.String.class, value)); return true;
         case "lazystartproducer":
         case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
         case "operation": getOrCreateConfiguration(target).setOperation(property(camelContext, org.apache.camel.component.aws2.eventbridge.EventbridgeOperations.class, value)); return true;
@@ -68,7 +66,6 @@ public class EventbridgeComponentConfigurer extends PropertyConfigurerSupport im
         answer.put("configuration", org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration.class);
         answer.put("eventPatternFile", java.lang.String.class);
         answer.put("eventbridgeClient", software.amazon.awssdk.services.eventbridge.EventBridgeClient.class);
-        answer.put("eventbusName", java.lang.String.class);
         answer.put("lazyStartProducer", boolean.class);
         answer.put("operation", org.apache.camel.component.aws2.eventbridge.EventbridgeOperations.class);
         answer.put("pojoRequest", boolean.class);
@@ -96,8 +93,6 @@ public class EventbridgeComponentConfigurer extends PropertyConfigurerSupport im
         case "eventPatternFile": return getOrCreateConfiguration(target).getEventPatternFile();
         case "eventbridgeclient":
         case "eventbridgeClient": return getOrCreateConfiguration(target).getEventbridgeClient();
-        case "eventbusname":
-        case "eventbusName": return getOrCreateConfiguration(target).getEventbusName();
         case "lazystartproducer":
         case "lazyStartProducer": return target.isLazyStartProducer();
         case "operation": return getOrCreateConfiguration(target).getOperation();
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 4af50a2..8f26101 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
@@ -29,8 +29,6 @@ public class EventbridgeEndpointConfigurer extends PropertyConfigurerSupport imp
         case "eventPatternFile": target.getConfiguration().setEventPatternFile(property(camelContext, java.lang.String.class, value)); return true;
         case "eventbridgeclient":
         case "eventbridgeClient": target.getConfiguration().setEventbridgeClient(property(camelContext, software.amazon.awssdk.services.eventbridge.EventBridgeClient.class, value)); return true;
-        case "eventbusname":
-        case "eventbusName": target.getConfiguration().setEventbusName(property(camelContext, java.lang.String.class, value)); return true;
         case "lazystartproducer":
         case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
         case "operation": target.getConfiguration().setOperation(property(camelContext, org.apache.camel.component.aws2.eventbridge.EventbridgeOperations.class, value)); return true;
@@ -60,7 +58,6 @@ public class EventbridgeEndpointConfigurer extends PropertyConfigurerSupport imp
         answer.put("basicPropertyBinding", boolean.class);
         answer.put("eventPatternFile", java.lang.String.class);
         answer.put("eventbridgeClient", software.amazon.awssdk.services.eventbridge.EventBridgeClient.class);
-        answer.put("eventbusName", java.lang.String.class);
         answer.put("lazyStartProducer", boolean.class);
         answer.put("operation", org.apache.camel.component.aws2.eventbridge.EventbridgeOperations.class);
         answer.put("pojoRequest", boolean.class);
@@ -88,8 +85,6 @@ public class EventbridgeEndpointConfigurer extends PropertyConfigurerSupport imp
         case "eventPatternFile": return target.getConfiguration().getEventPatternFile();
         case "eventbridgeclient":
         case "eventbridgeClient": return target.getConfiguration().getEventbridgeClient();
-        case "eventbusname":
-        case "eventbusName": return target.getConfiguration().getEventbusName();
         case "lazystartproducer":
         case "lazyStartProducer": return target.isLazyStartProducer();
         case "operation": return target.getConfiguration().getOperation();
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 787ca71..14b2c20 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
@@ -25,7 +25,6 @@
     "autoDiscoverClient": { "kind": "property", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 for a client instanc [...]
     "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "deprecated": 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, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured AWS Eventbridge as client" },
-    "eventbusName": { "kind": "property", "displayName": "Eventbus Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "default", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "The eventbus name, the default value is default and this means it will be the AWS event bus of your a [...]
     "eventPatternFile": { "kind": "property", "displayName": "Event Pattern File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": 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, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the r [...]
     "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeOperations", "enum": [ "putRule", "putTargets", "removeTargets" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", [...]
@@ -40,10 +39,9 @@
     "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
   },
   "properties": {
-    "label": { "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "Logical name" },
+    "eventbusNameOrArn": { "kind": "path", "displayName": "Eventbus Name Or Arn", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "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, "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 for a client instan [...]
     "eventbridgeClient": { "kind": "parameter", "displayName": "Eventbridge Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.eventbridge.EventBridgeClient", "deprecated": 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": "parameter", "displayName": "Eventbus Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "default", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "The eventbus name, the default value is default and this means it will be the AWS event bus of your  [...]
     "eventPatternFile": { "kind": "parameter", "displayName": "Event Pattern File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": 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, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the  [...]
     "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeOperations", "enum": [ "putRule", "putTargets", "removeTargets" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration" [...]
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 930dd53..0d0feb8 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
@@ -46,7 +46,7 @@ You can append query options to the URI in the following format,
 
 
 // component options: START
-The AWS 2 Eventbridge component supports 16 options, which are listed below.
+The AWS 2 Eventbridge component supports 15 options, which are listed below.
 
 
 
@@ -56,7 +56,6 @@ The AWS 2 Eventbridge component supports 16 options, which are listed below.
 | *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
-| *eventbusName* (producer) | The eventbus name, the default value is default and this means it will be the AWS event bus of your account. | default | String
 | *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 3 enums and the value can be one of: putRule, putTargets, removeTargets | putRule | EventbridgeOperations
@@ -90,11 +89,11 @@ with the following path and query parameters:
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *label* | *Required* Logical name |  | String
+| *eventbusNameOrArn* | *Required* Event bus name or ARN |  | String
 |===
 
 
-=== Query Parameters (16 parameters):
+=== Query Parameters (15 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -102,7 +101,6 @@ with the following path and query parameters:
 | 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
-| *eventbusName* (producer) | The eventbus name, the default value is default and this means it will be the AWS event bus of your account. | default | String
 | *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 3 enums and the value can be one of: putRule, putTargets, removeTargets | 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 f7f9898..4a3d053 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
@@ -52,6 +52,12 @@ public class EventbridgeComponent extends DefaultComponent {
 
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
+        if (remaining == null || remaining.trim().length() == 0) {
+            throw new IllegalArgumentException("Event bus name must be specified.");
+        }
+        if (remaining.startsWith("arn:")) {
+            remaining = remaining.substring(remaining.lastIndexOf(':') + 1, remaining.length());
+        }
         EventbridgeConfiguration configuration
                 = this.configuration != null ? this.configuration.copy() : new EventbridgeConfiguration();
         EventbridgeEndpoint endpoint = new EventbridgeEndpoint(uri, this, configuration);
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 4cb2ea9..2666ee3 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,16 +20,13 @@ 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")
-    @Metadata(required = true)
-    private String label;
+    private String eventbusName = "default";
     @UriParam
     private EventBridgeClient eventbridgeClient;
     @UriParam(label = "security", secret = true)
@@ -55,8 +52,6 @@ public class EventbridgeConfiguration implements Cloneable {
     private boolean autoDiscoverClient = true;
     @UriParam
     private String eventPatternFile;
-    @UriParam(defaultValue = "default")
-    private String eventbusName = "default";
 
     public EventBridgeClient getEventbridgeClient() {
         return eventbridgeClient;
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpoint.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpoint.java
index 984fe40..4796f36 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpoint.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpoint.java
@@ -23,8 +23,10 @@ import org.apache.camel.Component;
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
 import org.apache.camel.support.DefaultEndpoint;
 import org.apache.camel.util.ObjectHelper;
 import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
@@ -49,6 +51,9 @@ public class EventbridgeEndpoint extends DefaultEndpoint {
 
     private EventBridgeClient eventbridgeClient;
 
+    @UriPath(description = "Event bus name or ARN")
+    @Metadata(required = true)
+    private String eventbusNameOrArn; // to support component docs
     @UriParam
     private EventbridgeConfiguration configuration;
 
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 5cfca0b..1befb41 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
@@ -90,20 +90,6 @@ public interface Aws2EventbridgeComponentBuilderFactory {
             return this;
         }
         /**
-         * The eventbus name, the default value is default and this means it
-         * will be the AWS event bus of your account.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Default: default
-         * Group: producer
-         */
-        default Aws2EventbridgeComponentBuilder eventbusName(
-                java.lang.String eventbusName) {
-            doSetProperty("eventbusName", eventbusName);
-            return this;
-        }
-        /**
          * EventPattern File.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -294,7 +280,6 @@ public interface Aws2EventbridgeComponentBuilderFactory {
             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 "eventbusName": getOrCreateConfiguration((EventbridgeComponent) component).setEventbusName((java.lang.String) value); return true;
             case "eventPatternFile": getOrCreateConfiguration((EventbridgeComponent) component).setEventPatternFile((java.lang.String) value); return true;
             case "lazyStartProducer": ((EventbridgeComponent) component).setLazyStartProducer((boolean) value); return true;
             case "operation": getOrCreateConfiguration((EventbridgeComponent) component).setOperation((org.apache.camel.component.aws2.eventbridge.EventbridgeOperations) value); return true;
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 450e5cd..d175549 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
@@ -1130,8 +1130,8 @@ public class StaticEndpointBuilders {
      * 
      * Syntax: <code>aws2-eventbridge:label</code>
      * 
-     * Path parameter: label (required)
-     * Logical name
+     * Path parameter: eventbusNameOrArn (required)
+     * Event bus name or ARN
      * 
      * @param path label
      */
@@ -1149,8 +1149,8 @@ public class StaticEndpointBuilders {
      * 
      * Syntax: <code>aws2-eventbridge:label</code>
      * 
-     * Path parameter: label (required)
-     * Logical name
+     * Path parameter: eventbusNameOrArn (required)
+     * Event bus name or ARN
      * 
      * @param componentName to use a custom component name for the endpoint
      * instead of the default name
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java
index 8d79468..50329c9 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
@@ -96,19 +96,6 @@ public interface EventbridgeEndpointBuilderFactory {
             return this;
         }
         /**
-         * The eventbus name, the default value is default and this means it
-         * will be the AWS event bus of your account.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Default: default
-         * Group: producer
-         */
-        default EventbridgeEndpointBuilder eventbusName(String eventbusName) {
-            doSetProperty("eventbusName", eventbusName);
-            return this;
-        }
-        /**
          * EventPattern File.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -437,8 +424,8 @@ public interface EventbridgeEndpointBuilderFactory {
          * 
          * Syntax: <code>aws2-eventbridge:label</code>
          * 
-         * Path parameter: label (required)
-         * Logical name
+         * Path parameter: eventbusNameOrArn (required)
+         * Event bus name or ARN
          * 
          * @param path label
          */
@@ -455,8 +442,8 @@ public interface EventbridgeEndpointBuilderFactory {
          * 
          * Syntax: <code>aws2-eventbridge:label</code>
          * 
-         * Path parameter: label (required)
-         * Logical name
+         * Path parameter: eventbusNameOrArn (required)
+         * Event bus name or ARN
          * 
          * @param componentName to use a custom component name for the endpoint
          * instead of the default name
diff --git a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
index 72bb2ee..cfbdb92 100644
--- a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
@@ -48,7 +48,7 @@ You can append query options to the URI in the following format,
 
 
 // component options: START
-The AWS 2 Eventbridge component supports 16 options, which are listed below.
+The AWS 2 Eventbridge component supports 15 options, which are listed below.
 
 
 
@@ -58,7 +58,6 @@ The AWS 2 Eventbridge component supports 16 options, which are listed below.
 | *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
-| *eventbusName* (producer) | The eventbus name, the default value is default and this means it will be the AWS event bus of your account. | default | String
 | *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 3 enums and the value can be one of: putRule, putTargets, removeTargets | putRule | EventbridgeOperations
@@ -92,11 +91,11 @@ with the following path and query parameters:
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *label* | *Required* Logical name |  | String
+| *eventbusNameOrArn* | *Required* Event bus name or ARN |  | String
 |===
 
 
-=== Query Parameters (16 parameters):
+=== Query Parameters (15 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -104,7 +103,6 @@ with the following path and query parameters:
 | 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
-| *eventbusName* (producer) | The eventbus name, the default value is default and this means it will be the AWS event bus of your account. | default | String
 | *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 3 enums and the value can be one of: putRule, putTargets, removeTargets | putRule | EventbridgeOperations


[camel] 02/06: Camel-AWS2-Eventbridge: Support eventbusNameOrArn like the other AWS* components

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 bf73081574dda93fd9daef556aca66b616480a64
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 23 08:33:08 2020 +0200

    Camel-AWS2-Eventbridge: Support eventbusNameOrArn like the other AWS* components
---
 .../apache/camel/component/aws2/eventbridge/EventbridgeComponent.java | 1 +
 .../eventbridge/integration/EventbridgePutRuleIntegrationTest.java    | 4 ++--
 2 files changed, 3 insertions(+), 2 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 4a3d053..d8d0ec4 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,6 +60,7 @@ public class EventbridgeComponent extends DefaultComponent {
         }
         EventbridgeConfiguration configuration
                 = this.configuration != null ? this.configuration.copy() : new EventbridgeConfiguration();
+        configuration.setEventbusName(remaining);
         EventbridgeEndpoint endpoint = new EventbridgeEndpoint(uri, this, configuration);
         setProperties(endpoint, parameters);
         if (endpoint.getConfiguration().isAutoDiscoverClient()) {
diff --git a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/integration/EventbridgePutRuleIntegrationTest.java b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/integration/EventbridgePutRuleIntegrationTest.java
index e931f40..8c5cf75 100644
--- a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/integration/EventbridgePutRuleIntegrationTest.java
+++ b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/integration/EventbridgePutRuleIntegrationTest.java
@@ -90,8 +90,8 @@ public class EventbridgePutRuleIntegrationTest extends CamelTestSupport {
             @Override
             public void configure() throws Exception {
                 String awsEndpoint
-                        = "aws2-eventbridge://test?operation=putRule&eventPatternFile=file:src/test/resources/eventpattern.json";
-                String target = "aws2-eventbridge://test?operation=putTargets";
+                        = "aws2-eventbridge://default?operation=putRule&eventPatternFile=file:src/test/resources/eventpattern.json";
+                String target = "aws2-eventbridge://default?operation=putTargets";
                 from("direct:evs").to(awsEndpoint).log("${body}").to("mock:result");
                 from("direct:evs-targets").to(target).log("${body}").to("mock:result1");
             }