camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [01/11] camel git commit: CAMEL-8320: Component doc to include endpoint syntax.
Date Sun, 01 Mar 2015 07:42:28 GMT
Repository: camel
Updated Branches:
  refs/heads/master 6cb8f8155 -> 6560d5bbf


CAMEL-8320: Component doc to include endpoint syntax.


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

Branch: refs/heads/master
Commit: e1736f393bde11ebeaf695d61edc8408e9e79b99
Parents: 6cb8f81
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat Feb 28 16:20:45 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sat Feb 28 16:20:45 2015 +0100

----------------------------------------------------------------------
 .../org/apache/camel/component/bean/BeanEndpoint.java |  2 +-
 .../camel/component/beanclass/ClassEndpoint.java      |  2 +-
 .../camel/component/binding/BindingEndpoint.java      |  2 +-
 .../apache/camel/component/browse/BrowseEndpoint.java |  2 +-
 .../component/controlbus/ControlBusEndpoint.java      |  4 ++--
 .../component/dataformat/DataFormatEndpoint.java      |  2 +-
 .../camel/component/dataset/DataSetEndpoint.java      |  2 +-
 .../apache/camel/component/direct/DirectEndpoint.java |  2 +-
 .../camel/component/directvm/DirectVmEndpoint.java    |  2 +-
 .../org/apache/camel/component/file/FileEndpoint.java |  2 +-
 .../camel/component/language/LanguageEndpoint.java    |  4 ++--
 .../org/apache/camel/component/log/LogEndpoint.java   |  2 +-
 .../org/apache/camel/component/mock/MockEndpoint.java |  2 +-
 .../org/apache/camel/component/ref/RefEndpoint.java   |  2 +-
 .../org/apache/camel/component/rest/RestEndpoint.java |  2 +-
 .../camel/component/scheduler/SchedulerEndpoint.java  |  2 +-
 .../org/apache/camel/component/seda/SedaEndpoint.java |  2 +-
 .../org/apache/camel/component/stub/StubEndpoint.java |  2 +-
 .../org/apache/camel/component/test/TestEndpoint.java |  2 +-
 .../apache/camel/component/timer/TimerEndpoint.java   |  2 +-
 .../camel/component/validator/ValidatorEndpoint.java  |  2 +-
 .../org/apache/camel/component/vm/VmEndpoint.java     |  2 +-
 .../org/apache/camel/component/xslt/XsltEndpoint.java |  2 +-
 .../camel/tools/apt/EndpointAnnotationProcessor.java  | 11 +++++++++++
 .../main/java/org/apache/camel/spi/UriEndpoint.java   | 14 ++++++++++++++
 25 files changed, 50 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/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 6da99c1..3d14299 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
@@ -34,7 +34,7 @@ import org.apache.camel.spi.UriPath;
  *
  * @version 
  */
