You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/05/11 10:46:21 UTC
[2/4] camel git commit: Component docs
Component docs
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/89706cd3
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/89706cd3
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/89706cd3
Branch: refs/heads/master
Commit: 89706cd3cd2f927abda022000bbec97ea86886f2
Parents: 5b6134b
Author: Claus Ibsen <da...@apache.org>
Authored: Mon May 11 09:19:56 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon May 11 09:19:56 2015 +0200
----------------------------------------------------------------------
.../component/couchdb/CouchDbEndpoint.java | 38 ++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/89706cd3/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 98358e3..231d95a 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
@@ -39,7 +39,7 @@ 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 @Metadata(required = "true")
+ @UriPath(enums = "http,https") @Metadata(required = "true")
private String protocol;
@UriPath @Metadata(required = "true")
private String hostname;
@@ -47,7 +47,7 @@ public class CouchDbEndpoint extends DefaultEndpoint {
private int port;
@UriPath @Metadata(required = "true")
private String database;
- @UriParam(defaultValue = DEFAULT_STYLE)
+ @UriParam(enums = "all_docs,main_only", defaultValue = DEFAULT_STYLE)
private String style = DEFAULT_STYLE;
@UriParam
private String username;
@@ -124,6 +124,9 @@ public class CouchDbEndpoint extends DefaultEndpoint {
return protocol;
}
+ /**
+ * The protocol to use for communicating with the database.
+ */
public void setProtocol(String protocol) {
this.protocol = protocol;
}
@@ -132,6 +135,9 @@ public class CouchDbEndpoint extends DefaultEndpoint {
return hostname;
}
+ /**
+ * Hostname of the running couchdb instance
+ */
public void setHostname(String hostname) {
this.hostname = hostname;
}
@@ -140,6 +146,10 @@ public class CouchDbEndpoint extends DefaultEndpoint {
return style;
}
+ /**
+ * Specifies how many revisions are returned in the changes array.
+ * The default, main_only, will only return the current "winning" revision; all_docs will return all leaf revisions (including conflicts and deleted former conflicts.)
+ */
public void setStyle(String style) {
this.style = style;
}
@@ -148,6 +158,9 @@ public class CouchDbEndpoint extends DefaultEndpoint {
return username;
}
+ /**
+ * Username in case of authenticated databases
+ */
public void setUsername(String username) {
this.username = username;
}
@@ -156,6 +169,9 @@ public class CouchDbEndpoint extends DefaultEndpoint {
return database;
}
+ /**
+ * Name of the database to use
+ */
public void setDatabase(String database) {
this.database = database;
}
@@ -164,6 +180,9 @@ public class CouchDbEndpoint extends DefaultEndpoint {
return password;
}
+ /**
+ * Password for authenticated databases
+ */
public void setPassword(String password) {
this.password = password;
}
@@ -172,6 +191,9 @@ public class CouchDbEndpoint extends DefaultEndpoint {
return port;
}
+ /**
+ * Port number for the running couchdb instance
+ */
public void setPort(int port) {
this.port = port;
}
@@ -180,6 +202,9 @@ public class CouchDbEndpoint extends DefaultEndpoint {
return heartbeat;
}
+ /**
+ * How often to send an empty message to keep socket alive in millis
+ */
public void setHeartbeat(long heartbeat) {
this.heartbeat = heartbeat;
}
@@ -188,6 +213,9 @@ public class CouchDbEndpoint extends DefaultEndpoint {
return createDatabase;
}
+ /**
+ * Creates the database if it does not already exist
+ */
public void setCreateDatabase(boolean createDatabase) {
this.createDatabase = createDatabase;
}
@@ -196,6 +224,9 @@ public class CouchDbEndpoint extends DefaultEndpoint {
return deletes;
}
+ /**
+ * Document deletes are published as events
+ */
public void setDeletes(boolean deletes) {
this.deletes = deletes;
}
@@ -204,6 +235,9 @@ public class CouchDbEndpoint extends DefaultEndpoint {
return updates;
}
+ /**
+ * Document inserts/updates are published as events
+ */
public void setUpdates(boolean updates) {
this.updates = updates;
}