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 2015/09/14 11:32:21 UTC

camel git commit: CAMEL-9131: Add more labels to endpoint/component options.

Repository: camel
Updated Branches:
  refs/heads/master 6df2fb66c -> 992b63d38


CAMEL-9131: Add more labels to endpoint/component options.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/992b63d3
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/992b63d3
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/992b63d3

Branch: refs/heads/master
Commit: 992b63d383f2424e7a3ce6d79f73d7ffa8b18aa6
Parents: 6df2fb6
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Sep 14 11:32:15 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Sep 14 11:33:29 2015 +0200

----------------------------------------------------------------------
 .../camel/component/bean/BeanEndpoint.java      |  8 +++---
 .../component/scheduler/SchedulerEndpoint.java  |  2 +-
 .../camel/component/seda/SedaEndpoint.java      |  8 +++---
 .../camel/component/timer/TimerEndpoint.java    |  6 ++---
 .../component/validator/ValidatorEndpoint.java  | 14 +++++-----
 .../camel/component/xslt/XsltComponent.java     |  2 ++
 .../camel/component/xslt/XsltEndpoint.java      | 12 ++++-----
 .../org/apache/camel/impl/DefaultEndpoint.java  |  5 ++--
 .../camel/impl/ScheduledPollEndpoint.java       | 27 ++++++++++----------
 9 files changed, 45 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/992b63d3/camel-core/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java
