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 2024/03/14 18:49:05 UTC

(camel) 05/10: CAMEL-17641: Generate json metadata for pojo beans in camel-core that end users can use such as AggregationStrategy implementations. And have that information in camel-catalog for tooling assistance.

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

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

commit 09d6078875b820361a1505cb0a943cb02c535b92
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Mar 14 16:31:23 2024 +0100

    CAMEL-17641: Generate json metadata for pojo beans in camel-core that end users can use such as AggregationStrategy implementations. And have that information in camel-catalog for tooling assistance.
---
 .../META-INF/services/org/apache/camel/bean.properties    |  2 +-
 .../apache/camel/bean/GroupedBodyAggregationStrategy.json | 15 +++++++++++++++
 .../camel/bean/GroupedExchangeAggregationStrategy.json    | 15 +++++++++++++++
 .../aggregate/GroupedBodyAggregationStrategy.java         |  5 +++++
 .../aggregate/GroupedExchangeAggregationStrategy.java     |  5 +++++
 5 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/bean.properties b/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/bean.properties
index 88fd1692084..80e93133b3c 100644
--- a/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/bean.properties
+++ b/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/bean.properties
@@ -1,5 +1,5 @@
 # Generated by camel build tools - do NOT edit this file!
-bean=GroupedMessageAggregationStrategy StringAggregationStrategy UseLatestAggregationStrategy UseOriginalAggregationStrategy
+bean=GroupedBodyAggregationStrategy GroupedExchangeAggregationStrategy GroupedMessageAggregationStrategy StringAggregationStrategy UseLatestAggregationStrategy UseOriginalAggregationStrategy
 groupId=org.apache.camel
 artifactId=camel-core-processor
 version=4.5.0-SNAPSHOT
diff --git a/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/bean/GroupedBodyAggregationStrategy.json b/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/bean/GroupedBodyAggregationStrategy.json
new file mode 100644
index 00000000000..10edccd31e1
--- /dev/null
+++ b/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/bean/GroupedBodyAggregationStrategy.json
@@ -0,0 +1,15 @@
+{
+  "bean": {
+    "kind": "bean",
+    "name": "GroupedBodyAggregationStrategy",
+    "javaType": "org.apache.camel.processor.aggregate.GroupedBodyAggregationStrategy",
+    "interfaceType": "org.apache.camel.AggregationStrategy",
+    "title": "Grouped Body Aggregation Strategy",
+    "description": "Aggregate body of input Message into a single combined Exchange holding all the aggregated bodies in a List of type Object as the message body. This aggregation strategy can be used in combination with Splitter to batch messages.",
+    "deprecated": false,
+    "groupId": "org.apache.camel",
+    "artifactId": "camel-core-processor",
+    "version": "4.5.0-SNAPSHOT"
+  }
+}
+
diff --git a/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/bean/GroupedExchangeAggregationStrategy.json b/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/bean/GroupedExchangeAggregationStrategy.json
new file mode 100644
index 00000000000..7ba11aca0c4
--- /dev/null
+++ b/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/bean/GroupedExchangeAggregationStrategy.json
@@ -0,0 +1,15 @@
+{
+  "bean": {
+    "kind": "bean",
+    "name": "GroupedExchangeAggregationStrategy",
+    "javaType": "org.apache.camel.processor.aggregate.GroupedExchangeAggregationStrategy",
+    "interfaceType": "org.apache.camel.AggregationStrategy",
+    "title": "Grouped Exchange Aggregation Strategy",
+    "description": "Aggregate all Exchanges into a single combined Exchange holding all the aggregated exchanges in a List of Exchange as the message body. This aggregation strategy can be used in combination with Splitter to batch messages.",
+    "deprecated": false,
+    "groupId": "org.apache.camel",
+    "artifactId": "camel-core-processor",
+    "version": "4.5.0-SNAPSHOT"
+  }
+}
+
diff --git a/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/GroupedBodyAggregationStrategy.java b/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/GroupedBodyAggregationStrategy.java
index ac5175ed237..d93e8f9bb04 100644
--- a/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/GroupedBodyAggregationStrategy.java
+++ b/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/GroupedBodyAggregationStrategy.java
@@ -20,6 +20,7 @@ import java.util.List;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
+import org.apache.camel.spi.Metadata;
 
 /**
  * Aggregate body of input {@link Message} into a single combined Exchange holding all the aggregated bodies in a
@@ -27,6 +28,10 @@ import org.apache.camel.Message;
  *
  * This aggregation strategy can used in combination with {@link org.apache.camel.processor.Splitter} to batch messages
  */
+@Metadata(label = "bean",
+          description = "Aggregate body of input Message into a single combined Exchange holding all the aggregated bodies in a List"
+                        + " of type Object as the message body. This aggregation strategy can be used in combination with"
+                        + " Splitter to batch messages.")
 public class GroupedBodyAggregationStrategy extends AbstractListAggregationStrategy<Object> {
 
     @Override
diff --git a/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/GroupedExchangeAggregationStrategy.java b/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/GroupedExchangeAggregationStrategy.java
index aa1f2b17392..7a3c0c97f3a 100644
--- a/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/GroupedExchangeAggregationStrategy.java
+++ b/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/GroupedExchangeAggregationStrategy.java
@@ -19,6 +19,7 @@ package org.apache.camel.processor.aggregate;
 import java.util.List;
 
 import org.apache.camel.Exchange;
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.support.DefaultExchange;
 
 /**
@@ -28,6 +29,10 @@ import org.apache.camel.support.DefaultExchange;
  * <b>Important:</b> This strategy is not to be used with the
  * <a href="http://camel.apache.org/content-enricher.html">Content Enricher</a> EIP which is enrich or pollEnrich.
  */
+@Metadata(label = "bean",
+          description = "Aggregate all Exchanges into a single combined Exchange holding all the aggregated exchanges in a List"
+                        + " of Exchange as the message body. This aggregation strategy can be used in combination with"
+                        + " Splitter to batch messages.")
 public class GroupedExchangeAggregationStrategy extends AbstractListAggregationStrategy<Exchange> {
 
     @Override