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/01/04 11:24:56 UTC

[1/6] camel git commit: CAMEL-7999: More components include documentation

Repository: camel
Updated Branches:
  refs/heads/master 43c81d4f5 -> f8d290765


CAMEL-7999: More components include documentation


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

Branch: refs/heads/master
Commit: 362c8bcd64ea0e614f4a2b5f40e3157c3e1f5543
Parents: 43c81d4
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Jan 4 10:39:00 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Jan 4 10:39:00 2015 +0100

----------------------------------------------------------------------
 .../camel/component/xmlsecurity/XmlCommand.java | 22 +++++++++++++
 .../xmlsecurity/XmlSignatureComponent.java      | 15 ++++++---
 .../xmlsecurity/XmlSignatureEndpoint.java       | 33 +++++++++++++++++++-
 .../processor/XmlSignatureConfiguration.java    | 13 ++++++--
 .../processor/XmlSignerConfiguration.java       | 21 +++++++++++++
 .../processor/XmlVerifierConfiguration.java     | 18 +++++++++--
 6 files changed, 112 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/362c8bcd/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/XmlCommand.java
----------------------------------------------------------------------
diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/XmlCommand.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/XmlCommand.java
new file mode 100644
index 0000000..c27d5d9
--- /dev/null
+++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/XmlCommand.java
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.xmlsecurity;
+
+public enum XmlCommand {
+
+    sign, verify
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/362c8bcd/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/XmlSignatureComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/XmlSignatureComponent.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/XmlSignatureComponent.java
index 886a695..eb27b38 100644
--- a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/XmlSignatureComponent.java
+++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/XmlSignatureComponent.java
@@ -24,21 +24,21 @@ import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
 import org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration;
 import org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration;
-import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.impl.UriEndpointComponent;
 import org.apache.camel.util.ObjectHelper;
 
-
-public class XmlSignatureComponent extends DefaultComponent {
+public class XmlSignatureComponent extends UriEndpointComponent {
 
     private XmlSignerConfiguration signerConfiguration;
 
     private XmlVerifierConfiguration verifierConfiguration;
 
     public XmlSignatureComponent() {
+        super(XmlSignatureEndpoint.class);
     }
 
     public XmlSignatureComponent(CamelContext context) {
-        super(context);
+        super(context, XmlSignatureEndpoint.class);
     }
 
     @Override
@@ -47,8 +47,11 @@ public class XmlSignatureComponent extends DefaultComponent {
         ObjectHelper.notNull(getCamelContext(), "CamelContext");
 
         String scheme;
+        String name;
         try {
-            scheme = new URI(remaining).getScheme();
+            URI u = new URI(remaining);
+            scheme = u.getScheme();
+            name = u.getPath();
         } catch (Exception e) {
             throw new MalformedURLException(
                 String.format(
@@ -76,6 +79,8 @@ public class XmlSignatureComponent extends DefaultComponent {
         }
         setProperties(endpoint.getConfiguration(), parameters);
         endpoint.getConfiguration().setCamelContext(getCamelContext());
+        endpoint.setCommand(XmlCommand.valueOf(scheme));
+        endpoint.setName(name);
         return endpoint;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/362c8bcd/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/XmlSignatureEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/XmlSignatureEndpoint.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/XmlSignatureEndpoint.java
index 3633f04..027928d 100644
--- a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/XmlSignatureEndpoint.java
+++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/XmlSignatureEndpoint.java
@@ -17,21 +17,52 @@
 package org.apache.camel.component.xmlsecurity;
 
 import java.util.Map;
-
 import javax.xml.crypto.URIDereferencer;
 
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.component.xmlsecurity.processor.XmlSignatureConfiguration;
+import org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration;
+import org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration;
 import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
 
+@UriEndpoint(scheme = "xmlsecurity", label = "security,transformation")
 public abstract class XmlSignatureEndpoint extends DefaultEndpoint {
 
+    @UriPath
+    private XmlCommand command;
+    @UriPath
+    private String name;
+    // to include both kind of configuration params
+    @UriParam
+    private XmlSignerConfiguration signerConfiguration;
+    @UriParam
+    private XmlVerifierConfiguration verifierConfiguration;
+
     public XmlSignatureEndpoint(String uri, XmlSignatureComponent component) {
         super(uri, component);
     }
 
+    public XmlCommand getCommand() {
+        return command;
+    }
+
+    public void setCommand(XmlCommand command) {
+        this.command = command;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
     @Override
     public Producer createProducer() {
         return new XmlSignatureProducer(this, createProcessor());

http://git-wip-us.apache.org/repos/asf/camel/blob/362c8bcd/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureConfiguration.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureConfiguration.java
index b752e0a..2289220 100644
--- a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureConfiguration.java
+++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureConfiguration.java
@@ -17,7 +17,6 @@
 package org.apache.camel.component.xmlsecurity.processor;
 
 import java.util.Map;
-
 import javax.xml.crypto.URIDereferencer;
 import javax.xml.crypto.XMLCryptoContext;
 import javax.xml.crypto.dsig.XMLSignContext;
@@ -26,25 +25,35 @@ import javax.xml.crypto.dsig.XMLValidateContext;
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelContextAware;
 import org.apache.camel.component.xmlsecurity.api.XmlSignatureConstants;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
 
+@UriParams
 public abstract class XmlSignatureConfiguration implements Cloneable, CamelContextAware {
 
     private CamelContext context;
 
     private URIDereferencer uriDereferencer;
 
+    @UriParam
     private String baseUri;
 
+    @UriParam
     private Map<String, ? extends Object> cryptoContextProperties;
 
+    @UriParam(defaultValue = "true")
     private Boolean disallowDoctypeDecl = Boolean.TRUE;
 
+    @UriParam(defaultValue = "false")
     private Boolean omitXmlDeclaration = Boolean.FALSE;
 
+    @UriParam(defaultValue = "true")
     private Boolean clearHeaders = Boolean.TRUE;
 
+    @UriParam
     private String schemaResourceUri;
-    
+
+    @UriParam
     private String outputXmlEncoding;
 
     public XmlSignatureConfiguration() {

http://git-wip-us.apache.org/repos/asf/camel/blob/362c8bcd/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignerConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignerConfiguration.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignerConfiguration.java
index 37acb5f..3872349 100644
--- a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignerConfiguration.java
+++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignerConfiguration.java
@@ -32,9 +32,13 @@ import org.apache.camel.component.xmlsecurity.api.XmlSignatureConstants;
 import org.apache.camel.component.xmlsecurity.api.XmlSignatureHelper;
 import org.apache.camel.component.xmlsecurity.api.XmlSignatureProperties;
 import org.apache.camel.component.xmlsecurity.api.XmlSignatureTransform;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
 
+@UriParams
 public class XmlSignerConfiguration extends XmlSignatureConfiguration {
 
+    @UriParam
     private KeyAccessor keyAccessor;
 
     /**
@@ -42,6 +46,7 @@ public class XmlSignerConfiguration extends XmlSignatureConfiguration {
      * {@link CanonicalizationMethod#INCLUSIVE}.
      * 
      */
+    @UriParam
     private AlgorithmMethod canonicalizationMethod = new XmlSignatureTransform(CanonicalizationMethod.INCLUSIVE);
 
     /**
@@ -51,6 +56,7 @@ public class XmlSignerConfiguration extends XmlSignatureConfiguration {
     private List<AlgorithmMethod> transformMethods = Collections.singletonList(XmlSignatureHelper
             .getCanonicalizationMethod(CanonicalizationMethod.INCLUSIVE));
 
+    @UriParam
     private String signatureAlgorithm = "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
 
     /**
@@ -59,15 +65,20 @@ public class XmlSignerConfiguration extends XmlSignatureConfiguration {
      * is not specified then the digest algorithm is calculated from the
      * signature algorithm. Example: "http://www.w3.org/2001/04/xmlenc#sha256"
      */
+    @UriParam
     private String digestAlgorithm;
 
+    @UriParam(defaultValue = "true")
     private Boolean addKeyInfoReference = Boolean.TRUE;
 
+    @UriParam(defaultValue = "ds")
     private String prefixForXmlSignatureNamespace = "ds";
 
+    @UriParam
     private String contentObjectId;
 
     // default value is null so that a unique ID is generated.
+    @UriParam
     private String signatureId;
 
     /**
@@ -77,6 +88,7 @@ public class XmlSignerConfiguration extends XmlSignatureConfiguration {
      * schema (see {@link #setSchemaResourceUri(String)}. Will be ignored in the
      * enveloping and detached case.
      */
+    @UriParam
     private String contentReferenceUri;
 
     /**
@@ -84,10 +96,13 @@ public class XmlSignerConfiguration extends XmlSignatureConfiguration {
      * This value can be overwritten by the header
      * {@link XmlSignatureConstants#HEADER_CONTENT_REFERENCE_TYPE}.
      */
+    @UriParam
     private String contentReferenceType;
 
+    @UriParam
     private String parentLocalName;
 
+    @UriParam
     private String parentNamespace;
 
     /**
@@ -96,6 +111,7 @@ public class XmlSignerConfiguration extends XmlSignatureConfiguration {
      * value can be overwritten by the header
      * {@link XmlSignatureConstants#HEADER_MESSAGE_IS_PLAIN_TEXT}.
      */
+    @UriParam(defaultValue = "false")
     private Boolean plainText = Boolean.FALSE;
 
     /**
@@ -103,6 +119,7 @@ public class XmlSignerConfiguration extends XmlSignatureConfiguration {
      * text (see parameter {@link #plainText}. Default value is "UTF-8".
      * 
      */
+    @UriParam
     private String plainTextEncoding = "UTF-8";
 
     private XmlSignatureProperties properties;
@@ -112,9 +129,13 @@ public class XmlSignerConfiguration extends XmlSignatureConfiguration {
     private XPathFilterParameterSpec parentXpath;
 
     /* references that should be resolved when the context changes */
+    @UriParam
     private String keyAccessorName;
+    @UriParam
     private String canonicalizationMethodName;
+    @UriParam
     private String transformMethodsName;
+    @UriParam
     private String propertiesName;
 
     public XmlSignerConfiguration() {

http://git-wip-us.apache.org/repos/asf/camel/blob/362c8bcd/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlVerifierConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlVerifierConfiguration.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlVerifierConfiguration.java
index c7da6cb..4ec50ca 100644
--- a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlVerifierConfiguration.java
+++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlVerifierConfiguration.java
@@ -25,31 +25,45 @@ import org.apache.camel.component.xmlsecurity.api.DefaultXmlSignature2Message;
 import org.apache.camel.component.xmlsecurity.api.ValidationFailedHandler;
 import org.apache.camel.component.xmlsecurity.api.XmlSignature2Message;
 import org.apache.camel.component.xmlsecurity.api.XmlSignatureChecker;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
 
 public class XmlVerifierConfiguration extends XmlSignatureConfiguration {
 
+    @UriParam
     private KeySelector keySelector;
 
+    @UriParam
     private String keySelectorName;
 
+    @UriParam
     private XmlSignatureChecker xmlSignatureChecker;
 
+    @UriParam
     private String xmlSignatureCheckerName;
 
+    @UriParam
     private XmlSignature2Message xmlSignature2Message = new DefaultXmlSignature2Message();
 
+    @UriParam
     private String xmlSignature2MessageName;
 
+    @UriParam
     private ValidationFailedHandler validationFailedHandler = new DefaultValidationFailedHandler();
 
+    @UriParam
     private String validationFailedHandlerName;
 
+    @UriParam
     private Object outputNodeSearch;
 
+    @UriParam(defaultValue = DefaultXmlSignature2Message.OUTPUT_NODE_SEARCH_TYPE_DEFAULT)
     private String outputNodeSearchType = DefaultXmlSignature2Message.OUTPUT_NODE_SEARCH_TYPE_DEFAULT;
 
+    @UriParam(defaultValue = "false")
     private Boolean removeSignatureElements = Boolean.FALSE;
-    
+
+    @UriParam(defaultValue = "false")
     private Boolean secureValidation = Boolean.TRUE;
 
     public XmlVerifierConfiguration() {
@@ -192,7 +206,7 @@ public class XmlVerifierConfiguration extends XmlSignatureConfiguration {
     /**
      * Determines the search type for determining the output node which is
      * serialized into the output message bodyF. See
-     * {@link #setOutputNodeSearch(String)}. The supported default search types
+     * {@link #setOutputNodeSearch(Object)}. The supported default search types
      * you can find in {@link DefaultXmlSignature2Message}.
      * 
      * @param outputNodeSearchType


[6/6] camel git commit: CAMEL-7999: More components include documentation

Posted by da...@apache.org.
CAMEL-7999: More components include documentation


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

Branch: refs/heads/master
Commit: f8d29076595a43974aff282e59d07b1c82445c76
Parents: cc119b4
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Jan 4 11:24:17 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Jan 4 11:24:17 2015 +0100

----------------------------------------------------------------------
 .../spring/batch/SpringBatchComponent.java      | 15 +++++++-------
 .../spring/batch/SpringBatchEndpoint.java       | 21 ++++++++++++++++----
 2 files changed, 24 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f8d29076/components/camel-spring-batch/src/main/java/org/apache/camel/component/spring/batch/SpringBatchComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-batch/src/main/java/org/apache/camel/component/spring/batch/SpringBatchComponent.java b/components/camel-spring-batch/src/main/java/org/apache/camel/component/spring/batch/SpringBatchComponent.java
index bac2fb9..7e4a23c 100644
--- a/components/camel-spring-batch/src/main/java/org/apache/camel/component/spring/batch/SpringBatchComponent.java
+++ b/components/camel-spring-batch/src/main/java/org/apache/camel/component/spring/batch/SpringBatchComponent.java
@@ -19,25 +19,24 @@ package org.apache.camel.component.spring.batch;
 import java.util.Map;
 
 import org.apache.camel.Endpoint;
-import org.apache.camel.impl.DefaultComponent;
-import org.apache.camel.util.CamelContextHelper;
-import org.springframework.batch.core.Job;
+import org.apache.camel.impl.UriEndpointComponent;
 import org.springframework.batch.core.launch.JobLauncher;
 
-public class SpringBatchComponent extends DefaultComponent {
+public class SpringBatchComponent extends UriEndpointComponent {
 
     private static final String DEFAULT_JOB_LAUNCHER_REF_NAME = "jobLauncher";
 
     private JobLauncher jobLauncher;
-
     private JobLauncher defaultResolvedJobLauncher;
-
     private Map<String, JobLauncher> allResolvedJobLaunchers;
 
+    public SpringBatchComponent() {
+        super(SpringBatchEndpoint.class);
+    }
+
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
-        Job resolvedJob = CamelContextHelper.mandatoryLookup(getCamelContext(), remaining, Job.class);
-        SpringBatchEndpoint endpoint = new SpringBatchEndpoint(uri, this, jobLauncher, defaultResolvedJobLauncher, allResolvedJobLaunchers, resolvedJob);
+        SpringBatchEndpoint endpoint = new SpringBatchEndpoint(uri, this, jobLauncher, defaultResolvedJobLauncher, allResolvedJobLaunchers, remaining);
         setProperties(endpoint, parameters);
         return endpoint;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/f8d29076/components/camel-spring-batch/src/main/java/org/apache/camel/component/spring/batch/SpringBatchEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-batch/src/main/java/org/apache/camel/component/spring/batch/SpringBatchEndpoint.java b/components/camel-spring-batch/src/main/java/org/apache/camel/component/spring/batch/SpringBatchEndpoint.java
index dfe525f..e4ac38c 100644
--- a/components/camel-spring-batch/src/main/java/org/apache/camel/component/spring/batch/SpringBatchEndpoint.java
+++ b/components/camel-spring-batch/src/main/java/org/apache/camel/component/spring/batch/SpringBatchEndpoint.java
@@ -23,34 +23,44 @@ import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
+import org.apache.camel.util.CamelContextHelper;
 import org.springframework.batch.core.Job;
 import org.springframework.batch.core.launch.JobLauncher;
 
+@UriEndpoint(scheme = "spring-batch", label = "spring,batch,scheduling")
 public class SpringBatchEndpoint extends DefaultEndpoint {
 
+    @UriPath
+    private String jobName;
+
     /**
      * @deprecated will be removed in Camel 3.0
      * use jobLauncher instead
      */
+    @Deprecated
     private String jobLauncherRef;
 
+    @UriParam
     private JobLauncher jobLauncher;
 
+    @UriParam
     private JobLauncher defaultResolvedJobLauncher;
 
     private Map<String, JobLauncher> allResolvedJobLaunchers;
 
-    private final Job job;
+    private Job job;
 
     public SpringBatchEndpoint(String endpointUri, Component component,
                                JobLauncher jobLauncher, JobLauncher defaultResolvedJobLauncher,
-                               Map<String, JobLauncher> allResolvedJobLaunchers,
-                               Job job) {
+                               Map<String, JobLauncher> allResolvedJobLaunchers, String jobName) {
         super(endpointUri, component);
         this.jobLauncher = jobLauncher;
         this.defaultResolvedJobLauncher = defaultResolvedJobLauncher;
         this.allResolvedJobLaunchers = allResolvedJobLaunchers;
-        this.job = job;
+        this.jobName = jobName;
     }
 
     @Override
@@ -73,6 +83,9 @@ public class SpringBatchEndpoint extends DefaultEndpoint {
         if (jobLauncher == null) {
             jobLauncher = resolveJobLauncher();
         }
+        if (job == null && jobName != null) {
+            job = CamelContextHelper.mandatoryLookup(getCamelContext(), jobName, Job.class);
+        }
     }
 
     private JobLauncher resolveJobLauncher() {


[4/6] camel git commit: CAMEL-7999: More components include documentation

Posted by da...@apache.org.
CAMEL-7999: More components include documentation


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

Branch: refs/heads/master
Commit: be25326c99e8c376eadc154398b7964a8056f9a2
Parents: 0eaff17
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Jan 4 11:06:54 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Jan 4 11:06:54 2015 +0100

----------------------------------------------------------------------
 .../component/springldap/SpringLdapComponent.java  | 17 +++++++++--------
 .../component/springldap/SpringLdapEndpoint.java   | 13 +++++++++----
 2 files changed, 18 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/be25326c/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapComponent.java b/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapComponent.java
index 6447c4c..307ec0b 100644
--- a/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapComponent.java
+++ b/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapComponent.java
@@ -20,14 +20,18 @@ 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.Registry;
 import org.springframework.ldap.core.LdapTemplate;
 
 /**
  * Creates endpoints for the Spring LDAP component.
  */
-public class SpringLdapComponent extends DefaultComponent {
+public class SpringLdapComponent extends UriEndpointComponent {
+
+    public SpringLdapComponent() {
+        super(SpringLdapEndpoint.class);
+    }
 
     /**
      * creates a Spring LDAP endpoint
@@ -37,17 +41,14 @@ public class SpringLdapComponent extends DefaultComponent {
      * 'operation' is defined in org.apache.camel.component.springldap.LdapOperation.
      * 'scope' must be one of "object", "onelevel", or "subtree".
      */
-    
     @Override
-    protected Endpoint createEndpoint(String uri, String remaining,
-            Map<String, Object> parameters) throws Exception {
+    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
         CamelContext camelContext = getCamelContext();
+
         Registry registry = camelContext.getRegistry();
-        LdapTemplate ldapTemplate = registry.lookupByNameAndType(remaining,
-                LdapTemplate.class);
+        LdapTemplate ldapTemplate = registry.lookupByNameAndType(remaining, LdapTemplate.class);
 
         Endpoint endpoint = new SpringLdapEndpoint(remaining, ldapTemplate);
-
         setProperties(endpoint, parameters);
         return endpoint;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/be25326c/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapEndpoint.java b/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapEndpoint.java
index 8b3c663..3b62a3e 100644
--- a/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapEndpoint.java
+++ b/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapEndpoint.java
@@ -19,15 +19,18 @@ package org.apache.camel.component.springldap;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
-
 import javax.naming.directory.SearchControls;
 
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
 import org.springframework.ldap.core.LdapTemplate;
 
+@UriEndpoint(scheme = "spring-ldap", label = "spring,ldap")
 public class SpringLdapEndpoint extends DefaultEndpoint {
 
     private static final String OBJECT_SCOPE_NAME = "object";
@@ -38,9 +41,12 @@ public class SpringLdapEndpoint extends DefaultEndpoint {
     private static Map<String, Integer> scopeMap;
 
     private LdapTemplate ldapTemplate;
+    @UriPath
+    private String templateName;
+    @UriParam
     private LdapOperation operation;
+    @UriParam(defaultValue = "2")
     private int scope = SearchControls.SUBTREE_SCOPE;
-    private String templateName;
 
     /**
      * Initializes the SpringLdapEndpoint using the provided template
@@ -107,8 +113,7 @@ public class SpringLdapEndpoint extends DefaultEndpoint {
     }
 
     /**
-     * sets the scope of the LDAP operation. The scope string must be one of "object", "onelevel", or "subtree"
-     * @param scope
+     * sets the scope of the LDAP operation. The scope string must be one of "object = 0", "onelevel = 1", or "subtree = 2"
      */
     public void setScope(String scope) {
         for (Entry<String, Integer> allowedScope : scopeMap.entrySet()) {


[3/6] camel git commit: CAMEL-7999: More components include documentation

Posted by da...@apache.org.
CAMEL-7999: More components include documentation


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

Branch: refs/heads/master
Commit: 0eaff17fe75c2dd47eb2b29a166d68be706a1436
Parents: 48e7ab5
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Jan 4 11:01:36 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Jan 4 11:01:36 2015 +0100

----------------------------------------------------------------------
 .../spring/integration/SpringIntegrationComponent.java   |  8 ++++++--
 .../spring/integration/SpringIntegrationEndpoint.java    | 11 ++++++++++-
 2 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0eaff17f/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationComponent.java b/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationComponent.java
index 70cbf8f..24daa26 100644
--- a/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationComponent.java
+++ b/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationComponent.java
@@ -18,14 +18,18 @@ package org.apache.camel.component.spring.integration;
 
 import java.util.Map;
 
-import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.impl.UriEndpointComponent;
 
 /**
  * Represents the component that manages {@link SpringIntegrationEndpoint}.
  *
  * @version 
  */
-public class SpringIntegrationComponent extends DefaultComponent {
+public class SpringIntegrationComponent extends UriEndpointComponent {
+
+    public SpringIntegrationComponent() {
+        super(SpringIntegrationEndpoint.class);
+    }
 
     protected SpringIntegrationEndpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
         SpringIntegrationEndpoint endpoint = new SpringIntegrationEndpoint(uri, remaining, this);

http://git-wip-us.apache.org/repos/asf/camel/blob/0eaff17f/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationEndpoint.java b/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationEndpoint.java
index 39d83ea..fc687c0 100644
--- a/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationEndpoint.java
+++ b/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationEndpoint.java
@@ -21,6 +21,9 @@ import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
 import org.apache.camel.spring.SpringCamelContext;
 import org.springframework.integration.MessageChannel;
 
@@ -29,11 +32,16 @@ import org.springframework.integration.MessageChannel;
  *
  * @version 
  */
+@UriEndpoint(scheme = "spring-integration", consumerClass = SpringIntegrationConsumer.class, label = "spring,eventbus")
 public class SpringIntegrationEndpoint extends DefaultEndpoint {
+    @UriPath
+    private String defaultChannel;
+    @UriParam
     private String inputChannel;
+    @UriParam
     private String outputChannel;
-    private String defaultChannel;
     private MessageChannel messageChannel;
+    @UriParam(defaultValue = "false")
     private boolean inOut;
 
     public SpringIntegrationEndpoint(String uri, String channel, SpringIntegrationComponent component) {
@@ -83,6 +91,7 @@ public class SpringIntegrationEndpoint extends DefaultEndpoint {
         return defaultChannel;
     }
 
+    @Deprecated
     public MessageChannel getMessageChannel() {
         return messageChannel;
     }


[2/6] camel git commit: CAMEL-7999: More components include documentation

Posted by da...@apache.org.
CAMEL-7999: More components include documentation


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

Branch: refs/heads/master
Commit: 48e7ab534ba51b812e757e65d7337b5332c6db1f
Parents: 362c8bc
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Jan 4 10:56:32 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Jan 4 10:56:32 2015 +0100

----------------------------------------------------------------------
 .../camel/component/xmlrpc/XmlRpcComponent.java |  20 ++-
 .../component/xmlrpc/XmlRpcConfiguration.java   | 168 +++++++++++++++++++
 .../camel/component/xmlrpc/XmlRpcEndpoint.java  |  41 ++++-
 3 files changed, 216 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/48e7ab53/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcComponent.java b/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcComponent.java
index 4ebdd41..b081f1d 100644
--- a/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcComponent.java
+++ b/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcComponent.java
@@ -19,23 +19,25 @@ package org.apache.camel.component.xmlrpc;
 import java.util.Map;
 
 import org.apache.camel.Endpoint;
-import org.apache.camel.impl.DefaultComponent;
-import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
+import org.apache.camel.impl.UriEndpointComponent;
 
 /**
  * Represents the component that manages {@link XmlRpcEndpoint}.
  */
-public class XmlRpcComponent extends DefaultComponent {
+public class XmlRpcComponent extends UriEndpointComponent {
+
+    public XmlRpcComponent() {
+        super(XmlRpcEndpoint.class);
+    }
 
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
+        XmlRpcConfiguration configuration = new XmlRpcConfiguration();
+        setProperties(configuration, parameters);
+
         // current we just use the uri as the server address
         XmlRpcEndpoint endpoint = new XmlRpcEndpoint(uri, this, remaining);
-        XmlRpcClientConfigImpl clientConfig = endpoint.getClientConfig();
-        // find out the clientConfigurer first
-        XmlRpcClientConfigurer clientConfigurer = resolveAndRemoveReferenceParameter(parameters, "clientConfigurer", XmlRpcClientConfigurer.class);
-        endpoint.setClientConfigurer(clientConfigurer);
-        // we just use the XmlRpcClientConfig to take the parameters
-        setProperties(clientConfig, parameters);
+        endpoint.setConfiguration(configuration);
+        setProperties(endpoint, parameters);
         return endpoint;
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/48e7ab53/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcConfiguration.java b/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcConfiguration.java
new file mode 100644
index 0000000..40c93c6
--- /dev/null
+++ b/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcConfiguration.java
@@ -0,0 +1,168 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.xmlrpc;
+
+import java.util.TimeZone;
+
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.xmlrpc.common.XmlRpcRequestProcessor;
+
+@UriParams
+public class XmlRpcConfiguration {
+
+    @UriParam
+    private boolean enabledForExtensions;
+    @UriParam
+    private boolean contentLengthOptional;
+    @UriParam
+    private String basicEncoding;
+    @UriParam
+    private String encoding;
+    @UriParam
+    private java.util.TimeZone timeZone;
+    @UriParam
+    private boolean gzipCompressing;
+    @UriParam
+    private boolean gzipRequesting;
+    @UriParam
+    private String basicUserName;
+    @UriParam
+    private String basicPassword;
+    @UriParam
+    private int connectionTimeout;
+    @UriParam
+    private int replyTimeout;
+    @UriParam
+    private boolean enabledForExceptions;
+    @UriParam
+    private org.apache.xmlrpc.common.XmlRpcRequestProcessor xmlRpcServer;
+    @UriParam
+    private String userAgent;
+
+    public boolean isEnabledForExtensions() {
+        return enabledForExtensions;
+    }
+
+    public void setEnabledForExtensions(boolean enabledForExtensions) {
+        this.enabledForExtensions = enabledForExtensions;
+    }
+
+    public boolean isContentLengthOptional() {
+        return contentLengthOptional;
+    }
+
+    public void setContentLengthOptional(boolean contentLengthOptional) {
+        this.contentLengthOptional = contentLengthOptional;
+    }
+
+    public String getBasicEncoding() {
+        return basicEncoding;
+    }
+
+    public void setBasicEncoding(String basicEncoding) {
+        this.basicEncoding = basicEncoding;
+    }
+
+    public String getEncoding() {
+        return encoding;
+    }
+
+    public void setEncoding(String encoding) {
+        this.encoding = encoding;
+    }
+
+    public TimeZone getTimeZone() {
+        return timeZone;
+    }
+
+    public void setTimeZone(TimeZone timeZone) {
+        this.timeZone = timeZone;
+    }
+
+    public boolean isGzipCompressing() {
+        return gzipCompressing;
+    }
+
+    public void setGzipCompressing(boolean gzipCompressing) {
+        this.gzipCompressing = gzipCompressing;
+    }
+
+    public boolean isGzipRequesting() {
+        return gzipRequesting;
+    }
+
+    public void setGzipRequesting(boolean gzipRequesting) {
+        this.gzipRequesting = gzipRequesting;
+    }
+
+    public String getBasicUserName() {
+        return basicUserName;
+    }
+
+    public void setBasicUserName(String basicUserName) {
+        this.basicUserName = basicUserName;
+    }
+
+    public String getBasicPassword() {
+        return basicPassword;
+    }
+
+    public void setBasicPassword(String basicPassword) {
+        this.basicPassword = basicPassword;
+    }
+
+    public int getConnectionTimeout() {
+        return connectionTimeout;
+    }
+
+    public void setConnectionTimeout(int connectionTimeout) {
+        this.connectionTimeout = connectionTimeout;
+    }
+
+    public int getReplyTimeout() {
+        return replyTimeout;
+    }
+
+    public void setReplyTimeout(int replyTimeout) {
+        this.replyTimeout = replyTimeout;
+    }
+
+    public boolean isEnabledForExceptions() {
+        return enabledForExceptions;
+    }
+
+    public void setEnabledForExceptions(boolean enabledForExceptions) {
+        this.enabledForExceptions = enabledForExceptions;
+    }
+
+    public XmlRpcRequestProcessor getXmlRpcServer() {
+        return xmlRpcServer;
+    }
+
+    public void setXmlRpcServer(XmlRpcRequestProcessor xmlRpcServer) {
+        this.xmlRpcServer = xmlRpcServer;
+    }
+
+    public String getUserAgent() {
+        return userAgent;
+    }
+
+    public void setUserAgent(String userAgent) {
+        this.userAgent = userAgent;
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/48e7ab53/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcEndpoint.java b/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcEndpoint.java
index 2cbe7d3..f97aba4 100644
--- a/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcEndpoint.java
+++ b/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcEndpoint.java
@@ -18,22 +18,35 @@ package org.apache.camel.component.xmlrpc;
 
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
 
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.impl.SynchronousDelegateProducer;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
+import org.apache.camel.util.IntrospectionSupport;
 import org.apache.xmlrpc.client.XmlRpcClient;
 import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
 
 /**
  * Represents a xmlrpc endpoint.
  */
+@UriEndpoint(scheme = "xmlrpc", label = "transformation")
 public class XmlRpcEndpoint extends DefaultEndpoint {
+    @UriPath
     private String address;
+    @UriParam
+    private XmlRpcConfiguration configuration;
+    @UriParam
     private String defaultMethodName;
+    @UriParam
     private XmlRpcClientConfigurer clientConfigurer;
+    @UriParam
     private XmlRpcClientConfigImpl clientConfig = new XmlRpcClientConfigImpl();
 
     public XmlRpcEndpoint() {
@@ -79,6 +92,9 @@ public class XmlRpcEndpoint extends DefaultEndpoint {
         return address;
     }
 
+    /**
+     * The server url
+     */
     public void setAddress(String address) {
         this.address = address;
     }
@@ -106,8 +122,25 @@ public class XmlRpcEndpoint extends DefaultEndpoint {
     public void setDefaultMethodName(String defaultMethodName) {
         this.defaultMethodName = defaultMethodName;
     }
-    
-    
-    
-    
+
+    public XmlRpcConfiguration getConfiguration() {
+        return configuration;
+    }
+
+    public void setConfiguration(XmlRpcConfiguration configuration) {
+        this.configuration = configuration;
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+
+        if (clientConfig == null) {
+            clientConfig = new XmlRpcClientConfigImpl();
+        }
+
+        Map<String, Object> params = new HashMap<String, Object>();
+        IntrospectionSupport.getProperties(configuration, params, null);
+        setProperties(clientConfig, params);
+    }
 }


[5/6] camel git commit: CAMEL-7999: More components include documentation

Posted by da...@apache.org.
CAMEL-7999: More components include documentation


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

Branch: refs/heads/master
Commit: cc119b46b11cdb6f9c8ba329a40c3e5ee493ee29
Parents: be25326
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Jan 4 11:18:05 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Jan 4 11:18:05 2015 +0100

----------------------------------------------------------------------
 .../camel/component/redis/RedisComponent.java     |  8 ++++++--
 .../camel/component/redis/RedisConfiguration.java | 18 ++++++++++++++++--
 .../camel/component/redis/RedisEndpoint.java      |  5 +++++
 3 files changed, 27 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/cc119b46/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisComponent.java b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisComponent.java
index e250117..568dda3 100755
--- a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisComponent.java
+++ b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisComponent.java
@@ -19,12 +19,16 @@ package org.apache.camel.component.redis;
 import java.util.Map;
 
 import org.apache.camel.Endpoint;
-import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.impl.UriEndpointComponent;
 
 /**
  * Represents the component that manages {@link RedisEndpoint}.
  */
-public class RedisComponent extends DefaultComponent {
+public class RedisComponent extends UriEndpointComponent {
+
+    public RedisComponent() {
+        super(RedisEndpoint.class);
+    }
 
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters)
         throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/cc119b46/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisConfiguration.java b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisConfiguration.java
index 7068404..4576a82 100755
--- a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisConfiguration.java
+++ b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisConfiguration.java
@@ -16,6 +16,9 @@
  */
 package org.apache.camel.component.redis;
 
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.spi.UriPath;
 import org.springframework.data.redis.connection.RedisConnectionFactory;
 import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
 import org.springframework.data.redis.core.RedisTemplate;
@@ -23,16 +26,27 @@ import org.springframework.data.redis.listener.RedisMessageListenerContainer;
 import org.springframework.data.redis.serializer.JdkSerializationRedisSerializer;
 import org.springframework.data.redis.serializer.RedisSerializer;
 
+@UriParams
 public class RedisConfiguration {
-    private String command;
-    private String channels;
+    @UriPath
     private String host;
+    @UriPath
     private Integer port;
+    @UriParam
+    private String command;
+    @UriParam
+    private String channels;
+    @UriParam
     private RedisTemplate redisTemplate;
+    @UriParam
     private RedisMessageListenerContainer listenerContainer;
+    @UriParam
     private RedisConnectionFactory connectionFactory;
+    @UriParam
     private RedisSerializer serializer;
+    @UriParam(defaultValue = "false")
     private boolean managedListenerContainer;
+    @UriParam(defaultValue = "false")
     private boolean managedConnectionFactory;
 
     public String getCommand() {

http://git-wip-us.apache.org/repos/asf/camel/blob/cc119b46/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisEndpoint.java b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisEndpoint.java
index 0452e1e..67ed9ec 100755
--- a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisEndpoint.java
+++ b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisEndpoint.java
@@ -20,11 +20,16 @@ import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.component.direct.DirectEndpoint;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
 
 /**
  * Represents a Redis endpoint.
  */
+@UriEndpoint(scheme = "spring-redis", consumerClass = RedisConsumer.class, label = "spring,nosql")
 public class RedisEndpoint extends DirectEndpoint {
+
+    @UriParam
     private RedisConfiguration configuration;
 
     public RedisEndpoint(String uri, RedisComponent component, RedisConfiguration configuration) {