index 1287483..af76a7a 100644
--- a/camel-core/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java
@@ -40,15 +40,15 @@ public class BeanEndpoint extends DefaultEndpoint {
     private transient BeanProcessor processor;
     @UriPath(description = "Sets the name of the bean to invoke") @Metadata(required = "true")
     private String beanName;
+    @UriParam(description = "Sets the name of the method to invoke on the bean")
+    private String method;
     @UriParam(description = "If enabled, Camel will cache the result of the first Registry look-up. Cache can be enabled if the bean in the Registry is defined as a singleton scope.")
     private boolean cache;
-    @UriParam(description = "How to treat the parameters which are passed from the message body."
+    @UriParam(label = "advanced", description = "How to treat the parameters which are passed from the message body."
             + "true means the message body should be an array of parameters. Note: This option is used internally by Camel, and is not intended for end users to use.")
     @Deprecated
     private boolean multiParameterArray;
-    @UriParam(description = "Sets the name of the method to invoke on the bean")
-    private String method;
-    @UriParam(description = "Used for configuring additional properties on the bean")
+    @UriParam(label = "advanced", description = "Used for configuring additional properties on the bean")
     private Map<String, Object> parameters;
 
     public BeanEndpoint() {

http://git-wip-us.apache.org/repos/asf/camel/blob/992b63d3/camel-core/src/main/java/org/apache/camel/component/scheduler/SchedulerEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/scheduler/SchedulerEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/scheduler/SchedulerEndpoint.java
index d931fec..13b32c9 100644
--- a/camel-core/src/main/java/org/apache/camel/component/scheduler/SchedulerEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/scheduler/SchedulerEndpoint.java
@@ -32,7 +32,7 @@ public class SchedulerEndpoint extends ScheduledPollEndpoint {
 
     @UriPath @Metadata(required = "true")
     private String name;
-    @UriParam(defaultValue = "1")
+    @UriParam(defaultValue = "1", label = "scheduler")
     private int concurrentTasks = 1;
 
     public SchedulerEndpoint(String uri, SchedulerComponent component, String remaining) {

http://git-wip-us.apache.org/repos/asf/camel/blob/992b63d3/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
index 7b10d1a..23f6d91 100644
--- a/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
@@ -70,13 +70,13 @@ public class SedaEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
 
     @UriParam(label = "consumer", defaultValue = "1")
     private int concurrentConsumers = 1;
-    @UriParam(label = "consumer", defaultValue = "true")
+    @UriParam(label = "consumer,advanced", defaultValue = "true")
     private boolean limitConcurrentConsumers = true;
-    @UriParam(label = "consumer")
+    @UriParam(label = "consumer,advanced")
     private boolean multipleConsumers;
-    @UriParam(label = "consumer")
+    @UriParam(label = "consumer,advanced")
     private boolean purgeWhenStopping;
-    @UriParam(label = "consumer", defaultValue = "1000")
+    @UriParam(label = "consumer,advanced", defaultValue = "1000")
     private int pollTimeout = 1000;
 
     @UriParam(label = "producer", defaultValue = "IfReplyExpected")

http://git-wip-us.apache.org/repos/asf/camel/blob/992b63d3/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
index a3ce56d..8ec33ff 100644
--- a/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
@@ -43,7 +43,7 @@ import org.apache.camel.spi.UriPath;
 public class TimerEndpoint extends DefaultEndpoint implements MultipleConsumersSupport {
     @UriPath @Metadata(required = "true")
     private String timerName;
-    @UriParam
+    @UriParam(label = "advanced")
     private Date time;
     @UriParam(defaultValue = "1000")
     private long period = 1000;
@@ -51,11 +51,11 @@ public class TimerEndpoint extends DefaultEndpoint implements MultipleConsumersS
     private long delay = 1000;
     @UriParam
     private boolean fixedRate;
-    @UriParam(defaultValue = "true")
+    @UriParam(defaultValue = "true", label = "advanced")
     private boolean daemon = true;
     @UriParam(defaultValue = "0")
     private long repeatCount;
-    @UriParam
+    @UriParam(label = "advanced")
     private Timer timer;
 
     public TimerEndpoint() {

http://git-wip-us.apache.org/repos/asf/camel/blob/992b63d3/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorEndpoint.java
index 85096b1..9bbeafd 100644
--- a/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorEndpoint.java
@@ -48,17 +48,19 @@ public class ValidatorEndpoint extends DefaultEndpoint {
     @UriPath(description = "URL to a local resource on the classpath or a full URL to a remote resource or resource on the file system which contains the XSD to validate against.")
     @Metadata(required = "true")
     private String resourceUri;
-    @UriParam(defaultValue = XMLConstants.W3C_XML_SCHEMA_NS_URI, description = "Configures the W3C XML Schema Namespace URI.")
+    @UriParam(defaultValue = XMLConstants.W3C_XML_SCHEMA_NS_URI, label = "advanced",
+            description = "Configures the W3C XML Schema Namespace URI.")
     private String schemaLanguage = XMLConstants.W3C_XML_SCHEMA_NS_URI;
-    @UriParam(description = "To use a custom javax.xml.validation.SchemaFactory")
+    @UriParam(label = "advanced", description = "To use a custom javax.xml.validation.SchemaFactory")
     private SchemaFactory schemaFactory;
-    @UriParam(description = "To use a custom org.apache.camel.processor.validation.ValidatorErrorHandler. The default error handler captures the errors and throws an exception.")
+    @UriParam(label = "advanced", description = "To use a custom org.apache.camel.processor.validation.ValidatorErrorHandler. The default error handler captures the errors and throws an exception.")
     private ValidatorErrorHandler errorHandler = new DefaultValidationErrorHandler();
-    @UriParam(description = "Whether DOMSource/DOMResult or SaxSource/SaxResult should be used by the validator.")
+    @UriParam(label = "advanced", description = "Whether DOMSource/DOMResult or SaxSource/SaxResult should be used by the validator.")
     private boolean useDom;
-    @UriParam(defaultValue = "true", description = "Whether the Schema instance should be shared or not. This option is introduced to work around a JDK 1.6.x bug. Xerces should not have this issue.")
+    @UriParam(defaultValue = "true", label = "advanced",
+            description = "Whether the Schema instance should be shared or not. This option is introduced to work around a JDK 1.6.x bug. Xerces should not have this issue.")
     private boolean useSharedSchema = true;
-    @UriParam(description = "To use a custom LSResourceResolver")
+    @UriParam(label = "advanced", description = "To use a custom LSResourceResolver")
     private LSResourceResolver resourceResolver;
     @UriParam(defaultValue = "true", description = "Whether to fail if no body exists.")
     private boolean failOnNullBody = true;

http://git-wip-us.apache.org/repos/asf/camel/blob/992b63d3/camel-core/src/main/java/org/apache/camel/component/xslt/XsltComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/xslt/XsltComponent.java b/camel-core/src/main/java/org/apache/camel/component/xslt/XsltComponent.java
index b0a06e0..3227242 100644
--- a/camel-core/src/main/java/org/apache/camel/component/xslt/XsltComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/xslt/XsltComponent.java
@@ -35,7 +35,9 @@ public class XsltComponent extends UriEndpointComponent {
 
     private static final Logger LOG = LoggerFactory.getLogger(XsltComponent.class);
 
+    @Metadata(label = "advanced")
     private XmlConverter xmlConverter;
+    @Metadata(label = "advanced")
     private URIResolver uriResolver;
     @Metadata(defaultValue = "true")
     private boolean contentCache = true;

http://git-wip-us.apache.org/repos/asf/camel/blob/992b63d3/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
index 51d0790..7aa5fa5 100644
--- a/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
@@ -59,15 +59,15 @@ public class XsltEndpoint extends ProcessorEndpoint {
     private String resourceUri;
     @UriParam(defaultValue = "true")
     private boolean contentCache = true;
-    @UriParam
+    @UriParam(label = "advanced")
     private XmlConverter converter;
-    @UriParam
+    @UriParam(label = "advanced")
     private String transformerFactoryClass;
-    @UriParam
+    @UriParam(label = "advanced")
     private TransformerFactory transformerFactory;
     @UriParam
     private boolean saxon;
-    @UriParam
+    @UriParam(label = "advanced")
     private ResultHandlerFactory resultHandlerFactory;
     @UriParam(defaultValue = "true")
     private boolean failOnNullBody = true;
@@ -75,9 +75,9 @@ public class XsltEndpoint extends ProcessorEndpoint {
     private XsltOutput output = XsltOutput.string;
     @UriParam(defaultValue = "0")
     private int transformerCacheSize;
-    @UriParam
+    @UriParam(label = "advanced")
     private ErrorListener errorListener;
-    @UriParam
+    @UriParam(label = "advanced")
     private URIResolver uriResolver;
     @UriParam(defaultValue = "true")
     private boolean allowStAX = true;

http://git-wip-us.apache.org/repos/asf/camel/blob/992b63d3/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
index e4caf13..24d7f6e 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
@@ -59,11 +59,12 @@ public abstract class DefaultEndpoint extends ServiceSupport implements Endpoint
     private EndpointConfiguration endpointConfiguration;
     private CamelContext camelContext;
     private Component component;
-    @UriParam(defaultValue = "InOnly", description = "Sets the default exchange pattern when creating an exchange")
+    @UriParam(defaultValue = "InOnly", label = "advanced",
+            description = "Sets the default exchange pattern when creating an exchange")
     private ExchangePattern exchangePattern = ExchangePattern.InOnly;
     // option to allow end user to dictate whether async processing should be
     // used or not (if possible)
-    @UriParam(defaultValue = "false",
+    @UriParam(defaultValue = "false", label = "advanced",
             description = "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported).")
     private boolean synchronous;
     private final String id = EndpointHelper.createEndpointId();

http://git-wip-us.apache.org/repos/asf/camel/blob/992b63d3/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
index bf19d4a..7cc812e 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
@@ -44,40 +44,41 @@ public abstract class ScheduledPollEndpoint extends DefaultEndpoint {
     private static final String QUARTZ_2_SCHEDULER = "org.apache.camel.pollconsumer.quartz2.QuartzScheduledPollConsumerScheduler";
 
     // if adding more options then align with org.apache.camel.impl.ScheduledPollConsumer
-    @UriParam(defaultValue = "true", label = "consumer", description = "Whether the scheduler should be auto started.")
+    @UriParam(defaultValue = "true", label = "consumer,scheduler", description = "Whether the scheduler should be auto started.")
     private boolean startScheduler = true;
-    @UriParam(defaultValue = "1000", label = "consumer", description = "Milliseconds before the first poll starts.")
+    @UriParam(defaultValue = "1000", label = "consumer,scheduler", description = "Milliseconds before the first poll starts.")
     private long initialDelay = 1000;
-    @UriParam(defaultValue = "500", label = "consumer", description = "Milliseconds before the next poll.")
+    @UriParam(defaultValue = "500", label = "consumer,scheduler", description = "Milliseconds before the next poll.")
     private long delay = 500;
-    @UriParam(defaultValue = "MILLISECONDS", label = "consumer", description = "Time unit for initialDelay and delay options.")
+    @UriParam(defaultValue = "MILLISECONDS", label = "consumer,scheduler", description = "Time unit for initialDelay and delay options.")
     private TimeUnit timeUnit = TimeUnit.MILLISECONDS;
-    @UriParam(defaultValue = "true", label = "consumer", description = "Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details.")
+    @UriParam(defaultValue = "true", label = "consumer,scheduler", description = "Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details.")
     private boolean useFixedDelay = true;
     @UriParam(label = "consumer", description = "A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation"
             + " to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel.")
     private PollingConsumerPollStrategy pollStrategy = new DefaultPollingConsumerPollStrategy();
-    @UriParam(defaultValue = "TRACE", label = "consumer",
+    @UriParam(defaultValue = "TRACE", label = "consumer,scheduler",
             description = "The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that.")
     private LoggingLevel runLoggingLevel = LoggingLevel.TRACE;
     @UriParam(label = "consumer", description = "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead.")
     private boolean sendEmptyMessageWhenIdle;
-    @UriParam(label = "consumer", description = "If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages.")
+    @UriParam(label = "consumer,scheduler", description = "If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages.")
     private boolean greedy;
-    @UriParam(enums = "spring,quartz2", label = "consumer", description = "To use a cron scheduler from either camel-spring or camel-quartz2 component")
+    @UriParam(enums = "spring,quartz2", label = "consumer,scheduler", description = "To use a cron scheduler from either camel-spring or camel-quartz2 component")
     private ScheduledPollConsumerScheduler scheduler;
     private String schedulerName; // used when configuring scheduler using a string value
-    @UriParam(label = "consumer", description = "To configure additional properties when using a custom scheduler or any of the Quartz2, Spring based scheduler.")
+    @UriParam(label = "consumer,scheduler", description = "To configure additional properties when using a custom scheduler or any of the Quartz2, Spring based scheduler.")
     private Map<String, Object> schedulerProperties;
-    @UriParam(label = "consumer", description = "Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool.")
+    @UriParam(label = "consumer,scheduler",
+            description = "Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool.")
     private ScheduledExecutorService scheduledExecutorService;
-    @UriParam(label = "consumer", description = "To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row."
+    @UriParam(label = "consumer,scheduler", description = "To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row."
             + " The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again."
             + " When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured.")
     private int backoffMultiplier;
-    @UriParam(label = "consumer", description = "The number of subsequent idle polls that should happen before the backoffMultipler should kick-in.")
+    @UriParam(label = "consumer,scheduler", description = "The number of subsequent idle polls that should happen before the backoffMultipler should kick-in.")
     private int backoffIdleThreshold;
-    @UriParam(label = "consumer", description = "The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in.")
+    @UriParam(label = "consumer,scheduler", description = "The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in.")
     private int backoffErrorThreshold;
 
     protected ScheduledPollEndpoint(String endpointUri, Component component) {