Repository: camel
Updated Branches:
  refs/heads/master cfc2f479b -> 3e194e048


CAMEL-7999: Include docs for binding component at build time


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

Branch: refs/heads/master
Commit: 0b077e3e531fcde0568f87307d1c9858c1dfe570
Parents: cfc2f47
Author: Claus Ibsen <davscl...@apache.org>
Authored: Mon Nov 10 15:31:44 2014 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Mon Nov 10 19:21:47 2014 +0100

----------------------------------------------------------------------
 .../camel/component/binding/BindingComponent.java       |  3 +++
 .../apache/camel/component/binding/BindingEndpoint.java |  2 ++
 .../camel/component/binding/BindingNameComponent.java   | 12 ++++++++++--
 .../org/apache/camel/tools/apt/JsonSchemaHelper.java    |  2 +-
 4 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0b077e3e/camel-core/src/main/java/org/apache/camel/component/binding/BindingComponent.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/main/java/org/apache/camel/component/binding/BindingComponent.java
 
b/camel-core/src/main/java/org/apache/camel/component/binding/BindingComponent.java
index f3497ba..b1e8264 100644
--- 
a/camel-core/src/main/java/org/apache/camel/component/binding/BindingComponent.java
+++ 
b/camel-core/src/main/java/org/apache/camel/component/binding/BindingComponent.java
@@ -30,7 +30,10 @@ import static 
org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint;
  * A composite {@link org.apache.camel.Component} which creates a {@link 
BindingEndpoint} from a
  * configured {@link Binding} instance and using the optional {@link 
#setUriPrefix(String)}
  * and {@link #setUriPostfix(String)} to create the underlying endpoint from 
the remaining URI
+ *
+ * @deprecated use {@link 
org.apache.camel.component.binding.BindingNameComponent}
  */
+@Deprecated
 public class BindingComponent extends DefaultComponent {
     private Binding binding;
     private String uriPrefix;

http://git-wip-us.apache.org/repos/asf/camel/blob/0b077e3e/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 65707c1..f5ec434 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
@@ -27,6 +27,7 @@ import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.processor.PipelineHelper;
 import org.apache.camel.spi.Binding;
 import org.apache.camel.spi.HasBinding;
+import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.util.ServiceHelper;
 
 /**
@@ -34,6 +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)
 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/0b077e3e/camel-core/src/main/java/org/apache/camel/component/binding/BindingNameComponent.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/main/java/org/apache/camel/component/binding/BindingNameComponent.java
 
b/camel-core/src/main/java/org/apache/camel/component/binding/BindingNameComponent.java
index 211b56b..558e0f7 100644
--- 
a/camel-core/src/main/java/org/apache/camel/component/binding/BindingNameComponent.java
+++ 
b/camel-core/src/main/java/org/apache/camel/component/binding/BindingNameComponent.java
@@ -20,20 +20,27 @@ import java.util.Map;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
-import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.impl.UriEndpointComponent;
 import org.apache.camel.spi.Binding;
 import org.apache.camel.util.CamelContextHelper;
 
 import static org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint;
 
 /**
+ * To compose a Camel component with a Camel data-format as a single binding 
unit.
+ * <p/>
  * A Binding component using the URI form 
<code>binding:nameOfBinding:endpointURI</code>
  * to extract the binding name which is then resolved from the registry and 
used to create a
  * {@link BindingEndpoint} from the underlying {@link Endpoint}
  */
-public class BindingNameComponent extends DefaultComponent {
+public class BindingNameComponent extends UriEndpointComponent {
+
     protected static final String BAD_FORMAT_MESSAGE = "URI should be of the 
format binding:nameOfBinding:endpointURI";
 
+    public BindingNameComponent() {
+        super(BindingEndpoint.class);
+    }
+
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, 
Map<String, Object> parameters) throws Exception {
         CamelContext camelContext = getCamelContext();
@@ -50,4 +57,5 @@ public class BindingNameComponent extends DefaultComponent {
         Endpoint delegate = getMandatoryEndpoint(camelContext, delegateURI);
         return new BindingEndpoint(uri, this, binding,  delegate);
     }
+
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/0b077e3e/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java
----------------------------------------------------------------------
diff --git 
a/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java 
b/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java
index 10b4649..12de1ab 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java
@@ -23,7 +23,7 @@ import java.util.Set;
  */
 final class JsonSchemaHelper {
 
-    private static final String VALID_CHARS = ".-='/\\!&()";
+    private static final String VALID_CHARS = ".-='/\\!&():;";
 
     private JsonSchemaHelper() {
     }

Reply via email to