You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2022/03/17 18:32:07 UTC

[camel] branch CAMEL-17792/doc-message-headers created (now f7a41c1)

This is an automated email from the ASF dual-hosted git repository.

nfilotto pushed a change to branch CAMEL-17792/doc-message-headers
in repository https://gitbox.apache.org/repos/asf/camel.git.


      at f7a41c1  CAMEL-17792: Add doc about the message headers of camel-crypto

This branch includes the following new commits:

     new 6371df2  CAMEL-17792: Add doc about the message headers of camel-bean
     new 0432391  CAMEL-17792: Add doc about the message headers of camel-beanstalk
     new 3588584  CAMEL-17792: Add doc about the message headers of camel-caffeine
     new f356ffe  CAMEL-17792: Add doc about the message headers of camel-cassandraql
     new 845186c  CAMEL-17792: Add doc about the message headers of camel-chunk
     new 3091798  CAMEL-17792: Add doc about the message headers of camel-cmis
     new f5d4f8b  CAMEL-17792: Add doc about the message headers of camel-coap
     new 4fa17c5  CAMEL-17792: Add doc about the message headers of camel-cometd
     new 66ac275  CAMEL-17792: Add doc about the message headers of camel-consul
     new 3f41849  CAMEL-17792: Add doc about the message headers of camel-corda
     new f16d107  CAMEL-17792: Add doc about the message headers of camel-couchbase
     new a09643b  CAMEL-17792: Add doc about the message headers of camel-couchdb
     new f7a41c1  CAMEL-17792: Add doc about the message headers of camel-crypto

The 13 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[camel] 12/13: CAMEL-17792: Add doc about the message headers of camel-couchdb

Posted by nf...@apache.org.
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 a09643b302b5d4444545a3259b5381c4f368e515
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Thu Mar 17 18:26:00 2022 +0100

    CAMEL-17792: Add doc about the message headers of camel-couchdb
---
 .../apache/camel/component/couchdb/couchdb.json    |  7 +++++++
 .../src/main/docs/couchdb-component.adoc           | 22 +++-------------------
 .../camel/component/couchdb/CouchDbConstants.java  |  8 ++++++++
 .../camel/component/couchdb/CouchDbEndpoint.java   |  2 +-
 4 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/components/camel-couchdb/src/generated/resources/org/apache/camel/component/couchdb/couchdb.json b/components/camel-couchdb/src/generated/resources/org/apache/camel/component/couchdb/couchdb.json
