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 1d1ddf946e221b9e716fc15275a4c466be1f9a49
Author: Nicolas Filotto <[email protected]>
AuthorDate: Tue Mar 29 18:49:21 2022 +0200

    CAMEL-17792: Add doc about the message headers of camel-irc
---
 .../resources/org/apache/camel/component/irc/irc.json      | 12 ++++++++++++
 components/camel-irc/src/main/docs/irc-component.adoc      |  3 +++
 .../java/org/apache/camel/component/irc/IrcConstants.java  | 14 ++++++++++++++
 .../java/org/apache/camel/component/irc/IrcEndpoint.java   |  2 +-
 4 files changed, 30 insertions(+), 1 deletion(-)

diff --git 
a/components/camel-irc/src/generated/resources/org/apache/camel/component/irc/irc.json
 
b/components/camel-irc/src/generated/resources/org/apache/camel/component/irc/irc.json
index 37fd45c..1349890 100644
--- 
a/components/camel-irc/src/generated/resources/org/apache/camel/component/irc/irc.json
+++ 
b/components/camel-irc/src/generated/resources/org/apache/camel/component/irc/irc.json
@@ -28,6 +28,18 @@
     "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 [...]
     "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": {
+    "irc.messageType": { "kind": "header", "displayName": "", "group": 
"common", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The type of message" },
+    "irc.target": { "kind": "header", "displayName": "", "group": "common", 
"label": "", "required": false, "javaType": "String", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
target" },
+    "irc.sendTo": { "kind": "header", "displayName": "", "group": "common", 
"label": "", "required": false, "javaType": "String", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
nickname or channel the message should be sent to." },
+    "irc.user.kicked": { "kind": "header", "displayName": "", "group": 
"common", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The nickname of the user who is kicked from a channel 
(passive)." },
+    "irc.user.host": { "kind": "header", "displayName": "", "group": "common", 
"label": "", "required": false, "javaType": "String", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
host of the person who sent the line." },
+    "irc.user.nick": { "kind": "header", "displayName": "", "group": "common", 
"label": "", "required": false, "javaType": "String", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
nickname of the person who sent the line or the server name of the server which 
sent the line." },
+    "irc.user.servername": { "kind": "header", "displayName": "", "group": 
"common", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The server name of the server which sent the line or the 
nickname of the person who sent the line." },
+    "irc.user.username": { "kind": "header", "displayName": "", "group": 
"common", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The username of the person who sent the line." },
+    "irc.num": { "kind": "header", "displayName": "", "group": "common", 
"label": "", "required": false, "javaType": "int", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
numeric reply." },
+    "irc.value": { "kind": "header", "displayName": "", "group": "common", 
"label": "", "required": false, "javaType": "String", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
first part of the message" }
+  },
   "properties": {
     "hostname": { "kind": "path", "displayName": "Hostname", "group": 
"common", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.irc.IrcConfiguration", "configurationField": 
"configuration", "description": "Hostname for the IRC chat server" },
     "port": { "kind": "path", "displayName": "Port", "group": "common", 
"label": "", "required": false, "type": "integer", "javaType": "int", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.irc.IrcConfiguration", "configurationField": 
"configuration", "description": "Port number for the IRC chat server. If no 
port is configured then a default port of either 6667, 6668 or 6669 is used." },
diff --git a/components/camel-irc/src/main/docs/irc-component.adoc 
b/components/camel-irc/src/main/docs/irc-component.adoc
index 565c079..a3fe477 100644
--- a/components/camel-irc/src/main/docs/irc-component.adoc
+++ b/components/camel-irc/src/main/docs/irc-component.adoc
@@ -42,6 +42,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
 
 == SSL Support
 
diff --git 
a/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcConstants.java
 
b/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcConstants.java
index e973ce7..a408f58 100644
--- 
a/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcConstants.java
+++ 
b/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcConstants.java
@@ -16,19 +16,33 @@
  */
 package org.apache.camel.component.irc;
 
+import org.apache.camel.spi.Metadata;
+
 /**
  * IRC Constants
  */
 public final class IrcConstants {
+    @Metadata(description = "The type of message", javaType = "String")
     public static final String IRC_MESSAGE_TYPE = "irc.messageType";
+    @Metadata(description = "The target", javaType = "String")
     public static final String IRC_TARGET = "irc.target";
+    @Metadata(description = "The nickname or channel the message should be 
sent to.", javaType = "String")
     public static final String IRC_SEND_TO = "irc.sendTo";
+    @Metadata(description = "The nickname of the user who is kicked from a 
channel (passive).", javaType = "String")
     public static final String IRC_USER_KICKED = "irc.user.kicked";
+    @Metadata(description = "The host of the person who sent the line.", 
javaType = "String")
     public static final String IRC_USER_HOST = "irc.user.host";
+    @Metadata(description = "The nickname of the person who sent the line or 
the server name of the server which sent the line.",
+              javaType = "String")
     public static final String IRC_USER_NICK = "irc.user.nick";
+    @Metadata(description = "The server name of the server which sent the line 
or the nickname of the person who sent the line.",
+              javaType = "String")
     public static final String IRC_USER_SERVERNAME = "irc.user.servername";
+    @Metadata(description = "The username of the person who sent the line.", 
javaType = "String")
     public static final String IRC_USER_USERNAME = "irc.user.username";
+    @Metadata(description = "The numeric reply.", javaType = "int")
     public static final String IRC_NUM = "irc.num";
+    @Metadata(description = "The first part of the message", javaType = 
"String")
     public static final String IRC_VALUE = "irc.value";
 
     private IrcConstants() {
diff --git 
a/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcEndpoint.java
 
b/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcEndpoint.java
index 4a81b56..1047e41 100644
--- 
a/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcEndpoint.java
+++ 
b/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcEndpoint.java
@@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory;
              title = "IRC",
              syntax = "irc:hostname:port",
              alternativeSyntax = "irc:username:password@hostname:port",
-             category = { Category.CHAT })
+             category = { Category.CHAT }, headersClass = IrcConstants.class)
 public class IrcEndpoint extends DefaultEndpoint {
 
     private static final Logger LOG = 
LoggerFactory.getLogger(IrcEndpoint.class);

Reply via email to