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 16:25:03 UTC

[camel] branch master updated (c2f950c -> b9077f3)

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 c2f950c  camel-box: adjust the code to respect platform independent line separator (#4280)
     new 2005d12  CAMEL-15561 - Camel-AWS2-Eventbridge: More producer operations - listRules
     new 2e6d3fc  Camel-AWS2-Eventbridge: Rebuild
     new 6e21d0e  Camel-AWS2-Eventbridge: Regen catalog
     new ada4dc2  Camel-AWS2-Eventbridge: Added docs for listRules operation
     new b9077f3  Camel-AWS2-Evenbridge: Regen

The 5 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 |  4 +--
 .../catalog/docs/aws2-eventbridge-component.adoc   | 22 +++++++++++--
 .../main/camel-main-configuration-metadata.json    |  4 +--
 .../aws2/eventbridge/aws2-eventbridge.json         |  4 +--
 .../src/main/docs/aws2-eventbridge-component.adoc  | 22 +++++++++++--
 .../aws2/eventbridge/EventbridgeConstants.java     |  1 +
 .../aws2/eventbridge/EventbridgeOperations.java    |  3 +-
 .../aws2/eventbridge/EventbridgeProducer.java      | 38 ++++++++++++++++++++++
 .../dsl/EventbridgeEndpointBuilderFactory.java     |  3 +-
 .../ROOT/pages/aws2-eventbridge-component.adoc     | 22 +++++++++++--
 10 files changed, 109 insertions(+), 14 deletions(-)


[camel] 03/05: 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 6e21d0ec5183bc5750c2654b7a7220d84fae8a3f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 23 18:19:20 2020 +0200

    Camel-AWS2-Eventbridge: Regen catalog
---
 .../org/apache/camel/catalog/components/aws2-eventbridge.json         | 4 ++--
 .../apache/camel/catalog/main/camel-main-configuration-metadata.json  | 4 ++--
 2 files changed, 4 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 3f52d40..f3c4f22 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
@@ -27,7 +27,7 @@
     "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" },
     "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", "deleteRule", "enableRule", "disableRule" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfigurati [...]
+    "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", "listRules" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configurationClass": "org.apache.camel.component.aws2.eventbridge.Eventbrid [...]
     "pojoRequest": { "kind": "property", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
     "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Eventbridge client" },
     "proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Eventbridge client" },
@@ -44,7 +44,7 @@
     "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" },
     "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", "deleteRule", "enableRule", "disableRule" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfigurat [...]
+    "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", "listRules" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configurationClass": "org.apache.camel.component.aws2.eventbridge.Eventbri [...]
     "pojoRequest": { "kind": "parameter", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
     "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Eventbridge client" },
     "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Eventbridge client" },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
