This is an automated email from the ASF dual-hosted git repository. nfilotto pushed a commit to branch CAMEL-17792/doc-message-headers in repository https://gitbox.apache.org/repos/asf/camel.git
commit f16d1078769dd9698dc23b4b71060212631e711e Author: Nicolas Filotto <nfilo...@talend.com> AuthorDate: Thu Mar 17 18:20:14 2022 +0100 CAMEL-17792: Add doc about the message headers of camel-couchbase --- .../resources/org/apache/camel/component/couchbase/couchbase.json | 7 +++++++ components/camel-couchbase/src/main/docs/couchbase-component.adoc | 4 ++++ .../org/apache/camel/component/couchbase/CouchbaseConstants.java | 7 +++++++ .../org/apache/camel/component/couchbase/CouchbaseEndpoint.java | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/components/camel-couchbase/src/generated/resources/org/apache/camel/component/couchbase/couchbase.json b/components/camel-couchbase/src/generated/resources/org/apache/camel/component/couchbase/couchbase.json index 63bd546..9a5890f 100644 --- a/components/camel-couchbase/src/generated/resources/org/apache/camel/component/couchbase/couchbase.json +++ b/components/camel-couchbase/src/generated/resources/org/apache/camel/component/couchbase/couchbase.json @@ -26,6 +26,13 @@ "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...] "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which t [...] }, + "headers": { + "CCB_KEY": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The key" }, + "CCB_ID": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The document id" }, + "CCB_TTL": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The expiry for the document in seconds" }, + "CCB_DDN": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The design document name" }, + "CCB_VN": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The view name" } + }, "properties": { "protocol": { "kind": "path", "displayName": "Protocol", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The protocol to use" }, "hostname": { "kind": "path", "displayName": "Hostname", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The hostname to use" }, diff --git a/components/camel-couchbase/src/main/docs/couchbase-component.adoc b/components/camel-couchbase/src/main/docs/couchbase-component.adoc index 739fe39..6adfa39 100644 --- a/components/camel-couchbase/src/main/docs/couchbase-component.adoc +++ b/components/camel-couchbase/src/main/docs/couchbase-component.adoc @@ -50,6 +50,10 @@ include::partial$component-endpoint-options.adoc[] // endpoint options: END +// component headers: START +include::partial$component-endpoint-headers.adoc[] +// component headers: END + == Couchbase SDK compatibility Using collections and scopes is supported only for Couchbase Enterprise Server 6.5+. diff --git a/components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseConstants.java b/components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseConstants.java index ce934e0..a637b8b 100644 --- a/components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseConstants.java +++ b/components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseConstants.java @@ -16,6 +16,8 @@ */ package org.apache.camel.component.couchbase; +import org.apache.camel.spi.Metadata; + /** * Couchbase Constants and default connection parameters */ @@ -29,10 +31,15 @@ public interface CouchbaseConstants { String COUCHBASE_DELETE = "CCB_DEL"; String DEFAULT_DESIGN_DOCUMENT_NAME = "beer"; String DEFAULT_VIEWNAME = "brewery_beers"; + @Metadata(label = "consumer", description = "The key", javaType = "String") String HEADER_KEY = "CCB_KEY"; + @Metadata(description = "The document id", javaType = "String") String HEADER_ID = "CCB_ID"; + @Metadata(label = "producer", description = "The expiry for the document in seconds", javaType = "String") String HEADER_TTL = "CCB_TTL"; + @Metadata(label = "consumer", description = "The design document name", javaType = "String") String HEADER_DESIGN_DOCUMENT_NAME = "CCB_DDN"; + @Metadata(label = "consumer", description = "The view name", javaType = "String") String HEADER_VIEWNAME = "CCB_VN"; int DEFAULT_PRODUCER_RETRIES = 2; diff --git a/components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseEndpoint.java b/components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseEndpoint.java index 101ad2d..5a3b821 100644 --- a/components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseEndpoint.java +++ b/components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseEndpoint.java @@ -56,7 +56,7 @@ import static org.apache.camel.component.couchbase.CouchbaseConstants.DEFAULT_VI * Query Couchbase Views with a poll strategy and/or perform various operations against Couchbase databases. */ @UriEndpoint(firstVersion = "2.19.0", scheme = "couchbase", title = "Couchbase", syntax = "couchbase:protocol://hostname:port", - category = { Category.DATABASE, Category.NOSQL }) + category = { Category.DATABASE, Category.NOSQL }, headersClass = CouchbaseConstants.class) public class CouchbaseEndpoint extends ScheduledPollEndpoint { @UriPath