CAMEL-7999: More components include documentation

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

Branch: refs/heads/master
Commit: 0a173c0cab20b3a83af96998c41ac1e907b7b95d
Parents: e16f0ab
Author: Claus Ibsen <davscl...@apache.org>
Authored: Fri Jan 2 15:57:23 2015 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Fri Jan 2 15:57:23 2015 +0100

----------------------------------------------------------------------
 .../component/couchdb/CouchDbComponent.java      |  7 ++++---
 .../camel/component/couchdb/CouchDbEndpoint.java | 19 +++++++++++++++++--
 2 files changed, 21 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0a173c0c/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbComponent.java
 
b/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbComponent.java
index 726771f..dd1d147 100644
--- 
a/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbComponent.java
+++ 
b/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbComponent.java
@@ -19,15 +19,16 @@ package org.apache.camel.component.couchdb;
 import java.util.Map;
 
 import org.apache.camel.CamelContext;
-import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.impl.UriEndpointComponent;
 
-public class CouchDbComponent extends DefaultComponent {
+public class CouchDbComponent extends UriEndpointComponent {
 
     public CouchDbComponent() {
+        super(CouchDbEndpoint.class);
     }
 
     public CouchDbComponent(CamelContext context) {
-        super(context);
+        super(context, CouchDbEndpoint.class);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/0a173c0c/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbEndpoint.java
 
b/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbEndpoint.java
index 91bc013..238484d 100644
--- 
a/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbEndpoint.java
+++ 
b/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbEndpoint.java
@@ -24,8 +24,12 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
 import org.lightcouch.CouchDbClient;
 
+@UriEndpoint(scheme = "couchdb", consumerClass = CouchDbConsumer.class, label 
= "database,nosql")
 public class CouchDbEndpoint extends DefaultEndpoint {
 
     public static final String DEFAULT_STYLE = "main_only";
@@ -34,16 +38,27 @@ public class CouchDbEndpoint extends DefaultEndpoint {
 
     private static final String URI_ERROR = "Invalid URI. Format must be of 
the form couchdb:http[s]://hostname[:port]/database?[options...]";
 
+    @UriPath
     private String protocol;
+    @UriPath
     private String hostname;
+    @UriPath
+    private int port;
+    @UriPath
+    private String database;
+    @UriParam(defaultValue = DEFAULT_STYLE)
     private String style = DEFAULT_STYLE;
+    @UriParam
     private String username;
-    private String database;
+    @UriParam
     private String password;
-    private int port;
+    @UriParam(defaultValue = "" + DEFAULT_HEARTBEAT)
     private long heartbeat = DEFAULT_HEARTBEAT;
+    @UriParam(defaultValue = "false")
     private boolean createDatabase;
+    @UriParam(defaultValue = "true")
     private boolean deletes = true;
+    @UriParam(defaultValue = "true")
     private boolean updates = true;
 
     public CouchDbEndpoint() {

Reply via email to