index c03abb2..631931e 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
@@ -15,7 +15,7 @@
     { "name": "camel.main.autoConfigurationEnvironmentVariablesEnabled", "description": "Whether auto configuration should include OS environment variables as well. When enabled this allows to overrule any configuration using an OS environment variable. For example to set a shutdown timeout of 5 seconds: CAMEL_MAIN_SHUTDOWNTIMEOUT=5. This option is default enabled.", "sourceType": "org.apache.camel.main.MainConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue [...]
     { "name": "camel.main.autoConfigurationFailFast", "description": "Whether auto configuration should fail fast when configuring one ore more properties fails for whatever reason such as a invalid property name, etc. This option is default enabled.", "sourceType": "org.apache.camel.main.MainConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": true },
     { "name": "camel.main.autoConfigurationLogSummary", "description": "Whether auto configuration should log a summary with the configured properties. This option is default enabled.", "sourceType": "org.apache.camel.main.MainConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": true },
-    { "name": "camel.main.autoStartup", "description": "Sets whether the object should automatically start when Camel starts. Important: Currently only routes can be disabled, as CamelContext's are always started. Note: When setting auto startup false on CamelContext then that takes precedence and no routes are started. You would need to start CamelContext explicit using the org.apache.camel.CamelContext.start() method, to start the context, and then you would need to start the routes ma [...]
+    { "name": "camel.main.autoStartup", "description": "Sets whether the object should automatically start when Camel starts. Important: Currently only routes can be disabled, as CamelContext's are always started. Note: When setting auto startup false on CamelContext then that takes precedence and no routes is started. You would need to start CamelContext explicit using the org.apache.camel.CamelContext.start() method, to start the context, and then you would need to start the routes man [...]
     { "name": "camel.main.autowireComponentProperties", "description": "Whether autowiring components with properties that are of same type, which has been added to the Camel registry, as a singleton instance. This is used for convention over configuration to inject DataSource, AmazonLogin instances to the components. This option is default enabled.", "sourceType": "org.apache.camel.main.MainConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": true },
     { "name": "camel.main.autowireComponentPropertiesAllowPrivateSetter", "description": "Whether autowiring components allows to use private setter method when setting the value. This may be needed in some rare situations when some configuration classes may configure via constructors over setters. But constructor configuration is more cumbersome to use via .properties files etc.", "sourceType": "org.apache.camel.main.MainConfigurationProperties", "type": "boolean", "javaType": "boolean" [...]
     { "name": "camel.main.autowireComponentPropertiesDeep", "description": "Whether autowiring components (with deep nesting by attempting to walk as deep down the object graph by creating new empty objects on the way if needed) with properties that are of same type, which has been added to the Camel registry, as a singleton instance. This is used for convention over configuration to inject DataSource, AmazonLogin instances to the components. This option is default disabled.", "sourceTyp [...]
@@ -41,7 +41,7 @@
     { "name": "camel.main.javaRoutesIncludePattern", "description": "Used for inclusive filtering component scanning of RouteBuilder classes with Component annotation. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to include all classes starting with Foo use: &#42;&#42;\/Foo To include all routes form a specific package use: com\/mycompany\/foo\/&#42; To in [...]
     { "name": "camel.main.jmxEnabled", "description": "Enable JMX in your Camel application.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": true },
     { "name": "camel.main.jmxManagementNamePattern", "description": "The naming pattern for creating the CamelContext JMX management name. The default pattern is #name#", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "#name#" },
-    { "name": "camel.main.jmxManagementStatisticsLevel", "description": "Sets the JMX statistics level, the level can be set to Extended to gather additional information The default value is Default.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "object", "javaType": "org.apache.camel.ManagementStatisticsLevel", "defaultValue": "Default", "enum": [ "Extended", "Default", "RoutesOnly", "Off" ] },
+    { "name": "camel.main.jmxManagementStatisticsLevel", "description": "Sets the JMX statistics level The level can be set to Extended to gather additional information The default value is Default.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "object", "javaType": "org.apache.camel.ManagementStatisticsLevel", "defaultValue": "Default", "enum": [ "Extended", "Default", "RoutesOnly", "Off" ] },
     { "name": "camel.main.lightweight", "description": "Experimental: Configure the context to be lightweight. This will trigger some optimizations and memory reduction options. Lightweight context have some limitations. At this moment, dynamic endpoint destinations are not supported.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean" },
     { "name": "camel.main.loadTypeConverters", "description": "Whether to load custom type converters by scanning classpath. This is used for backwards compatibility with Camel 2.x. Its recommended to migrate to use fast type converter loading by setting Converter(loader = true) on your custom type converter classes.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean" },
     { "name": "camel.main.logDebugMaxChars", "description": "Is used to limit the maximum length of the logging Camel message bodies. If the message body is longer than the limit, the log message is clipped. Use -1 to have unlimited length. Use for example 1000 to log at most 1000 characters.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "int" },


[camel] 02/05: Camel-AWS2-Eventbridge: Rebuild

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 2e6d3fc30d0cf0d9cc5afb3253978e88e30c5194
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 23 18:18:32 2020 +0200

    Camel-AWS2-Eventbridge: Rebuild
---
 .../org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc     | 4 ++--
 .../org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json | 4 ++--
 .../src/main/docs/aws2-eventbridge-component.adoc                     | 4 ++--
 .../apache/camel/component/aws2/eventbridge/EventbridgeProducer.java  | 4 ++--
 .../camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java | 3 ++-
 docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc    | 4 ++--
 6 files changed, 12 insertions(+), 11 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 cee8155..0712da6 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
@@ -58,7 +58,7 @@ The AWS 2 Eventbridge component supports 15 options, which are listed below.
 | *eventbridgeClient* (producer) | 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 6 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule | putRule | EventbridgeOperations
+| *operation* (producer) | *Required* The operation to perform. There are 7 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, listRules | putRule | EventbridgeOperations
 | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean
 | *proxyHost* (producer) | To define a proxy host when instantiating the Eventbridge client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the Eventbridge client |  | Integer
@@ -103,7 +103,7 @@ with the following path and query parameters:
 | *eventbridgeClient* (producer) | 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 6 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule | putRule | EventbridgeOperations
+| *operation* (producer) | *Required* The operation to perform. There are 7 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, listRules | putRule | EventbridgeOperations
 | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean
 | *proxyHost* (producer) | To define a proxy host when instantiating the Eventbridge client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the Eventbridge client |  | Integer
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 3f52d40..f3c4f22 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
@@ -27,7 +27,7 @@
     "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" },
     "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", "deleteRule", "enableRule", "disableRule" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfigurati [...]
+    "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", "listRules" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configurationClass": "org.apache.camel.component.aws2.eventbridge.Eventbrid [...]
     "pojoRequest": { "kind": "property", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
     "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Eventbridge client" },
     "proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Eventbridge client" },
@@ -44,7 +44,7 @@
     "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" },
     "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", "deleteRule", "enableRule", "disableRule" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfigurat [...]
+    "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", "listRules" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configurationClass": "org.apache.camel.component.aws2.eventbridge.Eventbri [...]
     "pojoRequest": { "kind": "parameter", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
     "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Eventbridge client" },
     "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Eventbridge client" },
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 cee8155..0712da6 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
@@ -58,7 +58,7 @@ The AWS 2 Eventbridge component supports 15 options, which are listed below.
 | *eventbridgeClient* (producer) | 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 6 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule | putRule | EventbridgeOperations
+| *operation* (producer) | *Required* The operation to perform. There are 7 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, listRules | putRule | EventbridgeOperations
 | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean
 | *proxyHost* (producer) | To define a proxy host when instantiating the Eventbridge client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the Eventbridge client |  | Integer
@@ -103,7 +103,7 @@ with the following path and query parameters:
 | *eventbridgeClient* (producer) | 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 6 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule | putRule | EventbridgeOperations
+| *operation* (producer) | *Required* The operation to perform. There are 7 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, listRules | putRule | EventbridgeOperations
 | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean
 | *proxyHost* (producer) | To define a proxy host when instantiating the Eventbridge client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the Eventbridge client |  | Integer
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
index 7242477..1f6c2f1 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
@@ -332,7 +332,7 @@ public class EventbridgeProducer extends DefaultProducer {
             message.setBody(result);
         }
     }
-    
+
     private void listRules(EventBridgeClient eventbridgeClient, Exchange exchange) throws InvalidPayloadException {
         if (getConfiguration().isPojoRequest()) {
             Object payload = exchange.getIn().getMandatoryBody();
@@ -348,7 +348,7 @@ public class EventbridgeProducer extends DefaultProducer {
                 message.setBody(result);
             }
         } else {
-        	ListRulesRequest.Builder builder = ListRulesRequest.builder();
+            ListRulesRequest.Builder builder = ListRulesRequest.builder();
             if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(EventbridgeConstants.RULE_NAME_PREFIX))) {
                 String ruleNamePrefix = exchange.getIn().getHeader(EventbridgeConstants.RULE_NAME_PREFIX, String.class);
                 builder.namePrefix(ruleNamePrefix);
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 82fbd73..f9acc9b 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
@@ -405,7 +405,8 @@ public interface EventbridgeEndpointBuilderFactory {
         removeTargets,
         deleteRule,
         enableRule,
-        disableRule;
+        disableRule,
+        listRules;
     }
 
     /**
diff --git a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
index f2b0f87..3bb5b67 100644
--- a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
@@ -60,7 +60,7 @@ The AWS 2 Eventbridge component supports 15 options, which are listed below.
 | *eventbridgeClient* (producer) | 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 6 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule | putRule | EventbridgeOperations
+| *operation* (producer) | *Required* The operation to perform. There are 7 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, listRules | putRule | EventbridgeOperations
 | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean
 | *proxyHost* (producer) | To define a proxy host when instantiating the Eventbridge client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the Eventbridge client |  | Integer
@@ -105,7 +105,7 @@ with the following path and query parameters:
 | *eventbridgeClient* (producer) | 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 6 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule | putRule | EventbridgeOperations
+| *operation* (producer) | *Required* The operation to perform. There are 7 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, listRules | putRule | EventbridgeOperations
 | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean
 | *proxyHost* (producer) | To define a proxy host when instantiating the Eventbridge client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the Eventbridge client |  | Integer


[camel] 01/05: CAMEL-15561 - Camel-AWS2-Eventbridge: More producer operations - listRules

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 2005d12b475706ce59d57387ea81cc66ce84d1aa
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 23 18:17:35 2020 +0200

    CAMEL-15561 - Camel-AWS2-Eventbridge: More producer operations - listRules
---
 .../aws2/eventbridge/EventbridgeConstants.java     |  1 +
 .../aws2/eventbridge/EventbridgeOperations.java    |  3 +-
 .../aws2/eventbridge/EventbridgeProducer.java      | 38 ++++++++++++++++++++++
 3 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConstants.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConstants.java
index 0d84b7f..bf7bcfd 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConstants.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConstants.java
@@ -22,6 +22,7 @@ package org.apache.camel.component.aws2.eventbridge;
 public interface EventbridgeConstants {
     String OPERATION = "CamelAwsEventbridgeOperation";
     String RULE_NAME = "CamelAwsEventbridgeRuleName";
+    String RULE_NAME_PREFIX = "CamelAwsEventbridgeRuleNamePrefix";
     String EVENT_PATTERN = "CamelAwsEventbridgeEventPattern";
     String TARGETS = "CamelAwsEventbridgeTargets";
     String TARGETS_IDS = "CamelAwsEventbridgeTargetsIds";
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeOperations.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeOperations.java
index 1d2abfd..38b86bc 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeOperations.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeOperations.java
@@ -23,5 +23,6 @@ public enum EventbridgeOperations {
     removeTargets,
     deleteRule,
     enableRule,
-    disableRule
+    disableRule,
+    listRules
 }
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
index 48e3178..7242477 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
@@ -40,6 +40,8 @@ import software.amazon.awssdk.services.eventbridge.model.DisableRuleRequest;
 import software.amazon.awssdk.services.eventbridge.model.DisableRuleResponse;
 import software.amazon.awssdk.services.eventbridge.model.EnableRuleRequest;
 import software.amazon.awssdk.services.eventbridge.model.EnableRuleResponse;
+import software.amazon.awssdk.services.eventbridge.model.ListRulesRequest;
+import software.amazon.awssdk.services.eventbridge.model.ListRulesResponse;
 import software.amazon.awssdk.services.eventbridge.model.PutRuleRequest;
 import software.amazon.awssdk.services.eventbridge.model.PutRuleResponse;
 import software.amazon.awssdk.services.eventbridge.model.PutTargetsRequest;
@@ -83,6 +85,9 @@ public class EventbridgeProducer extends DefaultProducer {
             case disableRule:
                 disableRule(getEndpoint().getEventbridgeClient(), exchange);
                 break;
+            case listRules:
+                listRules(getEndpoint().getEventbridgeClient(), exchange);
+                break;
             default:
                 throw new IllegalArgumentException("Unsupported operation");
         }
@@ -327,6 +332,39 @@ public class EventbridgeProducer extends DefaultProducer {
             message.setBody(result);
         }
     }
+    
+    private void listRules(EventBridgeClient eventbridgeClient, Exchange exchange) throws InvalidPayloadException {
+        if (getConfiguration().isPojoRequest()) {
+            Object payload = exchange.getIn().getMandatoryBody();
+            if (payload instanceof ListRulesRequest) {
+                ListRulesResponse result;
+                try {
+                    result = eventbridgeClient.listRules((ListRulesRequest) payload);
+                } catch (AwsServiceException ase) {
+                    LOG.trace("List Rules command returned the error code {}", ase.awsErrorDetails().errorCode());
+                    throw ase;
+                }
+                Message message = getMessageForResponse(exchange);
+                message.setBody(result);
+            }
+        } else {
+        	ListRulesRequest.Builder builder = ListRulesRequest.builder();
+            if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(EventbridgeConstants.RULE_NAME_PREFIX))) {
+                String ruleNamePrefix = exchange.getIn().getHeader(EventbridgeConstants.RULE_NAME_PREFIX, String.class);
+                builder.namePrefix(ruleNamePrefix);
+            }
+            builder.eventBusName(getConfiguration().getEventbusName());
+            ListRulesResponse result;
+            try {
+                result = eventbridgeClient.listRules(builder.build());
+            } catch (AwsServiceException ase) {
+                LOG.trace("Disable Rule command returned the error code {}", ase.awsErrorDetails().errorCode());
+                throw ase;
+            }
+            Message message = getMessageForResponse(exchange);
+            message.setBody(result);
+        }
+    }
 
     @Override
     public EventbridgeEndpoint getEndpoint() {


[camel] 04/05: Camel-AWS2-Eventbridge: Added docs for listRules operation

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 ada4dc22621fb5b32083d05685c59e971ab35de1
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 23 18:21:03 2020 +0200

    Camel-AWS2-Eventbridge: Added docs for listRules operation
---
 .../src/main/docs/aws2-eventbridge-component.adoc      | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

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 0712da6..eed37ff 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
@@ -127,6 +127,7 @@ Camel-AWS2-Eventbridge component provides the following operation on the produce
 - deleteRule
 - enableRule
 - disableRule
+- listRules
 
 - PutRule: this operation create a rule related to an eventbus
 
@@ -238,6 +239,23 @@ This operation will enable the firstrule rule from the test eventbus.
 
 This operation will disable the firstrule rule from the test eventbus.
 
+- ListRules: this operation will list all the rules related to an eventbus with prefix first
+
+[source,java]
+--------------------------------------------------------------------------------
+  from("direct:start").process(new Processor() {
+                    
+      @Override
+      public void process(Exchange exchange) throws Exception {
+          exchange.getIn().setHeader(EventbridgeConstants.RULE_NAME_PREFIX, "first");
+      }
+  })
+  .to("aws2-eventbridge://test?operation=listRules")
+  .to("mock:result");
+--------------------------------------------------------------------------------
+
+This operation will list all the rules with prefix first from the test eventbus.
+
 == Automatic detection of EventbridgeClient client in registry
 
 The component is capable of detecting the presence of an EventbridgeClient bean into the registry.


[camel] 05/05: Camel-AWS2-Evenbridge: 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 b9077f3cc499f8dbb6522e925841a9a5801084c2
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 23 18:22:06 2020 +0200

    Camel-AWS2-Evenbridge: Regen
---
 .../camel/catalog/docs/aws2-eventbridge-component.adoc | 18 ++++++++++++++++++
 .../modules/ROOT/pages/aws2-eventbridge-component.adoc | 18 ++++++++++++++++++
 2 files changed, 36 insertions(+)

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 0712da6..eed37ff 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
@@ -127,6 +127,7 @@ Camel-AWS2-Eventbridge component provides the following operation on the produce
 - deleteRule
 - enableRule
 - disableRule
+- listRules
 
 - PutRule: this operation create a rule related to an eventbus
 
@@ -238,6 +239,23 @@ This operation will enable the firstrule rule from the test eventbus.
 
 This operation will disable the firstrule rule from the test eventbus.
 
+- ListRules: this operation will list all the rules related to an eventbus with prefix first
+
+[source,java]
+--------------------------------------------------------------------------------
+  from("direct:start").process(new Processor() {
+                    
+      @Override
+      public void process(Exchange exchange) throws Exception {
+          exchange.getIn().setHeader(EventbridgeConstants.RULE_NAME_PREFIX, "first");
+      }
+  })
+  .to("aws2-eventbridge://test?operation=listRules")
+  .to("mock:result");
+--------------------------------------------------------------------------------
+
+This operation will list all the rules with prefix first from the test eventbus.
+
 == Automatic detection of EventbridgeClient client in registry
 
 The component is capable of detecting the presence of an EventbridgeClient bean into the registry.
diff --git a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
index 3bb5b67..223c938 100644
--- a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
@@ -129,6 +129,7 @@ Camel-AWS2-Eventbridge component provides the following operation on the produce
 - deleteRule
 - enableRule
 - disableRule
+- listRules
 
 - PutRule: this operation create a rule related to an eventbus
 
@@ -240,6 +241,23 @@ This operation will enable the firstrule rule from the test eventbus.
 
 This operation will disable the firstrule rule from the test eventbus.
 
+- ListRules: this operation will list all the rules related to an eventbus with prefix first
+
+[source,java]
+--------------------------------------------------------------------------------
+  from("direct:start").process(new Processor() {
+                    
+      @Override
+      public void process(Exchange exchange) throws Exception {
+          exchange.getIn().setHeader(EventbridgeConstants.RULE_NAME_PREFIX, "first");
+      }
+  })
+  .to("aws2-eventbridge://test?operation=listRules")
+  .to("mock:result");
+--------------------------------------------------------------------------------
+
+This operation will list all the rules with prefix first from the test eventbus.
+
 == Automatic detection of EventbridgeClient client in registry
 
 The component is capable of detecting the presence of an EventbridgeClient bean into the registry.