You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/03/28 11:22:40 UTC

[camel] branch main updated: CAMEL-19205: camel-plc4j - Make it easier to use tag in URIs

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 3a0f9134d1a CAMEL-19205: camel-plc4j - Make it easier to use tag in URIs
3a0f9134d1a is described below

commit 3a0f9134d1aee0950b954bb6691650ae8993cfc1
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Mar 28 13:22:10 2023 +0200

    CAMEL-19205: camel-plc4j - Make it easier to use tag in URIs
---
 .../org/apache/camel/catalog/components/plc4x.json |   2 +-
 .../component/plc4x/Plc4XEndpointConfigurer.java   |   2 +-
 .../component/plc4x/Plc4XEndpointUriFactory.java   |   4 +-
 .../org/apache/camel/component/plc4x/plc4x.json    |   2 +-
 .../camel-plc4x/src/main/docs/plc4x-component.adoc |  14 ++-
 .../camel/component/plc4x/Plc4XComponent.java      |  17 ++-
 .../camel/component/plc4x/Plc4XConsumer.java       |  20 +---
 .../camel/component/plc4x/Plc4XEndpoint.java       |  42 ++-----
 ...mponentTest.java => Plc4XComponentTagTest.java} |  11 +-
 .../camel/component/plc4x/Plc4XComponentTest.java  |   2 +-
 .../endpoint/dsl/Plc4XEndpointBuilderFactory.java  | 128 ++++++---------------
 11 files changed, 74 insertions(+), 170 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/plc4x.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/plc4x.json
