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/16 19:12:56 UTC

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

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 72e3ddfe8fbeb878bc1b7a30b5524d9f26586e84
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Tue Mar 15 15:45:35 2022 +0100

    CAMEL-17792: Add doc about the message headers of camel-atom
---
 .../resources/org/apache/camel/component/atom/atom.json     |  3 +++
 components/camel-atom/src/main/docs/atom-component.adoc     | 13 +++----------
 .../java/org/apache/camel/component/atom/AtomConstants.java |  4 ++++
 .../java/org/apache/camel/component/atom/AtomEndpoint.java  |  2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/components/camel-atom/src/generated/resources/org/apache/camel/component/atom/atom.json b/components/camel-atom/src/generated/resources/org/apache/camel/component/atom/atom.json
index d3dc064..180a953 100644
--- a/components/camel-atom/src/generated/resources/org/apache/camel/component/atom/atom.json
+++ b/components/camel-atom/src/generated/resources/org/apache/camel/component/atom/atom.json
@@ -25,6 +25,9 @@
     "bridgeErrorHandler": { "kind": "property", "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 me [...]
     "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": {
+    "CamelAtomFeed": { "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "org.apache.abdera.model.Feed", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When consuming the `org.apache.abdera.model.Feed` object is set to this header." }
+  },
   "properties": {
     "feedUri": { "kind": "path", "displayName": "Feed Uri", "group": "consumer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The URI to the feed to poll." },
     "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-atom/src/main/docs/atom-component.adoc b/components/camel-atom/src/main/docs/atom-component.adoc
index 05a25a6..2eac69f 100644
--- a/components/camel-atom/src/main/docs/atom-component.adoc
+++ b/components/camel-atom/src/main/docs/atom-component.adoc
@@ -75,16 +75,9 @@ Depending on the `splitEntries` flag Camel will either return one
 Camel can set the `Feed` object on the In header (see `feedHeader`
 option to disable this):
 
-== Message Headers
-
-Camel atom uses these headers.
-
-[width="100%",cols="10%,90%",options="header",]
-|=======================================================================
-|Header |Description
-|`CamelAtomFeed` |When consuming the `org.apache.abdera.model.Feed` object is set to this
-header.
-|=======================================================================
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 == Examples
 
diff --git a/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomConstants.java b/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomConstants.java
index 4b4f0b5..93713ce 100644
--- a/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomConstants.java
+++ b/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomConstants.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.atom;
 
+import org.apache.camel.spi.Metadata;
+
 /**
  * Atom constants
  */
@@ -24,6 +26,8 @@ public final class AtomConstants {
     /**
      * Header key for the {@link org.apache.abdera.model.Feed} object is stored on the in message on the exchange.
      */
+    @Metadata(description = "When consuming the `org.apache.abdera.model.Feed` object is set to this header.",
+              javaType = "org.apache.abdera.model.Feed")
     public static final String ATOM_FEED = "CamelAtomFeed";
 
     private AtomConstants() {
diff --git a/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomEndpoint.java b/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomEndpoint.java
index 3031ccee..ec7f71b 100644
--- a/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomEndpoint.java
+++ b/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomEndpoint.java
@@ -31,7 +31,7 @@ import org.apache.camel.spi.UriEndpoint;
  * Poll Atom RSS feeds.
  */
 @UriEndpoint(firstVersion = "1.2.0", scheme = "atom", title = "Atom", syntax = "atom:feedUri", consumerOnly = true,
-             category = { Category.RSS }, lenientProperties = true)
+             category = { Category.RSS }, lenientProperties = true, headersClass = AtomConstants.class)
 public class AtomEndpoint extends FeedEndpoint {
 
     public AtomEndpoint() {