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 0dcf153ce77f1623967903902ec25ed2b12cf1af
Author: Nicolas Filotto <[email protected]>
AuthorDate: Wed Mar 30 10:43:37 2022 +0200

    CAMEL-17792: Add doc about the message headers of camel-jcache
---
 .../resources/org/apache/camel/component/jcache/jcache.json | 10 ++++++++++
 components/camel-jcache/src/main/docs/jcache-component.adoc |  3 +++
 .../org/apache/camel/component/jcache/JCacheConstants.java  | 13 +++++++++++++
 .../org/apache/camel/component/jcache/JCacheEndpoint.java   |  2 +-
 4 files changed, 27 insertions(+), 1 deletion(-)

diff --git 
a/components/camel-jcache/src/generated/resources/org/apache/camel/component/jcache/jcache.json
 
b/components/camel-jcache/src/generated/resources/org/apache/camel/component/jcache/jcache.json
index 037a74d..f789ad7 100644
--- 
a/components/camel-jcache/src/generated/resources/org/apache/camel/component/jcache/jcache.json
+++ 
b/components/camel-jcache/src/generated/resources/org/apache/camel/component/jcache/jcache.json
@@ -31,6 +31,16 @@
     "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": {
+    "CamelJCacheAction": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The cache operation to perform" },
+    "CamelJCacheResult": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "boolean", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The result of the cache operation" },
+    "CamelJCacheEventType": { "kind": "header", "displayName": "", "group": 
"consumer", "label": "consumer", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The type of event received" },
+    "CamelJCacheKey": { "kind": "header", "displayName": "", "group": 
"common", "label": "", "required": false, "javaType": "Object", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The key of the cache entry" },
+    "CamelJCacheKeys": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "Set<Object>", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The collection of keys against which the action should 
be performed" },
+    "CamelJCacheOldValue": { "kind": "header", "displayName": "", "group": 
"consumer", "label": "consumer", "required": false, "javaType": "Object", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The old value of the cache entry" },
+    "CamelJCacheEntryProcessor": { "kind": "header", "displayName": "", 
"group": "producer", "label": "producer", "required": false, "javaType": 
"EntryProcessor<Object, Object, Object>", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
EntryProcessor to invoke" },
+    "CamelJCacheEntryArgs": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": 
"Collection<Object>", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "The additional arguments to pass to the 
EntryProcessor" }
+  },
   "properties": {
     "cacheName": { "kind": "path", "displayName": "Cache Name", "group": 
"common", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "The name of the cache" },
     "cacheConfiguration": { "kind": "parameter", "displayName": "Cache 
Configuration", "group": "common", "label": "", "required": false, "type": 
"object", "javaType": "javax.cache.configuration.Configuration", "deprecated": 
false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.jcache.JCacheConfiguration", "configurationField": 
"configuration", "description": "A Configuration for the Cache" },
diff --git a/components/camel-jcache/src/main/docs/jcache-component.adoc 
b/components/camel-jcache/src/main/docs/jcache-component.adoc
index 0a7469e..aec160d 100644
--- a/components/camel-jcache/src/main/docs/jcache-component.adoc
+++ b/components/camel-jcache/src/main/docs/jcache-component.adoc
@@ -33,6 +33,9 @@ include::partial$component-endpoint-options.adoc[]
 // endpoint options: START
 
 // endpoint options: END
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 == JCache Policy
 
diff --git 
a/components/camel-jcache/src/main/java/org/apache/camel/component/jcache/JCacheConstants.java
 
b/components/camel-jcache/src/main/java/org/apache/camel/component/jcache/JCacheConstants.java
index 269c589..173ee92 100644
--- 
a/components/camel-jcache/src/main/java/org/apache/camel/component/jcache/JCacheConstants.java
+++ 
b/components/camel-jcache/src/main/java/org/apache/camel/component/jcache/JCacheConstants.java
@@ -16,13 +16,26 @@
  */
 package org.apache.camel.component.jcache;
 
+import org.apache.camel.spi.Metadata;
+
 public interface JCacheConstants {
+    @Metadata(label = "producer", description = "The cache operation to 
perform", javaType = "String")
     String ACTION = "CamelJCacheAction";
+    @Metadata(label = "producer", description = "The result of the cache 
operation", javaType = "boolean")
     String RESULT = "CamelJCacheResult";
+    @Metadata(label = "consumer", description = "The type of event received", 
javaType = "String")
     String EVENT_TYPE = "CamelJCacheEventType";
+    @Metadata(description = "The key of the cache entry", javaType = "Object")
     String KEY = "CamelJCacheKey";
+    @Metadata(label = "producer", description = "The collection of keys 
against which the action should be performed",
+              javaType = "Set<Object>")
     String KEYS = "CamelJCacheKeys";
+    @Metadata(label = "consumer", description = "The old value of the cache 
entry", javaType = "Object")
     String OLD_VALUE = "CamelJCacheOldValue";
+    @Metadata(label = "producer", description = "The EntryProcessor to invoke",
+              javaType = "EntryProcessor<Object, Object, Object>")
     String ENTRY_PROCESSOR = "CamelJCacheEntryProcessor";
+    @Metadata(label = "producer", description = "The additional arguments to 
pass to the EntryProcessor",
+              javaType = "Collection<Object>")
     String ARGUMENTS = "CamelJCacheEntryArgs";
 }
diff --git 
a/components/camel-jcache/src/main/java/org/apache/camel/component/jcache/JCacheEndpoint.java
 
b/components/camel-jcache/src/main/java/org/apache/camel/component/jcache/JCacheEndpoint.java
index 034818d..c27c3b7 100644
--- 
a/components/camel-jcache/src/main/java/org/apache/camel/component/jcache/JCacheEndpoint.java
+++ 
b/components/camel-jcache/src/main/java/org/apache/camel/component/jcache/JCacheEndpoint.java
@@ -30,7 +30,7 @@ import org.apache.camel.support.DefaultEndpoint;
  * Perform caching operations against JSR107/JCache.
  */
 @UriEndpoint(firstVersion = "2.17.0", scheme = "jcache", title = "JCache", 
syntax = "jcache:cacheName",
-             category = { Category.CACHE, Category.DATAGRID, 
Category.CLUSTERING })
+             category = { Category.CACHE, Category.DATAGRID, 
Category.CLUSTERING }, headersClass = JCacheConstants.class)
 public class JCacheEndpoint extends DefaultEndpoint {
 
     @UriPath(description = "The name of the cache")

Reply via email to