index 9f4a1e5..b3f3a8c 100644
--- a/components/camel-couchdb/src/generated/resources/org/apache/camel/component/couchdb/couchdb.json
+++ b/components/camel-couchdb/src/generated/resources/org/apache/camel/component/couchdb/couchdb.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": {
+    "CouchDbDatabase": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The database the message came from" },
+    "CouchDbSeq": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The couchdb changeset sequence number of the update \/ delete message" },
+    "CouchDbId": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The couchdb document id" },
+    "CouchDbRev": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The couchdb document revision" },
+    "CouchDbMethod": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The method (delete \/ update)" }
+  },
   "properties": {
     "protocol": { "kind": "path", "displayName": "Protocol", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "enum": [ "http", "https" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The protocol to use for communicating with the database." },
     "hostname": { "kind": "path", "displayName": "Hostname", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Hostname of the running couchdb instance" },
diff --git a/components/camel-couchdb/src/main/docs/couchdb-component.adoc b/components/camel-couchdb/src/main/docs/couchdb-component.adoc
index d17af7b..e247cae 100644
--- a/components/camel-couchdb/src/main/docs/couchdb-component.adoc
+++ b/components/camel-couchdb/src/main/docs/couchdb-component.adoc
@@ -67,25 +67,9 @@ include::partial$component-endpoint-options.adoc[]
 
 // endpoint options: END
 
-
-== Headers
-
-The following headers are set on exchanges during message transport.
-
-[width="100%",cols="20%,80%",options="header",]
-|=======================================================================
-|Property |Value
-
-|`CouchDbDatabase` |the database the message came from
-
-|`CouchDbSeq` |the couchdb changeset sequence number of the update / delete message
-
-|`CouchDbId` |the couchdb document id
-
-|`CouchDbRev` |the couchdb document revision
-
-|`CouchDbMethod` |the method (delete / update)
-|=======================================================================
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 Headers are set by the consumer once the message is received. The
 producer will also set the headers for downstream processors once the
diff --git a/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbConstants.java b/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbConstants.java
index b177b19..0876e85 100644
--- a/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbConstants.java
+++ b/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbConstants.java
@@ -16,15 +16,23 @@
  */
 package org.apache.camel.component.couchdb;
 
+import org.apache.camel.spi.Metadata;
+
 /**
  *
  */
 public interface CouchDbConstants {
 
+    @Metadata(label = "consumer", description = "The database the message came from", javaType = "String")
     String HEADER_DATABASE = "CouchDbDatabase";
+    @Metadata(label = "consumer", description = "The couchdb changeset sequence number of the update / delete message",
+              javaType = "String")
     String HEADER_SEQ = "CouchDbSeq";
+    @Metadata(description = "The couchdb document id", javaType = "String")
     String HEADER_DOC_ID = "CouchDbId";
+    @Metadata(description = "The couchdb document revision", javaType = "String")
     String HEADER_DOC_REV = "CouchDbRev";
+    @Metadata(description = "The method (delete / update)", javaType = "String")
     String HEADER_METHOD = "CouchDbMethod";
 
 }
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 a45d0c3..46d621c 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
@@ -34,7 +34,7 @@ import org.lightcouch.CouchDbClient;
  * documents from a CouchDB database.
  */
 @UriEndpoint(firstVersion = "2.11.0", scheme = "couchdb", title = "CouchDB", syntax = "couchdb:protocol:hostname:port/database",
-             category = { Category.DATABASE, Category.NOSQL })
+             category = { Category.DATABASE, Category.NOSQL }, headersClass = CouchDbConstants.class)
 public class CouchDbEndpoint extends DefaultEndpoint {
 
     public static final String DEFAULT_STYLE = "main_only";

[camel] 09/13: CAMEL-17792: Add doc about the message headers of camel-consul

Posted by nf...@apache.org.
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 66ac2757d84c36ff815435176b56e51a7ea9f6b7
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Thu Mar 17 17:15:10 2022 +0100

    CAMEL-17792: Add doc about the message headers of camel-consul
---
 .../org/apache/camel/component/consul/consul.json  | 33 ++++++++++++++++++++
 .../src/main/docs/consul-component.adoc            | 29 ++---------------
 .../camel/component/consul/ConsulConstants.java    | 36 ++++++++++++++++++++++
 .../camel/component/consul/ConsulEndpoint.java     |  2 +-
 4 files changed, 73 insertions(+), 27 deletions(-)

diff --git a/components/camel-consul/src/generated/resources/org/apache/camel/component/consul/consul.json b/components/camel-consul/src/generated/resources/org/apache/camel/component/consul/consul.json
index 31d576b..18c62b0 100644
--- a/components/camel-consul/src/generated/resources/org/apache/camel/component/consul/consul.json
+++ b/components/camel-consul/src/generated/resources/org/apache/camel/component/consul/consul.json
@@ -52,6 +52,39 @@
     "firstIndex": { "kind": "property", "displayName": "First Index", "group": "watch", "label": "consumer,watch", "required": false, "type": "object", "javaType": "java.math.BigInteger", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0", "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The first index for watch for, default 0" },
     "recursive": { "kind": "property", "displayName": "Recursive", "group": "watch", "label": "consumer,watch", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Recursively watch, default false" }
   },
+  "headers": {
+    "CamelConsulAction": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Producer action" },
+    "CamelConsulKey": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Key on which the action should applied" },
+    "CamelConsulEventId": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The event id" },
+    "CamelConsulEventName": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The event name" },
+    "CamelConsulEventLTime": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The event LTime" },
+    "CamelConsulNodeFilter": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Node filter" },
+    "CamelConsulTagFilter": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The tag filter" },
+    "CamelConsulSessionFilter": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The session filter" },
+    "CamelConsulVersion": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The data version" },
+    "CamelConsulFlags": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Flags associated with a value" },
+    "CamelConsulIndex": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "BigInteger", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The optional value index" },
+    "CamelConsulWait": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The optional value wait" },
+    "CamelConsulCreateIndex": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The internal index value that represents when the entry was created" },
+    "CamelConsulLockIndex": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of times this key has successfully been acquired in a lock" },
+    "CamelConsulModifyIndex": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The last index that modified this key" },
+    "CamelConsulOptions": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Options associated to the request" },
+    "CamelConsulResult": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "true if the response has a result" },
+    "CamelConsulSession": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The session id" },
+    "CamelConsulValueAsString": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "To transform values retrieved from Consul i.e. on KV endpoint to string." },
+    "CamelConsulNode": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The node" },
+    "CamelConsulService": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The service" },
+    "CamelConsulDatacenter": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The data center" },
+    "CamelConsulNearNode": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The near node to use for queries." },
+    "CamelConsulNodeMeta": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "List<String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The note meta-data to use for queries." },
+    "CamelConsulLastContact": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The last contact" },
+    "CamelConsulKnownLeader": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Indicates whether it is the known leader" },
+    "CamelConsulConsistencyMode": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "com.orbitz.consul.option.ConsistencyMode", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "DEFAULT", "description": "The consistencyMode used for queries" },
+    "CamelConsulHealthyOnly": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "false", "description": "Only on healthy services" },
+    "CamelConsulHealthyState": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "com.orbitz.consul.model.State", "enum": [ "PASS", "WARN", "FAIL", "ANY", "UNKNOWN" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The state to query." },
+    "CamelConsulPreparedQueryID": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the prepared query" },
+    "CamelConsulServiceId": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The service id for agent deregistration" }
+  },
   "properties": {
     "apiEndpoint": { "kind": "path", "displayName": "Api Endpoint", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The API endpoint" },
     "connectTimeout": { "kind": "parameter", "displayName": "Connect Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Connect timeout for OkHttpClient" },
diff --git a/components/camel-consul/src/main/docs/consul-component.adoc b/components/camel-consul/src/main/docs/consul-component.adoc
index 9535110..00a5e85 100644
--- a/components/camel-consul/src/main/docs/consul-component.adoc
+++ b/components/camel-consul/src/main/docs/consul-component.adoc
@@ -46,32 +46,9 @@ include::partial$component-endpoint-options.adoc[]
 
 // endpoint options: END
 
-
-
-== Headers
-
-[width="100%",options="header"]
-|=======================================================================
-|Name |Type |Description
-|CamelConsulAction|String|The Producer action
-|CamelConsulKey|String|The Key on which the action should applied
-|CamelConsulEventId|String|The event id (consumer only)
-|CamelConsulEventName|String|The event name (consumer only)
-|CamelConsulEventLTime|Long|The event LTime
-|CamelConsulNodeFilter|String|The Node filter
-|CamelConsulTagFilter|String|The tag filter
-|CamelConsulSessionFilter|String|The session filter
-|CamelConsulVersion|int|The data version
-|CamelConsulFlags|Long|Flags associated with a value
-|CamelConsulCreateIndex|Long|The internal index value that represents when the entry was created
-|CamelConsulLockIndex|Long|The number of times this key has successfully been acquired in a lock
-|CamelConsulModifyIndex|Long|The last index that modified this key
-|CamelConsulOptions|Object|Options associated to the request
-|CamelConsulResult|boolean|true if the response has a result
-|CamelConsulSession|String|The session id
-|CamelConsulValueAsString|boolean|To transform values retrieved from Consul i.e. on KV endpoint to string.
-|CamelConsulServiceId|String|The service id for agent deregistration
-|=======================================================================
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 == Api Endpoint
 
diff --git a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulConstants.java b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulConstants.java
index 29bb5ad..9d7f565 100644
--- a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulConstants.java
+++ b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulConstants.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.consul;
 
 import com.orbitz.consul.Consul;
+import org.apache.camel.spi.Metadata;
 
 public interface ConsulConstants {
     String CONSUL_DEFAULT_URL = String.format("http://%s:%d", Consul.DEFAULT_HTTP_HOST, Consul.DEFAULT_HTTP_PORT);
@@ -25,35 +26,70 @@ public interface ConsulConstants {
     String CONSUL_SERVER_IP = "CamelConsulServerIp";
     String CONSUL_SERVER_PORT = "CamelConsulServerPort";
 
+    @Metadata(label = "producer", description = "The Producer action", javaType = "String")
     String CONSUL_ACTION = "CamelConsulAction";
+    @Metadata(description = "The Key on which the action should applied", javaType = "String")
     String CONSUL_KEY = "CamelConsulKey";
+    @Metadata(label = "consumer", description = "The event id", javaType = "String")
     String CONSUL_EVENT_ID = "CamelConsulEventId";
+    @Metadata(label = "consumer", description = "The event name", javaType = "String")
     String CONSUL_EVENT_NAME = "CamelConsulEventName";
+    @Metadata(label = "consumer", description = "The event LTime", javaType = "Long")
     String CONSUL_EVENT_LTIME = "CamelConsulEventLTime";
+    @Metadata(label = "consumer", description = "The Node filter", javaType = "String")
     String CONSUL_NODE_FILTER = "CamelConsulNodeFilter";
+    @Metadata(label = "consumer", description = "The tag filter", javaType = "String")
     String CONSUL_TAG_FILTER = "CamelConsulTagFilter";
+    @Metadata(label = "consumer", description = "The session filter", javaType = "String")
     String CONSUL_SERVICE_FILTER = "CamelConsulSessionFilter";
+    @Metadata(label = "consumer", description = "The data version", javaType = "Integer")
     String CONSUL_VERSION = "CamelConsulVersion";
+    @Metadata(description = "Flags associated with a value", javaType = "Long")
     String CONSUL_FLAGS = "CamelConsulFlags";
+    @Metadata(label = "producer", description = "The optional value index", javaType = "BigInteger")
     String CONSUL_INDEX = "CamelConsulIndex";
+    @Metadata(label = "producer", description = "The optional value wait", javaType = "String")
     String CONSUL_WAIT = "CamelConsulWait";
+    @Metadata(label = "consumer", description = "The internal index value that represents when the entry was created",
+              javaType = "Long")
     String CONSUL_CREATE_INDEX = "CamelConsulCreateIndex";
+    @Metadata(label = "consumer", description = "The number of times this key has successfully been acquired in a lock",
+              javaType = "Long")
     String CONSUL_LOCK_INDEX = "CamelConsulLockIndex";
+    @Metadata(label = "consumer", description = "The last index that modified this key", javaType = "Long")
     String CONSUL_MODIFY_INDEX = "CamelConsulModifyIndex";
+    @Metadata(description = "Options associated to the request")
     String CONSUL_OPTIONS = "CamelConsulOptions";
+    @Metadata(description = "true if the response has a result", javaType = "Boolean")
     String CONSUL_RESULT = "CamelConsulResult";
+    @Metadata(description = "The session id", javaType = "String")
     String CONSUL_SESSION = "CamelConsulSession";
+    @Metadata(label = "producer", description = "To transform values retrieved from Consul i.e. on KV endpoint to string.",
+              javaType = "Boolean")
     String CONSUL_VALUE_AS_STRING = "CamelConsulValueAsString";
+    @Metadata(label = "producer", description = "The node", javaType = "String")
     String CONSUL_NODE = "CamelConsulNode";
+    @Metadata(label = "producer", description = "The service", javaType = "String")
     String CONSUL_SERVICE = "CamelConsulService";
+    @Metadata(label = "producer", description = "The data center", javaType = "String")
     String CONSUL_DATACENTER = "CamelConsulDatacenter";
+    @Metadata(label = "producer", description = "The near node to use for queries.", javaType = "String")
     String CONSUL_NEAR_NODE = "CamelConsulNearNode";
+    @Metadata(label = "producer", description = "The note meta-data to use for queries.", javaType = "List<String>")
     String CONSUL_NODE_META = "CamelConsulNodeMeta";
+    @Metadata(label = "producer", description = "The last contact", javaType = "Long")
     String CONSUL_LAST_CONTACT = "CamelConsulLastContact";
+    @Metadata(label = "producer", description = "Indicates whether it is the known leader", javaType = "Boolean")
     String CONSUL_KNOWN_LEADER = "CamelConsulKnownLeader";
+    @Metadata(label = "producer", description = "The consistencyMode used for queries",
+              javaType = "com.orbitz.consul.option.ConsistencyMode", defaultValue = "DEFAULT")
     String CONSUL_CONSISTENCY_MODE = "CamelConsulConsistencyMode";
+    @Metadata(label = "producer", description = "Only on healthy services", javaType = "Boolean", defaultValue = "false")
     String CONSUL_HEALTHY_ONLY = "CamelConsulHealthyOnly";
+    @Metadata(label = "producer", description = "The state to query.", javaType = "com.orbitz.consul.model.State")
     String CONSUL_HEALTHY_STATE = "CamelConsulHealthyState";
+    @Metadata(label = "producer", description = "The id of the prepared query", javaType = "String")
     String CONSUL_PREPARED_QUERY_ID = "CamelConsulPreparedQueryID";
+    @Metadata(label = "producer", description = "The service id for agent deregistration", javaType = "String")
     String CONSUL_SERVICE_ID = "CamelConsulServiceId";
 }
diff --git a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulEndpoint.java b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulEndpoint.java
index c22b8c0..dce77df 100644
--- a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulEndpoint.java
+++ b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulEndpoint.java
@@ -34,7 +34,7 @@ import org.apache.camel.util.ObjectHelper;
  * Integrate with <a href="https://www.consul.io/">Consul</a> service discovery and configuration store.
  */
 @UriEndpoint(firstVersion = "2.18.0", scheme = "consul", title = "Consul", syntax = "consul:apiEndpoint",
-             category = { Category.CLOUD, Category.API })
+             category = { Category.CLOUD, Category.API }, headersClass = ConsulConstants.class)
 public class ConsulEndpoint extends DefaultEndpoint {
 
     @UriParam

[camel] 05/13: CAMEL-17792: Add doc about the message headers of camel-chunk

Posted by nf...@apache.org.
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 845186c60ac949f72638a104be65d54a09cb5ba5
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Thu Mar 17 12:30:13 2022 +0100

    CAMEL-17792: Add doc about the message headers of camel-chunk
---
 .../resources/org/apache/camel/component/chunk/chunk.json    |  4 ++++
 components/camel-chunk/src/main/docs/chunk-component.adoc    | 12 +++---------
 .../org/apache/camel/component/chunk/ChunkConstants.java     |  4 ++++
 .../java/org/apache/camel/component/chunk/ChunkEndpoint.java |  2 +-
 4 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/components/camel-chunk/src/generated/resources/org/apache/camel/component/chunk/chunk.json b/components/camel-chunk/src/generated/resources/org/apache/camel/component/chunk/chunk.json
index e67c821..bd036e9 100644
--- a/components/camel-chunk/src/generated/resources/org/apache/camel/component/chunk/chunk.json
+++ b/components/camel-chunk/src/generated/resources/org/apache/camel/component/chunk/chunk.json
@@ -27,6 +27,10 @@
     "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": {
+    "ChunkResourceUri": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A URI for the template resource to use instead of the endpoint configured." },
+    "ChunkTemplate": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The template to use instead of the endpoint configured." }
+  },
   "properties": {
     "resourceUri": { "kind": "path", "displayName": "Resource Uri", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file and http loads the resource using these protocols (classpath is default). ref will lookup the resource in the registry. bean will [...]
     "allowContextMapAll": { "kind": "parameter", "displayName": "Allow Context Map All", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether the context map should allow access to all details. By default only the message body and headers can be accessed. This option can be enabled for full access to the current Exchange and CamelContext. [...]
diff --git a/components/camel-chunk/src/main/docs/chunk-component.adoc b/components/camel-chunk/src/main/docs/chunk-component.adoc
index a18c9e9..8f4c5de 100644
--- a/components/camel-chunk/src/main/docs/chunk-component.adoc
+++ b/components/camel-chunk/src/main/docs/chunk-component.adoc
@@ -83,15 +83,9 @@ location for a template or the template content itself. If any of these
 headers is set then Camel uses this over the endpoint configured
 resource. This allows you to provide a dynamic template at runtime.
 
-[width="100%",cols="20%,10%,10%,60%",options="header",]
-|=======================================================================
-|Header |Type |Description |Support Version
-
-|ChunkConstants.CHUNK_RESOURCE_URI |String |A URI for the template resource to use instead of the endpoint
-configured. |
-
-|ChunkConstants.CHUNK_TEMPLATE |String |The template to use instead of the endpoint configured. |
-|=======================================================================
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 == Samples
 
diff --git a/components/camel-chunk/src/main/java/org/apache/camel/component/chunk/ChunkConstants.java b/components/camel-chunk/src/main/java/org/apache/camel/component/chunk/ChunkConstants.java
index b58053e..f55b8c7 100644
--- a/components/camel-chunk/src/main/java/org/apache/camel/component/chunk/ChunkConstants.java
+++ b/components/camel-chunk/src/main/java/org/apache/camel/component/chunk/ChunkConstants.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.chunk;
 
+import org.apache.camel.spi.Metadata;
+
 /**
  * Chunk component constants
  */
@@ -24,11 +26,13 @@ public final class ChunkConstants {
     /**
      * Header containing a Chunk template location
      */
+    @Metadata(description = "A URI for the template resource to use instead of the endpoint configured.", javaType = "String")
     public static final String CHUNK_RESOURCE_URI = "ChunkResourceUri";
 
     /**
      * Header containing the Chunk template code
      */
+    @Metadata(description = "The template to use instead of the endpoint configured.", javaType = "String")
     public static final String CHUNK_TEMPLATE = "ChunkTemplate";
 
     /**
diff --git a/components/camel-chunk/src/main/java/org/apache/camel/component/chunk/ChunkEndpoint.java b/components/camel-chunk/src/main/java/org/apache/camel/component/chunk/ChunkEndpoint.java
index 2c2a24d..f8ad1e0 100644
--- a/components/camel-chunk/src/main/java/org/apache/camel/component/chunk/ChunkEndpoint.java
+++ b/components/camel-chunk/src/main/java/org/apache/camel/component/chunk/ChunkEndpoint.java
@@ -45,7 +45,7 @@ import static org.apache.camel.component.chunk.ChunkConstants.CHUNK_TEMPLATE;
  * Transform messages using Chunk templating engine.
  */
 @UriEndpoint(firstVersion = "2.15.0", scheme = "chunk", title = "Chunk", syntax = "chunk:resourceUri", producerOnly = true,
-             category = { Category.TRANSFORMATION })
+             category = { Category.TRANSFORMATION }, headersClass = ChunkConstants.class)
 public class ChunkEndpoint extends ResourceEndpoint {
 
     private Theme theme;

[camel] 04/13: CAMEL-17792: Add doc about the message headers of camel-cassandraql

Posted by nf...@apache.org.
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 f356ffe1ab1e4f59502390e927e7722cb7496c13
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Thu Mar 17 12:20:00 2022 +0100

    CAMEL-17792: Add doc about the message headers of camel-cassandraql
---
 .../generated/resources/org/apache/camel/component/cassandra/cql.json | 3 +++
 components/camel-cassandraql/src/main/docs/cql-component.adoc         | 4 ++++
 .../java/org/apache/camel/component/cassandra/CassandraConstants.java | 3 +++
 .../java/org/apache/camel/component/cassandra/CassandraEndpoint.java  | 2 +-
 4 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/components/camel-cassandraql/src/generated/resources/org/apache/camel/component/cassandra/cql.json b/components/camel-cassandraql/src/generated/resources/org/apache/camel/component/cassandra/cql.json
index 500795f..e63fd79 100644
--- a/components/camel-cassandraql/src/generated/resources/org/apache/camel/component/cassandra/cql.json
+++ b/components/camel-cassandraql/src/generated/resources/org/apache/camel/component/cassandra/cql.json
@@ -26,6 +26,9 @@
     "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": {
+    "CamelCqlQuery": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The CQL query to execute." }
+  },
   "properties": {
     "beanRef": { "kind": "path", "displayName": "Bean Ref", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "beanRef is defined using bean:id" },
     "hosts": { "kind": "path", "displayName": "Hosts", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Hostname(s) Cassandra server(s). Multiple hosts can be separated by comma." },
diff --git a/components/camel-cassandraql/src/main/docs/cql-component.adoc b/components/camel-cassandraql/src/main/docs/cql-component.adoc
index a3f7e16..f5e342f 100644
--- a/components/camel-cassandraql/src/main/docs/cql-component.adoc
+++ b/components/camel-cassandraql/src/main/docs/cql-component.adoc
@@ -40,6 +40,10 @@ include::partial$component-endpoint-options.adoc[]
 
 // endpoint options: END
 
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
+
 == Endpoint Connection Syntax
 
 The endpoint can initiate the Cassandra connection or use an existing
diff --git a/components/camel-cassandraql/src/main/java/org/apache/camel/component/cassandra/CassandraConstants.java b/components/camel-cassandraql/src/main/java/org/apache/camel/component/cassandra/CassandraConstants.java
index e86ed10..6dc1552 100644
--- a/components/camel-cassandraql/src/main/java/org/apache/camel/component/cassandra/CassandraConstants.java
+++ b/components/camel-cassandraql/src/main/java/org/apache/camel/component/cassandra/CassandraConstants.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.cassandra;
 
+import org.apache.camel.spi.Metadata;
+
 /**
  * Cassandra QL Endpoint constants
  */
@@ -24,6 +26,7 @@ public final class CassandraConstants {
     /**
      * In Message header: CQL Query
      */
+    @Metadata(label = "producer", description = "The CQL query to execute.", javaType = "String")
     public static final String CQL_QUERY = "CamelCqlQuery";
 
     private CassandraConstants() {
diff --git a/components/camel-cassandraql/src/main/java/org/apache/camel/component/cassandra/CassandraEndpoint.java b/components/camel-cassandraql/src/main/java/org/apache/camel/component/cassandra/CassandraEndpoint.java
index 7e25c2a..1bd2ca5 100644
--- a/components/camel-cassandraql/src/main/java/org/apache/camel/component/cassandra/CassandraEndpoint.java
+++ b/components/camel-cassandraql/src/main/java/org/apache/camel/component/cassandra/CassandraEndpoint.java
@@ -45,7 +45,7 @@ import org.apache.camel.utils.cassandra.CassandraSessionHolder;
  * DataStax.
  */
 @UriEndpoint(firstVersion = "2.15.0", scheme = "cql", title = "Cassandra CQL", syntax = "cql:beanRef:hosts:port/keyspace",
-             category = { Category.DATABASE, Category.NOSQL })
+             category = { Category.DATABASE, Category.NOSQL }, headersClass = CassandraConstants.class)
 public class CassandraEndpoint extends ScheduledPollEndpoint {
 
     private volatile CassandraSessionHolder sessionHolder;

[camel] 02/13: CAMEL-17792: Add doc about the message headers of camel-beanstalk

Posted by nf...@apache.org.
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 043239134e576ffd0e0c796118acfd1bdabac6f7
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Thu Mar 17 11:21:30 2022 +0100

    CAMEL-17792: Add doc about the message headers of camel-beanstalk
---
 .../camel/component/beanstalk/beanstalk.json       | 15 ++++++++++
 .../src/main/docs/beanstalk-component.adoc         | 32 ++--------------------
 .../component/beanstalk/BeanstalkEndpoint.java     |  2 +-
 .../apache/camel/component/beanstalk/Headers.java  | 17 ++++++++++++
 4 files changed, 36 insertions(+), 30 deletions(-)

diff --git a/components/camel-beanstalk/src/generated/resources/org/apache/camel/component/beanstalk/beanstalk.json b/components/camel-beanstalk/src/generated/resources/org/apache/camel/component/beanstalk/beanstalk.json
index 9f6b861..1483f20 100644
--- a/components/camel-beanstalk/src/generated/resources/org/apache/camel/component/beanstalk/beanstalk.json
+++ b/components/camel-beanstalk/src/generated/resources/org/apache/camel/component/beanstalk/beanstalk.json
@@ -27,6 +27,21 @@
     "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 [...]
     "connectionSettingsFactory": { "kind": "property", "displayName": "Connection Settings Factory", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.beanstalk.ConnectionSettingsFactory", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Custom ConnectionSettingsFactory. Specify which ConnectionSettingsFactory to use to make connections to Beanstalkd. Especially useful for [...]
   },
+  "headers": {
+    "beanstalk.priority": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The priority value set" },
+    "beanstalk.delay": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Job delay in seconds" },
+    "beanstalk.timeToRun": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Job time to run in seconds. (when 0, the beanstalkd daemon raises it to 1 automatically, see Beanstalk protocol)" },
+    "beanstalk.jobId": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Job ID" },
+    "beanstalk.result": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The flag indicating if the operation was a success or not" },
+    "beanstalk.tube": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the tube that contains this job" },
+    "beanstalk.state": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "\u201Cready\u201D or \u201Cdelayed\u201D or \u201Creserved\u201D or \u201Cburied\u201D (must be \u201Creserved\u201D)" },
+    "beanstalk.age": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The time in seconds since the put command that created this job" },
+    "beanstalk.time-left": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of seconds left until the server puts this job into the ready queue" },
+    "beanstalk.timeouts": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of times this job has timed out during a reservation" },
+    "beanstalk.releases": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of times a client has released this job from a reservation" },
+    "beanstalk.buries": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of times this job has been buried" },
+    "beanstalk.kicks": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of times this job has been kicked" }
+  },
   "properties": {
     "connectionSettings": { "kind": "path", "displayName": "Connection Settings", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Connection settings host:port\/tube" },
     "command": { "kind": "parameter", "displayName": "Command", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.beanstalk.BeanstalkCommand", "enum": [ "bury", "release", "put", "touch", "delete", "kick" ], "deprecated": false, "autowired": false, "secret": false, "description": "put means to put the job into Beanstalk. Job body is specified in the Camel message body. Job ID will be returned in beanstalk.jobId message header. de [...]
diff --git a/components/camel-beanstalk/src/main/docs/beanstalk-component.adoc b/components/camel-beanstalk/src/main/docs/beanstalk-component.adoc
index ea878e6..523b99a 100644
--- a/components/camel-beanstalk/src/main/docs/beanstalk-component.adoc
+++ b/components/camel-beanstalk/src/main/docs/beanstalk-component.adoc
@@ -104,35 +104,9 @@ Consumer] which means there is more options you can configure, such as
 how frequent the consumer should poll. For more details
 see Polling Consumer.
 
-== Consumer Headers
-
-The consumer stores a number of job headers in the Exchange message:
-
-[width="100%",cols="10%,10%,80%",options="header",]
-|=======================================================================
-|Property |Type |Description
-
-|_beanstalk.jobId_ |long | Job ID
-
-|_beanstalk.tube_ |string |the name of the tube that contains this job
-
-|_beanstalk.state_ |string |“ready” or “delayed” or “reserved” or “buried” (must be “reserved”)
-
-|_beanstalk.priority_ |long |the priority value set
-
-|_beanstalk.age_ |int |the time in seconds since the put command that created this job
-
-|_beanstalk.time-left_ |int |the number of seconds left until the server puts this job into the ready
-queue
-
-|_beanstalk.timeouts_ |int |the number of times this job has timed out during a reservation
-
-|_beanstalk.releases_ |int |the number of times a client has released this job from a reservation
-
-|_beanstalk.buries_ |int |the number of times this job has been buried
-
-|_beanstalk.kicks_ |int |the number of times this job has been kicked
-|=======================================================================
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 == Examples
 
diff --git a/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/BeanstalkEndpoint.java b/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/BeanstalkEndpoint.java
index 1e436d0..655d13f 100644
--- a/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/BeanstalkEndpoint.java
+++ b/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/BeanstalkEndpoint.java
@@ -39,7 +39,7 @@ import org.apache.camel.support.ScheduledPollEndpoint;
  * Retrieve and post-process Beanstalk jobs.
  */
 @UriEndpoint(firstVersion = "2.15.0", scheme = "beanstalk", title = "Beanstalk", syntax = "beanstalk:connectionSettings",
-             category = { Category.MESSAGING })
+             category = { Category.MESSAGING }, headersClass = Headers.class)
 public class BeanstalkEndpoint extends ScheduledPollEndpoint implements AsyncEndpoint {
     final ConnectionSettings conn;
 
diff --git a/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/Headers.java b/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/Headers.java
index 4e7a305..87d4d55 100644
--- a/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/Headers.java
+++ b/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/Headers.java
@@ -16,29 +16,46 @@
  */
 package org.apache.camel.component.beanstalk;
 
+import org.apache.camel.spi.Metadata;
+
 public final class Headers {
 
     public static final String PREFIX = "beanstalk.";
 
     // in
+    @Metadata(description = "The priority value set", javaType = "long")
     public static final String PRIORITY = PREFIX + "priority";
+    @Metadata(description = "The Job delay in seconds", javaType = "Integer")
     public static final String DELAY = PREFIX + "delay";
+    @Metadata(description = "The Job time to run in seconds. (when 0, the beanstalkd daemon raises it to 1 automatically, see Beanstalk protocol)",
+              javaType = "Integer")
     public static final String TIME_TO_RUN = PREFIX + "timeToRun";
 
     // in/out
+    @Metadata(description = "Job ID", javaType = "long")
     public static final String JOB_ID = PREFIX + "jobId";
 
     // out
+    @Metadata(description = "The flag indicating if the operation was a success or not", javaType = "Boolean")
     public static final String RESULT = PREFIX + "result";
 
     // other info
+    @Metadata(description = "The name of the tube that contains this job", javaType = "String")
     public static final String TUBE = PREFIX + "tube";
+    @Metadata(description = "“ready” or “delayed” or “reserved” or “buried” (must be “reserved”)", javaType = "String")
     public static final String STATE = PREFIX + "state";
+    @Metadata(description = "The time in seconds since the put command that created this job", javaType = "Integer")
     public static final String AGE = PREFIX + "age";
+    @Metadata(description = "The number of seconds left until the server puts this job into the ready queue",
+              javaType = "Integer")
     public static final String TIME_LEFT = PREFIX + "time-left";
+    @Metadata(description = "The number of times this job has timed out during a reservation", javaType = "Integer")
     public static final String TIMEOUTS = PREFIX + "timeouts";
+    @Metadata(description = "The number of times a client has released this job from a reservation", javaType = "Integer")
     public static final String RELEASES = PREFIX + "releases";
+    @Metadata(description = "The number of times this job has been buried", javaType = "Integer")
     public static final String BURIES = PREFIX + "buries";
+    @Metadata(description = "The number of times this job has been kicked", javaType = "Integer")
     public static final String KICKS = PREFIX + "kicks";
 
     private Headers() {

[camel] 13/13: CAMEL-17792: Add doc about the message headers of camel-crypto

Posted by nf...@apache.org.
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 f7a41c1ade68cced5ac22ed3660c82ecef61486b
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Thu Mar 17 18:46:59 2022 +0100

    CAMEL-17792: Add doc about the message headers of camel-crypto
---
 .../resources/org/apache/camel/component/crypto/crypto.json      | 6 ++++++
 components/camel-crypto/src/main/docs/crypto-component.adoc      | 5 ++++-
 .../apache/camel/component/crypto/DigitalSignatureConstants.java | 9 +++++++++
 .../apache/camel/component/crypto/DigitalSignatureEndpoint.java  | 3 ++-
 4 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/components/camel-crypto/src/generated/resources/org/apache/camel/component/crypto/crypto.json b/components/camel-crypto/src/generated/resources/org/apache/camel/component/crypto/crypto.json
index 2405e57..2245c27 100644
--- a/components/camel-crypto/src/generated/resources/org/apache/camel/component/crypto/crypto.json
+++ b/components/camel-crypto/src/generated/resources/org/apache/camel/component/crypto/crypto.json
@@ -44,6 +44,12 @@
     "secureRandom": { "kind": "property", "displayName": "Secure Random", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.security.SecureRandom", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.crypto.DigitalSignatureConfiguration", "configurationField": "configuration", "description": "Set the SecureRandom used to initialize the Signature service" },
     "password": { "kind": "property", "displayName": "Password", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.crypto.DigitalSignatureConfiguration", "configurationField": "configuration", "description": "Sets the password used to access an aliased PrivateKey in the KeyStore." }
   },
+  "headers": {
+    "CamelSignaturePrivateKey": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "java.security.PrivateKey", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The PrivateKey that should be used to sign the message" },
+    "CamelSignaturePublicKeyOrCert": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Certificate or PublicKey", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Certificate or PublicKey that should be used to verify the signature" },
+    "CamelSignatureKeyStoreAlias": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The alias used to query the KeyStore for keys and Certificates to be\n used in signing and verifying exchanges" },
+    "CamelSignatureKeyStorePassword": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "char[]", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The password used to access an aliased PrivateKey in the KeyStore." }
+  },
   "properties": {
     "cryptoOperation": { "kind": "path", "displayName": "Crypto Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.crypto.CryptoOperation", "enum": [ "sign", "verify" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.crypto.DigitalSignatureConfiguration", "configurationField": "configuration", "description": "Set the Crypto operation f [...]
     "name": { "kind": "path", "displayName": "Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.crypto.DigitalSignatureConfiguration", "configurationField": "configuration", "description": "The logical name of this operation." },
diff --git a/components/camel-crypto/src/main/docs/crypto-component.adoc b/components/camel-crypto/src/main/docs/crypto-component.adoc
index 3ff4975..9e85d7e 100644
--- a/components/camel-crypto/src/main/docs/crypto-component.adoc
+++ b/components/camel-crypto/src/main/docs/crypto-component.adoc
@@ -101,12 +101,15 @@ include::partial$component-endpoint-options.adoc[]
 
 // endpoint options: END
 
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 == Using
 
 === Raw keys
 
-The most basic way to way to sign and verify an exchange is with a
+The most basic way to sign and verify an exchange is with a
 KeyPair as follows.
 
 The same can be achieved with the xref:manual::spring-xml-extensions.adoc[Spring
diff --git a/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureConstants.java b/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureConstants.java
index 0a02a63..d94677d 100644
--- a/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureConstants.java
+++ b/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureConstants.java
@@ -16,14 +16,23 @@
  */
 package org.apache.camel.component.crypto;
 
+import org.apache.camel.spi.Metadata;
+
 /**
  * <code>DigitalSignatureConstants</code> contains Constants for use as Message header keys.
  */
 public final class DigitalSignatureConstants {
+    @Metadata(description = "The PrivateKey that should be used to sign the message", javaType = "java.security.PrivateKey")
     public static final String SIGNATURE_PRIVATE_KEY = "CamelSignaturePrivateKey";
+    @Metadata(description = "The Certificate or PublicKey that should be used to verify the signature",
+              javaType = "Certificate or PublicKey")
     public static final String SIGNATURE_PUBLIC_KEY_OR_CERT = "CamelSignaturePublicKeyOrCert";
     public static final String SIGNATURE = "CamelDigitalSignature";
+    @Metadata(description = "The alias used to query the KeyStore for keys and Certificates to be\n" +
+                            " used in signing and verifying exchanges",
+              javaType = "String")
     public static final String KEYSTORE_ALIAS = "CamelSignatureKeyStoreAlias";
+    @Metadata(description = "The password used to access an aliased PrivateKey in the KeyStore.", javaType = "char[]")
     public static final String KEYSTORE_PASSWORD = "CamelSignatureKeyStorePassword";
 
     private DigitalSignatureConstants() {
diff --git a/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureEndpoint.java b/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureEndpoint.java
index 69ce2e7..664015c 100644
--- a/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureEndpoint.java
+++ b/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureEndpoint.java
@@ -36,7 +36,8 @@ import org.apache.camel.support.DefaultEndpoint;
  * Sign and verify exchanges using the Signature Service of the Java Cryptographic Extension (JCE).
  */
 @UriEndpoint(firstVersion = "2.3.0", scheme = "crypto", title = "Crypto (JCE)", syntax = "crypto:cryptoOperation:name",
-             producerOnly = true, category = { Category.SECURITY, Category.TRANSFORMATION })
+             producerOnly = true, category = { Category.SECURITY, Category.TRANSFORMATION },
+             headersClass = DigitalSignatureConstants.class)
 public class DigitalSignatureEndpoint extends DefaultEndpoint {
     @UriParam
     private DigitalSignatureConfiguration configuration;

[camel] 08/13: CAMEL-17792: Add doc about the message headers of camel-cometd

Posted by nf...@apache.org.
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 4fa17c5e4152dffae94d6d1a3b4e30ec92a45814
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Thu Mar 17 14:37:28 2022 +0100

    CAMEL-17792: Add doc about the message headers of camel-cometd
---
 .../generated/resources/org/apache/camel/component/cometd/cometd.json | 4 ++++
 .../resources/org/apache/camel/component/cometd/cometds.json          | 4 ++++
 components/camel-cometd/src/main/docs/cometd-component.adoc           | 4 +++-
 .../main/java/org/apache/camel/component/cometd/CometdBinding.java    | 3 +++
 .../main/java/org/apache/camel/component/cometd/CometdEndpoint.java   | 2 +-
 5 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/components/camel-cometd/src/generated/resources/org/apache/camel/component/cometd/cometd.json b/components/camel-cometd/src/generated/resources/org/apache/camel/component/cometd/cometd.json
index 558abaf..5b24a81 100644
--- a/components/camel-cometd/src/generated/resources/org/apache/camel/component/cometd/cometd.json
+++ b/components/camel-cometd/src/generated/resources/org/apache/camel/component/cometd/cometd.json
@@ -34,6 +34,10 @@
     "sslPassword": { "kind": "property", "displayName": "Ssl Password", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "The password when using SSL." },
     "useGlobalSslContextParameters": { "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." }
   },
+  "headers": {
+    "CometdClientId": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The clientId of the session" },
+    "subscription": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The subscription" }
+  },
   "properties": {
     "host": { "kind": "path", "displayName": "Host", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Hostname" },
     "port": { "kind": "path", "displayName": "Port", "group": "common", "label": "", "required": true, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Host port number" },
diff --git a/components/camel-cometd/src/generated/resources/org/apache/camel/component/cometd/cometds.json b/components/camel-cometd/src/generated/resources/org/apache/camel/component/cometd/cometds.json
index 0176a91..3e48eb6 100644
--- a/components/camel-cometd/src/generated/resources/org/apache/camel/component/cometd/cometds.json
+++ b/components/camel-cometd/src/generated/resources/org/apache/camel/component/cometd/cometds.json
@@ -34,6 +34,10 @@
     "sslPassword": { "kind": "property", "displayName": "Ssl Password", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "The password when using SSL." },
     "useGlobalSslContextParameters": { "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." }
   },
+  "headers": {
+    "CometdClientId": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The clientId of the session" },
+    "subscription": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The subscription" }
+  },
   "properties": {
     "host": { "kind": "path", "displayName": "Host", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Hostname" },
     "port": { "kind": "path", "displayName": "Port", "group": "common", "label": "", "required": true, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Host port number" },
diff --git a/components/camel-cometd/src/main/docs/cometd-component.adoc b/components/camel-cometd/src/main/docs/cometd-component.adoc
index 6a60f5d..1806ee0 100644
--- a/components/camel-cometd/src/main/docs/cometd-component.adoc
+++ b/components/camel-cometd/src/main/docs/cometd-component.adoc
@@ -65,7 +65,9 @@ include::partial$component-endpoint-options.adoc[]
 
 // endpoint options: END
 
-
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 == Sample
 
diff --git a/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdBinding.java b/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdBinding.java
index ffa804d..52d648b 100644
--- a/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdBinding.java
+++ b/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdBinding.java
@@ -24,6 +24,7 @@ import java.util.Set;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.support.DefaultMessage;
 import org.cometd.bayeux.server.ServerChannel;
 import org.cometd.bayeux.server.ServerMessage;
@@ -38,7 +39,9 @@ import org.slf4j.LoggerFactory;
 public class CometdBinding {
 
     public static final String HEADERS_FIELD = "CamelHeaders";
+    @Metadata(description = "The clientId of the session", javaType = "String")
     public static final String COMETD_CLIENT_ID_HEADER_NAME = "CometdClientId";
+    @Metadata(description = "The subscription", javaType = "String")
     public static final String COMETD_SUBSCRIPTION_HEADER_NAME = "subscription";
     public static final String COMETD_SESSION_ATTR_HEADER_NAME = "CometdSessionAttr";
 
diff --git a/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdEndpoint.java b/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdEndpoint.java
index 17c65b9..573339c 100644
--- a/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdEndpoint.java
+++ b/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdEndpoint.java
@@ -38,7 +38,7 @@ import org.apache.camel.util.ObjectHelper;
  * the browser using an AJAX based mechanism.
  */
 @UriEndpoint(firstVersion = "2.0.0", scheme = "cometd,cometds", title = "CometD", syntax = "cometd:host:port/channelName",
-             category = { Category.WEBSOCKET })
+             category = { Category.WEBSOCKET }, headersClass = CometdBinding.class)
 public class CometdEndpoint extends DefaultEndpoint {
 
     private CometdComponent component;

[camel] 07/13: CAMEL-17792: Add doc about the message headers of camel-coap

Posted by nf...@apache.org.
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 f5d4f8b70541fdcf59119a2b0782f7f51aa061b2
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Thu Mar 17 14:19:46 2022 +0100

    CAMEL-17792: Add doc about the message headers of camel-coap
---
 .../resources/org/apache/camel/coap/coap+tcp.json      |  6 ++++++
 .../resources/org/apache/camel/coap/coap.json          |  6 ++++++
 .../resources/org/apache/camel/coap/coaps+tcp.json     |  6 ++++++
 .../resources/org/apache/camel/coap/coaps.json         |  6 ++++++
 .../camel-coap/src/main/docs/coap-component.adoc       | 18 +++---------------
 .../java/org/apache/camel/coap/CamelCoapResource.java  |  4 ++--
 .../main/java/org/apache/camel/coap/CoAPConstants.java | 13 +++++++++++++
 .../main/java/org/apache/camel/coap/CoAPEndpoint.java  |  2 +-
 .../main/java/org/apache/camel/coap/CoAPProducer.java  |  4 ++--
 .../apache/camel/coap/CoAPComponentTLSTestBase.java    | 18 +++++++++---------
 .../java/org/apache/camel/coap/CoAPComponentTest.java  |  5 ++---
 .../apache/camel/coap/CoAPRestComponentTestBase.java   |  5 ++---
 12 files changed, 58 insertions(+), 35 deletions(-)

diff --git a/components/camel-coap/src/generated/resources/org/apache/camel/coap/coap+tcp.json b/components/camel-coap/src/generated/resources/org/apache/camel/coap/coap+tcp.json
index 59d4ef1..4d75e37 100644
--- a/components/camel-coap/src/generated/resources/org/apache/camel/coap/coap+tcp.json
+++ b/components/camel-coap/src/generated/resources/org/apache/camel/coap/coap+tcp.json
@@ -27,6 +27,12 @@
     "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": {
+    "CamelCoapMethod": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The request method that the CoAP producer should use when calling the target CoAP\nserver URI. Valid options are DELETE, GET, PING, POST & PUT." },
+    "CamelCoapResponseCode": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The CoAP response code sent by the external server. See RFC 7252 for details\nof what each code means." },
+    "CamelCoapUri": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The URI of a CoAP server to call. Will override any existing URI configured directly on the endpoint." },
+    "Content-Type": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The content type" }
+  },
   "properties": {
     "uri": { "kind": "path", "displayName": "Uri", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.net.URI", "deprecated": false, "autowired": false, "secret": false, "description": "The URI for the CoAP endpoint" },
     "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a m [...]
diff --git a/components/camel-coap/src/generated/resources/org/apache/camel/coap/coap.json b/components/camel-coap/src/generated/resources/org/apache/camel/coap/coap.json
index ea77364..11495aa 100644
--- a/components/camel-coap/src/generated/resources/org/apache/camel/coap/coap.json
+++ b/components/camel-coap/src/generated/resources/org/apache/camel/coap/coap.json
@@ -27,6 +27,12 @@
     "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": {
+    "CamelCoapMethod": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The request method that the CoAP producer should use when calling the target CoAP\nserver URI. Valid options are DELETE, GET, PING, POST & PUT." },
+    "CamelCoapResponseCode": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The CoAP response code sent by the external server. See RFC 7252 for details\nof what each code means." },
+    "CamelCoapUri": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The URI of a CoAP server to call. Will override any existing URI configured directly on the endpoint." },
+    "Content-Type": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The content type" }
+  },
   "properties": {
     "uri": { "kind": "path", "displayName": "Uri", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.net.URI", "deprecated": false, "autowired": false, "secret": false, "description": "The URI for the CoAP endpoint" },
     "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a m [...]
diff --git a/components/camel-coap/src/generated/resources/org/apache/camel/coap/coaps+tcp.json b/components/camel-coap/src/generated/resources/org/apache/camel/coap/coaps+tcp.json
index 6c0da841..66aa21e 100644
--- a/components/camel-coap/src/generated/resources/org/apache/camel/coap/coaps+tcp.json
+++ b/components/camel-coap/src/generated/resources/org/apache/camel/coap/coaps+tcp.json
@@ -27,6 +27,12 @@
     "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": {
+    "CamelCoapMethod": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The request method that the CoAP producer should use when calling the target CoAP\nserver URI. Valid options are DELETE, GET, PING, POST & PUT." },
+    "CamelCoapResponseCode": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The CoAP response code sent by the external server. See RFC 7252 for details\nof what each code means." },
+    "CamelCoapUri": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The URI of a CoAP server to call. Will override any existing URI configured directly on the endpoint." },
+    "Content-Type": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The content type" }
+  },
   "properties": {
     "uri": { "kind": "path", "displayName": "Uri", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.net.URI", "deprecated": false, "autowired": false, "secret": false, "description": "The URI for the CoAP endpoint" },
     "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a m [...]
diff --git a/components/camel-coap/src/generated/resources/org/apache/camel/coap/coaps.json b/components/camel-coap/src/generated/resources/org/apache/camel/coap/coaps.json
index e9a8546..e668fb9 100644
--- a/components/camel-coap/src/generated/resources/org/apache/camel/coap/coaps.json
+++ b/components/camel-coap/src/generated/resources/org/apache/camel/coap/coaps.json
@@ -27,6 +27,12 @@
     "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": {
+    "CamelCoapMethod": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The request method that the CoAP producer should use when calling the target CoAP\nserver URI. Valid options are DELETE, GET, PING, POST & PUT." },
+    "CamelCoapResponseCode": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The CoAP response code sent by the external server. See RFC 7252 for details\nof what each code means." },
+    "CamelCoapUri": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The URI of a CoAP server to call. Will override any existing URI configured directly on the endpoint." },
+    "Content-Type": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The content type" }
+  },
   "properties": {
     "uri": { "kind": "path", "displayName": "Uri", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.net.URI", "deprecated": false, "autowired": false, "secret": false, "description": "The URI for the CoAP endpoint" },
     "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a m [...]
diff --git a/components/camel-coap/src/main/docs/coap-component.adoc b/components/camel-coap/src/main/docs/coap-component.adoc
index 528f18a..94737c5 100644
--- a/components/camel-coap/src/main/docs/coap-component.adoc
+++ b/components/camel-coap/src/main/docs/coap-component.adoc
@@ -62,21 +62,9 @@ include::partial$component-endpoint-options.adoc[]
 
 // endpoint options: END
 
-
-== Message Headers
-
-[width="100%",cols="10%,20%,70%",options="header",]
-|=======================================================================
-|Name |Type |Description
-
-|`CamelCoapMethod` |`String` |The request method that the CoAP producer should use when calling the target CoAP
-server URI. Valid options are DELETE, GET, PING, POST & PUT.
-
-|`CamelCoapResponseCode` |`String` |The CoAP response code sent by the external server. See RFC 7252 for details
-of what each code means.
-
-|`CamelCoapUri` |`String` |The URI of a CoAP server to call. Will override any existing URI configured directly on the endpoint.
-|=======================================================================
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 === Configuring the CoAP producer request method
 
diff --git a/components/camel-coap/src/main/java/org/apache/camel/coap/CamelCoapResource.java b/components/camel-coap/src/main/java/org/apache/camel/coap/CamelCoapResource.java
index 5045117..a938396 100644
--- a/components/camel-coap/src/main/java/org/apache/camel/coap/CamelCoapResource.java
+++ b/components/camel-coap/src/main/java/org/apache/camel/coap/CamelCoapResource.java
@@ -111,7 +111,7 @@ final class CamelCoapResource extends CoapResource {
 
             if (options.hasContentFormat()) {
                 String mt = MediaTypeRegistry.toString(options.getContentFormat());
-                camelExchange.getIn().setHeader(org.apache.camel.Exchange.CONTENT_TYPE, mt);
+                camelExchange.getIn().setHeader(CoAPConstants.CONTENT_TYPE, mt);
             }
 
             List<String> path = exchange.getRequest().getOptions().getUriPath();
@@ -140,7 +140,7 @@ final class CamelCoapResource extends CoapResource {
             consumer.getProcessor().process(camelExchange);
             Message target = camelExchange.getMessage();
 
-            int format = MediaTypeRegistry.parse(target.getHeader(org.apache.camel.Exchange.CONTENT_TYPE, String.class));
+            int format = MediaTypeRegistry.parse(target.getHeader(CoAPConstants.CONTENT_TYPE, String.class));
             cexchange.respond(ResponseCode.CONTENT, target.getBody(byte[].class), format);
 
         } catch (Exception e) {
diff --git a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPConstants.java b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPConstants.java
index 042f1c2..211bdb7 100644
--- a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPConstants.java
+++ b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPConstants.java
@@ -16,6 +16,9 @@
  */
 package org.apache.camel.coap;
 
+import org.apache.camel.Exchange;
+import org.apache.camel.spi.Metadata;
+
 /**
  * CoAP component constants
  */
@@ -38,7 +41,17 @@ public interface CoAPConstants {
     /**
      * CoAP exchange header names
      */
+    @Metadata(description = "The request method that the CoAP producer should use when calling the target CoAP\n" +
+                            "server URI. Valid options are DELETE, GET, PING, POST & PUT.",
+              javaType = "String")
     String COAP_METHOD = "CamelCoapMethod";
+    @Metadata(description = "The CoAP response code sent by the external server. See RFC 7252 for details\n" +
+                            "of what each code means.",
+              javaType = "String")
     String COAP_RESPONSE_CODE = "CamelCoapResponseCode";
+    @Metadata(description = "The URI of a CoAP server to call. Will override any existing URI configured directly on the endpoint.",
+              javaType = "String")
     String COAP_URI = "CamelCoapUri";
+    @Metadata(description = "The content type", javaType = "String")
+    String CONTENT_TYPE = Exchange.CONTENT_TYPE;
 }
diff --git a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPEndpoint.java b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPEndpoint.java
index 82119b5..3814cb9 100644
--- a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPEndpoint.java
+++ b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPEndpoint.java
@@ -51,7 +51,7 @@ import org.eclipse.californium.scandium.dtls.rpkstore.TrustedRpkStore;
  * Send and receive messages to/from COAP capable devices.
  */
 @UriEndpoint(firstVersion = "2.16.0", scheme = "coap,coaps,coap+tcp,coaps+tcp", title = "CoAP", syntax = "coap:uri",
-             category = { Category.IOT })
+             category = { Category.IOT }, headersClass = CoAPConstants.class)
 public class CoAPEndpoint extends DefaultEndpoint {
     @UriPath
     private URI uri;
diff --git a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java
index bcbd70a..fc60f19 100644
--- a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java
+++ b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java
@@ -49,7 +49,7 @@ public class CoAPProducer extends DefaultProducer {
     @Override
     public void process(Exchange exchange) throws Exception {
         CoapClient client = getClient(exchange);
-        String ct = exchange.getIn().getHeader(Exchange.CONTENT_TYPE, String.class);
+        String ct = exchange.getIn().getHeader(CoAPConstants.CONTENT_TYPE, String.class);
         if (ct == null) {
             // ?default?
             ct = "application/octet-stream";
@@ -83,7 +83,7 @@ public class CoAPProducer extends DefaultProducer {
         if (response != null) {
             Message resp = exchange.getOut();
             String mt = MediaTypeRegistry.toString(response.getOptions().getContentFormat());
-            resp.setHeader(org.apache.camel.Exchange.CONTENT_TYPE, mt);
+            resp.setHeader(CoAPConstants.CONTENT_TYPE, mt);
             resp.setHeader(CoAPConstants.COAP_RESPONSE_CODE, response.getCode().toString());
             resp.setBody(response.getPayload());
         }
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTLSTestBase.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTLSTestBase.java
index 27b9c71..05a165a 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTLSTestBase.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTLSTestBase.java
@@ -59,7 +59,7 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMinimumMessageCount(1);
         mock.expectedBodiesReceived("Hello Camel CoAP");
-        mock.expectedHeaderReceived(Exchange.CONTENT_TYPE,
+        mock.expectedHeaderReceived(CoAPConstants.CONTENT_TYPE,
                 MediaTypeRegistry.toString(MediaTypeRegistry.APPLICATION_OCTET_STREAM));
         mock.expectedHeaderReceived(CoAPConstants.COAP_RESPONSE_CODE, CoAP.ResponseCode.CONTENT.toString());
         sendBodyAndHeader("direct:start", "Camel CoAP", CoAPConstants.COAP_METHOD, "POST");
@@ -87,7 +87,7 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMinimumMessageCount(1);
         mock.expectedBodiesReceived("Hello Camel CoAP");
-        mock.expectedHeaderReceived(Exchange.CONTENT_TYPE,
+        mock.expectedHeaderReceived(CoAPConstants.CONTENT_TYPE,
                 MediaTypeRegistry.toString(MediaTypeRegistry.APPLICATION_OCTET_STREAM));
         mock.expectedHeaderReceived(CoAPConstants.COAP_RESPONSE_CODE, CoAP.ResponseCode.CONTENT.toString());
         sendBodyAndHeader("direct:selfsigned", "Camel CoAP", CoAPConstants.COAP_METHOD, "POST");
@@ -99,7 +99,7 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMinimumMessageCount(1);
         mock.expectedBodiesReceived("Hello Camel CoAP");
-        mock.expectedHeaderReceived(Exchange.CONTENT_TYPE,
+        mock.expectedHeaderReceived(CoAPConstants.CONTENT_TYPE,
                 MediaTypeRegistry.toString(MediaTypeRegistry.APPLICATION_OCTET_STREAM));
         mock.expectedHeaderReceived(CoAPConstants.COAP_RESPONSE_CODE, CoAP.ResponseCode.CONTENT.toString());
         sendBodyAndHeader("direct:clientauth", "Camel CoAP", CoAPConstants.COAP_METHOD, "POST");
@@ -119,7 +119,7 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMinimumMessageCount(1);
         mock.expectedBodiesReceived("Hello Camel CoAP");
-        mock.expectedHeaderReceived(Exchange.CONTENT_TYPE,
+        mock.expectedHeaderReceived(CoAPConstants.CONTENT_TYPE,
                 MediaTypeRegistry.toString(MediaTypeRegistry.APPLICATION_OCTET_STREAM));
         mock.expectedHeaderReceived(CoAPConstants.COAP_RESPONSE_CODE, CoAP.ResponseCode.CONTENT.toString());
         sendBodyAndHeader("direct:ciphersuites", "Camel CoAP", CoAPConstants.COAP_METHOD, "POST");
@@ -132,7 +132,7 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
             MockEndpoint mock = getMockEndpoint("mock:result");
             mock.expectedMinimumMessageCount(1);
             mock.expectedBodiesReceived("Hello Camel CoAP");
-            mock.expectedHeaderReceived(Exchange.CONTENT_TYPE,
+            mock.expectedHeaderReceived(CoAPConstants.CONTENT_TYPE,
                     MediaTypeRegistry.toString(MediaTypeRegistry.APPLICATION_OCTET_STREAM));
             mock.expectedHeaderReceived(CoAPConstants.COAP_RESPONSE_CODE, CoAP.ResponseCode.CONTENT.toString());
             sendBodyAndHeader("direct:rpk", "Camel CoAP", CoAPConstants.COAP_METHOD, "POST");
@@ -166,7 +166,7 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
             MockEndpoint mock = getMockEndpoint("mock:result");
             mock.expectedMinimumMessageCount(1);
             mock.expectedBodiesReceived("Hello Camel CoAP");
-            mock.expectedHeaderReceived(Exchange.CONTENT_TYPE,
+            mock.expectedHeaderReceived(CoAPConstants.CONTENT_TYPE,
                     MediaTypeRegistry.toString(MediaTypeRegistry.APPLICATION_OCTET_STREAM));
             mock.expectedHeaderReceived(CoAPConstants.COAP_RESPONSE_CODE, CoAP.ResponseCode.CONTENT.toString());
             sendBodyAndHeader("direct:rpkclientauth", "Camel CoAP", CoAPConstants.COAP_METHOD, "POST");
@@ -180,7 +180,7 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
             MockEndpoint mock = getMockEndpoint("mock:result");
             mock.expectedMinimumMessageCount(1);
             mock.expectedBodiesReceived("Hello Camel CoAP");
-            mock.expectedHeaderReceived(Exchange.CONTENT_TYPE,
+            mock.expectedHeaderReceived(CoAPConstants.CONTENT_TYPE,
                     MediaTypeRegistry.toString(MediaTypeRegistry.APPLICATION_OCTET_STREAM));
             mock.expectedHeaderReceived(CoAPConstants.COAP_RESPONSE_CODE, CoAP.ResponseCode.CONTENT.toString());
             sendBodyAndHeader("direct:psk", "Camel CoAP", CoAPConstants.COAP_METHOD, "POST");
@@ -194,7 +194,7 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
             MockEndpoint mock = getMockEndpoint("mock:result");
             mock.expectedMinimumMessageCount(1);
             mock.expectedBodiesReceived("Hello Camel CoAP");
-            mock.expectedHeaderReceived(Exchange.CONTENT_TYPE,
+            mock.expectedHeaderReceived(CoAPConstants.CONTENT_TYPE,
                     MediaTypeRegistry.toString(MediaTypeRegistry.APPLICATION_OCTET_STREAM));
             mock.expectedHeaderReceived(CoAPConstants.COAP_RESPONSE_CODE, CoAP.ResponseCode.CONTENT.toString());
             sendBodyAndHeader("direct:pskciphersuite", "Camel CoAP", CoAPConstants.COAP_METHOD, "POST");
@@ -208,7 +208,7 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
             MockEndpoint mock = getMockEndpoint("mock:result");
             mock.expectedMinimumMessageCount(1);
             mock.expectedBodiesReceived("Hello Camel CoAP");
-            mock.expectedHeaderReceived(Exchange.CONTENT_TYPE,
+            mock.expectedHeaderReceived(CoAPConstants.CONTENT_TYPE,
                     MediaTypeRegistry.toString(MediaTypeRegistry.APPLICATION_OCTET_STREAM));
             mock.expectedHeaderReceived(CoAPConstants.COAP_RESPONSE_CODE, CoAP.ResponseCode.CONTENT.toString());
             sendBodyAndHeader("direct:pskx509", "Camel CoAP", CoAPConstants.COAP_METHOD, "POST");
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java
index 0c60ced..6bd9ba9 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.coap;
 
-import org.apache.camel.Exchange;
 import org.apache.camel.Produce;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
@@ -49,7 +48,7 @@ public class CoAPComponentTest extends CoAPTestSupport {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMinimumMessageCount(1);
         mock.expectedBodiesReceived("Hello Camel CoAP");
-        mock.expectedHeaderReceived(Exchange.CONTENT_TYPE,
+        mock.expectedHeaderReceived(CoAPConstants.CONTENT_TYPE,
                 MediaTypeRegistry.toString(MediaTypeRegistry.APPLICATION_OCTET_STREAM));
         mock.expectedHeaderReceived(CoAPConstants.COAP_RESPONSE_CODE, CoAP.ResponseCode.CONTENT.toString());
         sender.sendBody("Camel CoAP");
@@ -61,7 +60,7 @@ public class CoAPComponentTest extends CoAPTestSupport {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMinimumMessageCount(1);
         mock.expectedBodiesReceived("Hello Camel CoAP");
-        mock.expectedHeaderReceived(Exchange.CONTENT_TYPE,
+        mock.expectedHeaderReceived(CoAPConstants.CONTENT_TYPE,
                 MediaTypeRegistry.toString(MediaTypeRegistry.APPLICATION_OCTET_STREAM));
         mock.expectedHeaderReceived(CoAPConstants.COAP_RESPONSE_CODE, CoAP.ResponseCode.CONTENT.toString());
         tcpSender.sendBody("Camel CoAP");
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestComponentTestBase.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestComponentTestBase.java
index 9e9e4f20..95c4a91 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestComponentTestBase.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestComponentTestBase.java
@@ -19,7 +19,6 @@ package org.apache.camel.coap;
 import java.io.IOException;
 import java.security.GeneralSecurityException;
 
-import org.apache.camel.Exchange;
 import org.apache.camel.Produce;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
@@ -140,9 +139,9 @@ abstract class CoAPRestComponentTestBase extends CamelTestSupport {
 
                 from("direct:post1").process(exchange -> {
                     String id = exchange.getIn().getHeader("id", String.class);
-                    String ct = exchange.getIn().getHeader(Exchange.CONTENT_TYPE, String.class);
+                    String ct = exchange.getIn().getHeader(CoAPConstants.CONTENT_TYPE, String.class);
                     exchange.getMessage().setBody("Hello " + id + ": " + exchange.getIn().getBody(String.class));
-                    exchange.getMessage().setHeader(Exchange.CONTENT_TYPE, ct);
+                    exchange.getMessage().setHeader(CoAPConstants.CONTENT_TYPE, ct);
                 });
 
                 from("direct:start").toF(getClientURI(), coapport).to("mock:result");

[camel] 03/13: CAMEL-17792: Add doc about the message headers of camel-caffeine

Posted by nf...@apache.org.
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 35885847aba35d7fde55f872cc575e7b0a4f6b94
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Thu Mar 17 11:52:31 2022 +0100

    CAMEL-17792: Add doc about the message headers of camel-caffeine
---
 .../component/caffeine/cache/caffeine-cache.json   |  9 +++++++
 .../caffeine/load/caffeine-loadcache.json          |  9 +++++++
 .../src/main/docs/caffeine-cache-component.adoc    |  3 +++
 .../main/docs/caffeine-loadcache-component.adoc    |  3 +++
 .../component/caffeine/CaffeineConstants.java      | 30 +++++++++++++++++-----
 .../caffeine/cache/CaffeineCacheEndpoint.java      |  3 ++-
 .../caffeine/load/CaffeineLoadCacheEndpoint.java   |  3 ++-
 7 files changed, 51 insertions(+), 9 deletions(-)

diff --git a/components/camel-caffeine/src/generated/resources/org/apache/camel/component/caffeine/cache/caffeine-cache.json b/components/camel-caffeine/src/generated/resources/org/apache/camel/component/caffeine/cache/caffeine-cache.json
index 70c5a49..3087c15 100644
--- a/components/camel-caffeine/src/generated/resources/org/apache/camel/component/caffeine/cache/caffeine-cache.json
+++ b/components/camel-caffeine/src/generated/resources/org/apache/camel/component/caffeine/cache/caffeine-cache.json
@@ -40,6 +40,15 @@
     "keyType": { "kind": "property", "displayName": "Key Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.caffeine.CaffeineConfiguration", "configurationField": "configuration", "description": "The cache key type, default java.lang.Object" },
     "valueType": { "kind": "property", "displayName": "Value Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.caffeine.CaffeineConfiguration", "configurationField": "configuration", "description": "The cache value type, default java.lang.Object" }
   },
+  "headers": {
+    "CamelCaffeineAction": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The action to execute.\n\nPossible values:\n\n* CLEANUP\n* PUT\n* PUT_ALL\n* GET\n* GET_ALL\n* INVALIDATE\n* INVALIDATE_ALL\n* AS_MAP" },
+    "CamelCaffeineActionHasResult": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The flag indicating whether the action has a result or not." },
+    "CamelCaffeineActionSucceeded": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The flag indicating whether the action was successful or not." },
+    "CamelCaffeineKey": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The key for all actions on a single entry." },
+    "CamelCaffeineKeys": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Set", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The keys to get (GET_ALL), to invalidate (INVALIDATE_ALL) or existing (AS_MAP) according to the action." },
+    "CamelCaffeineValue": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The value of key for all put actions (PUT or PUT_ALL)." },
+    "CamelCaffeineOldValue": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The old value returned according to the action." }
+  },
   "properties": {
     "cacheName": { "kind": "path", "displayName": "Cache Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "the cache name" },
     "action": { "kind": "parameter", "displayName": "Action", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.caffeine.CaffeineConfiguration", "configurationField": "configuration", "description": "To configure the default cache action. If an action is set in the message header, then the operation from the header takes  [...]
diff --git a/components/camel-caffeine/src/generated/resources/org/apache/camel/component/caffeine/load/caffeine-loadcache.json b/components/camel-caffeine/src/generated/resources/org/apache/camel/component/caffeine/load/caffeine-loadcache.json
index bc224d5..ddb5485 100644
--- a/components/camel-caffeine/src/generated/resources/org/apache/camel/component/caffeine/load/caffeine-loadcache.json
+++ b/components/camel-caffeine/src/generated/resources/org/apache/camel/component/caffeine/load/caffeine-loadcache.json
@@ -40,6 +40,15 @@
     "keyType": { "kind": "property", "displayName": "Key Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.caffeine.CaffeineConfiguration", "configurationField": "configuration", "description": "The cache key type, default java.lang.Object" },
     "valueType": { "kind": "property", "displayName": "Value Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.caffeine.CaffeineConfiguration", "configurationField": "configuration", "description": "The cache value type, default java.lang.Object" }
   },
+  "headers": {
+    "CamelCaffeineAction": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The action to execute.\n\nPossible values:\n\n* CLEANUP\n* PUT\n* PUT_ALL\n* GET\n* GET_ALL\n* INVALIDATE\n* INVALIDATE_ALL\n* AS_MAP" },
+    "CamelCaffeineActionHasResult": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The flag indicating whether the action has a result or not." },
+    "CamelCaffeineActionSucceeded": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The flag indicating whether the action was successful or not." },
+    "CamelCaffeineKey": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The key for all actions on a single entry." },
+    "CamelCaffeineKeys": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Set", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The keys to get (GET_ALL), to invalidate (INVALIDATE_ALL) or existing (AS_MAP) according to the action." },
+    "CamelCaffeineValue": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The value of key for all put actions (PUT or PUT_ALL)." },
+    "CamelCaffeineOldValue": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The old value returned according to the action." }
+  },
   "properties": {
     "cacheName": { "kind": "path", "displayName": "Cache Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "the cache name" },
     "action": { "kind": "parameter", "displayName": "Action", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.caffeine.CaffeineConfiguration", "configurationField": "configuration", "description": "To configure the default cache action. If an action is set in the message header, then the operation from the header takes  [...]
diff --git a/components/camel-caffeine/src/main/docs/caffeine-cache-component.adoc b/components/camel-caffeine/src/main/docs/caffeine-cache-component.adoc
index 543824b..f1eaf30 100644
--- a/components/camel-caffeine/src/main/docs/caffeine-cache-component.adoc
+++ b/components/camel-caffeine/src/main/docs/caffeine-cache-component.adoc
@@ -49,6 +49,9 @@ include::partial$component-endpoint-options.adoc[]
 
 // endpoint options: END
 
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 == Examples
 
diff --git a/components/camel-caffeine/src/main/docs/caffeine-loadcache-component.adoc b/components/camel-caffeine/src/main/docs/caffeine-loadcache-component.adoc
index a8f942e..e9714a5 100644
--- a/components/camel-caffeine/src/main/docs/caffeine-loadcache-component.adoc
+++ b/components/camel-caffeine/src/main/docs/caffeine-loadcache-component.adoc
@@ -52,6 +52,9 @@ include::partial$component-endpoint-options.adoc[]
 
 // endpoint options: END
 
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 
 include::spring-boot:partial$starter.adoc[]
diff --git a/components/camel-caffeine/src/main/java/org/apache/camel/component/caffeine/CaffeineConstants.java b/components/camel-caffeine/src/main/java/org/apache/camel/component/caffeine/CaffeineConstants.java
index e7ad766..c32b347 100644
--- a/components/camel-caffeine/src/main/java/org/apache/camel/component/caffeine/CaffeineConstants.java
+++ b/components/camel-caffeine/src/main/java/org/apache/camel/component/caffeine/CaffeineConstants.java
@@ -16,14 +16,9 @@
  */
 package org.apache.camel.component.caffeine;
 
+import org.apache.camel.spi.Metadata;
+
 public interface CaffeineConstants {
-    String ACTION = "CamelCaffeineAction";
-    String ACTION_HAS_RESULT = "CamelCaffeineActionHasResult";
-    String ACTION_SUCCEEDED = "CamelCaffeineActionSucceeded";
-    String KEY = "CamelCaffeineKey";
-    String KEYS = "CamelCaffeineKeys";
-    String VALUE = "CamelCaffeineValue";
-    String OLD_VALUE = "CamelCaffeineOldValue";
 
     String ACTION_CLEANUP = "CLEANUP";
     String ACTION_PUT = "PUT";
@@ -33,4 +28,25 @@ public interface CaffeineConstants {
     String ACTION_INVALIDATE = "INVALIDATE";
     String ACTION_INVALIDATE_ALL = "INVALIDATE_ALL";
     String ACTION_AS_MAP = "AS_MAP";
+
+    @Metadata(description = "The action to execute.\n\nPossible values:\n\n* " + ACTION_CLEANUP + "\n* "
+                            + ACTION_PUT + "\n* " + ACTION_PUT_ALL + "\n* " + ACTION_GET + "\n* " + ACTION_GET_ALL + "\n* "
+                            + ACTION_INVALIDATE + "\n* " + ACTION_INVALIDATE_ALL + "\n* " + ACTION_AS_MAP,
+              javaType = "String")
+    String ACTION = "CamelCaffeineAction";
+    @Metadata(description = "The flag indicating whether the action has a result or not.", javaType = "Boolean")
+    String ACTION_HAS_RESULT = "CamelCaffeineActionHasResult";
+    @Metadata(description = "The flag indicating whether the action was successful or not.", javaType = "Boolean")
+    String ACTION_SUCCEEDED = "CamelCaffeineActionSucceeded";
+    @Metadata(description = "The key for all actions on a single entry.")
+    String KEY = "CamelCaffeineKey";
+    @Metadata(description = "The keys to get (" + ACTION_GET_ALL + "), to invalidate (" + ACTION_INVALIDATE_ALL
+                            + ") or existing (" + ACTION_AS_MAP + ") according to the action.",
+              javaType = "Set")
+    String KEYS = "CamelCaffeineKeys";
+    @Metadata(description = "The value of key for all put actions (" + ACTION_PUT + " or " + ACTION_PUT_ALL + ").")
+    String VALUE = "CamelCaffeineValue";
+    @Metadata(description = "The old value returned according to the action.")
+    String OLD_VALUE = "CamelCaffeineOldValue";
+
 }
diff --git a/components/camel-caffeine/src/main/java/org/apache/camel/component/caffeine/cache/CaffeineCacheEndpoint.java b/components/camel-caffeine/src/main/java/org/apache/camel/component/caffeine/cache/CaffeineCacheEndpoint.java
index ea08224..31321fd 100644
--- a/components/camel-caffeine/src/main/java/org/apache/camel/component/caffeine/cache/CaffeineCacheEndpoint.java
+++ b/components/camel-caffeine/src/main/java/org/apache/camel/component/caffeine/cache/CaffeineCacheEndpoint.java
@@ -26,6 +26,7 @@ import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.component.caffeine.CaffeineConfiguration;
+import org.apache.camel.component.caffeine.CaffeineConstants;
 import org.apache.camel.component.caffeine.EvictionType;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;
@@ -40,7 +41,7 @@ import org.apache.camel.util.ObjectHelper;
  */
 @UriEndpoint(firstVersion = "2.20.0", scheme = "caffeine-cache", title = "Caffeine Cache",
              syntax = "caffeine-cache:cacheName", category = { Category.CACHE, Category.DATAGRID, Category.CLUSTERING },
-             producerOnly = true)
+             producerOnly = true, headersClass = CaffeineConstants.class)
 public class CaffeineCacheEndpoint extends DefaultEndpoint {
     @UriPath(description = "the cache name")
     @Metadata(required = true)
diff --git a/components/camel-caffeine/src/main/java/org/apache/camel/component/caffeine/load/CaffeineLoadCacheEndpoint.java b/components/camel-caffeine/src/main/java/org/apache/camel/component/caffeine/load/CaffeineLoadCacheEndpoint.java
index 70402ce..627c1d2 100644
--- a/components/camel-caffeine/src/main/java/org/apache/camel/component/caffeine/load/CaffeineLoadCacheEndpoint.java
+++ b/components/camel-caffeine/src/main/java/org/apache/camel/component/caffeine/load/CaffeineLoadCacheEndpoint.java
@@ -24,6 +24,7 @@ import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.component.caffeine.CaffeineConfiguration;
+import org.apache.camel.component.caffeine.CaffeineConstants;
 import org.apache.camel.component.caffeine.cache.CaffeineCacheEndpoint;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;
@@ -37,7 +38,7 @@ import org.apache.camel.support.DefaultEndpoint;
  */
 @UriEndpoint(firstVersion = "2.20.0", scheme = "caffeine-loadcache", title = "Caffeine LoadCache",
              syntax = "caffeine-loadcache:cacheName", category = { Category.CACHE, Category.DATAGRID, Category.CLUSTERING },
-             producerOnly = true)
+             producerOnly = true, headersClass = CaffeineConstants.class)
 public class CaffeineLoadCacheEndpoint extends DefaultEndpoint {
     @UriPath(description = "the cache name")
     @Metadata(required = true)

[camel] 11/13: CAMEL-17792: Add doc about the message headers of camel-couchbase

Posted by nf...@apache.org.
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 <nf...@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

[camel] 06/13: CAMEL-17792: Add doc about the message headers of camel-cmis

Posted by nf...@apache.org.
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 309179822d6a872bb6f17557a382203d23416fd2
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Thu Mar 17 14:07:33 2022 +0100

    CAMEL-17792: Add doc about the message headers of camel-cmis
---
 .../org/apache/camel/component/cmis/cmis.json      | 17 +++++
 .../camel-cmis/src/main/docs/cmis-component.adoc   | 36 +---------
 .../apache/camel/component/cmis/CMISEndpoint.java  |  2 +-
 .../apache/camel/component/cmis/CMISHelper.java    |  3 +-
 .../apache/camel/component/cmis/CMISProducer.java  | 48 ++++++-------
 .../camel/component/cmis/CMISSessionFacade.java    |  4 +-
 .../camel/component/cmis/CamelCMISConstants.java   | 33 +++++++++
 .../camel/component/cmis/CMISProducerTest.java     | 78 +++++++++++-----------
 .../camel/component/cmis/CMISTestSupport.java      | 11 ++-
 9 files changed, 125 insertions(+), 107 deletions(-)

diff --git a/components/camel-cmis/src/generated/resources/org/apache/camel/component/cmis/cmis.json b/components/camel-cmis/src/generated/resources/org/apache/camel/component/cmis/cmis.json
index 4b0dda1..7f92e29 100644
--- a/components/camel-cmis/src/generated/resources/org/apache/camel/component/cmis/cmis.json
+++ b/components/camel-cmis/src/generated/resources/org/apache/camel/component/cmis/cmis.json
@@ -27,6 +27,23 @@
     "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 [...]
     "sessionFacadeFactory": { "kind": "property", "displayName": "Session Facade Factory", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.cmis.CMISSessionFacadeFactory", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "To use a custom CMISSessionFacadeFactory to create the CMISSessionFacade instances" }
   },
+  "headers": {
+    "cmis:action": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.apache.camel.component.cmis.CamelCMISActions", "enum": [ "CREATE", "DELETE_DOCUMENT", "DELETE_FOLDER", "MOVE_DOCUMENT", "MOVE_FOLDER", "COPY_DOCUMENT", "COPY_FOLDER", "RENAME", "CHECK_IN", "CHECK_OUT", "CANCEL_CHECK_OUT", "GET_FOLDER", "LIST_FOLDER", "FIND_OBJECT_BY_ID", "FIND_OBJECT_BY_PATH", "CREATE_FOLDER_BY_PATH", "DOWNLOAD_DOCUMENT" ], "deprecated": [...]
+    "cmis:path": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If `CamelCMISFolderPath` is not set, will try to find out the path of\nthe node from this cmis property and it is name" },
+    "cmis:name": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If `CamelCMISFolderPath` is not set, will try to find out the path of\nthe node from this cmis property and it is path" },
+    "cmis:objectTypeId": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type of the node" },
+    "cmis:checkinComment": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The check-in comment for the document version" },
+    "cmis:contentStreamMimeType": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The mimetype to set for a document" },
+    "CamelCMISFolderPath": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "\/", "description": "The current folder to use during the execution. If not specified will\nuse the root folder" },
+    "CamelCMISObjectId": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the object" },
+    "CamelCMISDestinationFolderId": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the destination folder" },
+    "CamelCMISSourceFolderId": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the source folder" },
+    "CamelCMISResultCount": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Number of nodes returned from the query" },
+    "CamelCMISRetrieveContent": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "In `queryMode` this header will force the producer to retrieve the\ncontent of document nodes." },
+    "CamelCMISReadSize": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Max number of nodes to read." },
+    "CamelCMISAllVersions": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Apply only to this version (false) or all versions (true)" },
+    "cmis:versioningState": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The versioning state" }
+  },
   "properties": {
     "cmsUrl": { "kind": "path", "displayName": "Cms Url", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "URL to the cmis repository" },
     "pageSize": { "kind": "parameter", "displayName": "Page Size", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 100, "configurationClass": "org.apache.camel.component.cmis.CMISSessionFacade", "configurationField": "sessionFacade", "description": "Number of nodes to retrieve per page" },
diff --git a/components/camel-cmis/src/main/docs/cmis-component.adoc b/components/camel-cmis/src/main/docs/cmis-component.adoc
index 688cf3b..7b5d689 100644
--- a/components/camel-cmis/src/main/docs/cmis-component.adoc
+++ b/components/camel-cmis/src/main/docs/cmis-component.adoc
@@ -44,39 +44,9 @@ include::partial$component-endpoint-options.adoc[]
 
 == Usage
 
-=== Message headers evaluated by the producer
-
-[width="100%",cols="10%,10%,80%",options="header",]
-|=======================================================================
-|Header |Default Value |Description
-
-|`CamelCMISFolderPath` |`/` |The current folder to use during the execution. If not specified will
-use the root folder
-
-|`CamelCMISRetrieveContent` |`false` |In `queryMode` this header will force the producer to retrieve the
-content of document nodes.
-
-|`CamelCMISReadSize` |`0` |Max number of nodes to read.
-
-|`cmis:path` |`null` |If `CamelCMISFolderPath` is not set, will try to find out the path of
-the node from this cmis property and it is name
-
-|`cmis:name` |`null` |If `CamelCMISFolderPath` is not set, will try to find out the path of
-the node from this cmis property and it is path
-
-|`cmis:objectTypeId` |`null` |The type of the node
-
-|`cmis:contentStreamMimeType` |`null` |The mimetype to set for a document
-|=======================================================================
-
-=== Message headers set during querying Producer operation
-
-[width="100%",cols="10%,10%,80%",options="header",]
-|=======================================================================
-|Header |Type |Description
-
-|`CamelCMISResultCount` |`Integer` |Number of nodes returned from the query.
-|=======================================================================
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 The message body will contain a list of maps, where each entry in the
 map is cmis property and its value. If `CamelCMISRetrieveContent` header is set to true, one additional
diff --git a/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISEndpoint.java b/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISEndpoint.java
index 7b555a6..4cf644d 100644
--- a/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISEndpoint.java
+++ b/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISEndpoint.java
@@ -32,7 +32,7 @@ import org.apache.camel.support.DefaultEndpoint;
  * Read and write data from to/from a CMIS compliant content repositories.
  */
 @UriEndpoint(firstVersion = "2.11.0", scheme = "cmis", title = "CMIS", syntax = "cmis:cmsUrl",
-             category = { Category.CMS, Category.DATABASE })
+             category = { Category.CMS, Category.DATABASE }, headersClass = CamelCMISConstants.class)
 public class CMISEndpoint extends DefaultEndpoint {
 
     @UriPath(description = "URL to the cmis repository")
diff --git a/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISHelper.java b/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISHelper.java
index a26d5b9..30738d9 100644
--- a/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISHelper.java
+++ b/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISHelper.java
@@ -22,7 +22,6 @@ import java.util.Map;
 
 import org.apache.chemistry.opencmis.client.api.CmisObject;
 import org.apache.chemistry.opencmis.client.api.Property;
-import org.apache.chemistry.opencmis.commons.PropertyIds;
 import org.apache.chemistry.opencmis.commons.data.PropertyData;
 
 public final class CMISHelper {
@@ -61,7 +60,7 @@ public final class CMISHelper {
     }
 
     public static Object getObjectTypeId(CmisObject child) {
-        return child.getPropertyValue(PropertyIds.OBJECT_TYPE_ID); //BASE_TYPE_ID?
+        return child.getPropertyValue(CamelCMISConstants.OBJECT_TYPE_ID); //BASE_TYPE_ID?
     }
 
 }
diff --git a/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISProducer.java b/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISProducer.java
index fcf89e8..cf721a6 100644
--- a/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISProducer.java
+++ b/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISProducer.java
@@ -104,10 +104,10 @@ public class CMISProducer extends DefaultProducer {
      */
     @SuppressWarnings("unused")
     public CmisObject findObjectByPath(Exchange exchange) throws Exception {
-        validateRequiredHeader(exchange, PropertyIds.PATH);
+        validateRequiredHeader(exchange, CamelCMISConstants.PATH);
         Message message = exchange.getIn();
 
-        String path = message.getHeader(PropertyIds.PATH, String.class);
+        String path = message.getHeader(CamelCMISConstants.PATH, String.class);
 
         try {
             return getSessionFacade().getObjectByPath(path);
@@ -158,8 +158,8 @@ public class CMISProducer extends DefaultProducer {
         Map<String, Object> result = new HashMap<>(properties.size());
 
         String objectTypeName = CamelCMISConstants.CMIS_DOCUMENT;
-        if (properties.containsKey(PropertyIds.OBJECT_TYPE_ID)) {
-            objectTypeName = (String) properties.get(PropertyIds.OBJECT_TYPE_ID);
+        if (properties.containsKey(CamelCMISConstants.OBJECT_TYPE_ID)) {
+            objectTypeName = (String) properties.get(CamelCMISConstants.OBJECT_TYPE_ID);
         }
 
         Set<String> types = new HashSet<>();
@@ -187,7 +187,7 @@ public class CMISProducer extends DefaultProducer {
      */
     @SuppressWarnings("unused")
     public CmisObject createNode(Exchange exchange) throws Exception {
-        validateRequiredHeader(exchange, PropertyIds.NAME);
+        validateRequiredHeader(exchange, CamelCMISConstants.NAME);
 
         Message message = exchange.getIn();
         String parentFolderId = message.getHeader(CamelCMISConstants.CMIS_OBJECT_ID, String.class);
@@ -196,7 +196,7 @@ public class CMISProducer extends DefaultProducer {
         Map<String, Object> cmisProperties = filterTypeProperties(message.getHeaders());
 
         if (isDocument(exchange)) {
-            String fileName = message.getHeader(PropertyIds.NAME, String.class);
+            String fileName = message.getHeader(CamelCMISConstants.NAME, String.class);
             String mimeType = getMimeType(message);
             byte[] buf = getBodyData(message);
             ContentStream contentStream = getSessionFacade().createContentStream(fileName, buf, mimeType);
@@ -214,12 +214,12 @@ public class CMISProducer extends DefaultProducer {
      */
     @SuppressWarnings("unused")
     public Folder createFolderByPath(Exchange exchange) throws Exception {
-        validateRequiredHeader(exchange, PropertyIds.PATH);
-        validateRequiredHeader(exchange, PropertyIds.NAME);
+        validateRequiredHeader(exchange, CamelCMISConstants.PATH);
+        validateRequiredHeader(exchange, CamelCMISConstants.NAME);
 
         Message message = exchange.getIn();
         Map<String, Object> cmisProperties = filterTypeProperties(message.getHeaders());
-        String parentPath = message.getHeader(PropertyIds.PATH, String.class);
+        String parentPath = message.getHeader(CamelCMISConstants.PATH, String.class);
 
         CmisObject result = getSessionFacade().getObjectByPath(parentPath);
 
@@ -340,7 +340,7 @@ public class CMISProducer extends DefaultProducer {
 
         VersioningState versioningState = VersioningState.NONE;
 
-        if (getSessionFacade().isObjectTypeVersionable(message.getHeader(PropertyIds.OBJECT_TYPE_ID, String.class))) {
+        if (getSessionFacade().isObjectTypeVersionable(message.getHeader(CamelCMISConstants.OBJECT_TYPE_ID, String.class))) {
             if (org.apache.camel.util.ObjectHelper.isNotEmpty(message.getHeader(CamelCMISConstants.VERSIONING_STATE))) {
                 versioningState = VersioningState.valueOf(message.getHeader(CamelCMISConstants.VERSIONING_STATE, String.class));
             } else {
@@ -348,9 +348,9 @@ public class CMISProducer extends DefaultProducer {
             }
         }
 
-        String newDocumentName = message.getHeader(PropertyIds.NAME, String.class);
+        String newDocumentName = message.getHeader(CamelCMISConstants.NAME, String.class);
         if (org.apache.camel.util.ObjectHelper.isNotEmpty(newDocumentName)) {
-            return document.copy(destinationFolder, Collections.singletonMap(PropertyIds.NAME, newDocumentName),
+            return document.copy(destinationFolder, Collections.singletonMap(CamelCMISConstants.NAME, newDocumentName),
                     versioningState, null, null, null, getSessionFacade().createOperationContext());
         }
 
@@ -398,8 +398,8 @@ public class CMISProducer extends DefaultProducer {
     private Map<String, CmisObject> copyFolderRecursive(
             Folder destinationFolder, Folder toCopyFolder, Map<String, CmisObject> result) {
         Map<String, Object> folderProperties = new HashMap<>();
-        folderProperties.put(PropertyIds.NAME, toCopyFolder.getName());
-        folderProperties.put(PropertyIds.OBJECT_TYPE_ID, toCopyFolder.getBaseTypeId().value());
+        folderProperties.put(CamelCMISConstants.NAME, toCopyFolder.getName());
+        folderProperties.put(CamelCMISConstants.OBJECT_TYPE_ID, toCopyFolder.getBaseTypeId().value());
         Folder newFolder = destinationFolder.createFolder(folderProperties);
         result.put(toCopyFolder.getId(), newFolder);
         copyChildren(newFolder, toCopyFolder, result);
@@ -424,12 +424,12 @@ public class CMISProducer extends DefaultProducer {
      */
     @SuppressWarnings("unused")
     public CmisObject rename(Exchange exchange) throws Exception {
-        validateRequiredHeader(exchange, PropertyIds.NAME);
+        validateRequiredHeader(exchange, CamelCMISConstants.NAME);
         validateRequiredHeader(exchange, CamelCMISConstants.CMIS_OBJECT_ID);
 
         Message message = exchange.getIn();
 
-        String newName = message.getHeader(PropertyIds.NAME, String.class);
+        String newName = message.getHeader(CamelCMISConstants.NAME, String.class);
         String objectId = message.getHeader(CamelCMISConstants.CMIS_OBJECT_ID, String.class);
         try {
             CmisObject object = getSessionFacade().getObjectById(objectId);
@@ -452,8 +452,8 @@ public class CMISProducer extends DefaultProducer {
         Message message = exchange.getIn();
 
         String objectId = message.getHeader(CamelCMISConstants.CMIS_OBJECT_ID, String.class);
-        String checkInComment = message.getHeader(PropertyIds.CHECKIN_COMMENT, String.class);
-        String fileName = message.getHeader(PropertyIds.NAME, String.class);
+        String checkInComment = message.getHeader(CamelCMISConstants.CHECKIN_COMMENT, String.class);
+        String fileName = message.getHeader(CamelCMISConstants.NAME, String.class);
         String mimeType = getMimeType(message);
         InputStream inputStream = (InputStream) message.getBody();
 
@@ -512,7 +512,7 @@ public class CMISProducer extends DefaultProducer {
     }
 
     private boolean isFolder(Message message) throws Exception {
-        String baseTypeId = message.getHeader(PropertyIds.OBJECT_TYPE_ID, String.class);
+        String baseTypeId = message.getHeader(CamelCMISConstants.OBJECT_TYPE_ID, String.class);
         if (baseTypeId != null) {
             return CamelCMISConstants.CMIS_FOLDER.equals(getSessionFacade().getCMISTypeFor(baseTypeId));
         }
@@ -520,7 +520,7 @@ public class CMISProducer extends DefaultProducer {
     }
 
     private Folder storeFolder(Folder parentFolder, Map<String, Object> cmisProperties) {
-        cmisProperties.putIfAbsent(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_FOLDER);
+        cmisProperties.putIfAbsent(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_FOLDER);
 
         LOG.debug("Creating folder with properties: {}", cmisProperties);
         return parentFolder.createFolder(cmisProperties);
@@ -529,11 +529,11 @@ public class CMISProducer extends DefaultProducer {
     private Document storeDocument(
             Folder parentFolder, Map<String, Object> cmisProperties, ContentStream contentStream, String versioning)
             throws Exception {
-        cmisProperties.putIfAbsent(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
+        cmisProperties.putIfAbsent(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
 
         VersioningState versioningState = VersioningState.NONE;
 
-        if (getSessionFacade().isObjectTypeVersionable((String) cmisProperties.get(PropertyIds.OBJECT_TYPE_ID))) {
+        if (getSessionFacade().isObjectTypeVersionable((String) cmisProperties.get(CamelCMISConstants.OBJECT_TYPE_ID))) {
             if (org.apache.camel.util.ObjectHelper.isNotEmpty(versioning)) {
                 versioningState = VersioningState.valueOf(versioning);
             } else {
@@ -550,7 +550,7 @@ public class CMISProducer extends DefaultProducer {
     }
 
     private boolean isDocument(Exchange exchange) throws Exception {
-        String baseTypeId = exchange.getIn().getHeader(PropertyIds.OBJECT_TYPE_ID, String.class);
+        String baseTypeId = exchange.getIn().getHeader(CamelCMISConstants.OBJECT_TYPE_ID, String.class);
         if (baseTypeId != null) {
             return CamelCMISConstants.CMIS_DOCUMENT.equals(getSessionFacade().getCMISTypeFor(baseTypeId));
         }
@@ -562,7 +562,7 @@ public class CMISProducer extends DefaultProducer {
     }
 
     private String getMimeType(Message message) {
-        String mimeType = message.getHeader(PropertyIds.CONTENT_STREAM_MIME_TYPE, String.class);
+        String mimeType = message.getHeader(CamelCMISConstants.CONTENT_STREAM_MIME_TYPE, String.class);
         if (mimeType == null) {
             mimeType = MessageHelper.getContentType(message);
         }
diff --git a/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java b/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java
index ff40d5e..bffb922 100644
--- a/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java
+++ b/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java
@@ -110,7 +110,7 @@ public class CMISSessionFacade {
             LOG.debug("Processing page {}", pageNumber);
             for (QueryResult item : currentPage) {
                 Map<String, Object> properties = CMISHelper.propertyDataToMap(item.getProperties());
-                Object objectTypeId = item.getPropertyValueById(PropertyIds.OBJECT_TYPE_ID);
+                Object objectTypeId = item.getPropertyValueById(CamelCMISConstants.OBJECT_TYPE_ID);
                 InputStream inputStream = null;
                 if (readContent && CamelCMISConstants.CMIS_DOCUMENT.equals(objectTypeId)) {
                     inputStream = getContentStreamFor(item);
@@ -173,7 +173,7 @@ public class CMISSessionFacade {
     }
 
     public Document getDocument(QueryResult queryResult) {
-        if (CamelCMISConstants.CMIS_DOCUMENT.equals(queryResult.getPropertyValueById(PropertyIds.OBJECT_TYPE_ID))
+        if (CamelCMISConstants.CMIS_DOCUMENT.equals(queryResult.getPropertyValueById(CamelCMISConstants.OBJECT_TYPE_ID))
                 || CamelCMISConstants.CMIS_DOCUMENT.equals(queryResult.getPropertyValueById(PropertyIds.BASE_TYPE_ID))) {
             String objectId = (String) queryResult.getPropertyById(PropertyIds.OBJECT_ID).getFirstValue();
             return (org.apache.chemistry.opencmis.client.api.Document) session.getObject(objectId);
diff --git a/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CamelCMISConstants.java b/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CamelCMISConstants.java
index 90b4515..523de54 100644
--- a/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CamelCMISConstants.java
+++ b/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CamelCMISConstants.java
@@ -16,19 +16,52 @@
  */
 package org.apache.camel.component.cmis;
 
+import org.apache.camel.spi.Metadata;
+import org.apache.chemistry.opencmis.commons.PropertyIds;
+
 public interface CamelCMISConstants {
     String CMIS_DOCUMENT = "cmis:document";
     String CMIS_FOLDER = "cmis:folder";
+    @Metadata(label = "producer", description = "The action to perform",
+              javaType = "org.apache.camel.component.cmis.CamelCMISActions")
     String CMIS_ACTION = "cmis:action";
+    @Metadata(label = "producer", description = "If `CamelCMISFolderPath` is not set, will try to find out the path of\n" +
+                                                "the node from this cmis property and it is name",
+              javaType = "String")
+    String PATH = PropertyIds.PATH;
+    @Metadata(label = "producer", description = "If `CamelCMISFolderPath` is not set, will try to find out the path of\n" +
+                                                "the node from this cmis property and it is path",
+              javaType = "String")
+    String NAME = PropertyIds.NAME;
+    @Metadata(label = "producer", description = "The type of the node", javaType = "String")
+    String OBJECT_TYPE_ID = PropertyIds.OBJECT_TYPE_ID;
+    @Metadata(label = "producer", description = "The check-in comment for the document version", javaType = "String")
+    String CHECKIN_COMMENT = PropertyIds.CHECKIN_COMMENT;
+    @Metadata(label = "producer", description = "The mimetype to set for a document", javaType = "String")
+    String CONTENT_STREAM_MIME_TYPE = PropertyIds.CONTENT_STREAM_MIME_TYPE;
+    @Metadata(label = "producer", description = "The current folder to use during the execution. If not specified will\n" +
+                                                "use the root folder",
+              javaType = "String", defaultValue = "/")
     String CMIS_FOLDER_PATH = "CamelCMISFolderPath";
+    @Metadata(label = "producer", description = "The id of the object", javaType = "String")
     String CMIS_OBJECT_ID = "CamelCMISObjectId";
+    @Metadata(label = "producer", description = "The id of the destination folder", javaType = "String")
     String CMIS_DESTIONATION_FOLDER_ID = "CamelCMISDestinationFolderId";
+    @Metadata(label = "producer", description = "The id of the source folder", javaType = "String")
     String CMIS_SOURCE_FOLDER_ID = "CamelCMISSourceFolderId";
     String CMIS_DOCUMENT_PATH = "CamelCMISDocumentPath";
+    @Metadata(label = "producer", description = "Number of nodes returned from the query", javaType = "Integer")
     String CAMEL_CMIS_RESULT_COUNT = "CamelCMISResultCount";
+    @Metadata(label = "producer", description = "In `queryMode` this header will force the producer to retrieve the\n" +
+                                                "content of document nodes.",
+              javaType = "Boolean")
     String CAMEL_CMIS_RETRIEVE_CONTENT = "CamelCMISRetrieveContent";
+    @Metadata(label = "producer", description = "Max number of nodes to read.", javaType = "Integer")
     String CAMEL_CMIS_READ_SIZE = "CamelCMISReadSize";
     String CAMEL_CMIS_CONTENT_STREAM = "CamelCMISContent";
+    @Metadata(label = "producer", description = "Apply only to this version (false) or all versions (true)",
+              javaType = "Boolean")
     String ALL_VERSIONS = "CamelCMISAllVersions";
+    @Metadata(label = "producer", description = "The versioning state", javaType = "String")
     String VERSIONING_STATE = "cmis:versioningState";
 }
diff --git a/components/camel-cmis/src/test/java/org/apache/camel/component/cmis/CMISProducerTest.java b/components/camel-cmis/src/test/java/org/apache/camel/component/cmis/CMISProducerTest.java
index bf40892..175f715 100644
--- a/components/camel-cmis/src/test/java/org/apache/camel/component/cmis/CMISProducerTest.java
+++ b/components/camel-cmis/src/test/java/org/apache/camel/component/cmis/CMISProducerTest.java
@@ -55,9 +55,9 @@ public class CMISProducerTest extends CMISTestSupport {
     void storeMessageBodyAsTextDocument() throws Exception {
         String content = "Some content to be store";
         Exchange exchange = createExchangeWithInBody(content);
-        exchange.getIn().getHeaders().put(PropertyIds.CONTENT_STREAM_MIME_TYPE, "text/plain; charset=UTF-8");
-        exchange.getIn().getHeaders().put(PropertyIds.NAME, "test.file");
-        exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
+        exchange.getIn().getHeaders().put(CamelCMISConstants.CONTENT_STREAM_MIME_TYPE, "text/plain; charset=UTF-8");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.NAME, "test.file");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.CREATE);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_OBJECT_ID, createSession().getRootFolder().getId());
 
@@ -74,22 +74,22 @@ public class CMISProducerTest extends CMISTestSupport {
     @Test
     void getDocumentMimeTypeFromMessageContentType() {
         Exchange exchange = createExchangeWithInBody("Some content to be store");
-        exchange.getIn().getHeaders().put(PropertyIds.CONTENT_STREAM_MIME_TYPE, "text/plain");
-        exchange.getIn().getHeaders().put(PropertyIds.NAME, "test.file");
-        exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
+        exchange.getIn().getHeaders().put(CamelCMISConstants.CONTENT_STREAM_MIME_TYPE, "text/plain");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.NAME, "test.file");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.CREATE);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_OBJECT_ID, createSession().getRootFolder().getId());
 
         template.send(exchange);
         CmisObject cmisObject = exchange.getMessage().getBody(CmisObject.class);
 
-        assertEquals("text/plain", cmisObject.getPropertyValue(PropertyIds.CONTENT_STREAM_MIME_TYPE));
+        assertEquals("text/plain", cmisObject.getPropertyValue(CamelCMISConstants.CONTENT_STREAM_MIME_TYPE));
     }
 
     @Test
     void namePropertyIsAlwaysRequired() {
         Exchange exchange = createExchangeWithInBody("Some content that will fail to be stored");
-        exchange.getIn().getHeaders().put(PropertyIds.CONTENT_STREAM_MIME_TYPE, "text/plain; charset=UTF-8");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.CONTENT_STREAM_MIME_TYPE, "text/plain; charset=UTF-8");
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.CREATE);
 
         template.send(exchange);
@@ -103,9 +103,9 @@ public class CMISProducerTest extends CMISTestSupport {
     @Test
     void createDocumentWithoutContentByExplicitlySpecifyingObjectTypeHeader() {
         Exchange exchange = createExchangeWithInBody(null);
-        exchange.getIn().getHeaders().put(PropertyIds.CONTENT_STREAM_MIME_TYPE, "text/plain; charset=UTF-8");
-        exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
-        exchange.getIn().getHeaders().put(PropertyIds.NAME, "test.file");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.CONTENT_STREAM_MIME_TYPE, "text/plain; charset=UTF-8");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
+        exchange.getIn().getHeaders().put(CamelCMISConstants.NAME, "test.file");
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.CREATE);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_OBJECT_ID, createSession().getRootFolder().getId());
 
@@ -114,13 +114,13 @@ public class CMISProducerTest extends CMISTestSupport {
         CmisObject cmisObject = exchange.getMessage().getBody(CmisObject.class);
         assertNotNull(cmisObject);
 
-        assertEquals(CamelCMISConstants.CMIS_DOCUMENT, cmisObject.getPropertyValue(PropertyIds.OBJECT_TYPE_ID));
+        assertEquals(CamelCMISConstants.CMIS_DOCUMENT, cmisObject.getPropertyValue(CamelCMISConstants.OBJECT_TYPE_ID));
     }
 
     @Test
     void emptyBodyAndMissingObjectTypeHeaderCreatesFolderNode() {
         Exchange exchange = createExchangeWithInBody(null);
-        exchange.getIn().getHeaders().put(PropertyIds.NAME, "testFolder");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.NAME, "testFolder");
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.CREATE);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_OBJECT_ID, createSession().getRootFolder().getId());
 
@@ -128,16 +128,16 @@ public class CMISProducerTest extends CMISTestSupport {
         CmisObject cmisObject = exchange.getMessage().getBody(CmisObject.class);
 
         assertNotNull(cmisObject);
-        assertEquals(CamelCMISConstants.CMIS_FOLDER, cmisObject.getPropertyValue(PropertyIds.OBJECT_TYPE_ID));
+        assertEquals(CamelCMISConstants.CMIS_FOLDER, cmisObject.getPropertyValue(CamelCMISConstants.OBJECT_TYPE_ID));
         assertTrue(cmisObject instanceof Folder);
     }
 
     @Test
     void cmisPropertiesAreStored() {
         Exchange exchange = createExchangeWithInBody("Some content to be store");
-        exchange.getIn().getHeaders().put(PropertyIds.CONTENT_STREAM_MIME_TYPE, "text/plain; charset=UTF-8");
-        exchange.getIn().getHeaders().put(PropertyIds.NAME, "test.txt");
-        exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
+        exchange.getIn().getHeaders().put(CamelCMISConstants.CONTENT_STREAM_MIME_TYPE, "text/plain; charset=UTF-8");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.NAME, "test.txt");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.CREATE);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_OBJECT_ID, createSession().getRootFolder().getId());
         exchange.getIn().getHeaders().put(CamelCMISConstants.VERSIONING_STATE, VersioningState.MAJOR);
@@ -145,9 +145,9 @@ public class CMISProducerTest extends CMISTestSupport {
         template.send(exchange);
         CmisObject cmisObject = exchange.getMessage().getBody(CmisObject.class);
 
-        assertEquals("test.txt", cmisObject.getPropertyValue(PropertyIds.NAME));
+        assertEquals("test.txt", cmisObject.getPropertyValue(CamelCMISConstants.NAME));
         assertEquals("text/plain; charset=UTF-8",
-                cmisObject.getPropertyValue(PropertyIds.CONTENT_STREAM_MIME_TYPE));
+                cmisObject.getPropertyValue(CamelCMISConstants.CONTENT_STREAM_MIME_TYPE));
     }
 
     @Test
@@ -156,11 +156,11 @@ public class CMISProducerTest extends CMISTestSupport {
         List<String> secondaryTypes = Arrays.asList("MySecondaryType");
 
         Exchange exchange = createExchangeWithInBody("Some content to be store");
-        exchange.getIn().getHeaders().put(PropertyIds.CONTENT_STREAM_MIME_TYPE, "text/plain; charset=UTF-8");
-        exchange.getIn().getHeaders().put(PropertyIds.NAME, "test.txt");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.CONTENT_STREAM_MIME_TYPE, "text/plain; charset=UTF-8");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.NAME, "test.txt");
         exchange.getIn().getHeaders().put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS, secondaryTypes);
         exchange.getIn().getHeaders().put("SecondaryStringProp", "secondaryTypePropValue");
-        exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
+        exchange.getIn().getHeaders().put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.CREATE);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_OBJECT_ID, createSession().getRootFolder().getId());
 
@@ -178,7 +178,7 @@ public class CMISProducerTest extends CMISTestSupport {
         Producer producer = endpoint.createProducer();
 
         Exchange exchange = createExchangeWithInBody("Some content to be store");
-        exchange.getIn().getHeaders().put(PropertyIds.NAME, "test.txt");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.NAME, "test.txt");
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.CREATE);
 
         assertThrows(RuntimeCamelException.class, () -> {
@@ -190,8 +190,8 @@ public class CMISProducerTest extends CMISTestSupport {
     void failCreatingFolderAtNonExistingParentId() {
 
         Exchange exchange = createExchangeWithInBody(null);
-        exchange.getIn().getHeaders().put(PropertyIds.NAME, "folder1");
-        exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_FOLDER);
+        exchange.getIn().getHeaders().put(CamelCMISConstants.NAME, "folder1");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_FOLDER);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.CREATE);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_OBJECT_ID, "Wrong Id");
 
@@ -215,16 +215,16 @@ public class CMISProducerTest extends CMISTestSupport {
         Folder folder = createFolderWithName("New Folder");
 
         Exchange exchange = createExchangeWithInBody(null);
-        exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_FOLDER);
+        exchange.getIn().getHeaders().put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_FOLDER);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_OBJECT_ID, folder.getId());
-        exchange.getIn().getHeaders().put(PropertyIds.NAME, "Renamed Folder");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.NAME, "Renamed Folder");
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.RENAME);
 
         template.send(exchange);
 
         CmisObject cmisObject = exchange.getMessage().getBody(CmisObject.class);
 
-        assertEquals("Renamed Folder", cmisObject.getPropertyValue(PropertyIds.NAME));
+        assertEquals("Renamed Folder", cmisObject.getPropertyValue(CamelCMISConstants.NAME));
         assertEquals(folder.getId(), cmisObject.getId());
         assertTrue(cmisObject instanceof Folder);
     }
@@ -235,16 +235,16 @@ public class CMISProducerTest extends CMISTestSupport {
         Document document = createTextDocument(createSession().getRootFolder(), "This is new test document", "document.txt");
 
         Exchange exchange = createExchangeWithInBody(null);
-        exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
+        exchange.getIn().getHeaders().put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_OBJECT_ID, document.getId());
-        exchange.getIn().getHeaders().put(PropertyIds.NAME, "Renamed Document.txt");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.NAME, "Renamed Document.txt");
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.RENAME);
 
         template.send(exchange);
 
         CmisObject cmisObject = exchange.getMessage().getBody(CmisObject.class);
 
-        assertEquals("Renamed Document.txt", cmisObject.getPropertyValue(PropertyIds.NAME));
+        assertEquals("Renamed Document.txt", cmisObject.getPropertyValue(CamelCMISConstants.NAME));
         assertEquals(document.getId(), cmisObject.getId());
         assertTrue(cmisObject instanceof Document);
     }
@@ -255,7 +255,7 @@ public class CMISProducerTest extends CMISTestSupport {
         Folder folder = createFolderWithName("Test");
 
         Exchange exchange = createExchangeWithInBody(null);
-        exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_FOLDER);
+        exchange.getIn().getHeaders().put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_FOLDER);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.DELETE_FOLDER);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_OBJECT_ID, folder.getId());
 
@@ -279,7 +279,7 @@ public class CMISProducerTest extends CMISTestSupport {
         Document document = createTextDocument(createSession().getRootFolder(), "This is new test document", "document.txt");
 
         Exchange exchange = createExchangeWithInBody(null);
-        exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
+        exchange.getIn().getHeaders().put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.DELETE_DOCUMENT);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_OBJECT_ID, document.getId());
 
@@ -296,7 +296,7 @@ public class CMISProducerTest extends CMISTestSupport {
         Folder destinationFolder = createFolderWithName("Destination");
 
         Exchange exchange = createExchangeWithInBody(null);
-        exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_FOLDER);
+        exchange.getIn().getHeaders().put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_FOLDER);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.MOVE_FOLDER);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_OBJECT_ID, toBeMoved.getId());
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_DESTIONATION_FOLDER_ID, destinationFolder.getId());
@@ -316,7 +316,7 @@ public class CMISProducerTest extends CMISTestSupport {
         Folder destinationFolder = createFolderWithName("Destination");
 
         Exchange exchange = createExchangeWithInBody(null);
-        exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
+        exchange.getIn().getHeaders().put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.MOVE_DOCUMENT);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_OBJECT_ID, toBeMoved.getId());
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_SOURCE_FOLDER_ID, rootFolder.getId());
@@ -333,7 +333,7 @@ public class CMISProducerTest extends CMISTestSupport {
         Document document = createTextDocument(createSession().getRootFolder(), "This is new test document", "document.txt");
 
         Exchange exchange = createExchangeWithInBody(null);
-        exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
+        exchange.getIn().getHeaders().put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.COPY_DOCUMENT);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_OBJECT_ID, document.getId());
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_DESTIONATION_FOLDER_ID, destination.getId());
@@ -354,9 +354,9 @@ public class CMISProducerTest extends CMISTestSupport {
         Document document = createTextDocument(createSession().getRootFolder(), "This is new test document", "document.txt");
 
         Exchange exchange = createExchangeWithInBody(null);
-        exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
+        exchange.getIn().getHeaders().put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.COPY_DOCUMENT);
-        exchange.getIn().getHeaders().put(PropertyIds.NAME, "renamedDocument.txt");
+        exchange.getIn().getHeaders().put(CamelCMISConstants.NAME, "renamedDocument.txt");
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_OBJECT_ID, document.getId());
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_DESTIONATION_FOLDER_ID, destination.getId());
 
@@ -378,7 +378,7 @@ public class CMISProducerTest extends CMISTestSupport {
         Folder destination = createFolderWithName("Destination Folder");
 
         Exchange exchange = createExchangeWithInBody(null);
-        exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_FOLDER);
+        exchange.getIn().getHeaders().put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_FOLDER);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_ACTION, CamelCMISActions.COPY_FOLDER);
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_OBJECT_ID, folder.getId());
         exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_DESTIONATION_FOLDER_ID, destination.getId());
diff --git a/components/camel-cmis/src/test/java/org/apache/camel/component/cmis/CMISTestSupport.java b/components/camel-cmis/src/test/java/org/apache/camel/component/cmis/CMISTestSupport.java
index 82b4728..532f5c3 100644
--- a/components/camel-cmis/src/test/java/org/apache/camel/component/cmis/CMISTestSupport.java
+++ b/components/camel-cmis/src/test/java/org/apache/camel/component/cmis/CMISTestSupport.java
@@ -38,7 +38,6 @@ import org.apache.chemistry.opencmis.client.api.Repository;
 import org.apache.chemistry.opencmis.client.api.Session;
 import org.apache.chemistry.opencmis.client.api.SessionFactory;
 import org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl;
-import org.apache.chemistry.opencmis.commons.PropertyIds;
 import org.apache.chemistry.opencmis.commons.SessionParameter;
 import org.apache.chemistry.opencmis.commons.data.ContentStream;
 import org.apache.chemistry.opencmis.commons.enums.BindingType;
@@ -81,7 +80,7 @@ public class CMISTestSupport extends CamelTestSupport {
         Folder rootFolder = session.getRootFolder();
         ItemIterable<CmisObject> children = rootFolder.getChildren();
         for (CmisObject cmisObject : children) {
-            if (CamelCMISConstants.CMIS_FOLDER.equals(cmisObject.getPropertyValue(PropertyIds.OBJECT_TYPE_ID))) {
+            if (CamelCMISConstants.CMIS_FOLDER.equals(cmisObject.getPropertyValue(CamelCMISConstants.OBJECT_TYPE_ID))) {
                 List<String> notDeltedIdList = ((Folder) cmisObject)
                         .deleteTree(true, UnfileObject.DELETE, true);
                 if (notDeltedIdList != null && notDeltedIdList.size() > 0) {
@@ -130,8 +129,8 @@ public class CMISTestSupport extends CamelTestSupport {
 
     protected Folder createChildFolderWithName(Folder parent, String childName) {
         Map<String, String> newFolderProps = new HashMap<>();
-        newFolderProps.put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_FOLDER);
-        newFolderProps.put(PropertyIds.NAME, childName);
+        newFolderProps.put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_FOLDER);
+        newFolderProps.put(CamelCMISConstants.NAME, childName);
         return parent.createFolder(newFolderProps);
     }
 
@@ -143,8 +142,8 @@ public class CMISTestSupport extends CamelTestSupport {
                 .createContentStream(fileName, buf.length, "text/plain; charset=UTF-8", input);
 
         Map<String, Object> properties = new HashMap<>();
-        properties.put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
-        properties.put(PropertyIds.NAME, fileName);
+        properties.put(CamelCMISConstants.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
+        properties.put(CamelCMISConstants.NAME, fileName);
         return newFolder.createDocument(properties, contentStream, VersioningState.NONE);
     }
 

[camel] 01/13: CAMEL-17792: Add doc about the message headers of camel-bean

Posted by nf...@apache.org.
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 6371df29dbfb7c0b65797fba3ce934cd885fdabd
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Thu Mar 17 10:34:12 2022 +0100

    CAMEL-17792: Add doc about the message headers of camel-bean
---
 .../generated/resources/org/apache/camel/component/bean/bean.json   | 3 +++
 .../resources/org/apache/camel/component/beanclass/class.json       | 3 +++
 components/camel-bean/src/main/docs/bean-component.adoc             | 3 +++
 components/camel-bean/src/main/docs/class-component.adoc            | 3 +++
 .../java/org/apache/camel/component/bean/AbstractBeanProcessor.java | 4 ++--
 .../main/java/org/apache/camel/component/bean/BeanConstants.java    | 6 +++++-
 .../src/main/java/org/apache/camel/component/bean/BeanEndpoint.java | 2 +-
 .../src/main/java/org/apache/camel/component/bean/BeanInfo.java     | 2 +-
 .../src/main/java/org/apache/camel/component/bean/MethodInfo.java   | 2 +-
 .../java/org/apache/camel/component/beanclass/ClassEndpoint.java    | 3 ++-
 10 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/components/camel-bean/src/generated/resources/org/apache/camel/component/bean/bean.json b/components/camel-bean/src/generated/resources/org/apache/camel/component/bean/bean.json
index 7df3d5d..5883e54 100644
--- a/components/camel-bean/src/generated/resources/org/apache/camel/component/bean/bean.json
+++ b/components/camel-bean/src/generated/resources/org/apache/camel/component/bean/bean.json
@@ -27,6 +27,9 @@
     "scope": { "kind": "property", "displayName": "Scope", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.BeanScope", "enum": [ "Singleton", "Request", "Prototype" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Singleton", "description": "Scope of bean. When using singleton scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint. The bean should be thread-sa [...]
     "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": {
+    "CamelBeanMethodName": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the method to invoke." }
+  },
   "properties": {
     "beanName": { "kind": "path", "displayName": "Bean Name", "group": "common", "label": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets the name of the bean to invoke" },
     "cache": { "kind": "parameter", "displayName": "Cache", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": true, "autowired": false, "secret": false, "description": "Use scope option instead." },
diff --git a/components/camel-bean/src/generated/resources/org/apache/camel/component/beanclass/class.json b/components/camel-bean/src/generated/resources/org/apache/camel/component/beanclass/class.json
index 42bd842..39479dc 100644
--- a/components/camel-bean/src/generated/resources/org/apache/camel/component/beanclass/class.json
+++ b/components/camel-bean/src/generated/resources/org/apache/camel/component/beanclass/class.json
@@ -27,6 +27,9 @@
     "scope": { "kind": "property", "displayName": "Scope", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.BeanScope", "enum": [ "Singleton", "Request", "Prototype" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Singleton", "description": "Scope of bean. When using singleton scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint. The bean should be thread-sa [...]
     "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": {
+    "CamelBeanMethodName": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the method to invoke." }
+  },
   "properties": {
     "beanName": { "kind": "path", "displayName": "Bean Name", "group": "common", "label": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets the name of the bean to invoke" },
     "cache": { "kind": "parameter", "displayName": "Cache", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": true, "autowired": false, "secret": false, "description": "Use scope option instead." },
diff --git a/components/camel-bean/src/main/docs/bean-component.adoc b/components/camel-bean/src/main/docs/bean-component.adoc
index 92118c8..aded420 100644
--- a/components/camel-bean/src/main/docs/bean-component.adoc
+++ b/components/camel-bean/src/main/docs/bean-component.adoc
@@ -38,6 +38,9 @@ include::partial$component-endpoint-options.adoc[]
 
 // endpoint options: END
 
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 == Using
 
diff --git a/components/camel-bean/src/main/docs/class-component.adoc b/components/camel-bean/src/main/docs/class-component.adoc
index 9368b6e..7e3cf80 100644
--- a/components/camel-bean/src/main/docs/class-component.adoc
+++ b/components/camel-bean/src/main/docs/class-component.adoc
@@ -42,6 +42,9 @@ include::partial$component-endpoint-options.adoc[]
 
 // endpoint options: END
 
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 == Using
 
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
index ce5bd9f..d1ab167 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
@@ -59,7 +59,7 @@ public abstract class AbstractBeanProcessor extends AsyncProcessorSupport {
     @Override
     public boolean process(Exchange exchange, AsyncCallback callback) {
         // do we have an explicit method name we always should invoke (either configured on endpoint or as a header)
-        String explicitMethodName = exchange.getIn().getHeader(Exchange.BEAN_METHOD_NAME, method, String.class);
+        String explicitMethodName = exchange.getIn().getHeader(BeanConstants.BEAN_METHOD_NAME, method, String.class);
 
         Object bean;
         BeanInfo beanInfo;
@@ -118,7 +118,7 @@ public abstract class AbstractBeanProcessor extends AsyncProcessorSupport {
 
         // set explicit method name to invoke as a header, which is how BeanInfo can detect it
         if (explicitMethodName != null) {
-            in.setHeader(Exchange.BEAN_METHOD_NAME, explicitMethodName);
+            in.setHeader(BeanConstants.BEAN_METHOD_NAME, explicitMethodName);
         }
 
         MethodInvocation invocation;
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanConstants.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanConstants.java
index 7643e0b..dac73c8 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanConstants.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanConstants.java
@@ -16,11 +16,15 @@
  */
 package org.apache.camel.component.bean;
 
-@Deprecated
+import org.apache.camel.Exchange;
+import org.apache.camel.spi.Metadata;
+
 public final class BeanConstants {
 
     @Deprecated
     public static final String BEAN_PARAMETER_MAPPING_STRATEGY = "CamelBeanParameterMappingStrategy";
+    @Metadata(description = "The name of the method to invoke.", javaType = "String")
+    public static final String BEAN_METHOD_NAME = Exchange.BEAN_METHOD_NAME;
 
     private BeanConstants() {
         // Utility class
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java
index 4d822cb..5739e67 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java
@@ -35,7 +35,7 @@ import org.apache.camel.support.DefaultEndpoint;
  * Invoke methods of Java beans stored in Camel registry.
  */
 @UriEndpoint(firstVersion = "1.0.0", scheme = "bean", title = "Bean", syntax = "bean:beanName", producerOnly = true,
-             category = { Category.CORE, Category.JAVA })
+             category = { Category.CORE, Category.JAVA }, headersClass = BeanConstants.class)
 public class BeanEndpoint extends DefaultEndpoint {
     private transient BeanHolder beanHolder;
     private transient BeanProcessor processor;
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanInfo.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanInfo.java
index 038819e..e6f5d08 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanInfo.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanInfo.java
@@ -183,7 +183,7 @@ public class BeanInfo {
 
         MethodInfo methodInfo = null;
 
-        String methodName = exchange.getIn().getHeader(Exchange.BEAN_METHOD_NAME, String.class);
+        String methodName = exchange.getIn().getHeader(BeanConstants.BEAN_METHOD_NAME, String.class);
         if (methodName != null) {
 
             // do not use qualifier for name
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/MethodInfo.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/MethodInfo.java
index c97bffc..a3fb6c5 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/MethodInfo.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/MethodInfo.java
@@ -569,7 +569,7 @@ public class MethodInfo {
 
             // if there was an explicit method name to invoke, then we should support using
             // any provided parameter values in the method name
-            String methodName = exchange.getIn().getHeader(Exchange.BEAN_METHOD_NAME, String.class);
+            String methodName = exchange.getIn().getHeader(BeanConstants.BEAN_METHOD_NAME, String.class);
             // the parameter values is between the parenthesis
             String methodParameters = StringHelper.betweenOuterPair(methodName, '(', ')');
             // use an iterator to walk the parameter values
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/beanclass/ClassEndpoint.java b/components/camel-bean/src/main/java/org/apache/camel/component/beanclass/ClassEndpoint.java
index b685a26..ce603a3 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/beanclass/ClassEndpoint.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/beanclass/ClassEndpoint.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.beanclass;
 
 import org.apache.camel.Category;
 import org.apache.camel.Component;
+import org.apache.camel.component.bean.BeanConstants;
 import org.apache.camel.component.bean.BeanEndpoint;
 import org.apache.camel.spi.UriEndpoint;
 
@@ -25,7 +26,7 @@ import org.apache.camel.spi.UriEndpoint;
  * Invoke methods of Java beans specified by class name.
  */
 @UriEndpoint(firstVersion = "2.4.0", scheme = "class", title = "Class", syntax = "class:beanName", producerOnly = true,
-             category = { Category.CORE, Category.JAVA })
+             category = { Category.CORE, Category.JAVA }, headersClass = BeanConstants.class)
 public class ClassEndpoint extends BeanEndpoint {
 
     public ClassEndpoint(String endpointUri, Component component) {

[camel] 10/13: CAMEL-17792: Add doc about the message headers of camel-corda

Posted by nf...@apache.org.
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 3f4184915f1fb6c139d0d2ee323bda3df4f06ee6
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Thu Mar 17 18:09:09 2022 +0100

    CAMEL-17792: Add doc about the message headers of camel-corda
---
 .../org/apache/camel/component/corda/corda.json         | 11 +++++++++++
 .../camel-corda/src/main/docs/corda-component.adoc      | 14 +++-----------
 .../apache/camel/component/corda/CordaConstants.java    | 17 +++++++++++++++++
 .../org/apache/camel/component/corda/CordaEndpoint.java |  2 +-
 4 files changed, 32 insertions(+), 12 deletions(-)

diff --git a/components/camel-corda/src/generated/resources/org/apache/camel/component/corda/corda.json b/components/camel-corda/src/generated/resources/org/apache/camel/component/corda/corda.json
index 95645d7..3d814f9 100644
--- a/components/camel-corda/src/generated/resources/org/apache/camel/component/corda/corda.json
+++ b/components/camel-corda/src/generated/resources/org/apache/camel/component/corda/corda.json
@@ -37,6 +37,17 @@
     "password": { "kind": "property", "displayName": "Password", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.corda.CordaConfiguration", "configurationField": "configuration", "description": "Password for login" },
     "username": { "kind": "property", "displayName": "Username", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.corda.CordaConfiguration", "configurationField": "configuration", "description": "Username for login" }
   },
+  "headers": {
+    "OPERATION": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform" },
+    "ATTACHMENT_QUERY_CRITERIA": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "net.corda.core.node.services.vault.AttachmentQueryCriteria", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The attachment query criteria" },
+    "SORT": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The sort" },
+    "EXACT_MATCH": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If true, a case sensitive match is done against each component of each X.500 name." },
+    "ARGUMENTS": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object[]", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The arguments." },
+    "DRAINING_MODE": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The value of the node's flows draining mode." },
+    "SECURE_HASH": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "net.corda.core.crypto.SecureHash", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Container for a cryptographically secure hash value." },
+    "QUERY_CRITERIA": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "net.corda.core.node.services.vault.QueryCriteria", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The query criteria." },
+    "PAGE_SPECIFICATION": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "net.corda.core.node.services.vault.PageSpecification", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The PageSpecification allows specification of a page number and page size" }
+  },
   "properties": {
     "node": { "kind": "path", "displayName": "Node", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.corda.CordaConfiguration", "configurationField": "configuration", "description": "The url for the corda node" },
     "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a m [...]
diff --git a/components/camel-corda/src/main/docs/corda-component.adoc b/components/camel-corda/src/main/docs/corda-component.adoc
index 0a2a49c..f1a3032 100644
--- a/components/camel-corda/src/main/docs/corda-component.adoc
+++ b/components/camel-corda/src/main/docs/corda-component.adoc
@@ -50,17 +50,9 @@ include::partial$component-endpoint-options.adoc[]
 
 // endpoint options: END
 
-
-== Message Headers
-
-[width="100%",cols="10%,90%",options="header",]
-|=======================================================================
-|Header |Description
-
-|`All URI options` |All URI options can also be set as exchange headers.
-
-|=======================================================================
-
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 == Samples
 
diff --git a/components/camel-corda/src/main/java/org/apache/camel/component/corda/CordaConstants.java b/components/camel-corda/src/main/java/org/apache/camel/component/corda/CordaConstants.java
index 7e6bf40..fd8a22a 100644
--- a/components/camel-corda/src/main/java/org/apache/camel/component/corda/CordaConstants.java
+++ b/components/camel-corda/src/main/java/org/apache/camel/component/corda/CordaConstants.java
@@ -16,7 +16,10 @@
  */
 package org.apache.camel.component.corda;
 
+import org.apache.camel.spi.Metadata;
+
 public interface CordaConstants {
+    @Metadata(label = "producer", description = "The operation to perform", javaType = "String")
     String OPERATION = "OPERATION";
     String NODE_INFO = "NODE_INFO";
     String CURRENT_NODE_TIME = "CURRENT_NODE_TIME";
@@ -58,13 +61,27 @@ public interface CordaConstants {
     String STATE_MACHINE_RECORDED_TRANSACTION_MAPPING_FEED = "STATE_MACHINE_RECORDED_TRANSACTION_MAPPING_FEED";
     String START_TRACKED_FLOW_DYNAMIC = "START_TRACKED_FLOW_DYNAMIC";
 
+    @Metadata(label = "producer", description = "The attachment query criteria",
+              javaType = "net.corda.core.node.services.vault.AttachmentQueryCriteria")
     String ATTACHMENT_QUERY_CRITERIA = "ATTACHMENT_QUERY_CRITERIA";
+    @Metadata(label = "producer", description = "The sort")
     String SORT = "SORT";
+    @Metadata(label = "producer",
+              description = "If true, a case sensitive match is done against each component of each X.500 name.",
+              javaType = "Boolean")
     String EXACT_MATCH = "EXACT_MATCH";
+    @Metadata(label = "producer", description = "The arguments.", javaType = "Object[]")
     String ARGUMENTS = "ARGUMENTS";
+    @Metadata(label = "producer", description = "The value of the node's flows draining mode.", javaType = "Boolean")
     String DRAINING_MODE = "DRAINING_MODE";
+    @Metadata(label = "producer", description = "Container for a cryptographically secure hash value.",
+              javaType = "net.corda.core.crypto.SecureHash")
     String SECURE_HASH = "SECURE_HASH";
+    @Metadata(label = "producer", description = "The query criteria.",
+              javaType = "net.corda.core.node.services.vault.QueryCriteria")
     String QUERY_CRITERIA = "QUERY_CRITERIA";
+    @Metadata(label = "producer", description = "The PageSpecification allows specification of a page number and page size",
+              javaType = "net.corda.core.node.services.vault.PageSpecification")
     String PAGE_SPECIFICATION = "PAGE_SPECIFICATION";
 
     String TERMINATE = "TERMINATE";
diff --git a/components/camel-corda/src/main/java/org/apache/camel/component/corda/CordaEndpoint.java b/components/camel-corda/src/main/java/org/apache/camel/component/corda/CordaEndpoint.java
index d771a45..dcb4b0c 100644
--- a/components/camel-corda/src/main/java/org/apache/camel/component/corda/CordaEndpoint.java
+++ b/components/camel-corda/src/main/java/org/apache/camel/component/corda/CordaEndpoint.java
@@ -32,7 +32,7 @@ import org.apache.camel.support.DefaultEndpoint;
  * Perform operations against Corda blockchain platform using corda-rpc library.
  */
 @UriEndpoint(firstVersion = "2.23.0", scheme = "corda", title = "Corda", syntax = "corda:node",
-             category = { Category.BLOCKCHAIN, Category.RPC })
+             category = { Category.BLOCKCHAIN, Category.RPC }, headersClass = CordaConstants.class)
 public class CordaEndpoint extends DefaultEndpoint {
 
     @UriParam