Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 291FE171E6 for ; Mon, 19 Jan 2015 13:35:16 +0000 (UTC) Received: (qmail 50233 invoked by uid 500); 19 Jan 2015 13:35:18 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 50180 invoked by uid 500); 19 Jan 2015 13:35:18 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 50171 invoked by uid 99); 19 Jan 2015 13:35:18 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jan 2015 13:35:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0AE9FE03FD; Mon, 19 Jan 2015 13:35:12 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Mon, 19 Jan 2015 13:35:13 -0000 Message-Id: <56aa17e049244150b10bab33f9e8cc5b@git.apache.org> In-Reply-To: <25bd9c60c3884c608969e378558ecf9b@git.apache.org> References: <25bd9c60c3884c608969e378558ecf9b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/4] camel git commit: CAMEL-8195: Add javadoc to model classes so we have EIP documentation out of the box CAMEL-8195: Add javadoc to model classes so we have EIP documentation out of the box Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/780c0964 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/780c0964 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/780c0964 Branch: refs/heads/master Commit: 780c09640167e82babe8f6495b414297f986084e Parents: 0d1bd02 Author: Claus Ibsen Authored: Mon Jan 19 13:47:47 2015 +0100 Committer: Claus Ibsen Committed: Mon Jan 19 14:28:16 2015 +0100 ---------------------------------------------------------------------- .../org/apache/camel/model/CatchDefinition.java | 21 +++++++++++++-- .../camel/model/ContextScanDefinition.java | 6 +++++ .../camel/model/ConvertBodyDefinition.java | 6 +++++ .../org/apache/camel/model/DelayDefinition.java | 8 ++++-- .../camel/model/DescriptionDefinition.java | 27 ++++++++++++++++++- .../apache/camel/model/EnrichDefinition.java | 28 ++++++++++++++++++++ .../camel/model/InterceptFromDefinition.java | 4 +++ .../InterceptSendToEndpointDefinition.java | 8 +++++- .../camel/model/PackageScanDefinition.java | 4 ++- .../camel/model/config/PropertyDefinition.java | 3 +++ 10 files changed, 108 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/780c0964/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java b/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java index 6f6186b..1556218 100644 --- a/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java @@ -18,7 +18,6 @@ package org.apache.camel.model; import java.util.ArrayList; import java.util.List; - import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -137,7 +136,7 @@ public class CatchDefinition extends ProcessorDefinition { // Fluent API //------------------------------------------------------------------------- /** - * Sets the exceptionClasses of the CatchType + * The exceptions to catch. * * @param exceptionClasses a list of the exception classes * @return the builder @@ -146,6 +145,24 @@ public class CatchDefinition extends ProcessorDefinition { setExceptionClasses(exceptionClasses); return this; } + + /** + * The exception(s) to catch. + * + * @param exceptions one or more exceptions + * @return the builder + */ + public CatchDefinition exception(Class... exceptions) { + if (exceptionClasses == null) { + exceptionClasses = new ArrayList>(); + } + if (exceptions != null) { + for (Class exception : exceptions) { + exceptionClasses.add(exception); + } + } + return this; + } /** * Sets an additional predicate that should be true before the onCatch is triggered. http://git-wip-us.apache.org/repos/asf/camel/blob/780c0964/camel-core/src/main/java/org/apache/camel/model/ContextScanDefinition.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/model/ContextScanDefinition.java b/camel-core/src/main/java/org/apache/camel/model/ContextScanDefinition.java index b349d54..62a16df 100644 --- a/camel-core/src/main/java/org/apache/camel/model/ContextScanDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/ContextScanDefinition.java @@ -48,10 +48,16 @@ public class ContextScanDefinition { return includes; } + /** + * Exclude finding route builder from these java package names. + */ public void setExcludes(List excludes) { this.excludes = excludes; } + /** + * Include finding route builder from these java package names. + */ public void setIncludes(List includes) { this.includes = includes; } http://git-wip-us.apache.org/repos/asf/camel/blob/780c0964/camel-core/src/main/java/org/apache/camel/model/ConvertBodyDefinition.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/model/ConvertBodyDefinition.java b/camel-core/src/main/java/org/apache/camel/model/ConvertBodyDefinition.java index 1363c22..cc0a0c7 100644 --- a/camel-core/src/main/java/org/apache/camel/model/ConvertBodyDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/ConvertBodyDefinition.java @@ -100,6 +100,9 @@ public class ConvertBodyDefinition extends NoOutputDefinitionnoy block while delaying. - * - * @return the builder */ public DelayDefinition asyncDelayed() { setAsyncDelayed(true); return this; } + /** + * To use a custom Thread Pool if asyncDelay has been enabled. + */ public DelayDefinition executorService(ExecutorService executorService) { setExecutorService(executorService); return this; } + /** + * Refers to a custom Thread Pool if asyncDelay has been enabled. + */ public DelayDefinition executorServiceRef(String executorServiceRef) { setExecutorServiceRef(executorServiceRef); return this; http://git-wip-us.apache.org/repos/asf/camel/blob/780c0964/camel-core/src/main/java/org/apache/camel/model/DescriptionDefinition.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/model/DescriptionDefinition.java b/camel-core/src/main/java/org/apache/camel/model/DescriptionDefinition.java index 5301a15..8caec77 100644 --- a/camel-core/src/main/java/org/apache/camel/model/DescriptionDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/DescriptionDefinition.java @@ -22,23 +22,30 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlValue; +import org.apache.camel.spi.Label; + /** - * Represents a description element which can be used on any element in the EIP route + * To provide comments about the node. * * @version */ +@Label("configuration") @XmlRootElement(name = "description") @XmlAccessorType(XmlAccessType.FIELD) public class DescriptionDefinition { @XmlAttribute private String lang; @XmlAttribute + @Deprecated private Double layoutX; @XmlAttribute + @Deprecated private Double layoutY; @XmlAttribute + @Deprecated private Double layoutWidth; @XmlAttribute + @Deprecated private Double layoutHeight; @XmlValue private String text; @@ -47,6 +54,9 @@ public class DescriptionDefinition { return lang; } + /** + * Language, such as en for english. + */ public void setLang(String lang) { this.lang = lang; } @@ -55,6 +65,9 @@ public class DescriptionDefinition { return text; } + /** + * The description as human readable text + */ public void setText(String text) { this.text = text; } @@ -63,6 +76,9 @@ public class DescriptionDefinition { return layoutHeight; } + /** + * Layout height + */ public void setLayoutHeight(Double layoutHeight) { this.layoutHeight = layoutHeight; } @@ -71,6 +87,9 @@ public class DescriptionDefinition { return layoutWidth; } + /** + * Layout width + */ public void setLayoutWidth(Double layoutWidth) { this.layoutWidth = layoutWidth; } @@ -79,6 +98,9 @@ public class DescriptionDefinition { return layoutX; } + /** + * Layout position X + */ public void setLayoutX(Double layoutX) { this.layoutX = layoutX; } @@ -87,6 +109,9 @@ public class DescriptionDefinition { return layoutY; } + /** + * Layout position Y + */ public void setLayoutY(Double layoutY) { this.layoutY = layoutY; } http://git-wip-us.apache.org/repos/asf/camel/blob/780c0964/camel-core/src/main/java/org/apache/camel/model/EnrichDefinition.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/model/EnrichDefinition.java b/camel-core/src/main/java/org/apache/camel/model/EnrichDefinition.java index 8886d60..9ff0a19 100644 --- a/camel-core/src/main/java/org/apache/camel/model/EnrichDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/EnrichDefinition.java @@ -149,6 +149,9 @@ public class EnrichDefinition extends NoOutputDefinition imple return resourceUri; } + /** + * The endpoint uri for the external service to enrich from. You must use either uri or ref. + */ public void setResourceUri(String resourceUri) { this.resourceUri = resourceUri; } @@ -157,6 +160,9 @@ public class EnrichDefinition extends NoOutputDefinition imple return resourceRef; } + /** + * Refers to the endpoint for the external service to enrich from. You must use either uri or ref. + */ public void setResourceRef(String resourceRef) { this.resourceRef = resourceRef; } @@ -165,6 +171,10 @@ public class EnrichDefinition extends NoOutputDefinition imple return aggregationStrategyRef; } + /** + * Refers to an 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. + */ public void setAggregationStrategyRef(String aggregationStrategyRef) { this.aggregationStrategyRef = aggregationStrategyRef; } @@ -173,6 +183,9 @@ public class EnrichDefinition extends NoOutputDefinition imple return aggregationStrategyMethodName; } + /** + * This option can be used to explicit declare the method name to use, when using POJOs as the AggregationStrategy. + */ public void setAggregationStrategyMethodName(String aggregationStrategyMethodName) { this.aggregationStrategyMethodName = aggregationStrategyMethodName; } @@ -181,6 +194,11 @@ public class EnrichDefinition extends NoOutputDefinition imple return aggregationStrategyMethodAllowNull; } + /** + * 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. + */ public void setAggregationStrategyMethodAllowNull(Boolean aggregationStrategyMethodAllowNull) { this.aggregationStrategyMethodAllowNull = aggregationStrategyMethodAllowNull; } @@ -189,6 +207,10 @@ public class EnrichDefinition extends NoOutputDefinition imple return aggregationStrategy; } + /** + * 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. + */ public void setAggregationStrategy(AggregationStrategy aggregationStrategy) { this.aggregationStrategy = aggregationStrategy; } @@ -197,6 +219,12 @@ public class EnrichDefinition extends NoOutputDefinition imple return aggregateOnException; } + /** + * 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. For example to suppress the exception + * or set a custom message body etc. + */ public void setAggregateOnException(Boolean aggregateOnException) { this.aggregateOnException = aggregateOnException; } http://git-wip-us.apache.org/repos/asf/camel/blob/780c0964/camel-core/src/main/java/org/apache/camel/model/InterceptFromDefinition.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/model/InterceptFromDefinition.java b/camel-core/src/main/java/org/apache/camel/model/InterceptFromDefinition.java index ca24ed6..6f6a5f5 100644 --- a/camel-core/src/main/java/org/apache/camel/model/InterceptFromDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/InterceptFromDefinition.java @@ -93,6 +93,10 @@ public class InterceptFromDefinition extends InterceptDefinition { return uri; } + /** + * Intercept incoming messages from the uri or uri pattern. + * If this option is not configured, then all incoming messages is intercepted. + */ public void setUri(String uri) { this.uri = uri; } http://git-wip-us.apache.org/repos/asf/camel/blob/780c0964/camel-core/src/main/java/org/apache/camel/model/InterceptSendToEndpointDefinition.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/model/InterceptSendToEndpointDefinition.java b/camel-core/src/main/java/org/apache/camel/model/InterceptSendToEndpointDefinition.java index db433d0..4d1ef7e 100644 --- a/camel-core/src/main/java/org/apache/camel/model/InterceptSendToEndpointDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/InterceptSendToEndpointDefinition.java @@ -17,7 +17,6 @@ package org.apache.camel.model; import java.util.List; - import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; @@ -210,6 +209,10 @@ public class InterceptSendToEndpointDefinition extends OutputDefinition