This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 978c78a CAMEL-14622: Component options use @Metadata to markup the options 978c78a is described below commit 978c78a211c86e2b38929e94b0341d856e29bcc2 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Tue Jun 16 14:06:02 2020 +0200 CAMEL-14622: Component options use @Metadata to markup the options --- .../component/flink/FlinkComponentConfigurer.java | 5 -- .../org/apache/camel/component/flink/flink.json | 7 ++- .../camel-flink/src/main/docs/flink-component.adoc | 3 +- .../camel/component/flink/FlinkComponent.java | 5 ++ .../component/google/bigquery/google-bigquery.json | 6 +-- .../google/bigquery/sql/google-bigquery-sql.json | 4 +- .../google/bigquery/GoogleBigQueryComponent.java | 5 ++ .../bigquery/sql/GoogleBigQuerySQLComponent.java | 4 ++ .../component/guava/eventbus/guava-eventbus.json | 4 +- .../src/main/docs/guava-eventbus-component.adoc | 2 +- .../guava/eventbus/GuavaEventBusComponent.java | 8 ++- .../org/apache/camel/component/hdfs/hdfs.json | 6 +-- .../camel-hdfs/src/main/docs/hdfs-component.adoc | 4 +- .../apache/camel/component/hdfs/HdfsComponent.java | 3 ++ .../component/iec60870/client/iec60870-client.json | 2 +- .../component/iec60870/server/iec60870-server.json | 2 +- .../component/iec60870/AbstractIecComponent.java | 13 ++--- .../component/iec60870/client/ClientComponent.java | 5 +- .../component/iec60870/server/ServerComponent.java | 5 +- .../dsl/FlinkComponentBuilderFactory.java | 13 ----- .../dsl/GuavaEventbusComponentBuilderFactory.java | 34 ++++++------ .../component/dsl/HdfsComponentBuilderFactory.java | 60 +++++++++++----------- 22 files changed, 93 insertions(+), 107 deletions(-) diff --git a/components/camel-flink/src/generated/java/org/apache/camel/component/flink/FlinkComponentConfigurer.java b/components/camel-flink/src/generated/java/org/apache/camel/component/flink/FlinkComponentConfigurer.java index 4ca2cae..dedf4f0 100644 --- a/components/camel-flink/src/generated/java/org/apache/camel/component/flink/FlinkComponentConfigurer.java +++ b/components/camel-flink/src/generated/java/org/apache/camel/component/flink/FlinkComponentConfigurer.java @@ -21,8 +21,6 @@ public class FlinkComponentConfigurer extends PropertyConfigurerSupport implemen switch (ignoreCase ? name.toLowerCase() : name) { case "basicpropertybinding": case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true; - case "dataset": - case "dataSet": target.setDataSet(property(camelContext, org.apache.flink.api.java.DataSet.class, value)); return true; case "datasetcallback": case "dataSetCallback": target.setDataSetCallback(property(camelContext, org.apache.camel.component.flink.DataSetCallback.class, value)); return true; case "datastream": @@ -39,7 +37,6 @@ public class FlinkComponentConfigurer extends PropertyConfigurerSupport implemen public Map<String, Object> getAllOptions(Object target) { Map<String, Object> answer = new CaseInsensitiveMap(); answer.put("basicPropertyBinding", boolean.class); - answer.put("dataSet", org.apache.flink.api.java.DataSet.class); answer.put("dataSetCallback", org.apache.camel.component.flink.DataSetCallback.class); answer.put("dataStream", org.apache.flink.streaming.api.datastream.DataStream.class); answer.put("dataStreamCallback", org.apache.camel.component.flink.DataStreamCallback.class); @@ -53,8 +50,6 @@ public class FlinkComponentConfigurer extends PropertyConfigurerSupport implemen switch (ignoreCase ? name.toLowerCase() : name) { case "basicpropertybinding": case "basicPropertyBinding": return target.isBasicPropertyBinding(); - case "dataset": - case "dataSet": return target.getDataSet(); case "datasetcallback": case "dataSetCallback": return target.getDataSetCallback(); case "datastream": diff --git a/components/camel-flink/src/generated/resources/org/apache/camel/component/flink/flink.json b/components/camel-flink/src/generated/resources/org/apache/camel/component/flink/flink.json index 5311ff7..eeecd78 100644 --- a/components/camel-flink/src/generated/resources/org/apache/camel/component/flink/flink.json +++ b/components/camel-flink/src/generated/resources/org/apache/camel/component/flink/flink.json @@ -21,10 +21,9 @@ "lenientProperties": false }, "componentProperties": { - "dataSet": { "kind": "property", "displayName": "Data Set", "group": "producer", "required": false, "type": "object", "javaType": "org.apache.flink.api.java.DataSet", "deprecated": false, "secret": false, "description": "DataSet to compute against." }, - "dataSetCallback": { "kind": "property", "displayName": "Data Set Callback", "group": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.flink.DataSetCallback", "deprecated": false, "secret": false, "description": "Function performing action against a DataSet." }, - "dataStream": { "kind": "property", "displayName": "Data Stream", "group": "producer", "required": false, "type": "object", "javaType": "org.apache.flink.streaming.api.datastream.DataStream", "deprecated": false, "secret": false, "description": "DataStream to compute against." }, - "dataStreamCallback": { "kind": "property", "displayName": "Data Stream Callback", "group": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.flink.DataStreamCallback", "deprecated": false, "secret": false, "description": "Function performing action against a DataStream." }, + "dataSetCallback": { "kind": "property", "displayName": "Data Set Callback", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.flink.DataSetCallback", "deprecated": false, "secret": false, "description": "Function performing action against a DataSet." }, + "dataStream": { "kind": "property", "displayName": "Data Stream", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.flink.streaming.api.datastream.DataStream", "deprecated": false, "secret": false, "description": "DataStream to compute against." }, + "dataStreamCallback": { "kind": "property", "displayName": "Data Stream Callback", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.flink.DataStreamCallback", "deprecated": false, "secret": false, "description": "Function performing action against a DataStream." }, "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 [...] "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" } }, diff --git a/components/camel-flink/src/main/docs/flink-component.adoc b/components/camel-flink/src/main/docs/flink-component.adoc index e7fa276..b423c7c 100644 --- a/components/camel-flink/src/main/docs/flink-component.adoc +++ b/components/camel-flink/src/main/docs/flink-component.adoc @@ -95,14 +95,13 @@ with the following path and query parameters: // component options: START -The Flink component supports 6 options, which are listed below. +The Flink component supports 5 options, which are listed below. [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *dataSet* (producer) | DataSet to compute against. | | DataSet | *dataSetCallback* (producer) | Function performing action against a DataSet. | | DataSetCallback | *dataStream* (producer) | DataStream to compute against. | | DataStream | *dataStreamCallback* (producer) | Function performing action against a DataStream. | | DataStreamCallback diff --git a/components/camel-flink/src/main/java/org/apache/camel/component/flink/FlinkComponent.java b/components/camel-flink/src/main/java/org/apache/camel/component/flink/FlinkComponent.java index cff7c6c..bd85eb3 100644 --- a/components/camel-flink/src/main/java/org/apache/camel/component/flink/FlinkComponent.java +++ b/components/camel-flink/src/main/java/org/apache/camel/component/flink/FlinkComponent.java @@ -19,6 +19,7 @@ package org.apache.camel.component.flink; import java.util.Map; import org.apache.camel.Endpoint; +import org.apache.camel.spi.Metadata; import org.apache.camel.spi.annotations.Component; import org.apache.camel.support.DefaultComponent; import org.apache.flink.api.java.DataSet; @@ -30,9 +31,13 @@ import org.apache.flink.streaming.api.datastream.DataStream; @Component("flink") public class FlinkComponent extends DefaultComponent { + @Metadata private DataSet ds; + @Metadata private DataSetCallback dataSetCallback; + @Metadata private DataStream dataStream; + @Metadata private DataStreamCallback dataStreamCallback; public FlinkComponent() { diff --git a/components/camel-google-bigquery/src/generated/resources/org/apache/camel/component/google/bigquery/google-bigquery.json b/components/camel-google-bigquery/src/generated/resources/org/apache/camel/component/google/bigquery/google-bigquery.json index cfac62e..a8fc00e 100644 --- a/components/camel-google-bigquery/src/generated/resources/org/apache/camel/component/google/bigquery/google-bigquery.json +++ b/components/camel-google-bigquery/src/generated/resources/org/apache/camel/component/google/bigquery/google-bigquery.json @@ -21,10 +21,10 @@ "lenientProperties": false }, "componentProperties": { - "connectionFactory": { "kind": "property", "displayName": "Connection Factory", "group": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.google.bigquery.GoogleBigQueryConnectionFactory", "deprecated": false, "secret": false, "description": "ConnectionFactory to obtain connection to Bigquery Service. If non provided the default one will be used" }, - "datasetId": { "kind": "property", "displayName": "Dataset Id", "group": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "BigQuery Dataset Id" }, + "connectionFactory": { "kind": "property", "displayName": "Connection Factory", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.google.bigquery.GoogleBigQueryConnectionFactory", "deprecated": false, "secret": false, "description": "ConnectionFactory to obtain connection to Bigquery Service. If non provided the default one will be used" }, + "datasetId": { "kind": "property", "displayName": "Dataset Id", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "BigQuery Dataset Id" }, "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 [...] - "projectId": { "kind": "property", "displayName": "Project Id", "group": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Google Cloud Project Id" }, + "projectId": { "kind": "property", "displayName": "Project Id", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Google Cloud Project Id" }, "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" } }, "properties": { diff --git a/components/camel-google-bigquery/src/generated/resources/org/apache/camel/component/google/bigquery/sql/google-bigquery-sql.json b/components/camel-google-bigquery/src/generated/resources/org/apache/camel/component/google/bigquery/sql/google-bigquery-sql.json index e2bb65d..45fba58 100644 --- a/components/camel-google-bigquery/src/generated/resources/org/apache/camel/component/google/bigquery/sql/google-bigquery-sql.json +++ b/components/camel-google-bigquery/src/generated/resources/org/apache/camel/component/google/bigquery/sql/google-bigquery-sql.json @@ -21,9 +21,9 @@ "lenientProperties": false }, "componentProperties": { - "connectionFactory": { "kind": "property", "displayName": "Connection Factory", "group": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.google.bigquery.GoogleBigQueryConnectionFactory", "deprecated": false, "secret": false, "description": "ConnectionFactory to obtain connection to Bigquery Service. If non provided the default one will be used" }, + "connectionFactory": { "kind": "property", "displayName": "Connection Factory", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.google.bigquery.GoogleBigQueryConnectionFactory", "deprecated": false, "secret": false, "description": "ConnectionFactory to obtain connection to Bigquery Service. If non provided the default one will be used" }, "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 [...] - "projectId": { "kind": "property", "displayName": "Project Id", "group": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Google Cloud Project Id" }, + "projectId": { "kind": "property", "displayName": "Project Id", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Google Cloud Project Id" }, "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" } }, "properties": { diff --git a/components/camel-google-bigquery/src/main/java/org/apache/camel/component/google/bigquery/GoogleBigQueryComponent.java b/components/camel-google-bigquery/src/main/java/org/apache/camel/component/google/bigquery/GoogleBigQueryComponent.java index a695f51..7d23f64 100644 --- a/components/camel-google-bigquery/src/main/java/org/apache/camel/component/google/bigquery/GoogleBigQueryComponent.java +++ b/components/camel-google-bigquery/src/main/java/org/apache/camel/component/google/bigquery/GoogleBigQueryComponent.java @@ -20,13 +20,18 @@ import java.util.Map; import org.apache.camel.CamelContext; import org.apache.camel.Endpoint; +import org.apache.camel.spi.Metadata; import org.apache.camel.spi.annotations.Component; import org.apache.camel.support.DefaultComponent; @Component("google-bigquery") public class GoogleBigQueryComponent extends DefaultComponent { + + @Metadata private String projectId; + @Metadata private String datasetId; + @Metadata private GoogleBigQueryConnectionFactory connectionFactory; public GoogleBigQueryComponent() { diff --git a/components/camel-google-bigquery/src/main/java/org/apache/camel/component/google/bigquery/sql/GoogleBigQuerySQLComponent.java b/components/camel-google-bigquery/src/main/java/org/apache/camel/component/google/bigquery/sql/GoogleBigQuerySQLComponent.java index fad5e65..da788e6 100644 --- a/components/camel-google-bigquery/src/main/java/org/apache/camel/component/google/bigquery/sql/GoogleBigQuerySQLComponent.java +++ b/components/camel-google-bigquery/src/main/java/org/apache/camel/component/google/bigquery/sql/GoogleBigQuerySQLComponent.java @@ -21,12 +21,16 @@ import java.util.Map; import org.apache.camel.CamelContext; import org.apache.camel.Endpoint; import org.apache.camel.component.google.bigquery.GoogleBigQueryConnectionFactory; +import org.apache.camel.spi.Metadata; import org.apache.camel.spi.annotations.Component; import org.apache.camel.support.DefaultComponent; @Component("google-bigquery-sql") public class GoogleBigQuerySQLComponent extends DefaultComponent { + + @Metadata private String projectId; + @Metadata private GoogleBigQueryConnectionFactory connectionFactory; public GoogleBigQuerySQLComponent() { diff --git a/components/camel-guava-eventbus/src/generated/resources/org/apache/camel/component/guava/eventbus/guava-eventbus.json b/components/camel-guava-eventbus/src/generated/resources/org/apache/camel/component/guava/eventbus/guava-eventbus.json index ac08ff4..08c0de2 100644 --- a/components/camel-guava-eventbus/src/generated/resources/org/apache/camel/component/guava/eventbus/guava-eventbus.json +++ b/components/camel-guava-eventbus/src/generated/resources/org/apache/camel/component/guava/eventbus/guava-eventbus.json @@ -21,9 +21,9 @@ "lenientProperties": false }, "componentProperties": { - "eventBus": { "kind": "property", "displayName": "Event Bus", "group": "common", "required": false, "type": "object", "javaType": "com.google.common.eventbus.EventBus", "deprecated": false, "secret": false, "description": "To use the given Guava EventBus instance" }, - "listenerInterface": { "kind": "property", "displayName": "Listener Interface", "group": "common", "required": false, "type": "string", "javaType": "java.lang.Class<java.lang.Object>", "deprecated": false, "secret": false, "description": "The interface with method(s) marked with the Subscribe annotation. Dynamic proxy will be created over the interface so it could be registered as the EventBus listener. Particularly useful when creating multi-event listeners and for handling DeadEven [...] + "eventBus": { "kind": "property", "displayName": "Event Bus", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.google.common.eventbus.EventBus", "deprecated": false, "secret": false, "description": "To use the given Guava EventBus instance" }, "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by [...] + "listenerInterface": { "kind": "property", "displayName": "Listener Interface", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.Class<java.lang.Object>", "deprecated": false, "secret": false, "description": "The interface with method(s) marked with the Subscribe annotation. Dynamic proxy will be created over the interface so it could be registered as the EventBus listener. Particularly useful when creating multi-event listeners an [...] "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 [...] "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" } }, diff --git a/components/camel-guava-eventbus/src/main/docs/guava-eventbus-component.adoc b/components/camel-guava-eventbus/src/main/docs/guava-eventbus-component.adoc index baf6cff..2ef1368 100644 --- a/components/camel-guava-eventbus/src/main/docs/guava-eventbus-component.adoc +++ b/components/camel-guava-eventbus/src/main/docs/guava-eventbus-component.adoc @@ -62,8 +62,8 @@ The Guava EventBus component supports 5 options, which are listed below. |=== | Name | Description | Default | Type | *eventBus* (common) | To use the given Guava EventBus instance | | EventBus -| *listenerInterface* (common) | The interface with method(s) marked with the Subscribe annotation. Dynamic proxy will be created over the interface so it could be registered as the EventBus listener. Particularly useful when creating multi-event listeners and for handling DeadEvent properly. This option cannot be used together with eventClass option. | | Class | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean +| *listenerInterface* (consumer) | The interface with method(s) marked with the Subscribe annotation. Dynamic proxy will be created over the interface so it could be registered as the EventBus listener. Particularly useful when creating multi-event listeners and for handling DeadEvent properly. This option cannot be used together with eventClass option. | | Class | *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 [...] | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean |=== diff --git a/components/camel-guava-eventbus/src/main/java/org/apache/camel/component/guava/eventbus/GuavaEventBusComponent.java b/components/camel-guava-eventbus/src/main/java/org/apache/camel/component/guava/eventbus/GuavaEventBusComponent.java index 472d0a2..eb7d5b2 100644 --- a/components/camel-guava-eventbus/src/main/java/org/apache/camel/component/guava/eventbus/GuavaEventBusComponent.java +++ b/components/camel-guava-eventbus/src/main/java/org/apache/camel/component/guava/eventbus/GuavaEventBusComponent.java @@ -20,18 +20,16 @@ import java.util.Map; import com.google.common.eventbus.EventBus; import org.apache.camel.Endpoint; +import org.apache.camel.spi.Metadata; import org.apache.camel.spi.annotations.Component; import org.apache.camel.support.DefaultComponent; -/** - * Camel component for Guava EventBus - * (http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/eventbus/EventBus.html). Supports both - * producer and consumer endpoints. - */ @Component("guava-eventbus") public class GuavaEventBusComponent extends DefaultComponent { + @Metadata private EventBus eventBus; + @Metadata(label = "consumer") private Class<?> listenerInterface; public GuavaEventBusComponent() { diff --git a/components/camel-hdfs/src/generated/resources/org/apache/camel/component/hdfs/hdfs.json b/components/camel-hdfs/src/generated/resources/org/apache/camel/component/hdfs/hdfs.json index 588aacd..c0d2d8d 100644 --- a/components/camel-hdfs/src/generated/resources/org/apache/camel/component/hdfs/hdfs.json +++ b/components/camel-hdfs/src/generated/resources/org/apache/camel/component/hdfs/hdfs.json @@ -21,11 +21,11 @@ "lenientProperties": false }, "componentProperties": { - "jAASConfiguration": { "kind": "property", "displayName": "JAASConfiguration", "group": "common", "required": false, "type": "object", "javaType": "javax.security.auth.login.Configuration", "deprecated": false, "secret": false, "description": "To use the given configuration for security with JAAS." }, - "kerberosConfigFile": { "kind": "property", "displayName": "Kerberos Config File", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "To use kerberos authentication, set the value of the 'java.security.krb5.conf' environment variable to an existing file. If the environment variable is already set, warn if different than the specified parameter" }, "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by [...] "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 [...] - "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" } + "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }, + "jAASConfiguration": { "kind": "property", "displayName": "JAASConfiguration", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "javax.security.auth.login.Configuration", "deprecated": false, "deprecationNote": "", "secret": false, "description": "To use the given configuration for security with JAAS." }, + "kerberosConfigFile": { "kind": "property", "displayName": "Kerberos Config File", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "description": "To use kerberos authentication, set the value of the 'java.security.krb5.conf' environment variable to an existing file. If the environment variable is already set, warn if different than the specified parameter" } }, "properties": { "hostName": { "kind": "path", "displayName": "Host Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.hdfs.HdfsConfiguration", "configurationField": "config", "description": "HDFS host to use" }, diff --git a/components/camel-hdfs/src/main/docs/hdfs-component.adoc b/components/camel-hdfs/src/main/docs/hdfs-component.adoc index b6c40c0..9f5eec9 100644 --- a/components/camel-hdfs/src/main/docs/hdfs-component.adoc +++ b/components/camel-hdfs/src/main/docs/hdfs-component.adoc @@ -69,11 +69,11 @@ The HDFS component supports 5 options, which are listed below. [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *jAASConfiguration* (common) | To use the given configuration for security with JAAS. | | Configuration -| *kerberosConfigFile* (common) | To use kerberos authentication, set the value of the 'java.security.krb5.conf' environment variable to an existing file. If the environment variable is already set, warn if different than the specified parameter | | String | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...] | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean +| *jAASConfiguration* (security) | To use the given configuration for security with JAAS. | | Configuration +| *kerberosConfigFile* (security) | To use kerberos authentication, set the value of the 'java.security.krb5.conf' environment variable to an existing file. If the environment variable is already set, warn if different than the specified parameter | | String |=== // component options: END diff --git a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsComponent.java b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsComponent.java index 8c22111..269cc57 100644 --- a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsComponent.java +++ b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsComponent.java @@ -23,6 +23,7 @@ import javax.security.auth.login.Configuration; import org.apache.camel.Endpoint; import org.apache.camel.component.hdfs.kerberos.KerberosConfigurationBuilder; +import org.apache.camel.spi.Metadata; import org.apache.camel.spi.annotations.Component; import org.apache.camel.support.DefaultComponent; import org.apache.hadoop.fs.FsUrlStreamHandlerFactory; @@ -70,6 +71,7 @@ public class HdfsComponent extends DefaultComponent { /** * To use the given configuration for security with JAAS. */ + @Metadata(label = "security") public static void setJAASConfiguration(Configuration auth) { if (auth != null) { LOG.trace("Restoring existing JAAS Configuration {}", auth); @@ -89,6 +91,7 @@ public class HdfsComponent extends DefaultComponent { * * @param kerberosConfigFileLocation - kerb5.conf file (https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html) */ + @Metadata(label = "security") public static void setKerberosConfigFile(String kerberosConfigFileLocation) { HdfsComponent.kerberosConfigFileLocation = kerberosConfigFileLocation; KerberosConfigurationBuilder.setKerberosConfigFile(kerberosConfigFileLocation); diff --git a/components/camel-iec60870/src/generated/resources/org/apache/camel/component/iec60870/client/iec60870-client.json b/components/camel-iec60870/src/generated/resources/org/apache/camel/component/iec60870/client/iec60870-client.json index ac63cc2..d13a569 100644 --- a/components/camel-iec60870/src/generated/resources/org/apache/camel/component/iec60870/client/iec60870-client.json +++ b/components/camel-iec60870/src/generated/resources/org/apache/camel/component/iec60870/client/iec60870-client.json @@ -21,7 +21,7 @@ "lenientProperties": false }, "componentProperties": { - "defaultConnectionOptions": { "kind": "property", "displayName": "Default Connection Options", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.component.iec60870.client.ClientOptions", "deprecated": false, "secret": false, "description": "Default connection options" }, + "defaultConnectionOptions": { "kind": "property", "displayName": "Default Connection Options", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.iec60870.client.ClientOptions", "deprecated": false, "deprecationNote": "", "secret": false, "description": "Default connection options" }, "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by [...] "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 [...] "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" } diff --git a/components/camel-iec60870/src/generated/resources/org/apache/camel/component/iec60870/server/iec60870-server.json b/components/camel-iec60870/src/generated/resources/org/apache/camel/component/iec60870/server/iec60870-server.json index 01614e8..27dc652 100644 --- a/components/camel-iec60870/src/generated/resources/org/apache/camel/component/iec60870/server/iec60870-server.json +++ b/components/camel-iec60870/src/generated/resources/org/apache/camel/component/iec60870/server/iec60870-server.json @@ -21,7 +21,7 @@ "lenientProperties": false }, "componentProperties": { - "defaultConnectionOptions": { "kind": "property", "displayName": "Default Connection Options", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.component.iec60870.server.ServerOptions", "deprecated": false, "secret": false, "description": "Default connection options" }, + "defaultConnectionOptions": { "kind": "property", "displayName": "Default Connection Options", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.iec60870.server.ServerOptions", "deprecated": false, "deprecationNote": "", "secret": false, "description": "Default connection options" }, "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by [...] "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 [...] "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" } diff --git a/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/AbstractIecComponent.java b/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/AbstractIecComponent.java index 356273a..ebd5b57 100644 --- a/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/AbstractIecComponent.java +++ b/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/AbstractIecComponent.java @@ -23,6 +23,7 @@ import java.util.Map; import org.apache.camel.CamelContext; import org.apache.camel.Endpoint; import org.apache.camel.component.iec60870.client.ClientOptions; +import org.apache.camel.spi.Metadata; import org.apache.camel.support.DefaultComponent; import org.eclipse.neoscada.protocol.iec60870.ProtocolOptions; import org.slf4j.Logger; @@ -55,27 +56,19 @@ public abstract class AbstractIecComponent<T1, T2 extends BaseOptions<T2>> exten /** * Default connection options - * - * @param defaultConnectionOptions the new default connection options, must - * not be {@code null} */ + @Metadata protected void setDefaultConnectionOptions(final T2 defaultConnectionOptions) { this.defaultConnectionOptions = requireNonNull(defaultConnectionOptions); } - /** - * Get the default connection options - * - * @return the default connect options, never returns {@code null} - */ protected T2 getDefaultConnectionOptions() { return this.defaultConnectionOptions; } @Override protected Endpoint createEndpoint(final String uri, final String remaining, final Map<String, Object> parameters) throws Exception { - - LOG.info("Create endpoint - uri: {}, remaining: {}, parameters: {}", uri, remaining, parameters); + LOG.debug("Create endpoint - uri: {}, remaining: {}, parameters: {}", uri, remaining, parameters); final T1 connection = lookupConnection(uri, parameters); final ObjectAddress address = parseAddress(uri); diff --git a/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/client/ClientComponent.java b/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/client/ClientComponent.java index acf4c27..94835ca 100644 --- a/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/client/ClientComponent.java +++ b/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/client/ClientComponent.java @@ -24,6 +24,7 @@ import org.apache.camel.component.iec60870.AbstractIecComponent; import org.apache.camel.component.iec60870.ConnectionId; import org.apache.camel.component.iec60870.Constants; import org.apache.camel.component.iec60870.ObjectAddress; +import org.apache.camel.spi.Metadata; import org.apache.camel.spi.annotations.Component; import org.eclipse.neoscada.protocol.iec60870.client.data.DataModuleOptions; @@ -57,10 +58,8 @@ public class ClientComponent extends AbstractIecComponent<ClientConnectionMultip /** * Default connection options - * - * @param defaultConnectionOptions the new default connection options, must - * not be {@code null} */ + @Metadata @Override public void setDefaultConnectionOptions(final ClientOptions defaultConnectionOptions) { super.setDefaultConnectionOptions(defaultConnectionOptions); diff --git a/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/server/ServerComponent.java b/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/server/ServerComponent.java index 2e0b66a..8f5c27b 100644 --- a/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/server/ServerComponent.java +++ b/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/server/ServerComponent.java @@ -25,6 +25,7 @@ import org.apache.camel.component.iec60870.AbstractIecComponent; import org.apache.camel.component.iec60870.ConnectionId; import org.apache.camel.component.iec60870.Constants; import org.apache.camel.component.iec60870.ObjectAddress; +import org.apache.camel.spi.Metadata; import org.apache.camel.spi.annotations.Component; import org.eclipse.neoscada.protocol.iec60870.server.data.DataModuleOptions; @@ -62,11 +63,9 @@ public class ServerComponent extends AbstractIecComponent<ServerConnectionMultip /** * Default connection options - * - * @param defaultConnectionOptions the new default connection options, must - * not be {@code null} */ @Override + @Metadata public void setDefaultConnectionOptions(final ServerOptions defaultConnectionOptions) { super.setDefaultConnectionOptions(defaultConnectionOptions); } diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/FlinkComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/FlinkComponentBuilderFactory.java index 8c4e623..995b320 100644 --- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/FlinkComponentBuilderFactory.java +++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/FlinkComponentBuilderFactory.java @@ -47,18 +47,6 @@ public interface FlinkComponentBuilderFactory { */ interface FlinkComponentBuilder extends ComponentBuilder<FlinkComponent> { /** - * DataSet to compute against. - * - * The option is a: <code>org.apache.flink.api.java.DataSet</code> type. - * - * Group: producer - */ - default FlinkComponentBuilder dataSet( - org.apache.flink.api.java.DataSet dataSet) { - doSetProperty("dataSet", dataSet); - return this; - } - /** * Function performing action against a DataSet. * * The option is a: @@ -151,7 +139,6 @@ public interface FlinkComponentBuilderFactory { String name, Object value) { switch (name) { - case "dataSet": ((FlinkComponent) component).setDataSet((org.apache.flink.api.java.DataSet) value); return true; case "dataSetCallback": ((FlinkComponent) component).setDataSetCallback((org.apache.camel.component.flink.DataSetCallback) value); return true; case "dataStream": ((FlinkComponent) component).setDataStream((org.apache.flink.streaming.api.datastream.DataStream) value); return true; case "dataStreamCallback": ((FlinkComponent) component).setDataStreamCallback((org.apache.camel.component.flink.DataStreamCallback) value); return true; diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GuavaEventbusComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GuavaEventbusComponentBuilderFactory.java index fd674ed..915e694 100644 --- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GuavaEventbusComponentBuilderFactory.java +++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GuavaEventbusComponentBuilderFactory.java @@ -62,22 +62,6 @@ public interface GuavaEventbusComponentBuilderFactory { return this; } /** - * The interface with method(s) marked with the Subscribe annotation. - * Dynamic proxy will be created over the interface so it could be - * registered as the EventBus listener. Particularly useful when - * creating multi-event listeners and for handling DeadEvent properly. - * This option cannot be used together with eventClass option. - * - * The option is a: <code>java.lang.Class<java.lang.Object></code> type. - * - * Group: common - */ - default GuavaEventbusComponentBuilder listenerInterface( - java.lang.Class<java.lang.Object> listenerInterface) { - doSetProperty("listenerInterface", listenerInterface); - return this; - } - /** * Allows for bridging the consumer to the Camel routing Error Handler, * which mean any exceptions occurred while the consumer is trying to * pickup incoming messages, or the likes, will now be processed as a @@ -97,6 +81,22 @@ public interface GuavaEventbusComponentBuilderFactory { return this; } /** + * The interface with method(s) marked with the Subscribe annotation. + * Dynamic proxy will be created over the interface so it could be + * registered as the EventBus listener. Particularly useful when + * creating multi-event listeners and for handling DeadEvent properly. + * This option cannot be used together with eventClass option. + * + * The option is a: <code>java.lang.Class<java.lang.Object></code> type. + * + * Group: consumer + */ + default GuavaEventbusComponentBuilder listenerInterface( + java.lang.Class<java.lang.Object> listenerInterface) { + doSetProperty("listenerInterface", listenerInterface); + return this; + } + /** * 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 @@ -149,8 +149,8 @@ public interface GuavaEventbusComponentBuilderFactory { Object value) { switch (name) { case "eventBus": ((GuavaEventBusComponent) component).setEventBus((com.google.common.eventbus.EventBus) value); return true; - case "listenerInterface": ((GuavaEventBusComponent) component).setListenerInterface((java.lang.Class) value); return true; case "bridgeErrorHandler": ((GuavaEventBusComponent) component).setBridgeErrorHandler((boolean) value); return true; + case "listenerInterface": ((GuavaEventBusComponent) component).setListenerInterface((java.lang.Class) value); return true; case "lazyStartProducer": ((GuavaEventBusComponent) component).setLazyStartProducer((boolean) value); return true; case "basicPropertyBinding": ((GuavaEventBusComponent) component).setBasicPropertyBinding((boolean) value); return true; default: return false; diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/HdfsComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/HdfsComponentBuilderFactory.java index e2a938d..1c4a458 100644 --- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/HdfsComponentBuilderFactory.java +++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/HdfsComponentBuilderFactory.java @@ -47,34 +47,6 @@ public interface HdfsComponentBuilderFactory { */ interface HdfsComponentBuilder extends ComponentBuilder<HdfsComponent> { /** - * To use the given configuration for security with JAAS. - * - * The option is a: <code>javax.security.auth.login.Configuration</code> - * type. - * - * Group: common - */ - default HdfsComponentBuilder jAASConfiguration( - javax.security.auth.login.Configuration jAASConfiguration) { - doSetProperty("jAASConfiguration", jAASConfiguration); - return this; - } - /** - * To use kerberos authentication, set the value of the - * 'java.security.krb5.conf' environment variable to an existing file. - * If the environment variable is already set, warn if different than - * the specified parameter. - * - * The option is a: <code>java.lang.String</code> type. - * - * Group: common - */ - default HdfsComponentBuilder kerberosConfigFile( - java.lang.String kerberosConfigFile) { - doSetProperty("kerberosConfigFile", kerberosConfigFile); - return this; - } - /** * Allows for bridging the consumer to the Camel routing Error Handler, * which mean any exceptions occurred while the consumer is trying to * pickup incoming messages, or the likes, will now be processed as a @@ -127,6 +99,34 @@ public interface HdfsComponentBuilderFactory { doSetProperty("basicPropertyBinding", basicPropertyBinding); return this; } + /** + * To use the given configuration for security with JAAS. + * + * The option is a: <code>javax.security.auth.login.Configuration</code> + * type. + * + * Group: security + */ + default HdfsComponentBuilder jAASConfiguration( + javax.security.auth.login.Configuration jAASConfiguration) { + doSetProperty("jAASConfiguration", jAASConfiguration); + return this; + } + /** + * To use kerberos authentication, set the value of the + * 'java.security.krb5.conf' environment variable to an existing file. + * If the environment variable is already set, warn if different than + * the specified parameter. + * + * The option is a: <code>java.lang.String</code> type. + * + * Group: security + */ + default HdfsComponentBuilder kerberosConfigFile( + java.lang.String kerberosConfigFile) { + doSetProperty("kerberosConfigFile", kerberosConfigFile); + return this; + } } class HdfsComponentBuilderImpl @@ -144,11 +144,11 @@ public interface HdfsComponentBuilderFactory { String name, Object value) { switch (name) { - case "jAASConfiguration": ((HdfsComponent) component).setJAASConfiguration((javax.security.auth.login.Configuration) value); return true; - case "kerberosConfigFile": ((HdfsComponent) component).setKerberosConfigFile((java.lang.String) value); return true; case "bridgeErrorHandler": ((HdfsComponent) component).setBridgeErrorHandler((boolean) value); return true; case "lazyStartProducer": ((HdfsComponent) component).setLazyStartProducer((boolean) value); return true; case "basicPropertyBinding": ((HdfsComponent) component).setBasicPropertyBinding((boolean) value); return true; + case "jAASConfiguration": ((HdfsComponent) component).setJAASConfiguration((javax.security.auth.login.Configuration) value); return true; + case "kerberosConfigFile": ((HdfsComponent) component).setKerberosConfigFile((java.lang.String) value); return true; default: return false; } }