camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/7] camel git commit: CAMEL-7999: Add label to @UriEndpoint so we can group endpoints.
Date Fri, 14 Nov 2014 12:02:19 GMT
CAMEL-7999: Add label to @UriEndpoint so we can group endpoints.


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

Branch: refs/heads/master
Commit: 636cbb5bf3441a57f50b0671eac03c79cdc85863
Parents: 6b07fa8
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Nov 14 10:03:16 2014 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Nov 14 13:02:05 2014 +0100

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


http://git-wip-us.apache.org/repos/asf/camel/blob/636cbb5b/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 c7b6de5..6b4605e 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
@@ -29,7 +29,7 @@ import org.apache.camel.spi.UriPath;
  *
  * @version 
  */
-@UriEndpoint(scheme = "bean")
+@UriEndpoint(scheme = "bean", label = "core,java")
 public class BeanEndpoint extends ProcessorEndpoint {
     private BeanHolder beanHolder;
     @UriPath

http://git-wip-us.apache.org/repos/asf/camel/blob/636cbb5b/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 dd4783b..3607192 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")
+@UriEndpoint(scheme = "class", label = "core,java")
 public class ClassEndpoint extends BeanEndpoint {
 
     public ClassEndpoint(String endpointUri, Component component) {

http://git-wip-us.apache.org/repos/asf/camel/blob/636cbb5b/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 f5ec434..b20afa7 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
@@ -35,7 +35,7 @@ import org.apache.camel.util.ServiceHelper;
  * 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)
+@UriEndpoint(scheme = "binding", consumerClass = BindingConsumerProcessor.class, label =
"core,transformation")
 public class BindingEndpoint extends DefaultEndpoint implements HasBinding {
     private final Binding binding;
     private final Endpoint delegate;

http://git-wip-us.apache.org/repos/asf/camel/blob/636cbb5b/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 73c4b6b..a0a8391 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
@@ -39,7 +39,7 @@ import org.apache.camel.spi.UriPath;
  *
  * @version 
  */
-@UriEndpoint(scheme = "browse")
+@UriEndpoint(scheme = "browse", label = "core,monitoring")
 public class BrowseEndpoint extends DefaultEndpoint implements BrowsableEndpoint {
 
     @UriPath(description = "A name which can be any string to uniquely identify the endpoint")

http://git-wip-us.apache.org/repos/asf/camel/blob/636cbb5b/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 467affd..951efed 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
@@ -32,7 +32,7 @@ import org.apache.camel.util.CamelLogger;
 /**
  * The control bus endpoint.
  */
-@UriEndpoint(scheme = "controlbus")
+@UriEndpoint(scheme = "controlbus", label = "core,monitoring")
 public class ControlBusEndpoint extends DefaultEndpoint {
 
     @UriPath(description = "Command can be either route or language")

http://git-wip-us.apache.org/repos/asf/camel/blob/636cbb5b/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 14599d2..2dbe86a 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.UriParam;
 import org.apache.camel.spi.UriPath;
 import org.apache.camel.util.ServiceHelper;
 
-@UriEndpoint(scheme = "dataformat")
+@UriEndpoint(scheme = "dataformat", label = "core,transformation")
 public class DataFormatEndpoint extends DefaultEndpoint {
 
     private MarshalProcessor marshal;

http://git-wip-us.apache.org/repos/asf/camel/blob/636cbb5b/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 c64d6df..7ed8e77 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
@@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory;
  *
  * @version 
  */
-@UriEndpoint(scheme = "dataset", consumerClass = DataSetConsumer.class)
+@UriEndpoint(scheme = "dataset", consumerClass = DataSetConsumer.class, label = "core,testing")
 public class DataSetEndpoint extends MockEndpoint implements Service {
     private final transient Logger log;
     @UriPath(name = "name", description = "name of DataSet to lookup in the registry")

http://git-wip-us.apache.org/repos/asf/camel/blob/636cbb5b/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 b6986d8..8075b7d 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
@@ -35,7 +35,7 @@ import org.apache.camel.util.ObjectHelper;
  *
  * @version 
  */
-@UriEndpoint(scheme = "direct", consumerClass = DirectConsumer.class)
+@UriEndpoint(scheme = "direct", consumerClass = DirectConsumer.class, label="core,java,endpoint")
 public class DirectEndpoint extends DefaultEndpoint {
 
     @UriPath(description = "Name of direct endpoint")

http://git-wip-us.apache.org/repos/asf/camel/blob/636cbb5b/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 c5c3af4..17fec96 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
@@ -28,7 +28,7 @@ import org.apache.camel.spi.UriPath;
 /**
  * The direct-vm endpoint.
  */
-@UriEndpoint(scheme = "direct-vm", consumerClass = DirectConsumer.class)
+@UriEndpoint(scheme = "direct-vm", consumerClass = DirectConsumer.class, label = "core,endpoint")
 public class DirectVmEndpoint extends DefaultEndpoint {
 
     @UriPath(description = "Name of direct-vm endpoint")

http://git-wip-us.apache.org/repos/asf/camel/blob/636cbb5b/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 645d733..00c2458 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
@@ -32,7 +32,7 @@ import org.apache.camel.util.ObjectHelper;
 /**
  * File endpoint.
  */
-@UriEndpoint(scheme = "file", consumerClass = FileConsumer.class)
+@UriEndpoint(scheme = "file", 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/636cbb5b/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 b025b05..f14088f 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
@@ -41,7 +41,7 @@ import org.apache.camel.util.ResourceHelper;
  *
  * @version 
  */
-@UriEndpoint(scheme = "language")
+@UriEndpoint(scheme = "language", label="core,script")
 public class LanguageEndpoint extends ResourceEndpoint {
     private Language language;
     private Expression expression;

http://git-wip-us.apache.org/repos/asf/camel/blob/636cbb5b/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 ca3c21e..cbde789 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
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 /**
  * Logger endpoint.
  */
-@UriEndpoint(scheme = "log")
+@UriEndpoint(scheme = "log", label="core,monitoring")
 public class LogEndpoint extends ProcessorEndpoint {
 
     private volatile Processor logger;

http://git-wip-us.apache.org/repos/asf/camel/blob/636cbb5b/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 71e127e..6ab1931 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
@@ -87,7 +87,7 @@ import org.slf4j.LoggerFactory;
  *
  * @version 
  */
-@UriEndpoint(scheme = "mock")
+@UriEndpoint(scheme = "mock", 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/636cbb5b/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 e9cc74e..4e0fceb 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
@@ -27,7 +27,7 @@ import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriPath;
 import org.apache.camel.util.CamelContextHelper;
 
-@UriEndpoint(scheme = "ref")
+@UriEndpoint(scheme = "ref", label = "core,endpoint")
 public class RefEndpoint extends DefaultEndpoint implements DelegateEndpoint {
 
     private volatile Endpoint endpoint;

http://git-wip-us.apache.org/repos/asf/camel/blob/636cbb5b/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 1e2aac8..c0e3a6e 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
@@ -32,7 +32,7 @@ import org.apache.camel.spi.UriParam;
 import org.apache.camel.util.HostUtils;
 import org.apache.camel.util.ObjectHelper;
 
-@UriEndpoint(scheme = "rest")
+@UriEndpoint(scheme = "rest", label="core,http,rest")
 public class RestEndpoint extends DefaultEndpoint {
 
     @UriParam

http://git-wip-us.apache.org/repos/asf/camel/blob/636cbb5b/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 36ed65a..74dbfa1 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
@@ -55,7 +55,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)
+@UriEndpoint(scheme = "seda", 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/636cbb5b/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 64d75ad..bd12cb1 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
@@ -27,7 +27,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)
+@UriEndpoint(scheme = "stub", 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/636cbb5b/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 7f2b53a..1f6a013 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
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
  *
  * @version 
  */
-@UriEndpoint(scheme = "test")
+@UriEndpoint(scheme = "test", 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/636cbb5b/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 8b2621c..2f38c2c 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
@@ -38,7 +38,7 @@ import org.apache.camel.spi.UriPath;
  * @version 
  */
 @ManagedResource(description = "Managed TimerEndpoint")
-@UriEndpoint(scheme = "timer", consumerClass = TimerConsumer.class)
+@UriEndpoint(scheme = "timer", consumerClass = TimerConsumer.class, label = "core,scheduling")
 public class TimerEndpoint extends DefaultEndpoint implements MultipleConsumersSupport {
     @UriPath
     private String timerName;

http://git-wip-us.apache.org/repos/asf/camel/blob/636cbb5b/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 8e260ba..87bc68d 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
@@ -39,7 +39,7 @@ import org.apache.camel.util.ResourceHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@UriEndpoint(scheme = "validator")
+@UriEndpoint(scheme = "validator", 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/636cbb5b/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 fb94a80..13681e0 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)
+@UriEndpoint(scheme = "vm", 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/636cbb5b/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 0e6b92b..2d4bf1f 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
@@ -43,7 +43,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @ManagedResource(description = "Managed XsltEndpoint")
-@UriEndpoint(scheme = "xslt")
+@UriEndpoint(scheme = "xslt", 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/636cbb5b/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 82b4313..0c28119 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
@@ -57,6 +57,7 @@ import org.apache.camel.spi.UriPath;
 import static org.apache.camel.tools.apt.IOHelper.loadText;
 import static org.apache.camel.tools.apt.JsonSchemaHelper.sanitizeDescription;
 import static org.apache.camel.tools.apt.Strings.canonicalClassName;
+import static org.apache.camel.tools.apt.Strings.getOrElse;
 import static org.apache.camel.tools.apt.Strings.isNullOrEmpty;
 
 /**
@@ -83,6 +84,7 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
         final UriEndpoint uriEndpoint = classElement.getAnnotation(UriEndpoint.class);
         if (uriEndpoint != null) {
             String scheme = uriEndpoint.scheme();
+            final String label = uriEndpoint.label();
             if (!isNullOrEmpty(scheme)) {
                 // support multiple schemes separated by comma, which maps to the exact same
component
                 // for example camel-mail has a bunch of component schema names that does
that
@@ -95,7 +97,7 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
                     Func1<PrintWriter, Void> handler = new Func1<PrintWriter, Void>()
{
                         @Override
                         public Void call(PrintWriter writer) {
-                            writeHtmlDocumentation(writer, roundEnv, classElement, uriEndpoint,
alias);
+                            writeHtmlDocumentation(writer, roundEnv, classElement, uriEndpoint,
alias, label);
                             return null;
                         }
                     };
@@ -106,7 +108,7 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
                     handler = new Func1<PrintWriter, Void>() {
                         @Override
                         public Void call(PrintWriter writer) {
-                            writeJSonSchemeDocumentation(writer, roundEnv, classElement,
uriEndpoint, alias);
+                            writeJSonSchemeDocumentation(writer, roundEnv, classElement,
uriEndpoint, alias, label);
                             return null;
                         }
                     };
@@ -116,7 +118,7 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
         }
     }
 
-    protected void writeHtmlDocumentation(PrintWriter writer, RoundEnvironment roundEnv,
TypeElement classElement, UriEndpoint uriEndpoint, String scheme) {
+    protected void writeHtmlDocumentation(PrintWriter writer, RoundEnvironment roundEnv,
TypeElement classElement, UriEndpoint uriEndpoint, String scheme, String label) {
         writer.println("<html>");
         writer.println("<header>");
         String title = scheme + " endpoint";
@@ -125,6 +127,15 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
         writer.println("<body>");
         writer.println("<h1>" + title + "</h1>");
 
+        if (label != null) {
+            String[] labels = label.split(",");
+            writer.println("<ul>");
+            for (String text : labels) {
+                writer.println("<li>" + text + "</li>");
+            }
+            writer.println("</ul>");
+        }
+
         showDocumentationAndFieldInjections(writer, roundEnv, classElement, "");
 
         // This code is not my fault, it seems to honestly be the hacky way to find a class
name in APT :)
@@ -137,7 +148,7 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
 
         boolean found = false;
         String consumerClassName = null;
-        String consumerPrefix = Strings.getOrElse(uriEndpoint.consumerPrefix(), "");
+        String consumerPrefix = getOrElse(uriEndpoint.consumerPrefix(), "");
         if (consumerType != null) {
             consumerClassName = consumerType.toString();
             TypeElement consumerElement = findTypeElement(roundEnv, consumerClassName);
@@ -154,9 +165,9 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
         writer.println("</html>");
     }
 
-    protected void writeJSonSchemeDocumentation(PrintWriter writer, RoundEnvironment roundEnv,
TypeElement classElement, UriEndpoint uriEndpoint, String scheme) {
+    protected void writeJSonSchemeDocumentation(PrintWriter writer, RoundEnvironment roundEnv,
TypeElement classElement, UriEndpoint uriEndpoint, String scheme, String label) {
         // gather component information
-        ComponentModel componentModel = findComponentProperties(roundEnv, scheme);
+        ComponentModel componentModel = findComponentProperties(roundEnv, scheme, label);
 
         // get endpoint information which is divided into paths and options (though there
should really only be one path)
         Set<EndpointPath> endpointPaths = new LinkedHashSet<>();
@@ -173,6 +184,7 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
         buffer.append("\n \"component\": {");
         buffer.append("\n    \"scheme\": \"").append(componentModel.getScheme()).append("\",");
         buffer.append("\n    \"description\": \"").append(componentModel.getDescription()).append("\",");
+        buffer.append("\n    \"label\": \"").append(getOrElse(componentModel.getLabel(),
"")).append("\"");
         buffer.append("\n    \"javaType\": \"").append(componentModel.getJavaType()).append("\",");
         buffer.append("\n    \"groupId\": \"").append(componentModel.getGroupId()).append("\",");
         buffer.append("\n    \"artifactId\": \"").append(componentModel.getArtifactId()).append("\",");
@@ -263,8 +275,9 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
         }
     }
 
-    protected ComponentModel findComponentProperties(RoundEnvironment roundEnv, String scheme)
{
+    protected ComponentModel findComponentProperties(RoundEnvironment roundEnv, String scheme,
String label) {
         ComponentModel model = new ComponentModel(scheme);
+        model.setLabel(label);
 
         String data = loadResource("META-INF/services/org/apache/camel/component", scheme);
         if (data != null) {
@@ -598,6 +611,7 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
         private String groupId;
         private String artifactId;
         private String versionId;
+        private String label;
 
         private ComponentModel(String scheme) {
             this.scheme = scheme;
@@ -646,6 +660,14 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
         public void setVersionId(String versionId) {
             this.versionId = versionId;
         }
+
+        public String getLabel() {
+            return label;
+        }
+
+        public void setLabel(String label) {
+            this.label = label;
+        }
     }
 
     private static final class EndpointOption {

http://git-wip-us.apache.org/repos/asf/camel/blob/636cbb5b/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 9342431..5b3f3fe 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
@@ -33,7 +33,10 @@ import java.lang.annotation.Target;
 public @interface UriEndpoint {
 
     /**
-     * Represents the URI scheme name of this endpoint
+     * Represents the URI scheme name of this endpoint.
+     * <p/>
+     * Multiple scheme names can be defined as a comma separated value.
+     * For example to associate <tt>http</tt> and <tt>https</tt>
to the same endpoint implementation.
      */
     String scheme();
 
@@ -47,4 +50,13 @@ public @interface UriEndpoint {
      * properties from the consumer properties
      */
     String consumerPrefix() default "";
+
+    /**
+     * To associate this endpoint with label(s).
+     * <p/>
+     * Multiple labels can be defined as a comma separated value.
+     * <p/>
+     * The labels is intended for grouping the endpoints, such as <tt>core</tt>,
<tt>file</tt>, <tt>messaging</tt>, <tt>database</tt>,
etc.
+     */
+    String label() default "";
 }
\ No newline at end of file


Mime
View raw message