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 2022/06/30 10:03:10 UTC

[camel] branch main updated: Add missing doc in EIP model

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 98ba41e8aea Add missing doc in EIP model
98ba41e8aea is described below

commit 98ba41e8aeaf8e1faba18ac94b6185aa35de7d99
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Jun 30 12:02:58 2022 +0200

    Add missing doc in EIP model
---
 .../resources/org/apache/camel/model/pausable.json |  2 +-
 .../org/apache/camel/model/PausableDefinition.java | 27 +++++++++++++++++++++-
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/pausable.json b/core/camel-core-model/src/generated/resources/org/apache/camel/model/pausable.json
index f1526b5311b..b26fa291a6b 100644
--- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/pausable.json
+++ b/core/camel-core-model/src/generated/resources/org/apache/camel/model/pausable.json
@@ -13,7 +13,7 @@
   },
   "properties": {
     "consumerListener": { "kind": "attribute", "displayName": "Consumer Listener", "required": true, "type": "object", "javaType": "org.apache.camel.resume.ConsumerListener", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the consumer listener to use" },
-    "untilCheck": { "kind": "attribute", "displayName": "Until Check", "required": true, "type": "object", "javaType": "java.util.function.Predicate", "deprecated": false, "autowired": false, "secret": false },
+    "untilCheck": { "kind": "attribute", "displayName": "Until Check", "required": true, "type": "object", "javaType": "java.util.function.Predicate", "deprecated": false, "autowired": false, "secret": false, "description": "References to a java.util.function.Predicate to use for until checks. The predicate is responsible for evaluating whether the processing can resume or not. Such predicate should return true if the consumption can resume, or false otherwise. The exact point of when th [...]
     "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
     "description": { "kind": "element", "displayName": "Description", "required": false, "type": "object", "javaType": "org.apache.camel.model.DescriptionDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" }
   }
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/PausableDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/PausableDefinition.java
index 7c8ceef4738..3cd41f199ef 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/PausableDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/PausableDefinition.java
@@ -100,7 +100,6 @@ public class PausableDefinition extends NoOutputDefinition<PausableDefinition> {
      */
     public PausableDefinition consumerListener(String consumerListenerRef) {
         setConsumerListener(consumerListenerRef);
-
         return this;
     }
 
@@ -109,7 +108,33 @@ public class PausableDefinition extends NoOutputDefinition<PausableDefinition> {
      */
     public PausableDefinition consumerListener(ConsumerListener<?, ?> consumerListener) {
         setConsumerListener(consumerListener);
+        return this;
+    }
 
+    /**
+     * References to a java.util.function.Predicate to use for until checks.
+     *
+     * The predicate is responsible for evaluating whether the processing can resume or not.
+     * Such predicate should return true if the consumption can resume, or false otherwise. The exact point of when the predicate is
+     * called is dependent on the component, and it may be called on either one of the available events. Implementations
+     * should not assume the predicate to be called at any specific point.
+     */
+    public PausableDefinition untilCheck(String untilCheck) {
+        setUntilCheck(untilCheck);
         return this;
     }
+
+    /**
+     * The java.util.function.Predicate to use for until checks.
+     *
+     * The predicate is responsible for evaluating whether the processing can resume or not.
+     * Such predicate should return true if the consumption can resume, or false otherwise. The exact point of when the predicate is
+     * called is dependent on the component, and it may be called on either one of the available events. Implementations
+     * should not assume the predicate to be called at any specific point.
+     */
+    public PausableDefinition untilCheck(Predicate<?> untilCheck) {
+        setUntilCheck(untilCheck);
+        return this;
+    }
+
 }