This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch fix/CAMEL-23816 in repository https://gitbox.apache.org/repos/asf/camel.git
commit ea4acc7423c27d3b6dbdc848081d216a5d27166a Author: Claus Ibsen <[email protected]> AuthorDate: Tue Jun 23 15:16:23 2026 +0200 CAMEL-23816: Improve descriptions in routing and messaging model classes for catalog and MCP tools Co-Authored-By: Claude Opus 4.6 <[email protected]> --- .../apache/camel/model/ClaimCheckDefinition.java | 13 +++++-- .../org/apache/camel/model/DelayDefinition.java | 9 +++-- .../camel/model/DynamicRouterDefinition.java | 10 ++++-- .../org/apache/camel/model/EnrichDefinition.java | 27 +++++++++----- .../org/apache/camel/model/FromDefinition.java | 4 ++- .../camel/model/IdempotentConsumerDefinition.java | 15 +++++--- .../org/apache/camel/model/LoopDefinition.java | 12 ++++--- .../apache/camel/model/OnCompletionDefinition.java | 18 ++++++---- .../apache/camel/model/PollEnrichDefinition.java | 27 +++++++++----- .../camel/model/RecipientListDefinition.java | 42 ++++++++++++++-------- .../org/apache/camel/model/RollbackDefinition.java | 9 +++-- .../apache/camel/model/RoutingSlipDefinition.java | 10 ++++-- .../org/apache/camel/model/SagaDefinition.java | 19 ++++++---- .../org/apache/camel/model/SamplingDefinition.java | 7 ++-- .../camel/model/ThreadPoolProfileDefinition.java | 21 ++++++----- .../org/apache/camel/model/ThreadsDefinition.java | 26 ++++++++------ .../org/apache/camel/model/ThrottleDefinition.java | 18 ++++++---- .../java/org/apache/camel/model/ToDefinition.java | 7 +++- .../apache/camel/model/ToDynamicDefinition.java | 18 ++++++---- .../org/apache/camel/model/ValidateDefinition.java | 3 +- .../org/apache/camel/model/WireTapDefinition.java | 12 ++++--- 21 files changed, 220 insertions(+), 107 deletions(-) diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/ClaimCheckDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/ClaimCheckDefinition.java index 902cdde81b82..f1640148b4e9 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/ClaimCheckDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/ClaimCheckDefinition.java @@ -39,20 +39,27 @@ public class ClaimCheckDefinition extends NoOutputDefinition<ClaimCheckDefinitio private AggregationStrategy aggregationStrategyBean; @XmlAttribute(required = true) - @Metadata(enums = "Get,GetAndRemove,Set,Push,Pop", javaType = "org.apache.camel.model.ClaimCheckOperation") + @Metadata(enums = "Get,GetAndRemove,Set,Push,Pop", javaType = "org.apache.camel.model.ClaimCheckOperation", + description = "The claim check operation to use. Get=retrieve, GetAndRemove=retrieve and remove," + + " Set=store with key, Push=store on stack, Pop=retrieve from stack.") @DslArg(position = 0, renderType = "enumString", typeName = "ClaimCheckOperation") private String operation; @XmlAttribute @DslArg(position = 1) + @Metadata(description = "The unique claim check key to use for Get, GetAndRemove, and Set operations.") private String key; @XmlAttribute @DslArg(position = 2) + @Metadata(description = "Specifies a filter to control what data gets merged back when using Get or Pop operations." + + " Use body, headers, header:pattern to include only matching data.") private String filter; @XmlAttribute - @Metadata(label = "advanced", javaType = "org.apache.camel.AggregationStrategy") + @Metadata(label = "advanced", javaType = "org.apache.camel.AggregationStrategy", + description = "Reference to a custom AggregationStrategy to use for merging data back from the claim check repository.") private String aggregationStrategy; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "The method name to use when using a POJO as the AggregationStrategy.") private String aggregationStrategyMethodName; public ClaimCheckDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/DelayDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/DelayDefinition.java index adf1929692d7..2aa2544c8d4c 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/DelayDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/DelayDefinition.java @@ -41,13 +41,16 @@ public class DelayDefinition extends ExpressionNode implements ExecutorServiceAw private ExecutorService executorServiceBean; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true", + description = "Enables asynchronous delay which means the thread will not block while delaying.") private String asyncDelayed; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true", + description = "Whether or not the caller should run the task when it was rejected by the thread pool.") private String callerRunsWhenRejected; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService") + @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService", + description = "To use a custom thread pool if asyncDelay has been enabled.") private String executorService; public DelayDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/DynamicRouterDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/DynamicRouterDefinition.java index 6ee06547687a..1f6c146fba7b 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/DynamicRouterDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/DynamicRouterDefinition.java @@ -39,13 +39,17 @@ public class DynamicRouterDefinition<Type extends ProcessorDefinition<Type>> ext public static final String DEFAULT_DELIMITER = ","; @XmlAttribute - @Metadata(defaultValue = ",") + @Metadata(defaultValue = ",", + description = "The delimiter used to separate endpoint URIs when the expression returns multiple endpoints. Default is comma.") private String uriDelimiter; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If enabled then invalid endpoint URIs are ignored and logged instead of throwing an exception.") private String ignoreInvalidEndpoints; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Integer") + @Metadata(label = "advanced", javaType = "java.lang.Integer", + description = "Configures the cache size for ProducerCache which caches producers for reuse. The default cache size is 1000." + + " Set to -1 to turn off caching.") private String cacheSize; public DynamicRouterDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/EnrichDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/EnrichDefinition.java index 183ec491b3b8..ceb6b83f2a01 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/EnrichDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/EnrichDefinition.java @@ -47,31 +47,40 @@ public class EnrichDefinition extends ExpressionNode @XmlAttribute private String variableReceive; @XmlAttribute - @Metadata(javaType = "org.apache.camel.AggregationStrategy") + @Metadata(javaType = "org.apache.camel.AggregationStrategy", + description = "Sets the AggregationStrategy to be used to merge the reply from the external service, into a single outgoing message. By default Camel will use the reply from the external service as outgoing message.") private String aggregationStrategy; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "This option can be used to explicitly declare the method name to use, when using POJOs as the AggregationStrategy.") private String aggregationStrategyMethodName; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "If this option is false then the aggregate method is not used if there was no data to enrich. If this option is true then null values is used as the oldExchange (when no data to enrich), when using POJOs as the AggregationStrategy.") private String aggregationStrategyMethodAllowNull; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If this option is false then the aggregate method is not used if there was an exception thrown while trying to retrieve the data to enrich from the resource. Setting this option to true allows end users to control what to do if there was an exception in the aggregate method.") private String aggregateOnException; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Shares the UnitOfWork with the parent and the resource exchange. Enrich will by default not share unit of work between the parent exchange and the resource exchange. This means the resource exchange has its own individual unit of work.") private String shareUnitOfWork; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Integer") + @Metadata(label = "advanced", javaType = "java.lang.Integer", + description = "Sets the maximum size used by the ProducerCache which is used to cache and reuse producers when uris are reused. Use 0 for default cache size, or -1 to turn cache off.") private String cacheSize; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Ignore the invalidate endpoint exception when try to create a producer with that endpoint.") private String ignoreInvalidEndpoint; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether to allow components to optimise enricher if they are SendDynamicAware.") private String allowOptimisedComponents; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether to auto startup components when enricher is starting up.") private String autoStartComponents; public EnrichDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/FromDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/FromDefinition.java index ad099f81abdf..43b2c2437370 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/FromDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/FromDefinition.java @@ -43,9 +43,11 @@ public class FromDefinition extends OptionalIdentifiedDefinition<FromDefinition> private EndpointConsumerBuilder endpointConsumerBuilder; @XmlAttribute - @Metadata(required = true) + @Metadata(required = true, description = "The endpoint URI to consume from.") private String uri; @XmlAttribute + @Metadata(description = "To use a variable to store the received message body (only body, not headers)." + + " This makes it handy to use variables for user data and to easily control what data to use for sending and receiving.") private String variableReceive; public FromDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/IdempotentConsumerDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/IdempotentConsumerDefinition.java index 0750b7c436f0..a6a43296ac93 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/IdempotentConsumerDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/IdempotentConsumerDefinition.java @@ -39,19 +39,24 @@ public class IdempotentConsumerDefinition extends OutputExpressionNode { private IdempotentRepository idempotentRepositoryBean; @XmlAttribute(required = true) - @Metadata(javaType = "org.apache.camel.spi.IdempotentRepository") + @Metadata(javaType = "org.apache.camel.spi.IdempotentRepository", + description = "Sets the reference name of the message id repository") private String idempotentRepository; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true", + description = "Sets whether to eagerly add the key to the idempotent repository or wait until the exchange is complete. Eager is default enabled.") private String eager; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false", + description = "Sets whether to complete the idempotent consumer eager or when the exchange is done.") private String completionEager; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true", + description = "Sets whether to skip duplicates or not. The default behavior is to skip duplicates.") private String skipDuplicate; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true", + description = "Sets whether to remove or keep the key on failure. The default behavior is to remove the key on failure.") private String removeOnFailure; public IdempotentConsumerDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/LoopDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/LoopDefinition.java index 30d0f3f54284..dbc8c518b819 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/LoopDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/LoopDefinition.java @@ -40,16 +40,20 @@ public class LoopDefinition extends OutputExpressionNode { private Processor onPrepareProcessor; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If enabled, a copy of the input Exchange is used for each iteration. That means each iteration will start from a copy of the same message.") private String copy; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Enables the while loop that loops until the predicate evaluates to false or null.") private String doWhile; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If enabled, the loop will not iterate until it reaches the end when Camel is shut down.") private String breakOnShutdown; @XmlAttribute - @Metadata(label = "advanced", javaType = "org.apache.camel.Processor") + @Metadata(label = "advanced", javaType = "org.apache.camel.Processor", + description = "Uses a processor when preparing the exchange for each loop iteration. This can be used to deep-clone messages, or any custom logic needed before the looping executes.") private String onPrepare; public LoopDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/OnCompletionDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/OnCompletionDefinition.java index bec792c32a2a..04e5eaa8112c 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/OnCompletionDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/OnCompletionDefinition.java @@ -49,22 +49,28 @@ public class OnCompletionDefinition extends OutputDefinition<OnCompletionDefinit @XmlAttribute @Metadata(label = "advanced", javaType = "org.apache.camel.model.OnCompletionMode", defaultValue = "AfterConsumer", - enums = "AfterConsumer,BeforeConsumer") + enums = "AfterConsumer,BeforeConsumer", + description = "Sets the on completion mode. The default value is AfterConsumer.") private String mode; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Will only synchronize when the Exchange completed successfully (no errors)") private String onCompleteOnly; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Will only synchronize when the Exchange ended with failure (exception or FAULT message)") private String onFailureOnly; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If enabled then the on completion process will run asynchronously by a separate thread from a thread pool. By default this is false, meaning the on completion process will run synchronously using the same caller thread as from the route.") private String parallelProcessing; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService") + @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService", + description = "Refers to a custom Thread Pool to be used for parallel processing. Notice if you set this option, then parallel processing is automatically implied, and you do not have to enable that option as well.") private String executorService; @XmlAttribute(name = "useOriginalMessage") - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Will use the original input message when an Exchange for this on completion. By default this feature is off.") private String useOriginalMessage; @Metadata(description = "To use an expression to only trigger routing this completion steps in specific situations") @XmlElement diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/PollEnrichDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/PollEnrichDefinition.java index f46f4efd9c07..7211585907f9 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/PollEnrichDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/PollEnrichDefinition.java @@ -45,31 +45,40 @@ public class PollEnrichDefinition extends ExpressionNode @XmlAttribute private String variableReceive; @XmlAttribute - @Metadata(javaType = "org.apache.camel.AggregationStrategy") + @Metadata(javaType = "org.apache.camel.AggregationStrategy", + description = "Sets the AggregationStrategy to be used to merge the reply from the external service, into a single outgoing message. By default Camel will use the reply from the external service as outgoing message.") private String aggregationStrategy; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "This option can be used to explicitly declare the method name to use, when using POJOs as the AggregationStrategy.") private String aggregationStrategyMethodName; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "If this option is false then the aggregate method is not used if there was no data to enrich. If this option is true then null values is used as the oldExchange (when no data to enrich), when using POJOs as the AggregationStrategy.") private String aggregationStrategyMethodAllowNull; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If this option is false then the aggregate method is not used if there was an exception thrown while trying to retrieve the data to enrich from the resource. Setting this option to true allows end users to control what to do if there was an exception in the aggregate method.") private String aggregateOnException; @XmlAttribute - @Metadata(javaType = "java.time.Duration", defaultValue = "-1") + @Metadata(javaType = "java.time.Duration", defaultValue = "-1", + description = "Timeout in millis when polling from the external service. A negative value waits until a message is available (could block indefinitely). Zero attempts to receive immediately without waiting. A positive value waits up to the given timeout.") private String timeout; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Integer") + @Metadata(label = "advanced", javaType = "java.lang.Integer", + description = "Sets the maximum size used by the ConsumerCache which is used to cache and reuse consumers when uris are reused. Use 0 for default cache size, or -1 to turn cache off.") private String cacheSize; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Ignore the invalidate endpoint exception when try to create a consumer with that endpoint.") private String ignoreInvalidEndpoint; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether to allow components to optimise if they are PollDynamicAware.") private String allowOptimisedComponents; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether to auto startup components when poll enricher is starting up.") private String autoStartComponents; public PollEnrichDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/RecipientListDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/RecipientListDefinition.java index 39fd7a5fe886..a5ab9a0895fb 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/RecipientListDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/RecipientListDefinition.java @@ -48,50 +48,64 @@ public class RecipientListDefinition<Type extends ProcessorDefinition<Type>> ext private Processor onPrepareProcessor; @XmlAttribute - @Metadata(defaultValue = ",") + @Metadata(defaultValue = ",", + description = "Delimiter used if the Expression returned multiple endpoints. Can be turned off using the value false.") private String delimiter; @XmlAttribute - @Metadata(javaType = "org.apache.camel.AggregationStrategy") + @Metadata(javaType = "org.apache.camel.AggregationStrategy", + description = "Sets the AggregationStrategy to be used to assemble the replies from the recipients, into a single outgoing message.") private String aggregationStrategy; @XmlAttribute - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "This option can be used to explicitly declare the method name to use, when using POJOs as the AggregationStrategy.") private String aggregationStrategyMethodName; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If this option is false then the aggregate method is not used if there was no data to enrich. If this option is true then null values is used as the oldExchange (when no data to enrich), when using POJOs as the AggregationStrategy.") private String aggregationStrategyMethodAllowNull; @Deprecated(since = "4.7.0") @XmlAttribute @Metadata(label = "advanced", javaType = "java.lang.Boolean") private String parallelAggregate; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "If enabled then sending messages to the recipients occurs concurrently. Note the caller thread will still wait until all messages has been fully processed, before it continues.") private String parallelProcessing; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "Sets whether synchronous processing should be strictly used. When enabled then the same thread is used to continue routing after the recipient list is complete, even if parallel processing is enabled.") private String synchronous; @XmlAttribute - @Metadata(javaType = "java.time.Duration", defaultValue = "0") + @Metadata(javaType = "java.time.Duration", defaultValue = "0", + description = "Sets a total timeout specified in millis, when using parallel processing. If the Recipient List hasn't been able to send and process all replies within the given timeframe, then the timeout triggers and the Recipient List breaks out and continues.") private String timeout; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService") + @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService", + description = "Refers to a custom Thread Pool to be used for parallel processing. Notice if you set this option, then parallel processing is automatically implied, and you do not have to enable that option as well.") private String executorService; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Will now stop further processing if an exception or failure occurred during processing of an exchange and the caused exception will be thrown. Will also stop if processing the exchange failed (has a fault message) or an exception was thrown and handled by the error handler (such as using onException).") private String stopOnException; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Ignore the invalidate endpoint exception when try to create a producer with that endpoint.") private String ignoreInvalidEndpoints; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If enabled then Camel will process replies out-of-order, eg in the order they come back. If disabled, Camel will process replies in the same order as defined by the recipient list.") private String streaming; @XmlAttribute - @Metadata(label = "advanced", javaType = "org.apache.camel.Processor") + @Metadata(label = "advanced", javaType = "org.apache.camel.Processor", + description = "Uses the Processor when preparing the exchange to be sent. This can be used to deep-clone messages that should be sent, or any custom logic needed before the exchange is sent.") private String onPrepare; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Integer") + @Metadata(label = "advanced", javaType = "java.lang.Integer", + description = "Sets the maximum size used by the ProducerCache which is used to cache and reuse producers when uris are reused. Use 0 for default cache size, or -1 to turn cache off.") private String cacheSize; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Shares the UnitOfWork with the parent and each of the sub messages. Recipient List will by default not share unit of work between the parent exchange and each recipient exchange. This means each sub exchange has its own individual unit of work.") private String shareUnitOfWork; public RecipientListDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/RollbackDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/RollbackDefinition.java index 672b84ed574c..880ddb12154f 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/RollbackDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/RollbackDefinition.java @@ -34,12 +34,17 @@ public class RollbackDefinition extends NoOutputDefinition<RollbackDefinition> { @XmlAttribute @DslArg + @Metadata(description = "The message to set on the exception when rolling back.") private String message; @XmlAttribute - @Metadata(javaType = "java.lang.Boolean") + @Metadata(javaType = "java.lang.Boolean", + description = "If enabled then only the current transaction is marked for rollback." + + " No exception is thrown and the route continues to execute.") private String markRollbackOnly; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If enabled then only the last sub-transaction (from the last transacted EIP) is marked for rollback." + + " This allows partial rollbacks in nested transaction scenarios.") private String markRollbackOnlyLast; public RollbackDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/RoutingSlipDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/RoutingSlipDefinition.java index 494a743bc751..67a3b34ae161 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/RoutingSlipDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/RoutingSlipDefinition.java @@ -40,13 +40,17 @@ public class RoutingSlipDefinition<Type extends ProcessorDefinition<Type>> exten public static final String DEFAULT_DELIMITER = ","; @XmlAttribute - @Metadata(defaultValue = ",") + @Metadata(defaultValue = ",", + description = "The delimiter used to separate endpoint URIs in the routing slip expression. Default is comma.") private String uriDelimiter; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "If enabled then invalid endpoint URIs are ignored and logged instead of throwing an exception.") private String ignoreInvalidEndpoints; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Integer") + @Metadata(label = "advanced", javaType = "java.lang.Integer", + description = "Configures the cache size for ProducerCache which caches producers for reuse. The default cache size is 1000." + + " Set to -1 to turn off caching.") private String cacheSize; public RoutingSlipDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/SagaDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/SagaDefinition.java index 92be490ff371..0d3f5322b73d 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/SagaDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/SagaDefinition.java @@ -53,27 +53,32 @@ public class SagaDefinition extends OutputDefinition<SagaDefinition> { @XmlTransient private CamelSagaService sagaServiceBean; @XmlAttribute - @Metadata(label = "advanced", javaType = "org.apache.camel.saga.CamelSagaService") + @Metadata(label = "advanced", javaType = "org.apache.camel.saga.CamelSagaService", + description = "Refers to the id to lookup in the registry for the specific CamelSagaService to use") private String sagaService; @XmlAttribute @Metadata(label = "advanced", javaType = "org.apache.camel.model.SagaPropagation", defaultValue = "REQUIRED", - enums = "REQUIRED,REQUIRES_NEW,MANDATORY,SUPPORTS,NOT_SUPPORTED,NEVER") + enums = "REQUIRED,REQUIRES_NEW,MANDATORY,SUPPORTS,NOT_SUPPORTED,NEVER", + description = "Set the Saga propagation mode (REQUIRED, REQUIRES_NEW, MANDATORY, SUPPORTS, NOT_SUPPORTED, NEVER)") private String propagation; @XmlAttribute @Metadata(label = "advanced", javaType = "org.apache.camel.model.SagaCompletionMode", defaultValue = "AUTO", - enums = "AUTO,MANUAL") + enums = "AUTO,MANUAL", + description = "Determine how the saga should be considered complete. When set to AUTO, the saga is completed when the exchange is processed successfully, or compensated when it completes exceptionally. When set to MANUAL, the user must complete or compensate the saga using the saga:complete or saga:compensate endpoints.") private String completionMode; @XmlAttribute - @Metadata(javaType = "java.time.Duration") + @Metadata(javaType = "java.time.Duration", + description = "Set the maximum amount of time for the Saga. After the timeout is expired, the saga will be compensated automatically (unless a different decision has been taken in the meantime).") private String timeout; @XmlAttribute - @Metadata + @Metadata(description = "The compensation endpoint URI that must be called to compensate all changes done in the route. The route corresponding to the compensation URI must perform compensation and complete without error.") private String compensation; @XmlAttribute - @Metadata + @Metadata(description = "The completion endpoint URI that will be called when the Saga is completed successfully. The route corresponding to the completion URI must perform completion tasks and terminate without error.") private String completion; @XmlElement(name = "option") - @Metadata(label = "advanced") + @Metadata(label = "advanced", + description = "Allows to save properties of the current exchange in order to re-use them in a compensation/completion callback route. Option values will be transformed into input headers of the compensation/completion exchange.") private List<PropertyExpressionDefinition> options; public SagaDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/SamplingDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/SamplingDefinition.java index 66ddfc33fcf3..135a2b1c7d60 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/SamplingDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/SamplingDefinition.java @@ -36,10 +36,13 @@ import org.apache.camel.util.TimeUtils; public class SamplingDefinition extends NoOutputDefinition<SamplingDefinition> { @XmlAttribute - @Metadata(defaultValue = "1000", javaType = "java.time.Duration") + @Metadata(defaultValue = "1000", javaType = "java.time.Duration", + description = "The period between samples, using a time-based approach. Default is 1 second.") private String samplePeriod; @XmlAttribute - @Metadata(javaType = "java.lang.Long") + @Metadata(javaType = "java.lang.Long", + description = "The frequency of samples as a message count, using a message-frequency approach." + + " For example, a value of 5 means every 5th message is sampled.") private String messageFrequency; public SamplingDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/ThreadPoolProfileDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/ThreadPoolProfileDefinition.java index 1c26ee020cdf..73c4948b8f28 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/ThreadPoolProfileDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/ThreadPoolProfileDefinition.java @@ -35,30 +35,35 @@ import org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy; public class ThreadPoolProfileDefinition extends OptionalIdentifiedDefinition<ThreadPoolProfileDefinition> { @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Whether this profile is the default thread pool profile") private String defaultProfile; @XmlAttribute - @Metadata(javaType = "java.lang.Integer") + @Metadata(javaType = "java.lang.Integer", description = "Sets the core pool size") private String poolSize; @XmlAttribute - @Metadata(javaType = "java.lang.Integer") + @Metadata(javaType = "java.lang.Integer", description = "Sets the maximum pool size") private String maxPoolSize; @XmlAttribute - @Metadata(javaType = "java.lang.Long") + @Metadata(javaType = "java.lang.Long", description = "Sets the keep alive time for idle threads in the pool") private String keepAliveTime; @XmlAttribute @Metadata(label = "advanced", javaType = "java.util.concurrent.TimeUnit", - enums = "NANOSECONDS,MICROSECONDS,MILLISECONDS,SECONDS,MINUTES,HOURS,DAYS") + enums = "NANOSECONDS,MICROSECONDS,MILLISECONDS,SECONDS,MINUTES,HOURS,DAYS", + description = "Sets the time unit to use for keep alive time. By default SECONDS is used.") private String timeUnit; @XmlAttribute - @Metadata(javaType = "java.lang.Integer") + @Metadata(javaType = "java.lang.Integer", + description = "Sets the maximum number of tasks in the work queue. Use -1 or Integer.MAX_VALUE for an unbounded queue.") private String maxQueueSize; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Whether idle core threads are allowed to timeout and therefore can shrink the pool size below the core pool size") private String allowCoreThreadTimeOut; @XmlAttribute @Metadata(label = "advanced", javaType = "org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy", - enums = "Abort,CallerRuns,Block") + enums = "Abort,CallerRuns,Block", + description = "Sets the handler for tasks which cannot be executed by the thread pool") private String rejectedPolicy; public ThreadPoolProfileDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/ThreadsDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/ThreadsDefinition.java index 1cedd5a77952..22377bdfac95 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/ThreadsDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/ThreadsDefinition.java @@ -42,38 +42,44 @@ public class ThreadsDefinition extends NoOutputDefinition<ThreadsDefinition> private ExecutorService executorServiceBean; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService") + @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService", + description = "To refer to a custom thread pool or use a thread pool profile (as overlay)") private String executorService; @XmlAttribute - @Metadata(javaType = "java.lang.Integer") + @Metadata(javaType = "java.lang.Integer", description = "Sets the core pool size") @DslArg(position = 0, renderType = "long") private String poolSize; @XmlAttribute - @Metadata(javaType = "java.lang.Integer") + @Metadata(javaType = "java.lang.Integer", description = "Sets the maximum pool size") @DslArg(position = 1, renderType = "long") private String maxPoolSize; @XmlAttribute - @Metadata(javaType = "java.lang.Long") + @Metadata(javaType = "java.lang.Long", description = "Sets the keep alive time for idle threads") private String keepAliveTime; @XmlAttribute @Metadata(label = "advanced", javaType = "java.util.concurrent.TimeUnit", - enums = "NANOSECONDS,MICROSECONDS,MILLISECONDS,SECONDS,MINUTES,HOURS,DAYS") + enums = "NANOSECONDS,MICROSECONDS,MILLISECONDS,SECONDS,MINUTES,HOURS,DAYS", + description = "Sets the keep alive time unit. By default SECONDS is used.") private String timeUnit; @XmlAttribute - @Metadata(javaType = "java.lang.Integer") + @Metadata(javaType = "java.lang.Integer", + description = "Sets the maximum number of tasks in the work queue. Use -1 or Integer.MAX_VALUE for an unbounded queue.") private String maxQueueSize; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Whether idle core threads are allowed to timeout and therefore can shrink the pool size below the core pool size") private String allowCoreThreadTimeOut; @XmlAttribute - @Metadata(defaultValue = "Threads") + @Metadata(defaultValue = "Threads", description = "Sets the thread name to use") private String threadName; @XmlAttribute @Metadata(label = "advanced", javaType = "org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy", - enums = "Abort,CallerRuns,Block") + enums = "Abort,CallerRuns,Block", + description = "Sets the handler for tasks which cannot be executed by the thread pool") private String rejectedPolicy; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true", + description = "Whether to use the caller thread as fallback when a task is rejected being added to the thread pool (when its full). This is only used as fallback if no rejectedPolicy has been configured, or the thread pool has no configured rejection handler.") private String callerRunsWhenRejected; public ThreadsDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/ThrottleDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/ThrottleDefinition.java index 33b5b4cba671..a9d0ce151071 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/ThrottleDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/ThrottleDefinition.java @@ -45,24 +45,30 @@ public class ThrottleDefinition extends ExpressionNode implements ExecutorServic @XmlAttribute @Metadata(javaType = "org.apache.camel.model.ThrottlingMode", defaultValue = "TotalRequests", - enums = "TotalRequests,ConcurrentRequests") + enums = "TotalRequests,ConcurrentRequests", + description = "Sets the throttling mode to one of the available modes enumerated in ThrottlingMode.") private String mode; @XmlElement(name = "correlationExpression") private ExpressionSubElementDefinition correlationExpression; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService") + @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService", + description = "To use a custom thread pool (ScheduledExecutorService) by the throttler.") private String executorService; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Enables asynchronous delay which means the thread will not block while delaying.") private String asyncDelayed; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether or not the caller should run the task when it was rejected by the thread pool.") private String callerRunsWhenRejected; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Whether or not throttler throws the ThrottlerRejectedExecutionException when the exchange exceeds the request limit.") private String rejectExecution; @XmlAttribute - @Metadata(defaultValue = "1000", javaType = "java.time.Duration") + @Metadata(defaultValue = "1000", javaType = "java.time.Duration", + description = "Sets the time period during which the maximum request count is valid for.") private String timePeriodMillis; public ThrottleDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/ToDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/ToDefinition.java index a6dfe8bea249..8bcd66b42599 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/ToDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/ToDefinition.java @@ -36,11 +36,16 @@ import org.apache.camel.spi.annotations.DslArg; public class ToDefinition extends SendDefinition<ToDefinition> { @XmlAttribute + @Metadata(description = "To use a variable as the source for the message body to send." + + " This makes it handy to use variables for user data and to easily control what data to use for sending and receiving.") private String variableSend; @XmlAttribute + @Metadata(description = "To use a variable to store the received message body (only body, not headers)." + + " This makes it handy to use variables for user data and to easily control what data to use for sending and receiving.") private String variableReceive; @XmlAttribute - @Metadata(label = "advanced", javaType = "org.apache.camel.ExchangePattern", enums = "InOnly,InOut") + @Metadata(label = "advanced", javaType = "org.apache.camel.ExchangePattern", enums = "InOnly,InOut", + description = "Sets the optional ExchangePattern to use. If not specified the default exchange pattern is used.") @DslArg(position = 0, renderType = "enumString", typeName = "ExchangePattern") private String pattern; diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/ToDynamicDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/ToDynamicDefinition.java index d2dcb26c3fe7..d96eb5c3bff3 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/ToDynamicDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/ToDynamicDefinition.java @@ -41,7 +41,8 @@ public class ToDynamicDefinition extends NoOutputDefinition<ToDynamicDefinition> protected EndpointProducerBuilder endpointProducerBuilder; @XmlAttribute - @Metadata(required = true) + @Metadata(required = true, + description = "The uri of the endpoint to send to. The uri can be dynamic computed using the simple language.") @DslArg private String uri; @XmlAttribute @@ -49,19 +50,24 @@ public class ToDynamicDefinition extends NoOutputDefinition<ToDynamicDefinition> @XmlAttribute private String variableReceive; @XmlAttribute - @Metadata(label = "advanced", javaType = "org.apache.camel.ExchangePattern", enums = "InOnly,InOut") + @Metadata(label = "advanced", javaType = "org.apache.camel.ExchangePattern", enums = "InOnly,InOut", + description = "Sets the optional ExchangePattern used to invoke this endpoint.") private String pattern; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Integer") + @Metadata(label = "advanced", javaType = "java.lang.Integer", + description = "Sets the maximum size used by the ProducerCache which is used to cache and reuse producers when uris are reused. Use 0 for default cache size, or -1 to turn cache off.") private String cacheSize; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", javaType = "java.lang.Boolean", + description = "Whether to ignore invalid endpoint URIs and skip sending the message.") private String ignoreInvalidEndpoint; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether to allow components to optimise toD if they are SendDynamicAware.") private String allowOptimisedComponents; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether to auto startup components when toD is starting up.") private String autoStartComponents; public ToDynamicDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/ValidateDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/ValidateDefinition.java index a21a4ddb846c..13a8dc75eae1 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/ValidateDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/ValidateDefinition.java @@ -42,7 +42,8 @@ public class ValidateDefinition extends ExpressionNode { private PredicateExceptionFactory factory; @XmlAttribute - @Metadata(label = "advanced", javaType = "org.apache.camel.spi.PredicateExceptionFactory") + @Metadata(label = "advanced", javaType = "org.apache.camel.spi.PredicateExceptionFactory", + description = "Reference to a custom PredicateExceptionFactory for creating the exception when validation fails.") private String predicateExceptionFactory; public ValidateDefinition() { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/WireTapDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/WireTapDefinition.java index 7a155184c508..2e7969018783 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/WireTapDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/WireTapDefinition.java @@ -44,16 +44,20 @@ public class WireTapDefinition<Type extends ProcessorDefinition<Type>> extends T private Processor onPrepareProcessor; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether to use a copy of the original exchange.") private String copy; @XmlAttribute - @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean") + @Metadata(label = "advanced", defaultValue = "true", javaType = "java.lang.Boolean", + description = "Whether the uri is dynamic or static. If dynamic then the simple language is used to evaluate a dynamic uri to use as the wire-tap destination, for each incoming message.") private String dynamicUri; @XmlAttribute - @Metadata(label = "advanced", javaType = "org.apache.camel.Processor") + @Metadata(label = "advanced", javaType = "org.apache.camel.Processor", + description = "Uses a processor when preparing the exchange to be sent. This can be used to deep-clone messages, or any custom logic needed before the exchange is sent.") private String onPrepare; @XmlAttribute - @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService") + @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService", + description = "Uses a custom thread pool for sending tapped exchanges.") private String executorService; public WireTapDefinition() {
