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 2014/02/16 15:13:21 UTC

[1/4] git commit: Added test

Repository: camel
Updated Branches:
  refs/heads/camel-2.12.x d22658623 -> 7c7c86fd4
  refs/heads/master 61490fdf0 -> 62ed5d974


Added test


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

Branch: refs/heads/master
Commit: 4a5cc163c8f215792913ce5f48b5be9b39697588
Parents: 61490fd
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Feb 16 13:40:58 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Feb 16 13:40:58 2014 +0100

----------------------------------------------------------------------
 ...sComponentConfigurationAndDocumentation.java | 60 ++++++++++++++++++++
 1 file changed, 60 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/4a5cc163/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsComponentConfigurationAndDocumentation.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..839034a
--- /dev/null
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsComponentConfigurationAndDocumentation.java
@@ -0,0 +1,60 @@
+/**
+ * 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.jms;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class JmsComponentConfigurationAndDocumentation extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        JmsComponent comp = context.getComponent("jms", JmsComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("jms:queue:foo?replyTo=bar");
+
+        assertEquals("bar", conf.getParameter("replyTo"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"replyToDestination\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"transacted\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (CamelTestSupport.isJava16()) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("jms");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}


[4/4] git commit: CAMEL-7210: getComponentDocumentation should handle dash in name, and also special for ftp components. Added more tests for components in core.

Posted by da...@apache.org.
CAMEL-7210: getComponentDocumentation should handle dash in name, and also special for ftp components. Added more tests for components in core.


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

Branch: refs/heads/camel-2.12.x
Commit: 7c7c86fd4492e054912a62058c554324620cac72
Parents: ce7ecc7
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Feb 16 14:55:36 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Feb 16 14:56:07 2014 +0100

----------------------------------------------------------------------
 .../dataformat/DataFormatComponent.java         |  3 +-
 .../camel/component/file/FileComponent.java     | 11 ++++
 .../component/file/GenericFileComponent.java    |  8 ++-
 .../apache/camel/impl/DefaultCamelContext.java  | 15 ++++-
 .../apache/camel/impl/UriEndpointComponent.java | 11 +++-
 ...nComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...eComponentConfigurationAndDocumentation.java | 60 +++++++++++++++++++
 ...sComponentConfigurationAndDocumentation.java | 62 ++++++++++++++++++++
 ...tComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...tComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...tComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...mComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...eComponentConfigurationAndDocumentation.java | 60 +++++++++++++++++++
 ...eComponentConfigurationAndDocumentation.java | 60 +++++++++++++++++++
 ...gComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...kComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...aComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...tComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...rComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...tComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 .../component/file/remote/FtpComponent.java     |  3 +
 .../component/file/remote/FtpEndpoint.java      |  5 ++
 .../component/file/remote/FtpsComponent.java    |  3 +
 .../component/file/remote/FtpsEndpoint.java     |  2 +
 .../file/remote/RemoteFileEndpoint.java         |  6 ++
 .../component/file/remote/SftpComponent.java    |  3 +
 .../component/file/remote/SftpEndpoint.java     |  2 +
 ...pComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...sComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...pComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 30 files changed, 1161 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatComponent.java b/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatComponent.java
index 62ffc59..668df4f 100644
--- a/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatComponent.java
@@ -19,7 +19,6 @@ package org.apache.camel.component.dataformat;
 import java.util.Map;
 
 import org.apache.camel.Endpoint;
-import org.apache.camel.component.dataset.DataSetEndpoint;
 import org.apache.camel.impl.UriEndpointComponent;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.util.EndpointHelper;
@@ -28,7 +27,7 @@ import org.apache.camel.util.ObjectHelper;
 public class DataFormatComponent extends UriEndpointComponent {
 
     public DataFormatComponent() {
-        super(DataSetEndpoint.class);
+        super(DataFormatEndpoint.class);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/main/java/org/apache/camel/component/file/FileComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/file/FileComponent.java b/camel-core/src/main/java/org/apache/camel/component/file/FileComponent.java
index 8ec22df..0cc237c 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/FileComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/FileComponent.java
@@ -21,6 +21,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.camel.CamelContext;
 import org.apache.camel.ComponentConfiguration;
 import org.apache.camel.spi.EndpointCompleter;
 import org.apache.camel.util.FileUtil;
@@ -32,6 +33,16 @@ import org.apache.camel.util.StringHelper;
  */
 public class FileComponent extends GenericFileComponent<File> implements EndpointCompleter {
 
+    public FileComponent() {
+        super();
+        setEndpointClass(FileEndpoint.class);
+    }
+
+    public FileComponent(CamelContext context) {
+        super(context);
+        setEndpointClass(FileEndpoint.class);
+    }
+
     /**
      * GenericFile property on Camel Exchanges.
      */

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/main/java/org/apache/camel/component/file/GenericFileComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileComponent.java b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileComponent.java
index 5ca9521..170ec76 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileComponent.java
@@ -22,26 +22,28 @@ import java.util.Map;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
-import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.impl.UriEndpointComponent;
 import org.apache.camel.util.CastUtils;
 import org.apache.camel.util.EndpointHelper;
 import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+
 import static org.apache.camel.util.ObjectHelper.isNotEmpty;
 
 /**
  * Base class file component. To be extended.
  */
-public abstract class GenericFileComponent<T> extends DefaultComponent {
+public abstract class GenericFileComponent<T> extends UriEndpointComponent {
 
     protected Logger log = LoggerFactory.getLogger(getClass());
 
     public GenericFileComponent() {
+        super(GenericFileEndpoint.class);
     }
 
     public GenericFileComponent(CamelContext context) {
-        super(context);
+        super(context, GenericFileEndpoint.class);
     }
 
     protected GenericFileEndpoint<T> createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
index eba472a..77a7cce 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
@@ -1030,7 +1030,8 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
     }
 
     public String getComponentDocumentation(String componentName) throws IOException {
-        String path = CamelContextHelper.COMPONENT_DOCUMENTATION_PREFIX + componentName + "/" + componentName + ".html";
+        String packageName = sanitizeComponentName(componentName);
+        String path = CamelContextHelper.COMPONENT_DOCUMENTATION_PREFIX + packageName + "/" + componentName + ".html";
         ClassResolver resolver = getClassResolver();
         InputStream inputStream = resolver.loadResourceAsStream(path);
         log.debug("Loading component documentation for: {} using class resolver: {} -> {}", new Object[]{componentName, resolver, inputStream});
@@ -1044,6 +1045,18 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
         return null;
     }
 
+    /**
+     * Sanitizes the component name by removing dash (-) in the name, when using the component name to load
+     * resources from the classpath.
+     */
+    private static String sanitizeComponentName(String componentName) {
+        // the ftp components are in a special package
+        if ("ftp".equals(componentName) || "ftps".equals(componentName) || "sftp".equals(componentName)) {
+            return "file/remote";
+        }
+        return componentName.replaceAll("-", "");
+    }
+
     // Helper methods
     // -----------------------------------------------------------------------
 

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/main/java/org/apache/camel/impl/UriEndpointComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/UriEndpointComponent.java b/camel-core/src/main/java/org/apache/camel/impl/UriEndpointComponent.java
index a034e52..d2ae5b1 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/UriEndpointComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/UriEndpointComponent.java
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
 public abstract class UriEndpointComponent extends DefaultComponent {
     private static final Logger LOG = LoggerFactory.getLogger(UriEndpointComponent.class);
 
-    private final Class<? extends Endpoint> endpointClass;
+    private Class<? extends Endpoint> endpointClass;
     private SortedMap<String, ParameterConfiguration> parameterConfigurationMap;
 
     public UriEndpointComponent(Class<? extends Endpoint> endpointClass) {
@@ -49,6 +49,15 @@ public abstract class UriEndpointComponent extends DefaultComponent {
         this.endpointClass = endpointClass;
     }
 
+    /**
+     * To use a specific endpoint class, instead of what has been provided by the constructors.
+     *
+     * @param endpointClass the endpoint class to use
+     */
+    public void setEndpointClass(Class<? extends Endpoint> endpointClass) {
+        this.endpointClass = endpointClass;
+    }
+
     @Override
     public ComponentConfiguration createComponentConfiguration() {
         return new UriComponentConfiguration(this);

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..bdabd43
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.bean;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.file.FileComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class BeanComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        BeanComponent comp = context.getComponent("bean", BeanComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("bean:foo?method=bar");
+
+        assertEquals("bar", conf.getParameter("method"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"method\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"cache\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("bean");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/test/java/org/apache/camel/component/browse/BrowseComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/browse/BrowseComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/browse/BrowseComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..f4c8be3
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/browse/BrowseComponentConfigurationAndDocumentation.java
@@ -0,0 +1,60 @@
+/**
+ * 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.browse;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class BrowseComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        BrowseComponent comp = context.getComponent("browse", BrowseComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("browse:seda:foo?synchronous=true");
+
+        assertEquals("true", conf.getParameter("synchronous"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"synchronous\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("browse");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/test/java/org/apache/camel/component/controlbus/ControlBusComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/controlbus/ControlBusComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/controlbus/ControlBusComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..9b931f3
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/controlbus/ControlBusComponentConfigurationAndDocumentation.java
@@ -0,0 +1,62 @@
+/**
+ * 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.controlbus;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class ControlBusComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        ControlBusComponent comp = context.getComponent("controlbus", ControlBusComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("controlbus:route?routeId=bar&action=stop");
+
+        assertEquals("bar", conf.getParameter("routeId"));
+        assertEquals("stop", conf.getParameter("action"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"action\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"async\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("controlbus");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..439492c
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.dataformat;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class DataFormatComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        DataFormatComponent comp = context.getComponent("dataformat", DataFormatComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("dataformaat:marshal:string?charset=iso-8859-1");
+
+        assertEquals("iso-8859-1", conf.getParameter("charset"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"operation\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"synchronous\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("dataformat");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..1a04dbe
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.dataset;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class DataSetComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        DataSetComponent comp = context.getComponent("dataset", DataSetComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("dataset:foo?minRate=3");
+
+        assertEquals("3", conf.getParameter("minRate"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"preloadSize\": { \"type\": \"long\" }"));
+        assertTrue(json.contains("\"minRate\": { \"type\": \"int\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("dataset");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..1f0a890
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.direct;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class DirectComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        DirectComponent comp = context.getComponent("direct", DirectComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("direct:foo?block=true");
+
+        assertEquals("true", conf.getParameter("block"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"timeout\": { \"type\": \"long\" }"));
+        assertTrue(json.contains("\"block\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("direct");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..0cca263
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.directvm;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.direct.DirectComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class DirectVmComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        DirectVmComponent comp = context.getComponent("direct-vm", DirectVmComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("direct-vm:foo?block=false");
+
+        assertEquals("false", conf.getParameter("block"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"timeout\": { \"type\": \"long\" }"));
+        assertTrue(json.contains("\"block\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("direct-vm");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/test/java/org/apache/camel/component/file/FileComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/file/FileComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..f74edbb
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileComponentConfigurationAndDocumentation.java
@@ -0,0 +1,60 @@
+/**
+ * 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.file;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class FileComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        FileComponent comp = context.getComponent("file", FileComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("file:target/foo?delete=true");
+
+        assertEquals("true", conf.getParameter("delete"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"exclude\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"delete\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("file");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/test/java/org/apache/camel/component/language/LanguageComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/language/LanguageComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/language/LanguageComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..67c83b6
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/language/LanguageComponentConfigurationAndDocumentation.java
@@ -0,0 +1,60 @@
+/**
+ * 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.language;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class LanguageComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        LanguageComponent comp = context.getComponent("language", LanguageComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("language:simple:foo?transform=false");
+
+        assertEquals("false", conf.getParameter("transform"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"script\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"cacheScript\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("language");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/test/java/org/apache/camel/component/log/LogComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/log/LogComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/log/LogComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..2110eb0
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/log/LogComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.log;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class LogComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        LogComponent comp = context.getComponent("log", LogComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("log:foo?level=DEBUG");
+
+        assertEquals("DEBUG", conf.getParameter("level"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"level\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"groupInterval\": { \"type\": \"java.lang.Long\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("log");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..37b93aa
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.mock;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class MockComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        MockComponent comp = context.getComponent("mock", MockComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("mock:foo?retainFirst=10");
+
+        assertEquals("10", conf.getParameter("retainFirst"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"expectedCount\": { \"type\": \"int\" }"));
+        assertTrue(json.contains("\"retainFirst\": { \"type\": \"int\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("mock");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/test/java/org/apache/camel/component/seda/SedaComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/seda/SedaComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/seda/SedaComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..f0dfc18
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/seda/SedaComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.seda;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class SedaComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        SedaComponent comp = context.getComponent("seda", SedaComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("seda:foo?blockWhenFull=true");
+
+        assertEquals("true", conf.getParameter("blockWhenFull"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"timeout\": { \"type\": \"long\" }"));
+        assertTrue(json.contains("\"blockWhenFull\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("seda");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/test/java/org/apache/camel/component/test/TestComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/test/TestComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/test/TestComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..47b9b1e
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/test/TestComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.test;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class TestComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        TestComponent comp = context.getComponent("test", TestComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("test:my:foo?timeout=1000");
+
+        assertEquals("1000", conf.getParameter("timeout"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"retainFirst\": { \"type\": \"int\" }"));
+        assertTrue(json.contains("\"timeout\": { \"type\": \"long\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("test");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..9392852
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.timer;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class TimerComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        TimerComponent comp = context.getComponent("timer", TimerComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("timer:foo?period=2000");
+
+        assertEquals("2000", conf.getParameter("period"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"timerName\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"delay\": { \"type\": \"long\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("timer");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..83b2495
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.xslt;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class XsltComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        XsltComponent comp = context.getComponent("xslt", XsltComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("xslt:foo?deleteOutputFile=true");
+
+        assertEquals("true", conf.getParameter("deleteOutputFile"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"resourceUri\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"synchronous\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("xslt");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpComponent.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpComponent.java
index 56bdeee..8e3998f 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpComponent.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpComponent.java
@@ -30,10 +30,13 @@ import org.apache.commons.net.ftp.FTPFile;
 public class FtpComponent extends RemoteFileComponent<FTPFile> {
 
     public FtpComponent() {
+        super();
+        setEndpointClass(FtpEndpoint.class);
     }
 
     public FtpComponent(CamelContext context) {
         super(context);
+        setEndpointClass(FtpEndpoint.class);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
index abad079..dfb6def 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
@@ -25,6 +25,8 @@ import org.apache.camel.Processor;
 import org.apache.camel.component.file.GenericFileConfiguration;
 import org.apache.camel.component.file.GenericFileProducer;
 import org.apache.camel.component.file.remote.RemoteFileConfiguration.PathSeparator;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
 import org.apache.commons.net.ftp.FTPClient;
 import org.apache.commons.net.ftp.FTPClientConfig;
 import org.apache.commons.net.ftp.FTPFile;
@@ -32,13 +34,16 @@ import org.apache.commons.net.ftp.FTPFile;
 /**
  * FTP endpoint
  */
+@UriEndpoint(scheme = "ftp", consumerClass = FtpConsumer.class)
 public class FtpEndpoint<T extends FTPFile> extends RemoteFileEndpoint<FTPFile> {
 
     protected FTPClient ftpClient;
     protected FTPClientConfig ftpClientConfig;
     protected Map<String, Object> ftpClientParameters;
     protected Map<String, Object> ftpClientConfigParameters;
+    @UriParam
     protected int soTimeout;
+    @UriParam
     protected int dataTimeout;
 
     public FtpEndpoint() {

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsComponent.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsComponent.java
index 57a032e..d43ecf2 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsComponent.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsComponent.java
@@ -34,10 +34,13 @@ import org.apache.commons.net.ftp.FTPFile;
 public class FtpsComponent extends FtpComponent {
 
     public FtpsComponent() {
+        super();
+        setEndpointClass(FtpsEndpoint.class);
     }
 
     public FtpsComponent(CamelContext context) {
         super(context);
+        setEndpointClass(FtpsEndpoint.class);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
index 06071a0..b9f2342 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
@@ -27,6 +27,7 @@ import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLSocket;
 import javax.net.ssl.TrustManagerFactory;
 
+import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.jsse.SSLContextParameters;
 import org.apache.commons.net.ftp.FTPClient;
@@ -39,6 +40,7 @@ import org.apache.commons.net.ftp.FTPSClient;
  * 
  * @version 
  */
+@UriEndpoint(scheme = "ftps", consumerClass = FtpConsumer.class)
 public class FtpsEndpoint extends FtpEndpoint<FTPFile> {
     
     protected Map<String, Object> ftpClientKeyStoreParameters;

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
index 6ceaa01..97a310d 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
@@ -26,6 +26,7 @@ import org.apache.camel.component.file.GenericFileExist;
 import org.apache.camel.component.file.GenericFileProducer;
 import org.apache.camel.impl.DefaultExchange;
 import org.apache.camel.processor.idempotent.MemoryIdempotentRepository;
+import org.apache.camel.spi.UriParam;
 import org.apache.camel.util.ObjectHelper;
 
 /**
@@ -33,10 +34,15 @@ import org.apache.camel.util.ObjectHelper;
  */
 public abstract class RemoteFileEndpoint<T> extends GenericFileEndpoint<T> {
 
+    @UriParam
     private int maximumReconnectAttempts = 3;
+    @UriParam
     private long reconnectDelay = 1000;
+    @UriParam
     private boolean disconnect;
+    @UriParam
     private boolean fastExistsCheck;
+    @UriParam
     private boolean download = true;
 
     public RemoteFileEndpoint() {

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpComponent.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpComponent.java
index 5772936..4faa66c 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpComponent.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpComponent.java
@@ -29,10 +29,13 @@ import org.apache.camel.component.file.GenericFileEndpoint;
 public class SftpComponent extends RemoteFileComponent<ChannelSftp.LsEntry> {
 
     public SftpComponent() {
+        super();
+        setEndpointClass(SftpEndpoint.class);
     }
 
     public SftpComponent(CamelContext context) {
         super(context);
+        setEndpointClass(SftpEndpoint.class);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java
index 257e240..055968a 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java
@@ -20,10 +20,12 @@ import com.jcraft.jsch.ChannelSftp;
 import com.jcraft.jsch.Proxy;
 import org.apache.camel.Processor;
 import org.apache.camel.component.file.GenericFileProducer;
+import org.apache.camel.spi.UriEndpoint;
 
 /**
  * Secure FTP endpoint
  */
+@UriEndpoint(scheme = "sftp", consumerClass = SftpConsumer.class)
 public class SftpEndpoint extends RemoteFileEndpoint<ChannelSftp.LsEntry> {
 
     Proxy proxy;

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpComponentConfigurationAndDocumentation.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..4dca6df
--- /dev/null
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.file.remote;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class FtpComponentConfigurationAndDocumentation extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        FtpComponent comp = context.getComponent("ftp", FtpComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("ftp:127.0.0.1?username=foo&password=secret");
+
+        assertEquals("foo", conf.getParameter("username"));
+        assertEquals("secret", conf.getParameter("password"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"maximumReconnectAttempts\": { \"type\": \"int\" }"));
+        assertTrue(json.contains("\"dataTimeout\": { \"type\": \"int\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (CamelTestSupport.isJava16()) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("ftp");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsComponentConfigurationAndDocumentation.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..63d96af
--- /dev/null
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.file.remote;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class FtpsComponentConfigurationAndDocumentation extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        FtpsComponent comp = context.getComponent("ftps", FtpsComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("ftps:127.0.0.1?username=foo&password=secret");
+
+        assertEquals("foo", conf.getParameter("username"));
+        assertEquals("secret", conf.getParameter("password"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"maximumReconnectAttempts\": { \"type\": \"int\" }"));
+        assertTrue(json.contains("\"dataTimeout\": { \"type\": \"int\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (CamelTestSupport.isJava16()) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("ftps");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7c7c86fd/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/SftpComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/SftpComponentConfigurationAndDocumentation.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/SftpComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..82a2000
--- /dev/null
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/SftpComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.file.remote;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class SftpComponentConfigurationAndDocumentation extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        SftpComponent comp = context.getComponent("sftp", SftpComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("sftp:127.0.0.1?username=foo&password=secret");
+
+        assertEquals("foo", conf.getParameter("username"));
+        assertEquals("secret", conf.getParameter("password"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"maximumReconnectAttempts\": { \"type\": \"int\" }"));
+        assertTrue(json.contains("\"download\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (CamelTestSupport.isJava16()) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("sftp");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}


[3/4] git commit: Added test

Posted by da...@apache.org.
Added test


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

Branch: refs/heads/camel-2.12.x
Commit: ce7ecc7ca8d4b203dd313499ae14fe98af0d0c9d
Parents: d226586
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Feb 16 13:40:58 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Feb 16 14:55:57 2014 +0100

----------------------------------------------------------------------
 ...sComponentConfigurationAndDocumentation.java | 60 ++++++++++++++++++++
 1 file changed, 60 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ce7ecc7c/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsComponentConfigurationAndDocumentation.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..839034a
--- /dev/null
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsComponentConfigurationAndDocumentation.java
@@ -0,0 +1,60 @@
+/**
+ * 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.jms;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class JmsComponentConfigurationAndDocumentation extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        JmsComponent comp = context.getComponent("jms", JmsComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("jms:queue:foo?replyTo=bar");
+
+        assertEquals("bar", conf.getParameter("replyTo"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"replyToDestination\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"transacted\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (CamelTestSupport.isJava16()) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("jms");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}


[2/4] git commit: CAMEL-7210: getComponentDocumentation should handle dash in name, and also special for ftp components. Added more tests for components in core.

Posted by da...@apache.org.
CAMEL-7210: getComponentDocumentation should handle dash in name, and also special for ftp components. Added more tests for components in core.


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

Branch: refs/heads/master
Commit: 62ed5d97444ef4e65f890c18d5352f3ba8599303
Parents: 4a5cc16
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Feb 16 14:55:36 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Feb 16 14:55:36 2014 +0100

----------------------------------------------------------------------
 .../dataformat/DataFormatComponent.java         |  3 +-
 .../camel/component/file/FileComponent.java     | 11 ++++
 .../component/file/GenericFileComponent.java    |  8 ++-
 .../apache/camel/impl/DefaultCamelContext.java  | 15 ++++-
 .../apache/camel/impl/UriEndpointComponent.java | 11 +++-
 ...nComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...eComponentConfigurationAndDocumentation.java | 60 +++++++++++++++++++
 ...sComponentConfigurationAndDocumentation.java | 62 ++++++++++++++++++++
 ...tComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...tComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...tComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...mComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...eComponentConfigurationAndDocumentation.java | 60 +++++++++++++++++++
 ...eComponentConfigurationAndDocumentation.java | 60 +++++++++++++++++++
 ...gComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...kComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...aComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...tComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...rComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...tComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 .../component/file/remote/FtpComponent.java     |  3 +
 .../component/file/remote/FtpEndpoint.java      |  5 ++
 .../component/file/remote/FtpsComponent.java    |  3 +
 .../component/file/remote/FtpsEndpoint.java     |  2 +
 .../file/remote/RemoteFileEndpoint.java         |  6 ++
 .../component/file/remote/SftpComponent.java    |  3 +
 .../component/file/remote/SftpEndpoint.java     |  2 +
 ...pComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...sComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 ...pComponentConfigurationAndDocumentation.java | 61 +++++++++++++++++++
 30 files changed, 1161 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatComponent.java b/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatComponent.java
index 62ffc59..668df4f 100644
--- a/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatComponent.java
@@ -19,7 +19,6 @@ package org.apache.camel.component.dataformat;
 import java.util.Map;
 
 import org.apache.camel.Endpoint;
-import org.apache.camel.component.dataset.DataSetEndpoint;
 import org.apache.camel.impl.UriEndpointComponent;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.util.EndpointHelper;
@@ -28,7 +27,7 @@ import org.apache.camel.util.ObjectHelper;
 public class DataFormatComponent extends UriEndpointComponent {
 
     public DataFormatComponent() {
-        super(DataSetEndpoint.class);
+        super(DataFormatEndpoint.class);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/main/java/org/apache/camel/component/file/FileComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/file/FileComponent.java b/camel-core/src/main/java/org/apache/camel/component/file/FileComponent.java
index 8ec22df..0cc237c 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/FileComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/FileComponent.java
@@ -21,6 +21,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.camel.CamelContext;
 import org.apache.camel.ComponentConfiguration;
 import org.apache.camel.spi.EndpointCompleter;
 import org.apache.camel.util.FileUtil;
@@ -32,6 +33,16 @@ import org.apache.camel.util.StringHelper;
  */
 public class FileComponent extends GenericFileComponent<File> implements EndpointCompleter {
 
+    public FileComponent() {
+        super();
+        setEndpointClass(FileEndpoint.class);
+    }
+
+    public FileComponent(CamelContext context) {
+        super(context);
+        setEndpointClass(FileEndpoint.class);
+    }
+
     /**
      * GenericFile property on Camel Exchanges.
      */

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/main/java/org/apache/camel/component/file/GenericFileComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileComponent.java b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileComponent.java
index 5ca9521..170ec76 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileComponent.java
@@ -22,26 +22,28 @@ import java.util.Map;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
-import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.impl.UriEndpointComponent;
 import org.apache.camel.util.CastUtils;
 import org.apache.camel.util.EndpointHelper;
 import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+
 import static org.apache.camel.util.ObjectHelper.isNotEmpty;
 
 /**
  * Base class file component. To be extended.
  */
-public abstract class GenericFileComponent<T> extends DefaultComponent {
+public abstract class GenericFileComponent<T> extends UriEndpointComponent {
 
     protected Logger log = LoggerFactory.getLogger(getClass());
 
     public GenericFileComponent() {
+        super(GenericFileEndpoint.class);
     }
 
     public GenericFileComponent(CamelContext context) {
-        super(context);
+        super(context, GenericFileEndpoint.class);
     }
 
     protected GenericFileEndpoint<T> createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
index 39348bc..f9266d3 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
@@ -1029,7 +1029,8 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
     }
 
     public String getComponentDocumentation(String componentName) throws IOException {
-        String path = CamelContextHelper.COMPONENT_DOCUMENTATION_PREFIX + componentName + "/" + componentName + ".html";
+        String packageName = sanitizeComponentName(componentName);
+        String path = CamelContextHelper.COMPONENT_DOCUMENTATION_PREFIX + packageName + "/" + componentName + ".html";
         ClassResolver resolver = getClassResolver();
         InputStream inputStream = resolver.loadResourceAsStream(path);
         log.debug("Loading component documentation for: {} using class resolver: {} -> {}", new Object[]{componentName, resolver, inputStream});
@@ -1043,6 +1044,18 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
         return null;
     }
 
+    /**
+     * Sanitizes the component name by removing dash (-) in the name, when using the component name to load
+     * resources from the classpath.
+     */
+    private static String sanitizeComponentName(String componentName) {
+        // the ftp components are in a special package
+        if ("ftp".equals(componentName) || "ftps".equals(componentName) || "sftp".equals(componentName)) {
+            return "file/remote";
+        }
+        return componentName.replaceAll("-", "");
+    }
+
     // Helper methods
     // -----------------------------------------------------------------------
 

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/main/java/org/apache/camel/impl/UriEndpointComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/UriEndpointComponent.java b/camel-core/src/main/java/org/apache/camel/impl/UriEndpointComponent.java
index a034e52..d2ae5b1 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/UriEndpointComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/UriEndpointComponent.java
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
 public abstract class UriEndpointComponent extends DefaultComponent {
     private static final Logger LOG = LoggerFactory.getLogger(UriEndpointComponent.class);
 
-    private final Class<? extends Endpoint> endpointClass;
+    private Class<? extends Endpoint> endpointClass;
     private SortedMap<String, ParameterConfiguration> parameterConfigurationMap;
 
     public UriEndpointComponent(Class<? extends Endpoint> endpointClass) {
@@ -49,6 +49,15 @@ public abstract class UriEndpointComponent extends DefaultComponent {
         this.endpointClass = endpointClass;
     }
 
+    /**
+     * To use a specific endpoint class, instead of what has been provided by the constructors.
+     *
+     * @param endpointClass the endpoint class to use
+     */
+    public void setEndpointClass(Class<? extends Endpoint> endpointClass) {
+        this.endpointClass = endpointClass;
+    }
+
     @Override
     public ComponentConfiguration createComponentConfiguration() {
         return new UriComponentConfiguration(this);

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..bdabd43
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.bean;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.file.FileComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class BeanComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        BeanComponent comp = context.getComponent("bean", BeanComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("bean:foo?method=bar");
+
+        assertEquals("bar", conf.getParameter("method"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"method\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"cache\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("bean");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/test/java/org/apache/camel/component/browse/BrowseComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/browse/BrowseComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/browse/BrowseComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..f4c8be3
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/browse/BrowseComponentConfigurationAndDocumentation.java
@@ -0,0 +1,60 @@
+/**
+ * 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.browse;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class BrowseComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        BrowseComponent comp = context.getComponent("browse", BrowseComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("browse:seda:foo?synchronous=true");
+
+        assertEquals("true", conf.getParameter("synchronous"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"synchronous\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("browse");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/test/java/org/apache/camel/component/controlbus/ControlBusComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/controlbus/ControlBusComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/controlbus/ControlBusComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..9b931f3
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/controlbus/ControlBusComponentConfigurationAndDocumentation.java
@@ -0,0 +1,62 @@
+/**
+ * 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.controlbus;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class ControlBusComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        ControlBusComponent comp = context.getComponent("controlbus", ControlBusComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("controlbus:route?routeId=bar&action=stop");
+
+        assertEquals("bar", conf.getParameter("routeId"));
+        assertEquals("stop", conf.getParameter("action"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"action\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"async\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("controlbus");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..439492c
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.dataformat;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class DataFormatComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        DataFormatComponent comp = context.getComponent("dataformat", DataFormatComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("dataformaat:marshal:string?charset=iso-8859-1");
+
+        assertEquals("iso-8859-1", conf.getParameter("charset"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"operation\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"synchronous\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("dataformat");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..1a04dbe
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.dataset;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class DataSetComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        DataSetComponent comp = context.getComponent("dataset", DataSetComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("dataset:foo?minRate=3");
+
+        assertEquals("3", conf.getParameter("minRate"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"preloadSize\": { \"type\": \"long\" }"));
+        assertTrue(json.contains("\"minRate\": { \"type\": \"int\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("dataset");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..1f0a890
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.direct;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class DirectComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        DirectComponent comp = context.getComponent("direct", DirectComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("direct:foo?block=true");
+
+        assertEquals("true", conf.getParameter("block"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"timeout\": { \"type\": \"long\" }"));
+        assertTrue(json.contains("\"block\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("direct");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..0cca263
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.directvm;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.direct.DirectComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class DirectVmComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        DirectVmComponent comp = context.getComponent("direct-vm", DirectVmComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("direct-vm:foo?block=false");
+
+        assertEquals("false", conf.getParameter("block"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"timeout\": { \"type\": \"long\" }"));
+        assertTrue(json.contains("\"block\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("direct-vm");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/test/java/org/apache/camel/component/file/FileComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/file/FileComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..f74edbb
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileComponentConfigurationAndDocumentation.java
@@ -0,0 +1,60 @@
+/**
+ * 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.file;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class FileComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        FileComponent comp = context.getComponent("file", FileComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("file:target/foo?delete=true");
+
+        assertEquals("true", conf.getParameter("delete"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"exclude\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"delete\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("file");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/test/java/org/apache/camel/component/language/LanguageComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/language/LanguageComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/language/LanguageComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..67c83b6
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/language/LanguageComponentConfigurationAndDocumentation.java
@@ -0,0 +1,60 @@
+/**
+ * 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.language;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class LanguageComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        LanguageComponent comp = context.getComponent("language", LanguageComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("language:simple:foo?transform=false");
+
+        assertEquals("false", conf.getParameter("transform"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"script\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"cacheScript\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("language");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/test/java/org/apache/camel/component/log/LogComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/log/LogComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/log/LogComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..2110eb0
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/log/LogComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.log;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class LogComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        LogComponent comp = context.getComponent("log", LogComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("log:foo?level=DEBUG");
+
+        assertEquals("DEBUG", conf.getParameter("level"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"level\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"groupInterval\": { \"type\": \"java.lang.Long\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("log");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..37b93aa
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.mock;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class MockComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        MockComponent comp = context.getComponent("mock", MockComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("mock:foo?retainFirst=10");
+
+        assertEquals("10", conf.getParameter("retainFirst"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"expectedCount\": { \"type\": \"int\" }"));
+        assertTrue(json.contains("\"retainFirst\": { \"type\": \"int\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("mock");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/test/java/org/apache/camel/component/seda/SedaComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/seda/SedaComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/seda/SedaComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..f0dfc18
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/seda/SedaComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.seda;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class SedaComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        SedaComponent comp = context.getComponent("seda", SedaComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("seda:foo?blockWhenFull=true");
+
+        assertEquals("true", conf.getParameter("blockWhenFull"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"timeout\": { \"type\": \"long\" }"));
+        assertTrue(json.contains("\"blockWhenFull\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("seda");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/test/java/org/apache/camel/component/test/TestComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/test/TestComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/test/TestComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..47b9b1e
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/test/TestComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.test;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class TestComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        TestComponent comp = context.getComponent("test", TestComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("test:my:foo?timeout=1000");
+
+        assertEquals("1000", conf.getParameter("timeout"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"retainFirst\": { \"type\": \"int\" }"));
+        assertTrue(json.contains("\"timeout\": { \"type\": \"long\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("test");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..9392852
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.timer;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class TimerComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        TimerComponent comp = context.getComponent("timer", TimerComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("timer:foo?period=2000");
+
+        assertEquals("2000", conf.getParameter("period"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"timerName\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"delay\": { \"type\": \"long\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("timer");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentation.java b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..83b2495
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.xslt;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+
+public class XsltComponentConfigurationAndDocumentation extends ContextTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        XsltComponent comp = context.getComponent("xslt", XsltComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("xslt:foo?deleteOutputFile=true");
+
+        assertEquals("true", conf.getParameter("deleteOutputFile"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"resourceUri\": { \"type\": \"java.lang.String\" }"));
+        assertTrue(json.contains("\"synchronous\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (isJavaVersion("1.6")) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("xslt");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpComponent.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpComponent.java
index 56bdeee..8e3998f 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpComponent.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpComponent.java
@@ -30,10 +30,13 @@ import org.apache.commons.net.ftp.FTPFile;
 public class FtpComponent extends RemoteFileComponent<FTPFile> {
 
     public FtpComponent() {
+        super();
+        setEndpointClass(FtpEndpoint.class);
     }
 
     public FtpComponent(CamelContext context) {
         super(context);
+        setEndpointClass(FtpEndpoint.class);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
index abad079..dfb6def 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
@@ -25,6 +25,8 @@ import org.apache.camel.Processor;
 import org.apache.camel.component.file.GenericFileConfiguration;
 import org.apache.camel.component.file.GenericFileProducer;
 import org.apache.camel.component.file.remote.RemoteFileConfiguration.PathSeparator;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
 import org.apache.commons.net.ftp.FTPClient;
 import org.apache.commons.net.ftp.FTPClientConfig;
 import org.apache.commons.net.ftp.FTPFile;
@@ -32,13 +34,16 @@ import org.apache.commons.net.ftp.FTPFile;
 /**
  * FTP endpoint
  */
+@UriEndpoint(scheme = "ftp", consumerClass = FtpConsumer.class)
 public class FtpEndpoint<T extends FTPFile> extends RemoteFileEndpoint<FTPFile> {
 
     protected FTPClient ftpClient;
     protected FTPClientConfig ftpClientConfig;
     protected Map<String, Object> ftpClientParameters;
     protected Map<String, Object> ftpClientConfigParameters;
+    @UriParam
     protected int soTimeout;
+    @UriParam
     protected int dataTimeout;
 
     public FtpEndpoint() {

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsComponent.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsComponent.java
index 57a032e..d43ecf2 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsComponent.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsComponent.java
@@ -34,10 +34,13 @@ import org.apache.commons.net.ftp.FTPFile;
 public class FtpsComponent extends FtpComponent {
 
     public FtpsComponent() {
+        super();
+        setEndpointClass(FtpsEndpoint.class);
     }
 
     public FtpsComponent(CamelContext context) {
         super(context);
+        setEndpointClass(FtpsEndpoint.class);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
index 06071a0..b9f2342 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
@@ -27,6 +27,7 @@ import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLSocket;
 import javax.net.ssl.TrustManagerFactory;
 
+import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.jsse.SSLContextParameters;
 import org.apache.commons.net.ftp.FTPClient;
@@ -39,6 +40,7 @@ import org.apache.commons.net.ftp.FTPSClient;
  * 
  * @version 
  */
+@UriEndpoint(scheme = "ftps", consumerClass = FtpConsumer.class)
 public class FtpsEndpoint extends FtpEndpoint<FTPFile> {
     
     protected Map<String, Object> ftpClientKeyStoreParameters;

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
index 6ceaa01..97a310d 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
@@ -26,6 +26,7 @@ import org.apache.camel.component.file.GenericFileExist;
 import org.apache.camel.component.file.GenericFileProducer;
 import org.apache.camel.impl.DefaultExchange;
 import org.apache.camel.processor.idempotent.MemoryIdempotentRepository;
+import org.apache.camel.spi.UriParam;
 import org.apache.camel.util.ObjectHelper;
 
 /**
@@ -33,10 +34,15 @@ import org.apache.camel.util.ObjectHelper;
  */
 public abstract class RemoteFileEndpoint<T> extends GenericFileEndpoint<T> {
 
+    @UriParam
     private int maximumReconnectAttempts = 3;
+    @UriParam
     private long reconnectDelay = 1000;
+    @UriParam
     private boolean disconnect;
+    @UriParam
     private boolean fastExistsCheck;
+    @UriParam
     private boolean download = true;
 
     public RemoteFileEndpoint() {

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpComponent.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpComponent.java
index 5772936..4faa66c 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpComponent.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpComponent.java
@@ -29,10 +29,13 @@ import org.apache.camel.component.file.GenericFileEndpoint;
 public class SftpComponent extends RemoteFileComponent<ChannelSftp.LsEntry> {
 
     public SftpComponent() {
+        super();
+        setEndpointClass(SftpEndpoint.class);
     }
 
     public SftpComponent(CamelContext context) {
         super(context);
+        setEndpointClass(SftpEndpoint.class);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java
index 257e240..055968a 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java
@@ -20,10 +20,12 @@ import com.jcraft.jsch.ChannelSftp;
 import com.jcraft.jsch.Proxy;
 import org.apache.camel.Processor;
 import org.apache.camel.component.file.GenericFileProducer;
+import org.apache.camel.spi.UriEndpoint;
 
 /**
  * Secure FTP endpoint
  */
+@UriEndpoint(scheme = "sftp", consumerClass = SftpConsumer.class)
 public class SftpEndpoint extends RemoteFileEndpoint<ChannelSftp.LsEntry> {
 
     Proxy proxy;

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpComponentConfigurationAndDocumentation.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..4dca6df
--- /dev/null
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.file.remote;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class FtpComponentConfigurationAndDocumentation extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        FtpComponent comp = context.getComponent("ftp", FtpComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("ftp:127.0.0.1?username=foo&password=secret");
+
+        assertEquals("foo", conf.getParameter("username"));
+        assertEquals("secret", conf.getParameter("password"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"maximumReconnectAttempts\": { \"type\": \"int\" }"));
+        assertTrue(json.contains("\"dataTimeout\": { \"type\": \"int\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (CamelTestSupport.isJava16()) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("ftp");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsComponentConfigurationAndDocumentation.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..63d96af
--- /dev/null
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.file.remote;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class FtpsComponentConfigurationAndDocumentation extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        FtpsComponent comp = context.getComponent("ftps", FtpsComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("ftps:127.0.0.1?username=foo&password=secret");
+
+        assertEquals("foo", conf.getParameter("username"));
+        assertEquals("secret", conf.getParameter("password"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"maximumReconnectAttempts\": { \"type\": \"int\" }"));
+        assertTrue(json.contains("\"dataTimeout\": { \"type\": \"int\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (CamelTestSupport.isJava16()) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("ftps");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/62ed5d97/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/SftpComponentConfigurationAndDocumentation.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/SftpComponentConfigurationAndDocumentation.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/SftpComponentConfigurationAndDocumentation.java
new file mode 100644
index 0000000..82a2000
--- /dev/null
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/SftpComponentConfigurationAndDocumentation.java
@@ -0,0 +1,61 @@
+/**
+ * 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.file.remote;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class SftpComponentConfigurationAndDocumentation extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        SftpComponent comp = context.getComponent("sftp", SftpComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("sftp:127.0.0.1?username=foo&password=secret");
+
+        assertEquals("foo", conf.getParameter("username"));
+        assertEquals("secret", conf.getParameter("password"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"maximumReconnectAttempts\": { \"type\": \"int\" }"));
+        assertTrue(json.contains("\"download\": { \"type\": \"boolean\" }"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        // cannot be tested on java 1.6
+        if (CamelTestSupport.isJava16()) {
+            return;
+        }
+
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("sftp");
+        assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+    }
+
+}