index 7dc3f7d7411..d041ef89650 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/plc4x.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/plc4x.json
@@ -29,8 +29,8 @@
   "properties": {
     "driver": { "kind": "path", "displayName": "Driver", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "PLC4X connection string for the connection to the target" },
     "autoReconnect": { "kind": "parameter", "displayName": "Auto Reconnect", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to reconnect when no connection is present upon doing a request" },
-    "tags": { "kind": "parameter", "displayName": "Tags", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The tags to read as Map containing the tag name associated to its query" },
     "period": { "kind": "parameter", "displayName": "Period", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Interval on which the Trigger should be checked" },
+    "tags": { "kind": "parameter", "displayName": "Tags", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.String>", "prefix": "tag.", "multiValue": true, "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Tags as key\/values from the Map to use in query" },
     "trigger": { "kind": "parameter", "displayName": "Trigger", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Query to a trigger. On a rising edge of the trigger, the tags will be read once" },
     "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now [...]
     "exceptionHandler": { "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the con [...]
diff --git a/components/camel-plc4x/src/generated/java/org/apache/camel/component/plc4x/Plc4XEndpointConfigurer.java b/components/camel-plc4x/src/generated/java/org/apache/camel/component/plc4x/Plc4XEndpointConfigurer.java
index 2537be5a0d8..b54d63b4720 100644
--- a/components/camel-plc4x/src/generated/java/org/apache/camel/component/plc4x/Plc4XEndpointConfigurer.java
+++ b/components/camel-plc4x/src/generated/java/org/apache/camel/component/plc4x/Plc4XEndpointConfigurer.java
@@ -82,7 +82,7 @@ public class Plc4XEndpointConfigurer extends PropertyConfigurerSupport implement
     @Override
     public Object getCollectionValueType(Object target, String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
-        case "tags": return java.lang.Object.class;
+        case "tags": return java.lang.String.class;
         default: return null;
         }
     }
diff --git a/components/camel-plc4x/src/generated/java/org/apache/camel/component/plc4x/Plc4XEndpointUriFactory.java b/components/camel-plc4x/src/generated/java/org/apache/camel/component/plc4x/Plc4XEndpointUriFactory.java
index 4119a71ee01..7028a24e94f 100644
--- a/components/camel-plc4x/src/generated/java/org/apache/camel/component/plc4x/Plc4XEndpointUriFactory.java
+++ b/components/camel-plc4x/src/generated/java/org/apache/camel/component/plc4x/Plc4XEndpointUriFactory.java
@@ -33,7 +33,9 @@ public class Plc4XEndpointUriFactory extends org.apache.camel.support.component.
         props.add("trigger");
         PROPERTY_NAMES = Collections.unmodifiableSet(props);
         SECRET_PROPERTY_NAMES = Collections.emptySet();
-        MULTI_VALUE_PREFIXES = Collections.emptySet();
+        Set<String> prefixes = new HashSet<>(1);
+        prefixes.add("tag.");
+        MULTI_VALUE_PREFIXES = Collections.unmodifiableSet(prefixes);
     }
 
     @Override
diff --git a/components/camel-plc4x/src/generated/resources/org/apache/camel/component/plc4x/plc4x.json b/components/camel-plc4x/src/generated/resources/org/apache/camel/component/plc4x/plc4x.json
index 7dc3f7d7411..d041ef89650 100644
--- a/components/camel-plc4x/src/generated/resources/org/apache/camel/component/plc4x/plc4x.json
+++ b/components/camel-plc4x/src/generated/resources/org/apache/camel/component/plc4x/plc4x.json
@@ -29,8 +29,8 @@
   "properties": {
     "driver": { "kind": "path", "displayName": "Driver", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "PLC4X connection string for the connection to the target" },
     "autoReconnect": { "kind": "parameter", "displayName": "Auto Reconnect", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to reconnect when no connection is present upon doing a request" },
-    "tags": { "kind": "parameter", "displayName": "Tags", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The tags to read as Map containing the tag name associated to its query" },
     "period": { "kind": "parameter", "displayName": "Period", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Interval on which the Trigger should be checked" },
+    "tags": { "kind": "parameter", "displayName": "Tags", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.String>", "prefix": "tag.", "multiValue": true, "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Tags as key\/values from the Map to use in query" },
     "trigger": { "kind": "parameter", "displayName": "Trigger", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Query to a trigger. On a rising edge of the trigger, the tags will be read once" },
     "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now [...]
     "exceptionHandler": { "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the con [...]
diff --git a/components/camel-plc4x/src/main/docs/plc4x-component.adoc b/components/camel-plc4x/src/main/docs/plc4x-component.adoc
index ea1e177521c..8c8c43a31a7 100644
--- a/components/camel-plc4x/src/main/docs/plc4x-component.adoc
+++ b/components/camel-plc4x/src/main/docs/plc4x-component.adoc
@@ -21,8 +21,9 @@ The Camel Component for PLC4X allows you to create routes using the PLC4X API to
 plc4x://driver[?options]
 ------------------------------
 
-The bucket will be created if it don't already exists. +
- You can append query options to the URI in the following format,
+The bucket will be created if it doesn't already exist.
+
+You can append query options to the URI in the following format,
 ?options=value&option2=value&...
 
 
@@ -63,18 +64,23 @@ where `$\{camel-version}` must be replaced by the actual version of Camel.
 
 
 == Consumer
+
 The consumer supports one-time reading or Triggered Reading. To read from
-the PLC, use a  `Map<String,String>` containing the Alias and Queries for the Data you want.
+the PLC, use a  `Map<String,String>` containing the Alias and Queries for the Data you want (tags).
+
+You can configure the _tags_ using `tag.key=value` in the URI, and you can repeat this for multiple tags.
 
 The Body created by the Consumer will be a `Map<String,Object>` containing the Aliases and their associated value
 read from the PLC.
 
 == Polling Consumer
+
 The polling consumer supports consecutive reading. The input and output is the same as for the regular consumer.
 
 == Producer
+
 To write data to the PLC, we also use a `Map`. The difference with the Producer is that the `Value` of the Map has also to
-be a Map. Also, this `Map` has to be set into the `Body` of the `Message`
+be a `Map`. Also, this `Map` has to be set into the `Body` of the `Message`
 
 The used `Map` would be a `Map<String,Map<String,Object>` where the `Map<String,Object>` represent the Query and the
 data we want to write to it.
diff --git a/components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XComponent.java b/components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XComponent.java
index 64bdd3f9942..c97b79e8330 100644
--- a/components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XComponent.java
+++ b/components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XComponent.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.plc4x;
 
+import java.util.LinkedHashMap;
 import java.util.Map;
 
 import org.apache.camel.Endpoint;
@@ -33,13 +34,21 @@ public class Plc4XComponent extends DefaultComponent {
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
         Plc4XEndpoint endpoint = new Plc4XEndpoint(uri, this);
-        //Tags have a Name, a query and an optional value (for writing)
-        //Reading --> Map<String,String>
-        //Writing --> Map<String,Map.Entry<String,Object>>
-        Map<String, Object> tags = getAndRemoveOrResolveReferenceParameter(parameters, "tags", Map.class);
+
+        Map<String, String> tags = getAndRemoveOrResolveReferenceParameter(parameters, "tags", Map.class);
+        Map<String, Object> map = PropertiesHelper.extractProperties(parameters, "tag.");
+        if (map != null) {
+            if (tags == null) {
+                tags = new LinkedHashMap<>();
+            }
+            for (Map.Entry<String, Object> me : map.entrySet()) {
+                tags.put(me.getKey(), me.getValue().toString());
+            }
+        }
         if (tags != null) {
             endpoint.setTags(tags);
         }
+
         String trigger = getAndRemoveOrResolveReferenceParameter(parameters, "trigger", String.class);
         if (trigger != null) {
             endpoint.setTrigger(trigger);
diff --git a/components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XConsumer.java b/components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XConsumer.java
index 3102ae569fe..5940ca31cd1 100644
--- a/components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XConsumer.java
+++ b/components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XConsumer.java
@@ -44,7 +44,7 @@ import org.slf4j.LoggerFactory;
 public class Plc4XConsumer extends DefaultConsumer {
     private static final Logger LOGGER = LoggerFactory.getLogger(Plc4XConsumer.class);
 
-    private final Map<String, Object> tags;
+    private final Map<String, String> tags;
     private final String trigger;
     private final Plc4XEndpoint plc4XEndpoint;
 
@@ -118,7 +118,7 @@ public class Plc4XConsumer extends DefaultConsumer {
     }
 
     private void startTriggered() throws ScraperException {
-        ScraperConfiguration configuration = getScraperConfig(validateTags());
+        ScraperConfiguration configuration = getScraperConfig(tags);
         TriggerCollector collector = new TriggerCollectorImpl(plc4XEndpoint.getPlcDriverManager());
 
         TriggeredScraperImpl scraper = new TriggeredScraperImpl(configuration, (job, alias, response) -> {
@@ -142,22 +142,6 @@ public class Plc4XConsumer extends DefaultConsumer {
         collector.start();
     }
 
-    private Map<String, String> validateTags() {
-        Map<String, String> map = new HashMap<>();
-        if (tags != null) {
-            for (Map.Entry<String, Object> tag : tags.entrySet()) {
-                if (tag.getValue() instanceof String) {
-                    map.put(tag.getKey(), (String) tag.getValue());
-                }
-            }
-            if (map.size() != tags.size()) {
-                LOGGER.error("At least one entry does not match the format : Map.Entry<String,String> ");
-                return null;
-            }
-        }
-        return map;
-    }
-
     private ScraperConfigurationTriggeredImpl getScraperConfig(Map<String, String> tagList) {
         String config = "(TRIGGER_VAR," + plc4XEndpoint.getPeriod() + ",(" + plc4XEndpoint.getTrigger() + ")==(true))";
         List<JobConfigurationImpl> job = Collections.singletonList(
diff --git a/components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XEndpoint.java b/components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XEndpoint.java
index 979d016a9af..4dcccc1abbc 100644
--- a/components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XEndpoint.java
+++ b/components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XEndpoint.java
@@ -17,7 +17,6 @@
 package org.apache.camel.component.plc4x;
 
 import java.util.Map;
-import java.util.Objects;
 
 import org.apache.camel.Category;
 import org.apache.camel.Component;
@@ -54,9 +53,9 @@ public class Plc4XEndpoint extends DefaultEndpoint {
     @UriPath
     @Metadata(required = true, description = "PLC4X connection string for the connection to the target")
     private String driver;
-    @UriParam
-    @Metadata(description = "The tags to read as Map<String,String> containing the tag name associated to its query")
-    private Map<String, Object> tags;
+    @UriParam(label = "consumer", prefix = "tag.", multiValue = true)
+    @Metadata(description = "Tags as key/values from the Map to use in query")
+    private Map<String, String> tags;
     @UriParam
     @Metadata(label = "consumer",
               description = "Query to a trigger. On a rising edge of the trigger, the tags will be read once")
@@ -107,7 +106,6 @@ public class Plc4XEndpoint extends DefaultEndpoint {
 
     /**
      * Set up the connection.
-     * <p>
      *
      * @throws PlcConnectionException if no connection could be established and auto-reconnect is turned off
      */
@@ -178,22 +176,18 @@ public class Plc4XEndpoint extends DefaultEndpoint {
 
     @Override
     public PollingConsumer createPollingConsumer() {
-        LOGGER.debug("Creating Plc4XPollingConsumer");
         return new Plc4XPollingConsumer(this);
     }
 
     /**
      * Build a {@link PlcReadRequest} using the tags specified in the endpoint.
-     * <p>
-     *
-     * @return {@link PlcReadRequest}
      */
     public PlcReadRequest buildPlcReadRequest() {
         PlcReadRequest.Builder builder = connection.readRequestBuilder();
         if (tags != null) {
-            for (Map.Entry<String, Object> tag : tags.entrySet()) {
+            for (Map.Entry<String, String> tag : tags.entrySet()) {
                 try {
-                    builder.addItem(tag.getKey(), (String) tag.getValue());
+                    builder.addItem(tag.getKey(), tag.getValue());
                 } catch (PlcIncompatibleDatatypeException e) {
                     LOGGER.warn("For consumer, please use Map<String,String>, currently using {}",
                             tags.getClass().getSimpleName());
@@ -235,36 +229,14 @@ public class Plc4XEndpoint extends DefaultEndpoint {
         this.driver = driver;
     }
 
-    public Map<String, Object> getTags() {
+    public Map<String, String> getTags() {
         return tags;
     }
 
-    public void setTags(Map<String, Object> tags) {
+    public void setTags(Map<String, String> tags) {
         this.tags = tags;
     }
 
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (!(o instanceof Plc4XEndpoint)) {
-            return false;
-        }
-        if (!super.equals(o)) {
-            return false;
-        }
-        Plc4XEndpoint that = (Plc4XEndpoint) o;
-        return Objects.equals(getDriver(), that.getDriver()) &&
-                Objects.equals(getTags(), that.getTags()) &&
-                Objects.equals(getPlcDriverManager(), that.getPlcDriverManager());
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(super.hashCode(), getDriver(), getTags(), getPlcDriverManager());
-    }
-
     @Override
     public void doStop() throws Exception {
         //Shutting down the connection when leaving the Context
diff --git a/components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTest.java b/components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTagTest.java
similarity index 84%
copy from components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTest.java
copy to components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTagTest.java
index 749dd89ca20..9939e5b7565 100644
--- a/components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTest.java
+++ b/components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTagTest.java
@@ -16,7 +16,7 @@
  */
 package org.apache.camel.component.plc4x;
 
-import java.util.*;
+import java.util.Collections;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.camel.builder.RouteBuilder;
@@ -24,7 +24,7 @@ import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit5.CamelTestSupport;
 import org.junit.jupiter.api.Test;
 
-public class Plc4XComponentTest extends CamelTestSupport {
+public class Plc4XComponentTagTest extends CamelTestSupport {
 
     @Test
     public void testSimpleRouting() throws Exception {
@@ -41,11 +41,6 @@ public class Plc4XComponentTest extends CamelTestSupport {
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                Map<String, Object> tags = new HashMap<>();
-                tags.put("Test1", "%TestQuery");
-                Plc4XEndpoint producer = getContext().getEndpoint("plc4x:mock:10.10.10.1/1/1", Plc4XEndpoint.class);
-                producer.setTags(tags);
-                producer.setAutoReconnect(true);
                 from("direct:plc4x")
                         .setBody(constant(Collections.singletonMap("test", Collections.singletonMap("testAddress", false))))
                         .to("plc4x:mock:10.10.10.1/1/1")
@@ -54,7 +49,7 @@ public class Plc4XComponentTest extends CamelTestSupport {
                         .setBody(constant(Collections.singletonMap("test2", Collections.singletonMap("testAddress2", 0x05))))
                         .to("plc4x:mock:10.10.10.1/1/1")
                         .to("mock:result");
-                from(producer)
+                from("plc4x:mock:10.10.10.1/1/1?autoReconnect=true&tag.Test1=%TestQuery")
                         .log("Got ${body}");
             }
         };
diff --git a/components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTest.java b/components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTest.java
index 749dd89ca20..e42eadbc70d 100644
--- a/components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTest.java
+++ b/components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTest.java
@@ -41,7 +41,7 @@ public class Plc4XComponentTest extends CamelTestSupport {
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                Map<String, Object> tags = new HashMap<>();
+                Map<String, String> tags = new HashMap<>();
                 tags.put("Test1", "%TestQuery");
                 Plc4XEndpoint producer = getContext().getEndpoint("plc4x:mock:10.10.10.1/1/1", Plc4XEndpoint.class);
                 producer.setTags(tags);
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Plc4XEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Plc4XEndpointBuilderFactory.java
index 9632328f67b..f1483276f7c 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Plc4XEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Plc4XEndpointBuilderFactory.java
@@ -17,6 +17,7 @@
 package org.apache.camel.builder.endpoint.dsl;
 
 import java.util.*;
+import java.util.Map;
 import java.util.concurrent.*;
 import java.util.function.*;
 import java.util.stream.*;
@@ -77,65 +78,68 @@ public interface Plc4XEndpointBuilderFactory {
             return this;
         }
         /**
-         * The tags to read as Map containing the tag name associated to its
-         * query.
+         * Interval on which the Trigger should be checked.
          * 
-         * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String,
-         * java.lang.Object&amp;gt;&lt;/code&gt; type.
+         * The option is a: &lt;code&gt;int&lt;/code&gt; type.
          * 
-         * Group: common
+         * Group: consumer
          * 
-         * @param tags the value to set
+         * @param period the value to set
          * @return the dsl builder
          */
-        default Plc4XEndpointConsumerBuilder tags(
-                Map<java.lang.String, java.lang.Object> tags) {
-            doSetProperty("tags", tags);
+        default Plc4XEndpointConsumerBuilder period(int period) {
+            doSetProperty("period", period);
             return this;
         }
         /**
-         * The tags to read as Map containing the tag name associated to its
-         * query.
+         * Interval on which the Trigger should be checked.
          * 
-         * The option will be converted to a
-         * &lt;code&gt;java.util.Map&amp;lt;java.lang.String,
-         * java.lang.Object&amp;gt;&lt;/code&gt; type.
+         * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type.
          * 
-         * Group: common
+         * Group: consumer
          * 
-         * @param tags the value to set
+         * @param period the value to set
          * @return the dsl builder
          */
-        default Plc4XEndpointConsumerBuilder tags(String tags) {
-            doSetProperty("tags", tags);
+        default Plc4XEndpointConsumerBuilder period(String period) {
+            doSetProperty("period", period);
             return this;
         }
         /**
-         * Interval on which the Trigger should be checked.
+         * Tags as key/values from the Map to use in query.
          * 
-         * The option is a: &lt;code&gt;int&lt;/code&gt; type.
+         * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String,
+         * java.lang.String&amp;gt;&lt;/code&gt; type.
+         * The option is multivalued, and you can use the tags(String, Object)
+         * method to add a value (call the method multiple times to set more
+         * values).
          * 
          * Group: consumer
          * 
-         * @param period the value to set
+         * @param key the option key
+         * @param value the option value
          * @return the dsl builder
          */
-        default Plc4XEndpointConsumerBuilder period(int period) {
-            doSetProperty("period", period);
+        default Plc4XEndpointConsumerBuilder tags(String key, Object value) {
+            doSetMultiValueProperty("tags", "tag." + key, value);
             return this;
         }
         /**
-         * Interval on which the Trigger should be checked.
+         * Tags as key/values from the Map to use in query.
          * 
-         * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type.
+         * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String,
+         * java.lang.String&amp;gt;&lt;/code&gt; type.
+         * The option is multivalued, and you can use the tags(String, Object)
+         * method to add a value (call the method multiple times to set more
+         * values).
          * 
          * Group: consumer
          * 
-         * @param period the value to set
+         * @param values the values
          * @return the dsl builder
          */
-        default Plc4XEndpointConsumerBuilder period(String period) {
-            doSetProperty("period", period);
+        default Plc4XEndpointConsumerBuilder tags(Map values) {
+            doSetMultiValueProperties("tags", "tag.", values);
             return this;
         }
         /**
@@ -323,40 +327,6 @@ public interface Plc4XEndpointBuilderFactory {
             doSetProperty("autoReconnect", autoReconnect);
             return this;
         }
-        /**
-         * The tags to read as Map containing the tag name associated to its
-         * query.
-         * 
-         * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String,
-         * java.lang.Object&amp;gt;&lt;/code&gt; type.
-         * 
-         * Group: common
-         * 
-         * @param tags the value to set
-         * @return the dsl builder
-         */
-        default Plc4XEndpointProducerBuilder tags(
-                Map<java.lang.String, java.lang.Object> tags) {
-            doSetProperty("tags", tags);
-            return this;
-        }
-        /**
-         * The tags to read as Map containing the tag name associated to its
-         * query.
-         * 
-         * The option will be converted to a
-         * &lt;code&gt;java.util.Map&amp;lt;java.lang.String,
-         * java.lang.Object&amp;gt;&lt;/code&gt; type.
-         * 
-         * Group: common
-         * 
-         * @param tags the value to set
-         * @return the dsl builder
-         */
-        default Plc4XEndpointProducerBuilder tags(String tags) {
-            doSetProperty("tags", tags);
-            return this;
-        }
     }
 
     /**
@@ -462,40 +432,6 @@ public interface Plc4XEndpointBuilderFactory {
             doSetProperty("autoReconnect", autoReconnect);
             return this;
         }
-        /**
-         * The tags to read as Map containing the tag name associated to its
-         * query.
-         * 
-         * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String,
-         * java.lang.Object&amp;gt;&lt;/code&gt; type.
-         * 
-         * Group: common
-         * 
-         * @param tags the value to set
-         * @return the dsl builder
-         */
-        default Plc4XEndpointBuilder tags(
-                Map<java.lang.String, java.lang.Object> tags) {
-            doSetProperty("tags", tags);
-            return this;
-        }
-        /**
-         * The tags to read as Map containing the tag name associated to its
-         * query.
-         * 
-         * The option will be converted to a
-         * &lt;code&gt;java.util.Map&amp;lt;java.lang.String,
-         * java.lang.Object&amp;gt;&lt;/code&gt; type.
-         * 
-         * Group: common
-         * 
-         * @param tags the value to set
-         * @return the dsl builder
-         */
-        default Plc4XEndpointBuilder tags(String tags) {
-            doSetProperty("tags", tags);
-            return this;
-        }
     }
 
     /**