-@UriEndpoint(scheme = "bean", producerOnly = true, label = "core,java")
+@UriEndpoint(scheme = "bean", syntax = "bean:beanName", producerOnly = true, label = "core,java")
 public class BeanEndpoint extends DefaultEndpoint {
     private transient BeanHolder beanHolder;
     private transient BeanProcessor processor;

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/beanclass/ClassEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/beanclass/ClassEndpoint.java
b/camel-core/src/main/java/org/apache/camel/component/beanclass/ClassEndpoint.java
index 3607192..9106406 100644
--- a/camel-core/src/main/java/org/apache/camel/component/beanclass/ClassEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/beanclass/ClassEndpoint.java
@@ -23,7 +23,7 @@ import org.apache.camel.spi.UriEndpoint;
 /**
  * Endpoint for the class component.
  */
-@UriEndpoint(scheme = "class", label = "core,java")
+@UriEndpoint(scheme = "class", syntax = "class:beanName", label = "core,java")
 public class ClassEndpoint extends BeanEndpoint {
 
     public ClassEndpoint(String endpointUri, Component component) {

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/binding/BindingEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/binding/BindingEndpoint.java
b/camel-core/src/main/java/org/apache/camel/component/binding/BindingEndpoint.java
index e9a1ad6..de2b1fe 100644
--- a/camel-core/src/main/java/org/apache/camel/component/binding/BindingEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/binding/BindingEndpoint.java
@@ -40,7 +40,7 @@ import static org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint;
  * before its sent to the endpoint and processes messages received by the endpoint consumer
before its passed
  * to the real consumer.
  */
-@UriEndpoint(scheme = "binding", consumerClass = BindingConsumerProcessor.class, label =
"core,transformation")
+@UriEndpoint(scheme = "binding", syntax = "binding:bindingName:delegateUri", consumerClass
= BindingConsumerProcessor.class, label = "core,transformation")
 public class BindingEndpoint extends DefaultEndpoint implements HasBinding {
 
     @UriPath @Metadata(required = "true")

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java
b/camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java
index 3cfac6f..0a063ee 100644
--- a/camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java
@@ -40,7 +40,7 @@ import org.apache.camel.spi.UriPath;
  *
  * @version 
  */
-@UriEndpoint(scheme = "browse", label = "core,monitoring")
+@UriEndpoint(scheme = "browse", syntax = "browse:name", label = "core,monitoring")
 public class BrowseEndpoint extends DefaultEndpoint implements BrowsableEndpoint {
 
     @UriPath(description = "A name which can be any string to uniquely identify the endpoint")
@Metadata(required = "true")

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/controlbus/ControlBusEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/controlbus/ControlBusEndpoint.java
b/camel-core/src/main/java/org/apache/camel/component/controlbus/ControlBusEndpoint.java
index d90c2c0..d8bc0b9 100644
--- a/camel-core/src/main/java/org/apache/camel/component/controlbus/ControlBusEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/controlbus/ControlBusEndpoint.java
@@ -33,12 +33,12 @@ import org.apache.camel.util.CamelLogger;
 /**
  * The control bus endpoint.
  */
-@UriEndpoint(scheme = "controlbus", producerOnly = true, label = "core,monitoring")
+@UriEndpoint(scheme = "controlbus", syntax = "controlbus:command:language", producerOnly
= true, label = "core,monitoring")
 public class ControlBusEndpoint extends DefaultEndpoint {
 
     @UriPath(description = "Command can be either route or language", enums = "route,language")
@Metadata(required = "true")
     private String command;
-    @UriPath
+    @UriPath(enums = "bean,constant,el,exchangeProperty,file,groovy,header,jsonpath,jxpath,mvel,ognl,ref,simple,spel,sql,terser,tokenize,xpath,xquery,xtokenize")
     private Language language;
     @UriParam
     private String routeId;

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatEndpoint.java
b/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatEndpoint.java
index 0fb1d02..2679b85 100644
--- a/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatEndpoint.java
@@ -32,7 +32,7 @@ import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriPath;
 import org.apache.camel.util.ServiceHelper;
 
-@UriEndpoint(scheme = "dataformat", producerOnly = true, label = "core,transformation")
+@UriEndpoint(scheme = "dataformat", syntax = "dataformat:name:operation", producerOnly =
true, label = "core,transformation")
 public class DataFormatEndpoint extends DefaultEndpoint {
 
     private MarshalProcessor marshal;

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java
b/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java
index 0aca20c..734dbdb 100644
--- a/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java
@@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory;
  *
  * @version 
  */
-@UriEndpoint(scheme = "dataset", consumerClass = DataSetConsumer.class, label = "core,testing")
+@UriEndpoint(scheme = "dataset", syntax = "dataset:name", consumerClass = DataSetConsumer.class,
label = "core,testing")
 public class DataSetEndpoint extends MockEndpoint implements Service {
     private final transient Logger log;
     private final AtomicInteger receivedCounter = new AtomicInteger();

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/direct/DirectEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/direct/DirectEndpoint.java
b/camel-core/src/main/java/org/apache/camel/component/direct/DirectEndpoint.java
index c2c4af7..eed6830 100644
--- a/camel-core/src/main/java/org/apache/camel/component/direct/DirectEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/direct/DirectEndpoint.java
@@ -36,7 +36,7 @@ import org.apache.camel.util.ObjectHelper;
  *
  * @version 
  */
-@UriEndpoint(scheme = "direct", consumerClass = DirectConsumer.class, label = "core,endpoint")
+@UriEndpoint(scheme = "direct", syntax = "direct:name", consumerClass = DirectConsumer.class,
label = "core,endpoint")
 public class DirectEndpoint extends DefaultEndpoint {
 
     private volatile Map<String, DirectConsumer> consumers;

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/directvm/DirectVmEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/directvm/DirectVmEndpoint.java
b/camel-core/src/main/java/org/apache/camel/component/directvm/DirectVmEndpoint.java
index 332989d..d2c0c36 100644
--- a/camel-core/src/main/java/org/apache/camel/component/directvm/DirectVmEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/directvm/DirectVmEndpoint.java
@@ -29,7 +29,7 @@ import org.apache.camel.spi.UriPath;
 /**
  * The direct-vm endpoint.
  */
-@UriEndpoint(scheme = "direct-vm", consumerClass = DirectConsumer.class, label = "core,endpoint")
+@UriEndpoint(scheme = "direct-vm", syntax = "direct-vm:name", consumerClass = DirectConsumer.class,
label = "core,endpoint")
 public class DirectVmEndpoint extends DefaultEndpoint {
 
     @UriPath(description = "Name of direct-vm endpoint") @Metadata(required = "true")

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
index 0137864..5b659ab 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
@@ -33,7 +33,7 @@ import org.apache.camel.util.ObjectHelper;
 /**
  * File endpoint.
  */
-@UriEndpoint(scheme = "file", consumerClass = FileConsumer.class, label = "core,file")
+@UriEndpoint(scheme = "file", syntax = "file:directoryName", consumerClass = FileConsumer.class,
label = "core,file")
 public class FileEndpoint extends GenericFileEndpoint<File> {
 
     private final FileOperations operations = new FileOperations(this);

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/language/LanguageEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/language/LanguageEndpoint.java
b/camel-core/src/main/java/org/apache/camel/component/language/LanguageEndpoint.java
index 6346873..77a64cb 100644
--- a/camel-core/src/main/java/org/apache/camel/component/language/LanguageEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/language/LanguageEndpoint.java
@@ -42,12 +42,12 @@ import org.apache.camel.util.ResourceHelper;
  *
  * @version 
  */
-@UriEndpoint(scheme = "language", producerOnly = true, label = "core,script")
+@UriEndpoint(scheme = "language", syntax = "language:languageName", producerOnly = true,
label = "core,script")
 public class LanguageEndpoint extends ResourceEndpoint {
     private Language language;
     private Expression expression;
     private boolean contentResolvedFromResource;
-    @UriPath @Metadata(required = "true")
+    @UriPath(enums = "bean,constant,el,exchangeProperty,file,groovy,header,jsonpath,jxpath,mvel,ognl,ref,simple,spel,sql,terser,tokenize,xpath,xquery,xtokenize")
@Metadata(required = "true")
     private String languageName;
     @UriParam
     private String script;

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/log/LogEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/log/LogEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/log/LogEndpoint.java
index dd2de3c..60b3344 100644
--- a/camel-core/src/main/java/org/apache/camel/component/log/LogEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/log/LogEndpoint.java
@@ -35,7 +35,7 @@ import org.slf4j.Logger;
 /**
  * Logger endpoint.
  */
-@UriEndpoint(scheme = "log", producerOnly = true, label = "core,monitoring")
+@UriEndpoint(scheme = "log", syntax = "log:loggerName", producerOnly = true, label = "core,monitoring")
 public class LogEndpoint extends ProcessorEndpoint {
 
     private volatile Processor logger;

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
index de3dcb2..363a1f1 100644
--- a/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
@@ -88,7 +88,7 @@ import org.slf4j.LoggerFactory;
  *
  * @version 
  */
-@UriEndpoint(scheme = "mock", producerOnly = true, label = "core,testing")
+@UriEndpoint(scheme = "mock", syntax = "mock:name", producerOnly = true, label = "core,testing")
 public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint {
     private static final Logger LOG = LoggerFactory.getLogger(MockEndpoint.class);
     // must be volatile so changes is visible between the thread which performs the assertions

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/ref/RefEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/ref/RefEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/ref/RefEndpoint.java
index 5aef973..c164a77 100644
--- a/camel-core/src/main/java/org/apache/camel/component/ref/RefEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/ref/RefEndpoint.java
@@ -28,7 +28,7 @@ import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriPath;
 import org.apache.camel.util.CamelContextHelper;
 
-@UriEndpoint(scheme = "ref", label = "core,endpoint")
+@UriEndpoint(scheme = "ref", syntax = "ref:name", label = "core,endpoint")
 public class RefEndpoint extends DefaultEndpoint implements DelegateEndpoint {
 
     private volatile Endpoint endpoint;

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/rest/RestEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/rest/RestEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/rest/RestEndpoint.java
index f845452..8bafb23 100644
--- a/camel-core/src/main/java/org/apache/camel/component/rest/RestEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/rest/RestEndpoint.java
@@ -34,7 +34,7 @@ import org.apache.camel.spi.UriPath;
 import org.apache.camel.util.HostUtils;
 import org.apache.camel.util.ObjectHelper;
 
-@UriEndpoint(scheme = "rest", consumerOnly = true, label = "core,http,rest")
+@UriEndpoint(scheme = "rest", syntax = "rest:method:path:uriTemplate", consumerOnly = true,
label = "core,http,rest")
 public class RestEndpoint extends DefaultEndpoint {
 
     @UriPath(enums = "get,post,put,delete,patch,head,trace,connect,options") @Metadata(required
= "true")

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/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 18a40a7..c39a53f 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
@@ -27,7 +27,7 @@ import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriPath;
 
-@UriEndpoint(scheme = "scheduler", consumerOnly = true, consumerClass = SchedulerConsumer.class,
label = "core,scheduling")
+@UriEndpoint(scheme = "scheduler", syntax = "scheduler:name", consumerOnly = true, consumerClass
= SchedulerConsumer.class, label = "core,scheduling")
 public class SchedulerEndpoint extends ScheduledPollEndpoint {
 
     @UriPath @Metadata(required = "true")

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/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 f21242f..86b71ca 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
@@ -56,7 +56,7 @@ import org.slf4j.LoggerFactory;
  * asynchronous SEDA exchanges on a {@link BlockingQueue} within a CamelContext
  */
 @ManagedResource(description = "Managed SedaEndpoint")
-@UriEndpoint(scheme = "seda", consumerClass = SedaConsumer.class, label = "core,endpoint")
+@UriEndpoint(scheme = "seda", syntax = "seda:name", consumerClass = SedaConsumer.class, label
= "core,endpoint")
 public class SedaEndpoint extends DefaultEndpoint implements BrowsableEndpoint, MultipleConsumersSupport
{
     private static final Logger LOG = LoggerFactory.getLogger(SedaEndpoint.class);
     private volatile BlockingQueue<Exchange> queue;

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/stub/StubEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/stub/StubEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/stub/StubEndpoint.java
index db159c6..50890f8 100644
--- a/camel-core/src/main/java/org/apache/camel/component/stub/StubEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/stub/StubEndpoint.java
@@ -26,7 +26,7 @@ import org.apache.camel.component.vm.VmConsumer;
 import org.apache.camel.component.vm.VmEndpoint;
 import org.apache.camel.spi.UriEndpoint;
 
-@UriEndpoint(scheme = "stub", consumerClass = VmConsumer.class, label = "core,testing")
+@UriEndpoint(scheme = "stub", syntax = "stub:name", consumerClass = VmConsumer.class, label
= "core,testing")
 public class StubEndpoint extends VmEndpoint {
 
     public StubEndpoint(String endpointUri, Component component, BlockingQueue<Exchange>
queue) {

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/test/TestEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/test/TestEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/test/TestEndpoint.java
index 0619550..b7eeae5 100644
--- a/camel-core/src/main/java/org/apache/camel/component/test/TestEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/test/TestEndpoint.java
@@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory;
  *
  * @version 
  */
-@UriEndpoint(scheme = "test", producerOnly = true, label = "core,testing")
+@UriEndpoint(scheme = "test", syntax = "test:name", producerOnly = true, label = "core,testing")
 public class TestEndpoint extends MockEndpoint {
     private static final Logger LOG = LoggerFactory.getLogger(TestEndpoint.class);
     private final Endpoint expectedMessageEndpoint;

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/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 b900c0d..ab8cf62 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
@@ -39,7 +39,7 @@ import org.apache.camel.spi.UriPath;
  * @version 
  */
 @ManagedResource(description = "Managed TimerEndpoint")
-@UriEndpoint(scheme = "timer", consumerOnly = true, consumerClass = TimerConsumer.class,
label = "core,scheduling")
+@UriEndpoint(scheme = "timer", syntax = "timer:timerName", consumerOnly = true, consumerClass
= TimerConsumer.class, label = "core,scheduling")
 public class TimerEndpoint extends DefaultEndpoint implements MultipleConsumersSupport {
     @UriPath @Metadata(required = "true")
     private String timerName;

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/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 24957fd..f6fe766 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
@@ -40,7 +40,7 @@ import org.apache.camel.util.ResourceHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@UriEndpoint(scheme = "validator", producerOnly = true, label = "core,validation")
+@UriEndpoint(scheme = "validator", syntax = "validator:resourceUri", producerOnly = true,
label = "core,validation")
 public class ValidatorEndpoint extends DefaultEndpoint {
 
     private static final Logger LOG = LoggerFactory.getLogger(ValidatorEndpoint.class);

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/camel-core/src/main/java/org/apache/camel/component/vm/VmEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/vm/VmEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/vm/VmEndpoint.java
index 13681e0..7c9e34b 100644
--- a/camel-core/src/main/java/org/apache/camel/component/vm/VmEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/vm/VmEndpoint.java
@@ -25,7 +25,7 @@ import org.apache.camel.component.seda.BlockingQueueFactory;
 import org.apache.camel.component.seda.SedaEndpoint;
 import org.apache.camel.spi.UriEndpoint;
 
-@UriEndpoint(scheme = "vm", consumerClass = VmConsumer.class, label = "core,endpoint")
+@UriEndpoint(scheme = "vm", syntax = "vm:name", consumerClass = VmConsumer.class, label =
"core,endpoint")
 public class VmEndpoint extends SedaEndpoint {
 
     public VmEndpoint(String endpointUri, Component component, BlockingQueue<Exchange>
queue) {

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/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 da89bad..9ddfe9a 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
@@ -44,7 +44,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @ManagedResource(description = "Managed XsltEndpoint")
-@UriEndpoint(scheme = "xslt", producerOnly = true, label = "core,transformation")
+@UriEndpoint(scheme = "xslt", syntax = "xslt:resourceUri", producerOnly = true, label = "core,transformation")
 public class XsltEndpoint extends ProcessorEndpoint {
 
     private static final Logger LOG = LoggerFactory.getLogger(XsltEndpoint.class);

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
index 4dd6bdb..f9f2e0f 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
@@ -180,6 +180,7 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor
{
         buffer.append("\n \"component\": {");
         buffer.append("\n    \"kind\": \"").append("component").append("\",");
         buffer.append("\n    \"scheme\": \"").append(componentModel.getScheme()).append("\",");
+        buffer.append("\n    \"syntax\": \"").append(componentModel.getSyntax()).append("\",");
         buffer.append("\n    \"description\": \"").append(componentModel.getDescription()).append("\",");
         buffer.append("\n    \"label\": \"").append(getOrElse(componentModel.getLabel(),
"")).append("\",");
         if (componentModel.isConsumerOnly()) {
@@ -330,6 +331,7 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor
{
 
     protected ComponentModel findComponentProperties(RoundEnvironment roundEnv, UriEndpoint
uriEndpoint, String scheme, String label) {
         ComponentModel model = new ComponentModel(scheme);
+        model.setSyntax(uriEndpoint.syntax());
         model.setLabel(label);
         model.setConsumerOnly(uriEndpoint.consumerOnly());
         model.setProducerOnly(uriEndpoint.producerOnly());
@@ -627,6 +629,7 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor
{
     private static final class ComponentModel {
 
         private String scheme;
+        private String syntax;
         private String javaType;
         private String description;
         private String groupId;
@@ -644,6 +647,14 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor
{
             return scheme;
         }
 
+        public String getSyntax() {
+            return syntax;
+        }
+
+        public void setSyntax(String syntax) {
+            this.syntax = syntax;
+        }
+
         public String getJavaType() {
             return javaType;
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/e1736f39/tooling/spi-annotations/src/main/java/org/apache/camel/spi/UriEndpoint.java
----------------------------------------------------------------------
diff --git a/tooling/spi-annotations/src/main/java/org/apache/camel/spi/UriEndpoint.java b/tooling/spi-annotations/src/main/java/org/apache/camel/spi/UriEndpoint.java
index 5bad0bd..e3b3bb2 100644
--- a/tooling/spi-annotations/src/main/java/org/apache/camel/spi/UriEndpoint.java
+++ b/tooling/spi-annotations/src/main/java/org/apache/camel/spi/UriEndpoint.java
@@ -41,6 +41,20 @@ public @interface UriEndpoint {
     String scheme();
 
     /**
+     * Represent the URI syntax the endpoint must use.
+     * <p/>
+     * The syntax follows the patterns such as:
+     * <ul>
+     *     <li>scheme:path[?options]</li>
+     *     <li>scheme:path:path[?options]</li>
+     *     <li>scheme:path:path/path[?options]</li>
+     *     <li>scheme:path:path/path/path[?options]</li>
+     * </ul>
+     * Where each path maps to the name of the endpoint {@link org.apache.camel.spi.UriPath}
option.
+     */
+    String syntax();
+
+    /**
      * Represents the consumer class which is injected and created by consumers
      */
     Class<?> consumerClass() default Object.class;


Mime
View raw message