diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/activemq.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/activemq.json index e0b80d458e33e..486cc84e783d9 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/activemq.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/activemq.json @@ -160,6 +160,12 @@ "CamelJmsMessageType": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "org.apache.camel.component.jms.JmsMessageType", "enum": [ "Bytes", "Map", "Object", "Stream", "Text", "Blob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message type.", "constantName": "org.apache.camel.component.jms.JmsConstants#JMS_MESSAGE_TYPE" }, "CamelJmsRequestTimeout": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "20000", "description": "The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds).", "constantName": "org.apache.camel.component.jms.JmsConstants#JMS_REQUEST_TIMEOUT" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text", "bytes", "map", "stream", "null" ], "dependsOn": [ "messageConverter", "transferExchange" ], "byOption": [ { "option": "mapJmsMessage", "value": "false", "carriers": [ "pojo" ], "javaType": "jakarta.jms.Message" }, { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "map", "stream", "pojo", "null" ] } ], "description": "By the JMS message received: a String for a TextMessage, a byte array for a BytesMessage, a Map for a MapMessage, a stream for a StreamMessage; an ObjectMessage only with objectMessageEnabled" }, + "consumerReply": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "dependsOn": [ "jmsMessageType", "messageConverter", "transferExchange" ], "byOption": [ { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "stream", "file", "map", "pojo" ] } ], "description": "The reply, sent as the producer sends a message" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "dependsOn": [ "jmsMessageType", "messageConverter", "transferExchange" ], "byOption": [ { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "stream", "file", "map", "pojo" ] } ], "description": "Text is sent as a TextMessage; bytes, a stream or a file as a BytesMessage; a Map as a MapMessage. Another Serializable object fails unless objectMessageEnabled" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "exchangePattern", "value": "InOnly", "carriers": [ "unchanged" ] }, { "option": "disableReplyTo", "value": "true", "carriers": [ "unchanged" ] } ], "description": "Unchanged for a message that expects no reply (InOnly). A message that expects one (InOut) gets the body of the reply, as the consumer gives it" } + }, "properties": { "destinationType": { "index": 0, "kind": "path", "displayName": "Destination Type", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "queue", "topic", "temp-queue", "temp-topic" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "queue", "description": "The kind of destination to use" }, "destinationName": { "index": 1, "kind": "path", "displayName": "Destination Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the queue or topic to use as destination" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/activemq6.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/activemq6.json index 99e6755d4daf3..a24c009644694 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/activemq6.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/activemq6.json @@ -160,6 +160,12 @@ "CamelJmsMessageType": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "org.apache.camel.component.jms.JmsMessageType", "enum": [ "Bytes", "Map", "Object", "Stream", "Text", "Blob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message type.", "constantName": "org.apache.camel.component.jms.JmsConstants#JMS_MESSAGE_TYPE" }, "CamelJmsRequestTimeout": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "20000", "description": "The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds).", "constantName": "org.apache.camel.component.jms.JmsConstants#JMS_REQUEST_TIMEOUT" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text", "bytes", "map", "stream", "null" ], "dependsOn": [ "messageConverter", "transferExchange" ], "byOption": [ { "option": "mapJmsMessage", "value": "false", "carriers": [ "pojo" ], "javaType": "jakarta.jms.Message" }, { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "map", "stream", "pojo", "null" ] } ], "description": "By the JMS message received: a String for a TextMessage, a byte array for a BytesMessage, a Map for a MapMessage, a stream for a StreamMessage; an ObjectMessage only with objectMessageEnabled" }, + "consumerReply": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "dependsOn": [ "jmsMessageType", "messageConverter", "transferExchange" ], "byOption": [ { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "stream", "file", "map", "pojo" ] } ], "description": "The reply, sent as the producer sends a message" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "dependsOn": [ "jmsMessageType", "messageConverter", "transferExchange" ], "byOption": [ { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "stream", "file", "map", "pojo" ] } ], "description": "Text is sent as a TextMessage; bytes, a stream or a file as a BytesMessage; a Map as a MapMessage. Another Serializable object fails unless objectMessageEnabled" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "exchangePattern", "value": "InOnly", "carriers": [ "unchanged" ] }, { "option": "disableReplyTo", "value": "true", "carriers": [ "unchanged" ] } ], "description": "Unchanged for a message that expects no reply (InOnly). A message that expects one (InOut) gets the body of the reply, as the consumer gives it" } + }, "properties": { "destinationType": { "index": 0, "kind": "path", "displayName": "Destination Type", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "queue", "topic", "temp-queue", "temp-topic" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "queue", "description": "The kind of destination to use" }, "destinationName": { "index": 1, "kind": "path", "displayName": "Destination Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the queue or topic to use as destination" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/amqp.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/amqp.json index aa458bcd193d6..8557ccf657541 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/amqp.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/amqp.json @@ -166,6 +166,12 @@ "CamelJmsMessageType": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "org.apache.camel.component.jms.JmsMessageType", "enum": [ "Bytes", "Map", "Object", "Stream", "Text", "Blob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message type.", "constantName": "org.apache.camel.component.jms.JmsConstants#JMS_MESSAGE_TYPE" }, "CamelJmsRequestTimeout": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "20000", "description": "The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds).", "constantName": "org.apache.camel.component.jms.JmsConstants#JMS_REQUEST_TIMEOUT" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text", "bytes", "map", "stream", "null" ], "dependsOn": [ "messageConverter", "transferExchange" ], "byOption": [ { "option": "mapJmsMessage", "value": "false", "carriers": [ "pojo" ], "javaType": "jakarta.jms.Message" }, { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "map", "stream", "pojo", "null" ] } ], "description": "By the JMS message received: a String for a TextMessage, a byte array for a BytesMessage, a Map for a MapMessage, a stream for a StreamMessage; an ObjectMessage only with objectMessageEnabled" }, + "consumerReply": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "dependsOn": [ "jmsMessageType", "messageConverter", "transferExchange" ], "byOption": [ { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "stream", "file", "map", "pojo" ] } ], "description": "The reply, sent as the producer sends a message" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "dependsOn": [ "jmsMessageType", "messageConverter", "transferExchange" ], "byOption": [ { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "stream", "file", "map", "pojo" ] } ], "description": "Text is sent as a TextMessage; bytes, a stream or a file as a BytesMessage; a Map as a MapMessage. Another Serializable object fails unless objectMessageEnabled" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "exchangePattern", "value": "InOnly", "carriers": [ "unchanged" ] }, { "option": "disableReplyTo", "value": "true", "carriers": [ "unchanged" ] } ], "description": "Unchanged for a message that expects no reply (InOnly). A message that expects one (InOut) gets the body of the reply, as the consumer gives it" } + }, "properties": { "destinationType": { "index": 0, "kind": "path", "displayName": "Destination Type", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "queue", "topic", "temp-queue", "temp-topic" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "queue", "description": "The kind of destination to use" }, "destinationName": { "index": 1, "kind": "path", "displayName": "Destination Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the queue or topic to use as destination" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sqs.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sqs.json index 71cc592888ed6..8ff172f1e1f3b 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sqs.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sqs.json @@ -93,6 +93,11 @@ "CamelAwsSqsFailedMessageCount": { "index": 12, "kind": "header", "displayName": "", "group": "sendBatchMessage", "label": "sendBatchMessage", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of failed messages in a batch send operation.", "constantName": "org.apache.camel.component.aws2.sqs.Sqs2Constants#FAILED_MESSAGE_COUNT" }, "CamelAwsSqsSuccessfulMessageCount": { "index": 13, "kind": "header", "displayName": "", "group": "sendBatchMessage", "label": "sendBatchMessage", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of successful messages in a batch send operation.", "constantName": "org.apache.camel.component.aws2.sqs.Sqs2Constants#SUCCESSFUL_MESSAGE_COUNT" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text" ], "javaType": "java.lang.String", "description": "The body of the SQS message" }, + "producerIn": { "carriers": [ "text" ], "byOption": [ { "option": "operation", "value": "sendBatchMessage", "carriers": [ "list", "text" ] } ], "description": "The body of the message to send, as text, so a Map or a POJO is sent as its toString(): marshal it first. sendBatchMessage takes a List of text, or text that batchSeparator splits" }, + "producerOut": { "carriers": [ "unchanged" ], "byOption": [ { "option": "operation", "value": "sendBatchMessage", "carriers": [ "pojo" ], "javaType": "software.amazon.awssdk.services.sqs.model.SendMessageBatchResponse" }, { "option": "operation", "value": "deleteMessage", "carriers": [ "pojo" ], "javaType": "software.amazon.awssdk.services.sqs.model.DeleteMessageResponse" }, { "option": "operation", "value": "listQueues", "carriers": [ "pojo" ], "javaType": "software.amazon.awssdk.services.sqs.model.ListQueuesResponse" }, { "option": "operation", "value": "purgeQueue", "carriers": [ "pojo" ], "javaType": "software.amazon.awssdk.services.sqs.model.PurgeQueueResponse" }, { "option": "operation", "value": "deleteQueue", "carriers": [ "pojo" ], "javaType": "software.amazon.awssdk.services.sqs.model.DeleteQueueResponse" } ], "description": "Unchanged for a send, with the id of the message in a header; the response of the AWS SDK for the other operations" } + }, "properties": { "queueNameOrArn": { "index": 0, "kind": "path", "displayName": "Queue Name Or Arn", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Queue name or ARN" }, "amazonAWSHost": { "index": 1, "kind": "parameter", "displayName": "Amazon AWSHost", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "amazonaws.com", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The hostname of the Amazon AWS cloud." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/ftp.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/ftp.json index e56b6813c06bd..8d0a3be6738aa 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/ftp.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/ftp.json @@ -50,6 +50,11 @@ "CamelFtpReplyCode": { "index": 15, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "important": true, "description": "The FTP client reply code", "constantName": "org.apache.camel.component.file.remote.FtpConstants#FTP_REPLY_CODE" }, "CamelFtpReplyString": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "important": true, "description": "The FTP client reply string", "constantName": "org.apache.camel.component.file.remote.FtpConstants#FTP_REPLY_STRING" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "file" ], "dependsOn": [ "preMove" ], "byOption": [ { "option": "streamDownload", "value": "true", "carriers": [ "stream" ] }, { "option": "download", "value": "false", "carriers": [ "null" ] } ], "description": "The file as read: a RemoteFile, which converts to text, bytes or a stream; a stream with streamDownload; with preMove its content, a byte array" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file" ], "byOption": [ { "option": "allowNullBody", "value": "true", "carriers": [ "null", "text", "bytes", "stream", "file" ] } ], "description": "What converts to an InputStream: text, bytes, a stream or a file. A Map or a List fails: marshal it first" }, + "producerOut": { "carriers": [ "unchanged" ] } + }, "properties": { "host": { "index": 0, "kind": "path", "displayName": "Host", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.file.remote.FtpConfiguration", "configurationField": "configuration", "description": "Hostname of the FTP server" }, "port": { "index": 1, "kind": "path", "displayName": "Port", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.file.remote.FtpConfiguration", "configurationField": "configuration", "description": "Port of the FTP server" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/ftps.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/ftps.json index 075f91d010d24..ba1fade434f6b 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/ftps.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/ftps.json @@ -51,6 +51,11 @@ "CamelFtpReplyCode": { "index": 15, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "important": true, "description": "The FTP client reply code", "constantName": "org.apache.camel.component.file.remote.FtpConstants#FTP_REPLY_CODE" }, "CamelFtpReplyString": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "important": true, "description": "The FTP client reply string", "constantName": "org.apache.camel.component.file.remote.FtpConstants#FTP_REPLY_STRING" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "file" ], "dependsOn": [ "preMove" ], "byOption": [ { "option": "streamDownload", "value": "true", "carriers": [ "stream" ] }, { "option": "download", "value": "false", "carriers": [ "null" ] } ], "description": "The file as read: a RemoteFile, which converts to text, bytes or a stream; a stream with streamDownload; with preMove its content, a byte array" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file" ], "byOption": [ { "option": "allowNullBody", "value": "true", "carriers": [ "null", "text", "bytes", "stream", "file" ] } ], "description": "What converts to an InputStream: text, bytes, a stream or a file. A Map or a List fails: marshal it first" }, + "producerOut": { "carriers": [ "unchanged" ] } + }, "properties": { "host": { "index": 0, "kind": "path", "displayName": "Host", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.file.remote.FtpsConfiguration", "configurationField": "configuration", "description": "Hostname of the FTP server" }, "port": { "index": 1, "kind": "path", "displayName": "Port", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.file.remote.FtpsConfiguration", "configurationField": "configuration", "description": "Port of the FTP server" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jms.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jms.json index 7307e4f146f23..43327061d9863 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jms.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jms.json @@ -154,6 +154,12 @@ "CamelJmsMessageType": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "org.apache.camel.component.jms.JmsMessageType", "enum": [ "Bytes", "Map", "Object", "Stream", "Text", "Blob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message type.", "constantName": "org.apache.camel.component.jms.JmsConstants#JMS_MESSAGE_TYPE" }, "CamelJmsRequestTimeout": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "20000", "description": "The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds).", "constantName": "org.apache.camel.component.jms.JmsConstants#JMS_REQUEST_TIMEOUT" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text", "bytes", "map", "stream", "null" ], "dependsOn": [ "messageConverter", "transferExchange" ], "byOption": [ { "option": "mapJmsMessage", "value": "false", "carriers": [ "pojo" ], "javaType": "jakarta.jms.Message" }, { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "map", "stream", "pojo", "null" ] } ], "description": "By the JMS message received: a String for a TextMessage, a byte array for a BytesMessage, a Map for a MapMessage, a stream for a StreamMessage; an ObjectMessage only with objectMessageEnabled" }, + "consumerReply": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "dependsOn": [ "jmsMessageType", "messageConverter", "transferExchange" ], "byOption": [ { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "stream", "file", "map", "pojo" ] } ], "description": "The reply, sent as the producer sends a message" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "dependsOn": [ "jmsMessageType", "messageConverter", "transferExchange" ], "byOption": [ { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "stream", "file", "map", "pojo" ] } ], "description": "Text is sent as a TextMessage; bytes, a stream or a file as a BytesMessage; a Map as a MapMessage. Another Serializable object fails unless objectMessageEnabled" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "exchangePattern", "value": "InOnly", "carriers": [ "unchanged" ] }, { "option": "disableReplyTo", "value": "true", "carriers": [ "unchanged" ] } ], "description": "Unchanged for a message that expects no reply (InOnly). A message that expects one (InOut) gets the body of the reply, as the consumer gives it" } + }, "properties": { "destinationType": { "index": 0, "kind": "path", "displayName": "Destination Type", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "queue", "topic", "temp-queue", "temp-topic" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "queue", "description": "The kind of destination to use" }, "destinationName": { "index": 1, "kind": "path", "displayName": "Destination Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the queue or topic to use as destination" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json index f40e398b911ba..d1dafe51f2f12 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json @@ -169,6 +169,11 @@ "CamelKafkaRecordMeta": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The metadata (only configured if recordMetadata endpoint parameter is true)", "constantName": "org.apache.camel.component.kafka.KafkaConstants#KAFKA_RECORD_META" }, "CamelKafkaManualCommit": { "index": 12, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "org.apache.camel.component.kafka.consumer.KafkaManualCommit", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Can be used for forcing manual offset commit when using Kafka consumer.", "constantName": "org.apache.camel.component.kafka.KafkaConstants#MANUAL_COMMIT" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text", "null" ], "dependsOn": [ "valueDeserializer" ], "byOption": [ { "option": "valueDeserializer", "value": "org.apache.kafka.common.serialization.ByteArrayDeserializer", "carriers": [ "bytes", "null" ], "javaType": "byte[]" }, { "option": "batching", "value": "true", "carriers": [ "list" ] } ], "description": "The value of the record: a String with the default valueDeserializer (StringDeserializer), null for a tombstone. With batching, a List of the exchanges of the records" }, + "producerIn": { "carriers": [ "any" ], "dependsOn": [ "valueSerializer" ], "description": "The value of the record, converted for the valueSerializer: text with the default StringSerializer, so a Map or a POJO is sent as its toString(): marshal it first. With useIterator, an Iterable or an Iterator is sent as one record per element" }, + "producerOut": { "carriers": [ "unchanged" ] } + }, "properties": { "topic": { "index": 0, "kind": "path", "displayName": "Topic", "group": "common", "label": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Name of the topic to use. On the consumer you can use comma to separate multiple topics. A producer can only send a message to a single topic." }, "additionalProperties": { "index": 1, "kind": "parameter", "displayName": "Additional Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map", "prefix": "additionalProperties.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Sets additional properties for either kafka consumer or kafka producer in case they can't be set directly on the camel configurations (e.g.: new Kafka properties that are not reflected yet in Camel configurations), the properties have to be prefixed with additionalProperties., e.g.: additionalProperties.transactional.id=12345&additionalProperties.schema.registry.url=http:\/\/localhost:8811\/avro. If the properties are set in the application.properties file, they must be prefixed with camel.component.kafka.additional-properties (camel.component.kafka-share.additional-properties for the Kafka Share component) followed by the property name enclosed in square brackets, for example the delivery.timeout.ms property in square brackets. This is a multi-value option with prefix: additionalProperties." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/log.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/log.json index 1780d6316af2e..bf19483c839cb 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/log.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/log.json @@ -30,6 +30,10 @@ "autowiredEnabled": { "index": 2, "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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." }, "exchangeFormatter": { "index": 3, "kind": "property", "displayName": "Exchange Formatter", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExchangeFormatter", "deprecated": false, "autowired": true, "secret": false, "description": "Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter." } }, + "bodyTypes": { + "producerIn": { "carriers": [ "any" ] }, + "producerOut": { "carriers": [ "unchanged" ] } + }, "properties": { "loggerName": { "index": 0, "kind": "path", "displayName": "Logger Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the logging category to use" }, "groupActiveOnly": { "index": 1, "kind": "parameter", "displayName": "Group Active Only", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "If true, will hide stats when no new messages have been received for a time interval, if false, show stats regardless of message traffic." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mock.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mock.json index eadcc424ddeb2..4982ad8453e7f 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mock.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mock.json @@ -30,6 +30,10 @@ "autowiredEnabled": { "index": 2, "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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." }, "exchangeFormatter": { "index": 3, "kind": "property", "displayName": "Exchange Formatter", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExchangeFormatter", "deprecated": false, "autowired": true, "secret": false, "description": "To use a custom ExchangeFormatter to format the Exchange into a String suitable for logging." } }, + "bodyTypes": { + "producerIn": { "carriers": [ "any" ] }, + "producerOut": { "carriers": [ "unchanged" ] } + }, "properties": { "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of mock endpoint" }, "assertPeriod": { "index": 1, "kind": "parameter", "displayName": "Assert Period", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a grace period after which the mock will re-assert to ensure the preliminary assertion is still valid. This is used, for example, to assert that exactly a number of messages arrive. For example, if the expected count was set to 5, then the assertion is satisfied when five or more messages arrive. To ensure that exactly 5 messages arrive, then you would need to wait a little period to ensure no further message arrives. This is what you can use this method for. By default, this period is disabled." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb.json index 62ad7c16ba705..6bfb9c23245ef 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb.json @@ -58,6 +58,11 @@ "CamelMongoDbReturnDocumentType": { "index": 24, "kind": "header", "displayName": "", "group": "producer update one and return", "label": "producer update one and return", "required": false, "javaType": "com.mongodb.client.model.ReturnDocument", "enum": [ "BEFORE", "AFTER" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Indicates which document to return, the document before or after an update and return atomic operation.", "constantName": "org.apache.camel.component.mongodb.MongoDbConstants#RETURN_DOCUMENT" }, "CamelMongoDbOperationOption": { "index": 25, "kind": "header", "displayName": "", "group": "producer update one and options", "label": "producer update one and options", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Options to use. When set, options set in the headers will be ignored.", "constantName": "org.apache.camel.component.mongodb.MongoDbConstants#OPTIONS" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo" ], "javaType": "org.bson.Document", "byOption": [ { "option": "consumerType", "value": "changeStreams", "carriers": [ "pojo", "null" ] } ], "description": "The document added to the capped collection; with changeStreams the full document of the change, null when the change has none (an update without fullDocument=updateLookup)" }, + "producerIn": { "carriers": [ "any" ], "description": "A document or a query: a Document, a Map or JSON text; a List of them for insert, aggregate and update" }, + "producerOut": { "carriers": [ "unknown" ], "dependsOn": [ "outputType", "writeResultAsHeader" ], "byOption": [ { "option": "operation", "value": "findById", "carriers": [ "pojo", "null" ], "javaType": "org.bson.Document" }, { "option": "operation", "value": "findOneByQuery", "carriers": [ "pojo", "null" ], "javaType": "org.bson.Document" }, { "option": "operation", "value": "findOneAndDelete", "carriers": [ "pojo", "null" ], "javaType": "org.bson.Document" }, { "option": "operation", "value": "findOneAndReplace", "carriers": [ "pojo", "null" ], "javaType": "org.bson.Document" }, { "option": "operation", "value": "findOneAndUpdate", "carriers": [ "pojo", "null" ], "javaType": "org.bson.Document" }, { "option": "operation", "value": "findAll", "carriers": [ "list" ] }, { "option": "operation", "value": "findDistinct", "carriers": [ "list" ] }, { "option": "operation", "value": "aggregate", "carriers": [ "list" ] }, { "option": "operation", "value": "count", "carriers": [ "value" ], "javaType": "java.lang.Long" }, { "option": "operation", "value": "insert", "carriers": [ "pojo", "list" ] }, { "option": "operation", "value": "save", "carriers": [ "pojo" ] }, { "option": "operation", "value": "update", "carriers": [ "pojo" ], "javaType": "com.mongodb.client.result.UpdateResult" }, { "option": "operation", "value": "remove", "carriers": [ "pojo" ], "javaType": "com.mongodb.client.result.DeleteResult" }, { "option": "operation", "value": "bulkWrite", "carriers": [ "pojo" ], "javaType": "com.mongodb.bulk.BulkWriteResult" }, { "option": "operation", "value": "command", "carriers": [ "pojo" ], "javaType": "org.bson.Document" }, { "option": "operation", "value": "getDbStats", "carriers": [ "pojo" ], "javaType": "org.bson.Document" }, { "option": "operation", "value": "getColStats", "carriers": [ "pojo" ], "javaType": "org.bson.Document" } ], "description": "By the operation: a Document or null for a find of one, a List for findAll, findDistinct and aggregate, a Long for count, the document added for insert, the result of the driver for the other writes, and a Document for command and the stats" } + }, "properties": { "connectionBean": { "index": 0, "kind": "path", "displayName": "Connection Bean", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets the connection bean reference used to lookup a client for connecting to a database if no hosts parameter is present." }, "collection": { "index": 1, "kind": "parameter", "displayName": "Collection", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "endpointIdentity": true, "description": "Sets the name of the MongoDB collection to bind to this endpoint" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/paho-mqtt5.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/paho-mqtt5.json index 0f3147d6b6422..94f903356cd54 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/paho-mqtt5.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/paho-mqtt5.json @@ -66,6 +66,11 @@ "CamelPahoMqtt5OverrideTopic": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of topic to override and send to instead of topic specified on endpoint.", "constantName": "org.apache.camel.component.paho.mqtt5.PahoMqtt5Constants#CAMEL_PAHO_OVERRIDE_TOPIC" }, "CamelPahoMqtt5MsgProperties": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "consumer,producer", "required": false, "javaType": "org.eclipse.paho.mqttv5.common.packet.MqttProperties", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Consumer: The properties set on the incoming message. Producer: The properties to be set on the outgoing message.", "constantName": "org.apache.camel.component.paho.mqtt5.PahoMqtt5Constants#CAMEL_PAHO_MSG_PROPERTIES" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "bytes" ], "javaType": "byte[]", "description": "The payload of the MQTT message" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file" ], "description": "What converts to a byte array: text, bytes, a stream or a file, sent as the payload" }, + "producerOut": { "carriers": [ "unchanged" ] } + }, "properties": { "topic": { "index": 0, "kind": "path", "displayName": "Topic", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the topic" }, "automaticReconnect": { "index": 1, "kind": "parameter", "displayName": "Automatic Reconnect", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.paho.mqtt5.PahoMqtt5Configuration", "configurationField": "configuration", "description": "Sets whether the client will automatically attempt to reconnect to the server if the connection is lost. If set to false, the client will not attempt to automatically reconnect to the server in the event that the connection is lost. If set to true, in the event that the connection is lost, the client will attempt to reconnect to the server. It will initially wait 1 second before it attempts to reconnect, for every failed reconnect attempt, the delay will double until it is at 2 minutes at which point the delay will stay at 2 minutes." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/platform-http.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/platform-http.json index e60f0367259fb..3c00abc0f66aa 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/platform-http.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/platform-http.json @@ -33,6 +33,10 @@ "engine": { "index": 5, "kind": "property", "displayName": "Engine", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.platform.http.spi.PlatformHttpEngine", "deprecated": false, "autowired": false, "secret": false, "description": "An HTTP Server engine implementation to serve the requests" }, "headerFilterStrategy": { "index": 6, "kind": "property", "displayName": "Header Filter Strategy", "group": "filter", "label": "filter", "required": false, "type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message." } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "stream", "bytes", "null", "map", "file" ], "byOption": [ { "option": "useBodyHandler", "value": "false", "carriers": [ "pojo" ] } ], "description": "The request body: the stream cache with the Vert.x engine, a byte array with Spring Boot; null for a request without a body, such as a GET; a Map of the fields of a form (populateBodyWithForm); a File for an upload" }, + "consumerReply": { "carriers": [ "null", "text", "bytes", "stream" ], "description": "The response body: text, bytes, a stream or no body. A Map or a List fails: marshal it first" } + }, "properties": { "path": { "index": 0, "kind": "path", "displayName": "Path", "group": "consumer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The path under which this endpoint serves the HTTP requests, for proxy use 'proxy'" }, "consumes": { "index": 1, "kind": "parameter", "displayName": "Consumes", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The content type this endpoint accepts as an input, such as application\/xml or application\/json. null or *\/* mean no restriction." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/quartz.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/quartz.json index d56eb70d9f853..8b8cc7acc2acb 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/quartz.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/quartz.json @@ -37,6 +37,9 @@ "autoStartScheduler": { "index": 10, "kind": "property", "displayName": "Auto Start Scheduler", "group": "scheduler", "label": "scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the scheduler should be auto started. This option is default true" }, "interruptJobsOnShutdown": { "index": 11, "kind": "property", "displayName": "Interrupt Jobs On Shutdown", "group": "scheduler", "label": "scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to interrupt jobs on shutdown, which forces the scheduler to shut down quicker and attempt to interrupt any running jobs. If this is enabled, then any running jobs can fail due to being interrupted. When a job is interrupted then Camel will mark the exchange to stop to continue routing and set java.util.concurrent.RejectedExecutionException as caused exception. Therefore, use this with care, as its often better to allow Camel jobs to complete and shutdown gracefully." } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "null" ], "description": "No body: the message only starts the route" } + }, "properties": { "groupName": { "index": 0, "kind": "path", "displayName": "Group Name", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Camel", "description": "The quartz group name to use. The combination of group name and trigger name should be unique." }, "triggerName": { "index": 1, "kind": "path", "displayName": "Trigger Name", "group": "consumer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The quartz trigger name to use. The combination of group name and trigger name should be unique." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest-openapi.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest-openapi.json index 22417ab779dfc..f175ff957c19b 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest-openapi.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest-openapi.json @@ -47,6 +47,8 @@ "useGlobalSslContextParameters": { "index": 20, "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." } }, "bodyTypes": { + "consumerOut": { "carriers": [ "stream", "bytes", "null", "map", "file" ], "dependsOn": [ "consumerComponentName" ], "description": "The request body as the HTTP consumer gives it (platform-http by default). With the json binding mode of the rest configuration, the object of the schema (bindingPackageScan), or a Map or a List" }, + "consumerReply": { "carriers": [ "null", "text", "bytes", "stream" ], "dependsOn": [ "consumerComponentName" ], "description": "The response body as the HTTP consumer writes it. With the json binding mode of the rest configuration, any object, which the binding writes as JSON" }, "producerIn": { "carriers": [ "null", "text", "bytes", "stream", "file" ], "dependsOn": [ "componentName" ], "description": "The request body of the operation, which the http component sends: text, bytes, a stream or a file. A Map or a List fails: marshal it first" }, "producerOut": { "carriers": [ "bytes", "stream", "null" ], "dependsOn": [ "componentName" ], "description": "The response body, as the http component gives it: a byte array or the stream cache; null for a response without a body" } }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest.json index 041ff7467c2e6..8ad7a7dbc0771 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest.json @@ -43,6 +43,12 @@ "Accept": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The media type such as: 'text\/xml', or 'application\/json' this REST service accepts.", "constantName": "org.apache.camel.component.rest.RestConstants#ACCEPT" }, "CamelHttpResponseCode": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "important": true, "description": "The http response code", "constantName": "org.apache.camel.component.rest.RestConstants#HTTP_RESPONSE_CODE" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "stream", "bytes", "null", "map", "file" ], "dependsOn": [ "consumerComponentName" ], "byOption": [ { "option": "bindingMode", "value": "json", "carriers": [ "map", "list", "pojo" ] } ], "description": "The request body as the HTTP consumer gives it (platform-http by default). With bindingMode json, the object of inType, or a Map or a List without inType" }, + "consumerReply": { "carriers": [ "null", "text", "bytes", "stream" ], "dependsOn": [ "consumerComponentName" ], "byOption": [ { "option": "bindingMode", "value": "json", "carriers": [ "any" ] } ], "description": "The response body as the HTTP consumer writes it. With bindingMode json, any object, which the binding writes as JSON" }, + "producerIn": { "carriers": [ "null", "text", "bytes", "stream", "file" ], "dependsOn": [ "producerComponentName" ], "byOption": [ { "option": "bindingMode", "value": "json", "carriers": [ "any" ] } ], "description": "The request body the HTTP producer sends (the http component by default). With bindingMode json, any object, which the binding writes as JSON" }, + "producerOut": { "carriers": [ "bytes", "stream", "null" ], "dependsOn": [ "producerComponentName", "outType" ], "description": "The response body as the HTTP producer gives it; with bindingMode json and outType, an object of outType" } + }, "properties": { "method": { "index": 0, "kind": "path", "displayName": "Method", "group": "common", "label": "common", "required": true, "type": "enum", "javaType": "java.lang.String", "enum": [ "get", "post", "put", "delete", "patch", "head", "trace", "connect", "options" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "HTTP method to use." }, "path": { "index": 1, "kind": "path", "displayName": "Path", "group": "common", "label": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The base path, can use * as path suffix to support wildcard HTTP route matching." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/scheduler.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/scheduler.json index 491fc0b24d373..83c5065eeca03 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/scheduler.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/scheduler.json @@ -34,6 +34,9 @@ "headers": { "CamelMessageTimestamp": { "index": 0, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The timestamp of the message", "constantName": "org.apache.camel.component.scheduler.SchedulerConstants#MESSAGE_TIMESTAMP" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "null" ], "description": "No body: the message only starts the route" } + }, "properties": { "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "consumer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the scheduler" }, "includeMetadata": { "index": 1, "kind": "parameter", "displayName": "Include Metadata", "group": "consumer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to include metadata in the exchange such as fired time, timer name, timer count etc." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/sftp.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/sftp.json index 11096138d4192..a0471a76cb2f0 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/sftp.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/sftp.json @@ -55,6 +55,11 @@ "CamelFtpReplyCode": { "index": 15, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "important": true, "description": "The FTP client reply code", "constantName": "org.apache.camel.component.file.remote.FtpConstants#FTP_REPLY_CODE" }, "CamelFtpReplyString": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "important": true, "description": "The FTP client reply string", "constantName": "org.apache.camel.component.file.remote.FtpConstants#FTP_REPLY_STRING" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "file" ], "dependsOn": [ "preMove" ], "byOption": [ { "option": "streamDownload", "value": "true", "carriers": [ "stream" ] }, { "option": "download", "value": "false", "carriers": [ "null" ] } ], "description": "The file as read: a RemoteFile, which converts to text, bytes or a stream; a stream with streamDownload; with preMove its content, a byte array" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file" ], "byOption": [ { "option": "allowNullBody", "value": "true", "carriers": [ "null", "text", "bytes", "stream", "file" ] } ], "description": "What converts to an InputStream: text, bytes, a stream or a file. A Map or a List fails: marshal it first" }, + "producerOut": { "carriers": [ "unchanged" ] } + }, "properties": { "host": { "index": 0, "kind": "path", "displayName": "Host", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.file.remote.SftpConfiguration", "configurationField": "configuration", "description": "Hostname of the FTP server" }, "port": { "index": 1, "kind": "path", "displayName": "Port", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.file.remote.SftpConfiguration", "configurationField": "configuration", "description": "Port of the FTP server" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/csv.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/csv.json index c1044cee0dd0c..2b073a8fdfe26 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/csv.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/csv.json @@ -15,6 +15,12 @@ "modelName": "csv", "modelJavaType": "org.apache.camel.model.dataformat.CsvDataFormat" }, + "bodyTypes": { + "marshalIn": { "carriers": [ "map", "list" ], "description": "One row as a Map, or the rows as a List (or an Iterator) of Maps or Lists" }, + "marshalOut": { "carriers": [ "stream" ], "format": "csv", "description": "The CSV in the stream cache, or a byte array when stream caching is off" }, + "unmarshalIn": { "carriers": [ "text", "bytes", "stream", "file" ], "format": "csv" }, + "unmarshalOut": { "carriers": [ "list" ], "dependsOn": [ "recordConverterRef" ], "byOption": [ { "option": "lazyLoad", "value": "true", "carriers": [ "iterator" ] } ], "description": "A List of the rows, each a List of its values; with useMaps or useOrderedMaps, a Map of the header names and the values" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }, "format": { "index": 1, "kind": "attribute", "displayName": "Format", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "DEFAULT", "EXCEL", "INFORMIX_UNLOAD", "INFORMIX_UNLOAD_CSV", "MONGODB_CSV", "MONGODB_TSV", "MYSQL", "ORACLE", "POSTGRESQL_CSV", "POSTGRESQL_TEXT", "RFC4180" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "DEFAULT", "description": "The format to use." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/jacksonXml.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/jacksonXml.json index 1eca4610e6271..e01c38e3002ee 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/jacksonXml.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/jacksonXml.json @@ -15,6 +15,12 @@ "modelName": "jacksonXml", "modelJavaType": "org.apache.camel.model.dataformat.JacksonXMLDataFormat" }, + "bodyTypes": { + "marshalIn": { "carriers": [ "any" ], "description": "A Map, a List or a POJO to write as XML. Text is written as an XML value, not as it is" }, + "marshalOut": { "carriers": [ "stream" ], "format": "xml", "description": "The XML in the stream cache, or a byte array when stream caching is off" }, + "unmarshalIn": { "carriers": [ "text", "bytes", "stream", "file" ], "format": "xml" }, + "unmarshalOut": { "carriers": [ "map" ], "dependsOn": [ "unmarshalType", "collectionType", "allowUnmarshallType" ], "byOption": [ { "option": "useList", "value": "true", "carriers": [ "list" ] } ], "description": "A Map (LinkedHashMap) of the XML; an object of the class unmarshalType names" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }, "xmlMapper": { "index": 1, "kind": "attribute", "displayName": "Xml Mapper", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Lookup and use the existing XmlMapper with the given id." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/snakeYaml.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/snakeYaml.json index cc69504fdca03..a24fa2186d37c 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/snakeYaml.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/snakeYaml.json @@ -15,6 +15,12 @@ "modelName": "yaml", "modelJavaType": "org.apache.camel.model.dataformat.YAMLDataFormat" }, + "bodyTypes": { + "marshalIn": { "carriers": [ "any" ], "description": "A Map, a List or a POJO to write as YAML" }, + "marshalOut": { "carriers": [ "stream" ], "format": "yaml", "description": "The YAML in the stream cache, or a byte array when stream caching is off" }, + "unmarshalIn": { "carriers": [ "text", "bytes", "stream", "file" ], "format": "yaml" }, + "unmarshalOut": { "carriers": [ "map", "list" ], "dependsOn": [ "unmarshalType" ], "description": "A Map (LinkedHashMap) for a mapping, a List (ArrayList) for a sequence; a document that is a single value gives that value" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }, "library": { "index": 1, "kind": "attribute", "displayName": "Library", "group": "common", "required": false, "type": "enum", "javaType": "org.apache.camel.model.dataformat.YAMLLibrary", "enum": [ "SnakeYAML" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "SnakeYAML", "description": "Which yaml library to use. By default it is SnakeYAML." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/constant.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/constant.json index e1c1c40cb2ea8..9889e6d5b957e 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/constant.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/constant.json @@ -15,6 +15,9 @@ "modelName": "constant", "modelJavaType": "org.apache.camel.model.language.ConstantExpression" }, + "bodyTypes": { + "expressionOut": { "carriers": [ "text" ], "javaType": "java.lang.String", "dependsOn": [ "resultType" ], "description": "The text as it is written; resource:classpath:name loads the text of the resource" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node." }, "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/groovy.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/groovy.json index db276ac056830..fd58e1de9825c 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/groovy.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/groovy.json @@ -15,6 +15,10 @@ "modelName": "groovy", "modelJavaType": "org.apache.camel.model.language.GroovyExpression" }, + "bodyTypes": { + "expressionIn": { "carriers": [ "any" ], "description": "The body as it is, in the variable body" }, + "expressionOut": { "carriers": [ "unknown" ], "description": "What the script returns" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node." }, "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/jq.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/jq.json index 8d658803476a5..781f11d2f1794 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/jq.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/jq.json @@ -15,6 +15,10 @@ "modelName": "jq", "modelJavaType": "org.apache.camel.model.language.JqExpression" }, + "bodyTypes": { + "expressionIn": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "format": "json", "description": "JSON as text, bytes, a stream or a file, or a Map" }, + "expressionOut": { "carriers": [ "pojo", "list", "null" ], "dependsOn": [ "resultType" ], "description": "A JsonNode; a List of JsonNode when the filter gives several, null when it gives none" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node." }, "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/jsonpath.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/jsonpath.json index af55d48104eaa..e3aeffd210b31 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/jsonpath.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/jsonpath.json @@ -15,6 +15,10 @@ "modelName": "jsonpath", "modelJavaType": "org.apache.camel.model.language.JsonPathExpression" }, + "bodyTypes": { + "expressionIn": { "carriers": [ "any" ], "description": "JSON as text, bytes, a stream or a file, or parsed: a Map or a List. A POJO is read through Jackson" }, + "expressionOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "writeAsString", "value": "true", "carriers": [ "text", "list" ] } ], "description": "The value the path selects: a Map for an object, a List for an array or for a path with a wildcard or a filter, otherwise text, a number or a boolean" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node." }, "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/simple.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/simple.json index 6de66be485c43..5648229337930 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/simple.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/simple.json @@ -15,6 +15,10 @@ "modelName": "simple", "modelJavaType": "org.apache.camel.model.language.SimpleExpression" }, + "bodyTypes": { + "expressionIn": { "carriers": [ "any" ] }, + "expressionOut": { "carriers": [ "unknown" ], "description": "A text with functions gives text. A single function, such as ${body} or ${header.foo}, gives its value as it is" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node." }, "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/xpath.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/xpath.json index 0a6a706898992..e7e50b9357a1e 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/xpath.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/xpath.json @@ -15,6 +15,10 @@ "modelName": "xpath", "modelJavaType": "org.apache.camel.model.language.XPathExpression" }, + "bodyTypes": { + "expressionIn": { "carriers": [ "text", "bytes", "stream", "file", "pojo" ], "format": "xml", "description": "XML as text, bytes, a stream or a file, or a DOM" }, + "expressionOut": { "carriers": [ "pojo" ], "javaType": "org.w3c.dom.NodeList", "dependsOn": [ "resultType" ], "byOption": [ { "option": "resultQName", "value": "STRING", "carriers": [ "text" ], "javaType": "java.lang.String" }, { "option": "resultQName", "value": "NUMBER", "carriers": [ "value" ], "javaType": "java.lang.Double" }, { "option": "resultQName", "value": "BOOLEAN", "carriers": [ "value" ], "javaType": "java.lang.Boolean" }, { "option": "resultQName", "value": "NODE", "carriers": [ "pojo" ], "javaType": "org.w3c.dom.Node" } ], "description": "The nodes the expression selects" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node." }, "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax." }, diff --git a/components/camel-activemq/src/generated/resources/META-INF/org/apache/camel/component/activemq/activemq.json b/components/camel-activemq/src/generated/resources/META-INF/org/apache/camel/component/activemq/activemq.json index e0b80d458e33e..486cc84e783d9 100644 --- a/components/camel-activemq/src/generated/resources/META-INF/org/apache/camel/component/activemq/activemq.json +++ b/components/camel-activemq/src/generated/resources/META-INF/org/apache/camel/component/activemq/activemq.json @@ -160,6 +160,12 @@ "CamelJmsMessageType": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "org.apache.camel.component.jms.JmsMessageType", "enum": [ "Bytes", "Map", "Object", "Stream", "Text", "Blob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message type.", "constantName": "org.apache.camel.component.jms.JmsConstants#JMS_MESSAGE_TYPE" }, "CamelJmsRequestTimeout": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "20000", "description": "The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds).", "constantName": "org.apache.camel.component.jms.JmsConstants#JMS_REQUEST_TIMEOUT" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text", "bytes", "map", "stream", "null" ], "dependsOn": [ "messageConverter", "transferExchange" ], "byOption": [ { "option": "mapJmsMessage", "value": "false", "carriers": [ "pojo" ], "javaType": "jakarta.jms.Message" }, { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "map", "stream", "pojo", "null" ] } ], "description": "By the JMS message received: a String for a TextMessage, a byte array for a BytesMessage, a Map for a MapMessage, a stream for a StreamMessage; an ObjectMessage only with objectMessageEnabled" }, + "consumerReply": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "dependsOn": [ "jmsMessageType", "messageConverter", "transferExchange" ], "byOption": [ { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "stream", "file", "map", "pojo" ] } ], "description": "The reply, sent as the producer sends a message" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "dependsOn": [ "jmsMessageType", "messageConverter", "transferExchange" ], "byOption": [ { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "stream", "file", "map", "pojo" ] } ], "description": "Text is sent as a TextMessage; bytes, a stream or a file as a BytesMessage; a Map as a MapMessage. Another Serializable object fails unless objectMessageEnabled" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "exchangePattern", "value": "InOnly", "carriers": [ "unchanged" ] }, { "option": "disableReplyTo", "value": "true", "carriers": [ "unchanged" ] } ], "description": "Unchanged for a message that expects no reply (InOnly). A message that expects one (InOut) gets the body of the reply, as the consumer gives it" } + }, "properties": { "destinationType": { "index": 0, "kind": "path", "displayName": "Destination Type", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "queue", "topic", "temp-queue", "temp-topic" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "queue", "description": "The kind of destination to use" }, "destinationName": { "index": 1, "kind": "path", "displayName": "Destination Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the queue or topic to use as destination" }, diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQEndpoint.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQEndpoint.java index c2c8432f5ff0f..34c534d2014d5 100644 --- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQEndpoint.java +++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQEndpoint.java @@ -24,6 +24,9 @@ import org.apache.camel.component.jms.JmsComponent; import org.apache.camel.component.jms.JmsConfiguration; import org.apache.camel.component.jms.JmsEndpoint; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.EndpointServiceLocation; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; @@ -36,6 +39,42 @@ @UriEndpoint(firstVersion = "1.0.0", extendsScheme = "jms", scheme = "activemq", title = "ActiveMQ 5.x", syntax = "activemq:destinationType:destinationName", category = { Category.MESSAGING }) +@BodyTypes(consumerOut = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.MAP, Carrier.STREAM, Carrier.NULL }, + dependsOn = { "messageConverter", "transferExchange" }, + byOption = { + @BodyType.When(option = "mapJmsMessage", value = "false", carriers = Carrier.POJO, + javaType = "jakarta.jms.Message"), + @BodyType.When(option = "objectMessageEnabled", value = "true", + carriers = { + Carrier.TEXT, Carrier.BYTES, Carrier.MAP, + Carrier.STREAM, Carrier.POJO, Carrier.NULL }) }, + description = "By the JMS message received: a String for a TextMessage, a byte array for a" + + " BytesMessage, a Map for a MapMessage, a stream for a StreamMessage;" + + " an ObjectMessage only with objectMessageEnabled"), + consumerReply = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE, Carrier.MAP }, + dependsOn = { "jmsMessageType", "messageConverter", "transferExchange" }, + byOption = @BodyType.When(option = "objectMessageEnabled", value = "true", + carriers = { + Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, + Carrier.FILE, Carrier.MAP, Carrier.POJO }), + description = "The reply, sent as the producer sends a message"), + producerIn = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE, Carrier.MAP }, + dependsOn = { "jmsMessageType", "messageConverter", "transferExchange" }, + byOption = @BodyType.When(option = "objectMessageEnabled", value = "true", + carriers = { + Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, + Carrier.FILE, Carrier.MAP, Carrier.POJO }), + description = "Text is sent as a TextMessage; bytes, a stream or a file as a BytesMessage;" + + " a Map as a MapMessage. Another Serializable object fails unless" + + " objectMessageEnabled"), + producerOut = @BodyType(value = Carrier.UNKNOWN, + byOption = { + @BodyType.When(option = "exchangePattern", value = "InOnly", + carriers = Carrier.UNCHANGED), + @BodyType.When(option = "disableReplyTo", value = "true", + carriers = Carrier.UNCHANGED) }, + description = "Unchanged for a message that expects no reply (InOnly). A message that" + + " expects one (InOut) gets the body of the reply, as the consumer gives it")) public class ActiveMQEndpoint extends JmsEndpoint implements EndpointServiceLocation { @UriParam(multiValue = true, prefix = "destination.", label = "consumer,advanced") diff --git a/components/camel-activemq6/src/generated/resources/META-INF/org/apache/camel/component/activemq6/activemq6.json b/components/camel-activemq6/src/generated/resources/META-INF/org/apache/camel/component/activemq6/activemq6.json index 99e6755d4daf3..a24c009644694 100644 --- a/components/camel-activemq6/src/generated/resources/META-INF/org/apache/camel/component/activemq6/activemq6.json +++ b/components/camel-activemq6/src/generated/resources/META-INF/org/apache/camel/component/activemq6/activemq6.json @@ -160,6 +160,12 @@ "CamelJmsMessageType": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "org.apache.camel.component.jms.JmsMessageType", "enum": [ "Bytes", "Map", "Object", "Stream", "Text", "Blob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message type.", "constantName": "org.apache.camel.component.jms.JmsConstants#JMS_MESSAGE_TYPE" }, "CamelJmsRequestTimeout": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "20000", "description": "The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds).", "constantName": "org.apache.camel.component.jms.JmsConstants#JMS_REQUEST_TIMEOUT" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text", "bytes", "map", "stream", "null" ], "dependsOn": [ "messageConverter", "transferExchange" ], "byOption": [ { "option": "mapJmsMessage", "value": "false", "carriers": [ "pojo" ], "javaType": "jakarta.jms.Message" }, { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "map", "stream", "pojo", "null" ] } ], "description": "By the JMS message received: a String for a TextMessage, a byte array for a BytesMessage, a Map for a MapMessage, a stream for a StreamMessage; an ObjectMessage only with objectMessageEnabled" }, + "consumerReply": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "dependsOn": [ "jmsMessageType", "messageConverter", "transferExchange" ], "byOption": [ { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "stream", "file", "map", "pojo" ] } ], "description": "The reply, sent as the producer sends a message" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "dependsOn": [ "jmsMessageType", "messageConverter", "transferExchange" ], "byOption": [ { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "stream", "file", "map", "pojo" ] } ], "description": "Text is sent as a TextMessage; bytes, a stream or a file as a BytesMessage; a Map as a MapMessage. Another Serializable object fails unless objectMessageEnabled" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "exchangePattern", "value": "InOnly", "carriers": [ "unchanged" ] }, { "option": "disableReplyTo", "value": "true", "carriers": [ "unchanged" ] } ], "description": "Unchanged for a message that expects no reply (InOnly). A message that expects one (InOut) gets the body of the reply, as the consumer gives it" } + }, "properties": { "destinationType": { "index": 0, "kind": "path", "displayName": "Destination Type", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "queue", "topic", "temp-queue", "temp-topic" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "queue", "description": "The kind of destination to use" }, "destinationName": { "index": 1, "kind": "path", "displayName": "Destination Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the queue or topic to use as destination" }, diff --git a/components/camel-activemq6/src/main/java/org/apache/camel/component/activemq6/ActiveMQEndpoint.java b/components/camel-activemq6/src/main/java/org/apache/camel/component/activemq6/ActiveMQEndpoint.java index cd3bed8b2bbaf..57373f8b7cde3 100644 --- a/components/camel-activemq6/src/main/java/org/apache/camel/component/activemq6/ActiveMQEndpoint.java +++ b/components/camel-activemq6/src/main/java/org/apache/camel/component/activemq6/ActiveMQEndpoint.java @@ -24,6 +24,9 @@ import org.apache.camel.component.jms.JmsComponent; import org.apache.camel.component.jms.JmsConfiguration; import org.apache.camel.component.jms.JmsEndpoint; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.EndpointServiceLocation; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; @@ -36,6 +39,42 @@ @UriEndpoint(firstVersion = "4.7.0", extendsScheme = "jms", scheme = "activemq6", title = "ActiveMQ 6.x", syntax = "activemq6:destinationType:destinationName", category = { Category.MESSAGING }) +@BodyTypes(consumerOut = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.MAP, Carrier.STREAM, Carrier.NULL }, + dependsOn = { "messageConverter", "transferExchange" }, + byOption = { + @BodyType.When(option = "mapJmsMessage", value = "false", carriers = Carrier.POJO, + javaType = "jakarta.jms.Message"), + @BodyType.When(option = "objectMessageEnabled", value = "true", + carriers = { + Carrier.TEXT, Carrier.BYTES, Carrier.MAP, + Carrier.STREAM, Carrier.POJO, Carrier.NULL }) }, + description = "By the JMS message received: a String for a TextMessage, a byte array for a" + + " BytesMessage, a Map for a MapMessage, a stream for a StreamMessage;" + + " an ObjectMessage only with objectMessageEnabled"), + consumerReply = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE, Carrier.MAP }, + dependsOn = { "jmsMessageType", "messageConverter", "transferExchange" }, + byOption = @BodyType.When(option = "objectMessageEnabled", value = "true", + carriers = { + Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, + Carrier.FILE, Carrier.MAP, Carrier.POJO }), + description = "The reply, sent as the producer sends a message"), + producerIn = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE, Carrier.MAP }, + dependsOn = { "jmsMessageType", "messageConverter", "transferExchange" }, + byOption = @BodyType.When(option = "objectMessageEnabled", value = "true", + carriers = { + Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, + Carrier.FILE, Carrier.MAP, Carrier.POJO }), + description = "Text is sent as a TextMessage; bytes, a stream or a file as a BytesMessage;" + + " a Map as a MapMessage. Another Serializable object fails unless" + + " objectMessageEnabled"), + producerOut = @BodyType(value = Carrier.UNKNOWN, + byOption = { + @BodyType.When(option = "exchangePattern", value = "InOnly", + carriers = Carrier.UNCHANGED), + @BodyType.When(option = "disableReplyTo", value = "true", + carriers = Carrier.UNCHANGED) }, + description = "Unchanged for a message that expects no reply (InOnly). A message that" + + " expects one (InOut) gets the body of the reply, as the consumer gives it")) public class ActiveMQEndpoint extends JmsEndpoint implements EndpointServiceLocation { @UriParam(multiValue = true, prefix = "destination.", label = "consumer,advanced") diff --git a/components/camel-amqp/src/generated/resources/META-INF/org/apache/camel/component/amqp/amqp.json b/components/camel-amqp/src/generated/resources/META-INF/org/apache/camel/component/amqp/amqp.json index aa458bcd193d6..8557ccf657541 100644 --- a/components/camel-amqp/src/generated/resources/META-INF/org/apache/camel/component/amqp/amqp.json +++ b/components/camel-amqp/src/generated/resources/META-INF/org/apache/camel/component/amqp/amqp.json @@ -166,6 +166,12 @@ "CamelJmsMessageType": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "org.apache.camel.component.jms.JmsMessageType", "enum": [ "Bytes", "Map", "Object", "Stream", "Text", "Blob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message type.", "constantName": "org.apache.camel.component.jms.JmsConstants#JMS_MESSAGE_TYPE" }, "CamelJmsRequestTimeout": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "20000", "description": "The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds).", "constantName": "org.apache.camel.component.jms.JmsConstants#JMS_REQUEST_TIMEOUT" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text", "bytes", "map", "stream", "null" ], "dependsOn": [ "messageConverter", "transferExchange" ], "byOption": [ { "option": "mapJmsMessage", "value": "false", "carriers": [ "pojo" ], "javaType": "jakarta.jms.Message" }, { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "map", "stream", "pojo", "null" ] } ], "description": "By the JMS message received: a String for a TextMessage, a byte array for a BytesMessage, a Map for a MapMessage, a stream for a StreamMessage; an ObjectMessage only with objectMessageEnabled" }, + "consumerReply": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "dependsOn": [ "jmsMessageType", "messageConverter", "transferExchange" ], "byOption": [ { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "stream", "file", "map", "pojo" ] } ], "description": "The reply, sent as the producer sends a message" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "dependsOn": [ "jmsMessageType", "messageConverter", "transferExchange" ], "byOption": [ { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "stream", "file", "map", "pojo" ] } ], "description": "Text is sent as a TextMessage; bytes, a stream or a file as a BytesMessage; a Map as a MapMessage. Another Serializable object fails unless objectMessageEnabled" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "exchangePattern", "value": "InOnly", "carriers": [ "unchanged" ] }, { "option": "disableReplyTo", "value": "true", "carriers": [ "unchanged" ] } ], "description": "Unchanged for a message that expects no reply (InOnly). A message that expects one (InOut) gets the body of the reply, as the consumer gives it" } + }, "properties": { "destinationType": { "index": 0, "kind": "path", "displayName": "Destination Type", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "queue", "topic", "temp-queue", "temp-topic" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "queue", "description": "The kind of destination to use" }, "destinationName": { "index": 1, "kind": "path", "displayName": "Destination Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the queue or topic to use as destination" }, diff --git a/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPEndpoint.java b/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPEndpoint.java index e39ea41759d7e..4216a71c9529f 100644 --- a/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPEndpoint.java +++ b/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPEndpoint.java @@ -18,6 +18,9 @@ import org.apache.camel.Category; import org.apache.camel.component.jms.JmsEndpoint; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.UriEndpoint; /** @@ -28,6 +31,42 @@ */ @UriEndpoint(firstVersion = "1.2.0", scheme = "amqp", extendsScheme = "jms", title = "AMQP", syntax = "amqp:destinationType:destinationName", category = { Category.MESSAGING }) +@BodyTypes(consumerOut = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.MAP, Carrier.STREAM, Carrier.NULL }, + dependsOn = { "messageConverter", "transferExchange" }, + byOption = { + @BodyType.When(option = "mapJmsMessage", value = "false", carriers = Carrier.POJO, + javaType = "jakarta.jms.Message"), + @BodyType.When(option = "objectMessageEnabled", value = "true", + carriers = { + Carrier.TEXT, Carrier.BYTES, Carrier.MAP, + Carrier.STREAM, Carrier.POJO, Carrier.NULL }) }, + description = "By the JMS message received: a String for a TextMessage, a byte array for a" + + " BytesMessage, a Map for a MapMessage, a stream for a StreamMessage;" + + " an ObjectMessage only with objectMessageEnabled"), + consumerReply = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE, Carrier.MAP }, + dependsOn = { "jmsMessageType", "messageConverter", "transferExchange" }, + byOption = @BodyType.When(option = "objectMessageEnabled", value = "true", + carriers = { + Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, + Carrier.FILE, Carrier.MAP, Carrier.POJO }), + description = "The reply, sent as the producer sends a message"), + producerIn = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE, Carrier.MAP }, + dependsOn = { "jmsMessageType", "messageConverter", "transferExchange" }, + byOption = @BodyType.When(option = "objectMessageEnabled", value = "true", + carriers = { + Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, + Carrier.FILE, Carrier.MAP, Carrier.POJO }), + description = "Text is sent as a TextMessage; bytes, a stream or a file as a BytesMessage;" + + " a Map as a MapMessage. Another Serializable object fails unless" + + " objectMessageEnabled"), + producerOut = @BodyType(value = Carrier.UNKNOWN, + byOption = { + @BodyType.When(option = "exchangePattern", value = "InOnly", + carriers = Carrier.UNCHANGED), + @BodyType.When(option = "disableReplyTo", value = "true", + carriers = Carrier.UNCHANGED) }, + description = "Unchanged for a message that expects no reply (InOnly). A message that" + + " expects one (InOut) gets the body of the reply, as the consumer gives it")) public class AMQPEndpoint extends JmsEndpoint { @Override diff --git a/components/camel-aws/camel-aws2-sqs/src/generated/resources/META-INF/org/apache/camel/component/aws2/sqs/aws2-sqs.json b/components/camel-aws/camel-aws2-sqs/src/generated/resources/META-INF/org/apache/camel/component/aws2/sqs/aws2-sqs.json index 71cc592888ed6..8ff172f1e1f3b 100644 --- a/components/camel-aws/camel-aws2-sqs/src/generated/resources/META-INF/org/apache/camel/component/aws2/sqs/aws2-sqs.json +++ b/components/camel-aws/camel-aws2-sqs/src/generated/resources/META-INF/org/apache/camel/component/aws2/sqs/aws2-sqs.json @@ -93,6 +93,11 @@ "CamelAwsSqsFailedMessageCount": { "index": 12, "kind": "header", "displayName": "", "group": "sendBatchMessage", "label": "sendBatchMessage", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of failed messages in a batch send operation.", "constantName": "org.apache.camel.component.aws2.sqs.Sqs2Constants#FAILED_MESSAGE_COUNT" }, "CamelAwsSqsSuccessfulMessageCount": { "index": 13, "kind": "header", "displayName": "", "group": "sendBatchMessage", "label": "sendBatchMessage", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of successful messages in a batch send operation.", "constantName": "org.apache.camel.component.aws2.sqs.Sqs2Constants#SUCCESSFUL_MESSAGE_COUNT" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text" ], "javaType": "java.lang.String", "description": "The body of the SQS message" }, + "producerIn": { "carriers": [ "text" ], "byOption": [ { "option": "operation", "value": "sendBatchMessage", "carriers": [ "list", "text" ] } ], "description": "The body of the message to send, as text, so a Map or a POJO is sent as its toString(): marshal it first. sendBatchMessage takes a List of text, or text that batchSeparator splits" }, + "producerOut": { "carriers": [ "unchanged" ], "byOption": [ { "option": "operation", "value": "sendBatchMessage", "carriers": [ "pojo" ], "javaType": "software.amazon.awssdk.services.sqs.model.SendMessageBatchResponse" }, { "option": "operation", "value": "deleteMessage", "carriers": [ "pojo" ], "javaType": "software.amazon.awssdk.services.sqs.model.DeleteMessageResponse" }, { "option": "operation", "value": "listQueues", "carriers": [ "pojo" ], "javaType": "software.amazon.awssdk.services.sqs.model.ListQueuesResponse" }, { "option": "operation", "value": "purgeQueue", "carriers": [ "pojo" ], "javaType": "software.amazon.awssdk.services.sqs.model.PurgeQueueResponse" }, { "option": "operation", "value": "deleteQueue", "carriers": [ "pojo" ], "javaType": "software.amazon.awssdk.services.sqs.model.DeleteQueueResponse" } ], "description": "Unchanged for a send, with the id of the message in a header; the response of the AWS SDK for the other operations" } + }, "properties": { "queueNameOrArn": { "index": 0, "kind": "path", "displayName": "Queue Name Or Arn", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Queue name or ARN" }, "amazonAWSHost": { "index": 1, "kind": "parameter", "displayName": "Amazon AWSHost", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "amazonaws.com", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The hostname of the Amazon AWS cloud." }, diff --git a/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Endpoint.java b/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Endpoint.java index 14b3316f0e4e8..961073d19076b 100644 --- a/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Endpoint.java +++ b/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Endpoint.java @@ -33,6 +33,7 @@ import org.apache.camel.clock.Clock; import org.apache.camel.component.aws2.sqs.client.Sqs2ClientFactory; import org.apache.camel.spi.*; +import org.apache.camel.spi.BodyType.Carrier; import org.apache.camel.support.MonotonicClock; import org.apache.camel.support.ResourceHelper; import org.apache.camel.support.ScheduledPollEndpoint; @@ -60,6 +61,30 @@ @UriEndpoint(firstVersion = "3.1.0", scheme = "aws2-sqs", title = "AWS Simple Queue Service (SQS)", syntax = "aws2-sqs:queueNameOrArn", category = { Category.CLOUD, Category.MESSAGING }, headersClass = Sqs2Constants.class) +@BodyTypes(consumerOut = @BodyType(value = Carrier.TEXT, javaType = "java.lang.String", + description = "The body of the SQS message"), + producerIn = @BodyType(value = Carrier.TEXT, + byOption = @BodyType.When(option = "operation", value = "sendBatchMessage", + carriers = { Carrier.LIST, Carrier.TEXT }), + description = "The body of the message to send, as text, so a Map or a POJO is sent as" + + " its toString(): marshal it first. sendBatchMessage takes a List of" + + " text, or text that batchSeparator splits"), + producerOut = @BodyType(value = Carrier.UNCHANGED, + byOption = { + @BodyType.When(option = "operation", value = "sendBatchMessage", + carriers = Carrier.POJO, + javaType = "software.amazon.awssdk.services.sqs.model.SendMessageBatchResponse"), + @BodyType.When(option = "operation", value = "deleteMessage", + carriers = Carrier.POJO, + javaType = "software.amazon.awssdk.services.sqs.model.DeleteMessageResponse"), + @BodyType.When(option = "operation", value = "listQueues", carriers = Carrier.POJO, + javaType = "software.amazon.awssdk.services.sqs.model.ListQueuesResponse"), + @BodyType.When(option = "operation", value = "purgeQueue", carriers = Carrier.POJO, + javaType = "software.amazon.awssdk.services.sqs.model.PurgeQueueResponse"), + @BodyType.When(option = "operation", value = "deleteQueue", carriers = Carrier.POJO, + javaType = "software.amazon.awssdk.services.sqs.model.DeleteQueueResponse") }, + description = "Unchanged for a send, with the id of the message in a header; the response" + + " of the AWS SDK for the other operations")) public class Sqs2Endpoint extends ScheduledPollEndpoint implements HeaderFilterStrategyAware, EndpointServiceLocation { private static final Logger LOG = LoggerFactory.getLogger(Sqs2Endpoint.class); diff --git a/components/camel-csv/src/generated/resources/META-INF/org/apache/camel/dataformat/csv/csv.json b/components/camel-csv/src/generated/resources/META-INF/org/apache/camel/dataformat/csv/csv.json index c1044cee0dd0c..2b073a8fdfe26 100644 --- a/components/camel-csv/src/generated/resources/META-INF/org/apache/camel/dataformat/csv/csv.json +++ b/components/camel-csv/src/generated/resources/META-INF/org/apache/camel/dataformat/csv/csv.json @@ -15,6 +15,12 @@ "modelName": "csv", "modelJavaType": "org.apache.camel.model.dataformat.CsvDataFormat" }, + "bodyTypes": { + "marshalIn": { "carriers": [ "map", "list" ], "description": "One row as a Map, or the rows as a List (or an Iterator) of Maps or Lists" }, + "marshalOut": { "carriers": [ "stream" ], "format": "csv", "description": "The CSV in the stream cache, or a byte array when stream caching is off" }, + "unmarshalIn": { "carriers": [ "text", "bytes", "stream", "file" ], "format": "csv" }, + "unmarshalOut": { "carriers": [ "list" ], "dependsOn": [ "recordConverterRef" ], "byOption": [ { "option": "lazyLoad", "value": "true", "carriers": [ "iterator" ] } ], "description": "A List of the rows, each a List of its values; with useMaps or useOrderedMaps, a Map of the header names and the values" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }, "format": { "index": 1, "kind": "attribute", "displayName": "Format", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "DEFAULT", "EXCEL", "INFORMIX_UNLOAD", "INFORMIX_UNLOAD_CSV", "MONGODB_CSV", "MONGODB_TSV", "MYSQL", "ORACLE", "POSTGRESQL_CSV", "POSTGRESQL_TEXT", "RFC4180" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "DEFAULT", "description": "The format to use." }, diff --git a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java index 5e443a58c6444..911b89cef6fd1 100644 --- a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java +++ b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java @@ -21,6 +21,9 @@ import java.util.StringJoiner; import org.apache.camel.Exchange; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.DataFormat; import org.apache.camel.spi.DataFormatName; import org.apache.camel.spi.annotations.Dataformat; @@ -36,6 +39,16 @@ * Autogeneration can be disabled. In this case, only the fields defined in csvConfig are written on the output. */ @Dataformat("csv") +@BodyTypes(marshalIn = @BodyType(value = { Carrier.MAP, Carrier.LIST }, + description = "One row as a Map, or the rows as a List (or an Iterator) of Maps or Lists"), + marshalOut = @BodyType(value = Carrier.STREAM, format = "csv", + description = "The CSV in the stream cache, or a byte array when stream caching is off"), + unmarshalIn = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE }, format = "csv"), + unmarshalOut = @BodyType(value = Carrier.LIST, dependsOn = "recordConverterRef", + byOption = @BodyType.When(option = "lazyLoad", value = "true", + carriers = Carrier.ITERATOR), + description = "A List of the rows, each a List of its values; with useMaps or" + + " useOrderedMaps, a Map of the header names and the values")) public class CsvDataFormat extends ServiceSupport implements DataFormat, DataFormatName { // CSV format options private CSVFormat csvFormat = CSVFormat.DEFAULT; diff --git a/components/camel-ftp/src/generated/resources/META-INF/org/apache/camel/component/file/remote/ftp.json b/components/camel-ftp/src/generated/resources/META-INF/org/apache/camel/component/file/remote/ftp.json index e56b6813c06bd..8d0a3be6738aa 100644 --- a/components/camel-ftp/src/generated/resources/META-INF/org/apache/camel/component/file/remote/ftp.json +++ b/components/camel-ftp/src/generated/resources/META-INF/org/apache/camel/component/file/remote/ftp.json @@ -50,6 +50,11 @@ "CamelFtpReplyCode": { "index": 15, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "important": true, "description": "The FTP client reply code", "constantName": "org.apache.camel.component.file.remote.FtpConstants#FTP_REPLY_CODE" }, "CamelFtpReplyString": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "important": true, "description": "The FTP client reply string", "constantName": "org.apache.camel.component.file.remote.FtpConstants#FTP_REPLY_STRING" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "file" ], "dependsOn": [ "preMove" ], "byOption": [ { "option": "streamDownload", "value": "true", "carriers": [ "stream" ] }, { "option": "download", "value": "false", "carriers": [ "null" ] } ], "description": "The file as read: a RemoteFile, which converts to text, bytes or a stream; a stream with streamDownload; with preMove its content, a byte array" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file" ], "byOption": [ { "option": "allowNullBody", "value": "true", "carriers": [ "null", "text", "bytes", "stream", "file" ] } ], "description": "What converts to an InputStream: text, bytes, a stream or a file. A Map or a List fails: marshal it first" }, + "producerOut": { "carriers": [ "unchanged" ] } + }, "properties": { "host": { "index": 0, "kind": "path", "displayName": "Host", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.file.remote.FtpConfiguration", "configurationField": "configuration", "description": "Hostname of the FTP server" }, "port": { "index": 1, "kind": "path", "displayName": "Port", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.file.remote.FtpConfiguration", "configurationField": "configuration", "description": "Port of the FTP server" }, diff --git a/components/camel-ftp/src/generated/resources/META-INF/org/apache/camel/component/file/remote/ftps.json b/components/camel-ftp/src/generated/resources/META-INF/org/apache/camel/component/file/remote/ftps.json index 075f91d010d24..ba1fade434f6b 100644 --- a/components/camel-ftp/src/generated/resources/META-INF/org/apache/camel/component/file/remote/ftps.json +++ b/components/camel-ftp/src/generated/resources/META-INF/org/apache/camel/component/file/remote/ftps.json @@ -51,6 +51,11 @@ "CamelFtpReplyCode": { "index": 15, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "important": true, "description": "The FTP client reply code", "constantName": "org.apache.camel.component.file.remote.FtpConstants#FTP_REPLY_CODE" }, "CamelFtpReplyString": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "important": true, "description": "The FTP client reply string", "constantName": "org.apache.camel.component.file.remote.FtpConstants#FTP_REPLY_STRING" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "file" ], "dependsOn": [ "preMove" ], "byOption": [ { "option": "streamDownload", "value": "true", "carriers": [ "stream" ] }, { "option": "download", "value": "false", "carriers": [ "null" ] } ], "description": "The file as read: a RemoteFile, which converts to text, bytes or a stream; a stream with streamDownload; with preMove its content, a byte array" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file" ], "byOption": [ { "option": "allowNullBody", "value": "true", "carriers": [ "null", "text", "bytes", "stream", "file" ] } ], "description": "What converts to an InputStream: text, bytes, a stream or a file. A Map or a List fails: marshal it first" }, + "producerOut": { "carriers": [ "unchanged" ] } + }, "properties": { "host": { "index": 0, "kind": "path", "displayName": "Host", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.file.remote.FtpsConfiguration", "configurationField": "configuration", "description": "Hostname of the FTP server" }, "port": { "index": 1, "kind": "path", "displayName": "Port", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.file.remote.FtpsConfiguration", "configurationField": "configuration", "description": "Port of the FTP server" }, diff --git a/components/camel-ftp/src/generated/resources/META-INF/org/apache/camel/component/file/remote/sftp.json b/components/camel-ftp/src/generated/resources/META-INF/org/apache/camel/component/file/remote/sftp.json index 11096138d4192..a0471a76cb2f0 100644 --- a/components/camel-ftp/src/generated/resources/META-INF/org/apache/camel/component/file/remote/sftp.json +++ b/components/camel-ftp/src/generated/resources/META-INF/org/apache/camel/component/file/remote/sftp.json @@ -55,6 +55,11 @@ "CamelFtpReplyCode": { "index": 15, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "important": true, "description": "The FTP client reply code", "constantName": "org.apache.camel.component.file.remote.FtpConstants#FTP_REPLY_CODE" }, "CamelFtpReplyString": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "important": true, "description": "The FTP client reply string", "constantName": "org.apache.camel.component.file.remote.FtpConstants#FTP_REPLY_STRING" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "file" ], "dependsOn": [ "preMove" ], "byOption": [ { "option": "streamDownload", "value": "true", "carriers": [ "stream" ] }, { "option": "download", "value": "false", "carriers": [ "null" ] } ], "description": "The file as read: a RemoteFile, which converts to text, bytes or a stream; a stream with streamDownload; with preMove its content, a byte array" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file" ], "byOption": [ { "option": "allowNullBody", "value": "true", "carriers": [ "null", "text", "bytes", "stream", "file" ] } ], "description": "What converts to an InputStream: text, bytes, a stream or a file. A Map or a List fails: marshal it first" }, + "producerOut": { "carriers": [ "unchanged" ] } + }, "properties": { "host": { "index": 0, "kind": "path", "displayName": "Host", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.file.remote.SftpConfiguration", "configurationField": "configuration", "description": "Hostname of the FTP server" }, "port": { "index": 1, "kind": "path", "displayName": "Port", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.file.remote.SftpConfiguration", "configurationField": "configuration", "description": "Port of the FTP server" }, diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java index 6c0d8bae52b8a..48417c25b72fc 100644 --- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java +++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java @@ -33,6 +33,9 @@ import org.apache.camel.component.file.remote.RemoteFileConfiguration.PathSeparator; import org.apache.camel.component.file.remote.strategy.FtpProcessStrategyFactory; import org.apache.camel.component.file.strategy.FileMoveExistingStrategy; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.ClassResolver; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; @@ -56,6 +59,20 @@ + "startingDirectoryMustHaveAccess,chmodDirectory,forceWrites,copyAndDeleteOnRenameFail," + "renameUsingCopy,synchronous") @ManagedResource(description = "Managed FtpEndpoint") +@BodyTypes(consumerOut = @BodyType(value = Carrier.FILE, dependsOn = "preMove", + byOption = { + @BodyType.When(option = "streamDownload", value = "true", carriers = Carrier.STREAM), + @BodyType.When(option = "download", value = "false", carriers = Carrier.NULL) }, + description = "The file as read: a RemoteFile, which converts to text, bytes or a stream; a" + + " stream with streamDownload; with preMove its content, a byte array"), + producerIn = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE }, + byOption = @BodyType.When(option = "allowNullBody", value = "true", + carriers = { + Carrier.NULL, Carrier.TEXT, Carrier.BYTES, + Carrier.STREAM, Carrier.FILE }), + description = "What converts to an InputStream: text, bytes, a stream or a file. A Map or" + + " a List fails: marshal it first"), + producerOut = @BodyType(Carrier.UNCHANGED)) public class FtpEndpoint extends RemoteFileEndpoint { private static final Logger LOG = LoggerFactory.getLogger(FtpEndpoint.class); diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java index 37251328723b2..079079926c9a4 100644 --- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java +++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java @@ -30,6 +30,9 @@ import org.apache.camel.Category; import org.apache.camel.api.management.ManagedResource; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -54,6 +57,20 @@ + "startingDirectoryMustHaveAccess,chmodDirectory,forceWrites,copyAndDeleteOnRenameFail," + "renameUsingCopy,synchronous") @ManagedResource(description = "Managed FtpsEndpoint") +@BodyTypes(consumerOut = @BodyType(value = Carrier.FILE, dependsOn = "preMove", + byOption = { + @BodyType.When(option = "streamDownload", value = "true", carriers = Carrier.STREAM), + @BodyType.When(option = "download", value = "false", carriers = Carrier.NULL) }, + description = "The file as read: a RemoteFile, which converts to text, bytes or a stream; a" + + " stream with streamDownload; with preMove its content, a byte array"), + producerIn = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE }, + byOption = @BodyType.When(option = "allowNullBody", value = "true", + carriers = { + Carrier.NULL, Carrier.TEXT, Carrier.BYTES, + Carrier.STREAM, Carrier.FILE }), + description = "What converts to an InputStream: text, bytes, a stream or a file. A Map or" + + " a List fails: marshal it first"), + producerOut = @BodyType(Carrier.UNCHANGED)) public class FtpsEndpoint extends FtpEndpoint { private static final Logger LOG = LoggerFactory.getLogger(FtpsEndpoint.class); diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java index 7c3bda7a0e864..199e5d28bdaa7 100644 --- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java +++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java @@ -24,6 +24,9 @@ import org.apache.camel.component.file.GenericFileProducer; import org.apache.camel.component.file.remote.strategy.SftpProcessStrategyFactory; import org.apache.camel.component.file.strategy.FileMoveExistingStrategy; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -37,6 +40,20 @@ + "directoryMustExist,extendedAttributes,probeContentType,startingDirectoryMustExist," + "startingDirectoryMustHaveAccess,forceWrites,copyAndDeleteOnRenameFail," + "renameUsingCopy,synchronous") +@BodyTypes(consumerOut = @BodyType(value = Carrier.FILE, dependsOn = "preMove", + byOption = { + @BodyType.When(option = "streamDownload", value = "true", carriers = Carrier.STREAM), + @BodyType.When(option = "download", value = "false", carriers = Carrier.NULL) }, + description = "The file as read: a RemoteFile, which converts to text, bytes or a stream; a" + + " stream with streamDownload; with preMove its content, a byte array"), + producerIn = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE }, + byOption = @BodyType.When(option = "allowNullBody", value = "true", + carriers = { + Carrier.NULL, Carrier.TEXT, Carrier.BYTES, + Carrier.STREAM, Carrier.FILE }), + description = "What converts to an InputStream: text, bytes, a stream or a file. A Map or" + + " a List fails: marshal it first"), + producerOut = @BodyType(Carrier.UNCHANGED)) public class SftpEndpoint extends RemoteFileEndpoint { @UriParam diff --git a/components/camel-groovy/src/generated/resources/META-INF/org/apache/camel/language/groovy/groovy.json b/components/camel-groovy/src/generated/resources/META-INF/org/apache/camel/language/groovy/groovy.json index db276ac056830..fd58e1de9825c 100644 --- a/components/camel-groovy/src/generated/resources/META-INF/org/apache/camel/language/groovy/groovy.json +++ b/components/camel-groovy/src/generated/resources/META-INF/org/apache/camel/language/groovy/groovy.json @@ -15,6 +15,10 @@ "modelName": "groovy", "modelJavaType": "org.apache.camel.model.language.GroovyExpression" }, + "bodyTypes": { + "expressionIn": { "carriers": [ "any" ], "description": "The body as it is, in the variable body" }, + "expressionOut": { "carriers": [ "unknown" ], "description": "What the script returns" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node." }, "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax." }, diff --git a/components/camel-groovy/src/main/java/org/apache/camel/language/groovy/GroovyLanguage.java b/components/camel-groovy/src/main/java/org/apache/camel/language/groovy/GroovyLanguage.java index 667bc5adb7fca..1fda88d90b5e1 100644 --- a/components/camel-groovy/src/main/java/org/apache/camel/language/groovy/GroovyLanguage.java +++ b/components/camel-groovy/src/main/java/org/apache/camel/language/groovy/GroovyLanguage.java @@ -32,6 +32,9 @@ import org.apache.camel.Ordered; import org.apache.camel.RuntimeCamelException; import org.apache.camel.Service; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.CamelEvent; import org.apache.camel.spi.CompilePreProcessor; import org.apache.camel.spi.EventNotifier; @@ -49,6 +52,8 @@ import org.slf4j.LoggerFactory; @Language("groovy") +@BodyTypes(expressionIn = @BodyType(value = Carrier.ANY, description = "The body as it is, in the variable body"), + expressionOut = @BodyType(value = Carrier.UNKNOWN, description = "What the script returns")) public class GroovyLanguage extends TypedLanguageSupport implements ScriptingLanguage, Service { private static final Logger LOG = LoggerFactory.getLogger(GroovyLanguage.class); diff --git a/components/camel-jacksonxml/src/generated/resources/META-INF/org/apache/camel/component/jacksonxml/jacksonXml.json b/components/camel-jacksonxml/src/generated/resources/META-INF/org/apache/camel/component/jacksonxml/jacksonXml.json index 1eca4610e6271..e01c38e3002ee 100644 --- a/components/camel-jacksonxml/src/generated/resources/META-INF/org/apache/camel/component/jacksonxml/jacksonXml.json +++ b/components/camel-jacksonxml/src/generated/resources/META-INF/org/apache/camel/component/jacksonxml/jacksonXml.json @@ -15,6 +15,12 @@ "modelName": "jacksonXml", "modelJavaType": "org.apache.camel.model.dataformat.JacksonXMLDataFormat" }, + "bodyTypes": { + "marshalIn": { "carriers": [ "any" ], "description": "A Map, a List or a POJO to write as XML. Text is written as an XML value, not as it is" }, + "marshalOut": { "carriers": [ "stream" ], "format": "xml", "description": "The XML in the stream cache, or a byte array when stream caching is off" }, + "unmarshalIn": { "carriers": [ "text", "bytes", "stream", "file" ], "format": "xml" }, + "unmarshalOut": { "carriers": [ "map" ], "dependsOn": [ "unmarshalType", "collectionType", "allowUnmarshallType" ], "byOption": [ { "option": "useList", "value": "true", "carriers": [ "list" ] } ], "description": "A Map (LinkedHashMap) of the XML; an object of the class unmarshalType names" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }, "xmlMapper": { "index": 1, "kind": "attribute", "displayName": "Xml Mapper", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Lookup and use the existing XmlMapper with the given id." }, diff --git a/components/camel-jacksonxml/src/main/java/org/apache/camel/component/jacksonxml/JacksonXMLDataFormat.java b/components/camel-jacksonxml/src/main/java/org/apache/camel/component/jacksonxml/JacksonXMLDataFormat.java index 5e4567427e425..097f6a2748be5 100644 --- a/components/camel-jacksonxml/src/main/java/org/apache/camel/component/jacksonxml/JacksonXMLDataFormat.java +++ b/components/camel-jacksonxml/src/main/java/org/apache/camel/component/jacksonxml/JacksonXMLDataFormat.java @@ -44,6 +44,9 @@ import org.apache.camel.CamelContextAware; import org.apache.camel.Exchange; import org.apache.camel.WrappedFile; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.DataFormat; import org.apache.camel.spi.DataFormatContentTypeHeader; import org.apache.camel.spi.DataFormatName; @@ -60,6 +63,17 @@ * Jackson to marshal to and from XML. */ @Dataformat("jacksonXml") +@BodyTypes(marshalIn = @BodyType(value = Carrier.ANY, + description = "A Map, a List or a POJO to write as XML. Text is written as an XML value," + + " not as it is"), + marshalOut = @BodyType(value = Carrier.STREAM, format = "xml", + description = "The XML in the stream cache, or a byte array when stream caching is off"), + unmarshalIn = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE }, format = "xml"), + unmarshalOut = @BodyType(value = Carrier.MAP, + dependsOn = { "unmarshalType", "collectionType", "allowUnmarshallType" }, + byOption = @BodyType.When(option = "useList", value = "true", carriers = Carrier.LIST), + description = "A Map (LinkedHashMap) of the XML; an object of the class unmarshalType" + + " names")) public class JacksonXMLDataFormat extends ServiceSupport implements DataFormat, DataFormatName, DataFormatContentTypeHeader, CamelContextAware { diff --git a/components/camel-jms/src/generated/resources/META-INF/org/apache/camel/component/jms/jms.json b/components/camel-jms/src/generated/resources/META-INF/org/apache/camel/component/jms/jms.json index 7307e4f146f23..43327061d9863 100644 --- a/components/camel-jms/src/generated/resources/META-INF/org/apache/camel/component/jms/jms.json +++ b/components/camel-jms/src/generated/resources/META-INF/org/apache/camel/component/jms/jms.json @@ -154,6 +154,12 @@ "CamelJmsMessageType": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "org.apache.camel.component.jms.JmsMessageType", "enum": [ "Bytes", "Map", "Object", "Stream", "Text", "Blob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message type.", "constantName": "org.apache.camel.component.jms.JmsConstants#JMS_MESSAGE_TYPE" }, "CamelJmsRequestTimeout": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "20000", "description": "The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds).", "constantName": "org.apache.camel.component.jms.JmsConstants#JMS_REQUEST_TIMEOUT" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text", "bytes", "map", "stream", "null" ], "dependsOn": [ "messageConverter", "transferExchange" ], "byOption": [ { "option": "mapJmsMessage", "value": "false", "carriers": [ "pojo" ], "javaType": "jakarta.jms.Message" }, { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "map", "stream", "pojo", "null" ] } ], "description": "By the JMS message received: a String for a TextMessage, a byte array for a BytesMessage, a Map for a MapMessage, a stream for a StreamMessage; an ObjectMessage only with objectMessageEnabled" }, + "consumerReply": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "dependsOn": [ "jmsMessageType", "messageConverter", "transferExchange" ], "byOption": [ { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "stream", "file", "map", "pojo" ] } ], "description": "The reply, sent as the producer sends a message" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "dependsOn": [ "jmsMessageType", "messageConverter", "transferExchange" ], "byOption": [ { "option": "objectMessageEnabled", "value": "true", "carriers": [ "text", "bytes", "stream", "file", "map", "pojo" ] } ], "description": "Text is sent as a TextMessage; bytes, a stream or a file as a BytesMessage; a Map as a MapMessage. Another Serializable object fails unless objectMessageEnabled" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "exchangePattern", "value": "InOnly", "carriers": [ "unchanged" ] }, { "option": "disableReplyTo", "value": "true", "carriers": [ "unchanged" ] } ], "description": "Unchanged for a message that expects no reply (InOnly). A message that expects one (InOut) gets the body of the reply, as the consumer gives it" } + }, "properties": { "destinationType": { "index": 0, "kind": "path", "displayName": "Destination Type", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "queue", "topic", "temp-queue", "temp-topic" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "queue", "description": "The kind of destination to use" }, "destinationName": { "index": 1, "kind": "path", "displayName": "Destination Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the queue or topic to use as destination" }, diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java index 8c18b428ee573..1d77420af22df 100644 --- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java +++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java @@ -39,6 +39,9 @@ import org.apache.camel.api.management.ManagedAttribute; import org.apache.camel.api.management.ManagedResource; import org.apache.camel.spi.BeanIntrospection; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.EndpointServiceLocation; import org.apache.camel.spi.HeaderFilterStrategy; import org.apache.camel.spi.HeaderFilterStrategyAware; @@ -73,6 +76,42 @@ @UriEndpoint(firstVersion = "1.0.0", scheme = "jms", title = "JMS", syntax = "jms:destinationType:destinationName", category = { Category.MESSAGING }, headersClass = JmsConstants.class) @Metadata(excludeProperties = "bridgeErrorHandler") +@BodyTypes(consumerOut = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.MAP, Carrier.STREAM, Carrier.NULL }, + dependsOn = { "messageConverter", "transferExchange" }, + byOption = { + @BodyType.When(option = "mapJmsMessage", value = "false", carriers = Carrier.POJO, + javaType = "jakarta.jms.Message"), + @BodyType.When(option = "objectMessageEnabled", value = "true", + carriers = { + Carrier.TEXT, Carrier.BYTES, Carrier.MAP, + Carrier.STREAM, Carrier.POJO, Carrier.NULL }) }, + description = "By the JMS message received: a String for a TextMessage, a byte array for a" + + " BytesMessage, a Map for a MapMessage, a stream for a StreamMessage;" + + " an ObjectMessage only with objectMessageEnabled"), + consumerReply = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE, Carrier.MAP }, + dependsOn = { "jmsMessageType", "messageConverter", "transferExchange" }, + byOption = @BodyType.When(option = "objectMessageEnabled", value = "true", + carriers = { + Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, + Carrier.FILE, Carrier.MAP, Carrier.POJO }), + description = "The reply, sent as the producer sends a message"), + producerIn = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE, Carrier.MAP }, + dependsOn = { "jmsMessageType", "messageConverter", "transferExchange" }, + byOption = @BodyType.When(option = "objectMessageEnabled", value = "true", + carriers = { + Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, + Carrier.FILE, Carrier.MAP, Carrier.POJO }), + description = "Text is sent as a TextMessage; bytes, a stream or a file as a BytesMessage;" + + " a Map as a MapMessage. Another Serializable object fails unless" + + " objectMessageEnabled"), + producerOut = @BodyType(value = Carrier.UNKNOWN, + byOption = { + @BodyType.When(option = "exchangePattern", value = "InOnly", + carriers = Carrier.UNCHANGED), + @BodyType.When(option = "disableReplyTo", value = "true", + carriers = Carrier.UNCHANGED) }, + description = "Unchanged for a message that expects no reply (InOnly). A message that" + + " expects one (InOut) gets the body of the reply, as the consumer gives it")) public class JmsEndpoint extends DefaultEndpoint implements AsyncEndpoint, HeaderFilterStrategyAware, MultipleConsumersSupport, EndpointServiceLocation { diff --git a/components/camel-jq/src/generated/resources/META-INF/org/apache/camel/language/jq/jq.json b/components/camel-jq/src/generated/resources/META-INF/org/apache/camel/language/jq/jq.json index 8d658803476a5..781f11d2f1794 100644 --- a/components/camel-jq/src/generated/resources/META-INF/org/apache/camel/language/jq/jq.json +++ b/components/camel-jq/src/generated/resources/META-INF/org/apache/camel/language/jq/jq.json @@ -15,6 +15,10 @@ "modelName": "jq", "modelJavaType": "org.apache.camel.model.language.JqExpression" }, + "bodyTypes": { + "expressionIn": { "carriers": [ "text", "bytes", "stream", "file", "map" ], "format": "json", "description": "JSON as text, bytes, a stream or a file, or a Map" }, + "expressionOut": { "carriers": [ "pojo", "list", "null" ], "dependsOn": [ "resultType" ], "description": "A JsonNode; a List of JsonNode when the filter gives several, null when it gives none" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node." }, "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax." }, diff --git a/components/camel-jq/src/main/java/org/apache/camel/language/jq/JqLanguage.java b/components/camel-jq/src/main/java/org/apache/camel/language/jq/JqLanguage.java index e21bfd984aca1..3944e84c8d266 100644 --- a/components/camel-jq/src/main/java/org/apache/camel/language/jq/JqLanguage.java +++ b/components/camel-jq/src/main/java/org/apache/camel/language/jq/JqLanguage.java @@ -22,11 +22,19 @@ import net.thisptr.jackson.jq.module.loaders.BuiltinModuleLoader; import org.apache.camel.Expression; import org.apache.camel.StaticService; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.annotations.Language; import org.apache.camel.support.CamelContextHelper; import org.apache.camel.support.SingleInputTypedLanguageSupport; @Language("jq") +@BodyTypes(expressionIn = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE, Carrier.MAP }, + format = "json", description = "JSON as text, bytes, a stream or a file, or a Map"), + expressionOut = @BodyType(value = { Carrier.POJO, Carrier.LIST, Carrier.NULL }, dependsOn = "resultType", + description = "A JsonNode; a List of JsonNode when the filter gives several, null when it" + + " gives none")) public class JqLanguage extends SingleInputTypedLanguageSupport implements StaticService { private Scope rootScope; diff --git a/components/camel-jsonpath/src/generated/resources/META-INF/org/apache/camel/jsonpath/jsonpath.json b/components/camel-jsonpath/src/generated/resources/META-INF/org/apache/camel/jsonpath/jsonpath.json index af55d48104eaa..e3aeffd210b31 100644 --- a/components/camel-jsonpath/src/generated/resources/META-INF/org/apache/camel/jsonpath/jsonpath.json +++ b/components/camel-jsonpath/src/generated/resources/META-INF/org/apache/camel/jsonpath/jsonpath.json @@ -15,6 +15,10 @@ "modelName": "jsonpath", "modelJavaType": "org.apache.camel.model.language.JsonPathExpression" }, + "bodyTypes": { + "expressionIn": { "carriers": [ "any" ], "description": "JSON as text, bytes, a stream or a file, or parsed: a Map or a List. A POJO is read through Jackson" }, + "expressionOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "writeAsString", "value": "true", "carriers": [ "text", "list" ] } ], "description": "The value the path selects: a Map for an object, a List for an array or for a path with a wildcard or a filter, otherwise text, a number or a boolean" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node." }, "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax." }, diff --git a/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathLanguage.java b/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathLanguage.java index 6b5df842e8dad..880b0bd42336b 100644 --- a/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathLanguage.java +++ b/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathLanguage.java @@ -25,6 +25,9 @@ import org.apache.camel.Expression; import org.apache.camel.Predicate; import org.apache.camel.jsonpath.easypredicate.EasyPredicateParser; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.PropertyConfigurer; import org.apache.camel.spi.annotations.Language; import org.apache.camel.support.ExpressionAdapter; @@ -32,6 +35,15 @@ import org.apache.camel.support.component.PropertyConfigurerSupport; @Language("jsonpath") +@BodyTypes(expressionIn = @BodyType(value = Carrier.ANY, + description = "JSON as text, bytes, a stream or a file, or parsed: a Map or a List. A POJO" + + " is read through Jackson"), + expressionOut = @BodyType(value = Carrier.UNKNOWN, + byOption = @BodyType.When(option = "writeAsString", value = "true", + carriers = { Carrier.TEXT, Carrier.LIST }), + description = "The value the path selects: a Map for an object, a List for an array or" + + " for a path with a wildcard or a filter, otherwise text, a number or a" + + " boolean")) public class JsonPathLanguage extends SingleInputTypedLanguageSupport implements PropertyConfigurer { private boolean suppressExceptions; diff --git a/components/camel-kafka/src/generated/resources/META-INF/org/apache/camel/component/kafka/kafka.json b/components/camel-kafka/src/generated/resources/META-INF/org/apache/camel/component/kafka/kafka.json index f40e398b911ba..d1dafe51f2f12 100644 --- a/components/camel-kafka/src/generated/resources/META-INF/org/apache/camel/component/kafka/kafka.json +++ b/components/camel-kafka/src/generated/resources/META-INF/org/apache/camel/component/kafka/kafka.json @@ -169,6 +169,11 @@ "CamelKafkaRecordMeta": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The metadata (only configured if recordMetadata endpoint parameter is true)", "constantName": "org.apache.camel.component.kafka.KafkaConstants#KAFKA_RECORD_META" }, "CamelKafkaManualCommit": { "index": 12, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "org.apache.camel.component.kafka.consumer.KafkaManualCommit", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Can be used for forcing manual offset commit when using Kafka consumer.", "constantName": "org.apache.camel.component.kafka.KafkaConstants#MANUAL_COMMIT" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text", "null" ], "dependsOn": [ "valueDeserializer" ], "byOption": [ { "option": "valueDeserializer", "value": "org.apache.kafka.common.serialization.ByteArrayDeserializer", "carriers": [ "bytes", "null" ], "javaType": "byte[]" }, { "option": "batching", "value": "true", "carriers": [ "list" ] } ], "description": "The value of the record: a String with the default valueDeserializer (StringDeserializer), null for a tombstone. With batching, a List of the exchanges of the records" }, + "producerIn": { "carriers": [ "any" ], "dependsOn": [ "valueSerializer" ], "description": "The value of the record, converted for the valueSerializer: text with the default StringSerializer, so a Map or a POJO is sent as its toString(): marshal it first. With useIterator, an Iterable or an Iterator is sent as one record per element" }, + "producerOut": { "carriers": [ "unchanged" ] } + }, "properties": { "topic": { "index": 0, "kind": "path", "displayName": "Topic", "group": "common", "label": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Name of the topic to use. On the consumer you can use comma to separate multiple topics. A producer can only send a message to a single topic." }, "additionalProperties": { "index": 1, "kind": "parameter", "displayName": "Additional Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map", "prefix": "additionalProperties.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Sets additional properties for either kafka consumer or kafka producer in case they can't be set directly on the camel configurations (e.g.: new Kafka properties that are not reflected yet in Camel configurations), the properties have to be prefixed with additionalProperties., e.g.: additionalProperties.transactional.id=12345&additionalProperties.schema.registry.url=http:\/\/localhost:8811\/avro. If the properties are set in the application.properties file, they must be prefixed with camel.component.kafka.additional-properties (camel.component.kafka-share.additional-properties for the Kafka Share component) followed by the property name enclosed in square brackets, for example the delivery.timeout.ms property in square brackets. This is a multi-value option with prefix: additionalProperties." }, diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaEndpoint.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaEndpoint.java index 30746c1de1731..b56c238d99bb1 100644 --- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaEndpoint.java +++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaEndpoint.java @@ -27,6 +27,9 @@ import org.apache.camel.Producer; import org.apache.camel.component.kafka.consumer.KafkaManualCommit; import org.apache.camel.component.kafka.consumer.KafkaManualCommitFactory; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.ClassResolver; import org.apache.camel.spi.EndpointServiceLocation; import org.apache.camel.spi.UriEndpoint; @@ -48,6 +51,21 @@ */ @UriEndpoint(firstVersion = "2.13.0", scheme = "kafka", title = "Kafka", syntax = "kafka:topic", category = { Category.MESSAGING }, headersClass = KafkaConstants.class) +@BodyTypes(consumerOut = @BodyType(value = { Carrier.TEXT, Carrier.NULL }, dependsOn = "valueDeserializer", + byOption = { + @BodyType.When(option = "valueDeserializer", + value = "org.apache.kafka.common.serialization.ByteArrayDeserializer", + carriers = { Carrier.BYTES, Carrier.NULL }, javaType = "byte[]"), + @BodyType.When(option = "batching", value = "true", carriers = Carrier.LIST) }, + description = "The value of the record: a String with the default valueDeserializer" + + " (StringDeserializer), null for a tombstone. With batching, a List of" + + " the exchanges of the records"), + producerIn = @BodyType(value = Carrier.ANY, dependsOn = "valueSerializer", + description = "The value of the record, converted for the valueSerializer: text with the" + + " default StringSerializer, so a Map or a POJO is sent as its toString():" + + " marshal it first. With useIterator, an Iterable or an Iterator is sent" + + " as one record per element"), + producerOut = @BodyType(Carrier.UNCHANGED)) public class KafkaEndpoint extends DefaultEndpoint implements MultipleConsumersSupport, EndpointServiceLocation { private static final Logger LOG = LoggerFactory.getLogger(KafkaEndpoint.class); diff --git a/components/camel-log/src/generated/resources/META-INF/org/apache/camel/component/log/log.json b/components/camel-log/src/generated/resources/META-INF/org/apache/camel/component/log/log.json index 1780d6316af2e..bf19483c839cb 100644 --- a/components/camel-log/src/generated/resources/META-INF/org/apache/camel/component/log/log.json +++ b/components/camel-log/src/generated/resources/META-INF/org/apache/camel/component/log/log.json @@ -30,6 +30,10 @@ "autowiredEnabled": { "index": 2, "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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." }, "exchangeFormatter": { "index": 3, "kind": "property", "displayName": "Exchange Formatter", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExchangeFormatter", "deprecated": false, "autowired": true, "secret": false, "description": "Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter." } }, + "bodyTypes": { + "producerIn": { "carriers": [ "any" ] }, + "producerOut": { "carriers": [ "unchanged" ] } + }, "properties": { "loggerName": { "index": 0, "kind": "path", "displayName": "Logger Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the logging category to use" }, "groupActiveOnly": { "index": 1, "kind": "parameter", "displayName": "Group Active Only", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "If true, will hide stats when no new messages have been received for a time interval, if false, show stats regardless of message traffic." }, diff --git a/components/camel-log/src/main/java/org/apache/camel/component/log/LogEndpoint.java b/components/camel-log/src/main/java/org/apache/camel/component/log/LogEndpoint.java index 3f8eff9127211..ce89ba2e3c422 100644 --- a/components/camel-log/src/main/java/org/apache/camel/component/log/LogEndpoint.java +++ b/components/camel-log/src/main/java/org/apache/camel/component/log/LogEndpoint.java @@ -22,6 +22,9 @@ import org.apache.camel.LoggingLevel; import org.apache.camel.Processor; import org.apache.camel.Producer; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.CamelLogger; import org.apache.camel.spi.ExchangeFormatter; import org.apache.camel.spi.MaskingFormatter; @@ -45,6 +48,7 @@ @UriEndpoint(firstVersion = "1.1.0", scheme = "log", title = "Log Data", remote = false, internal = true, syntax = "log:loggerName", producerOnly = true, category = { Category.CORE, Category.MONITORING }) +@BodyTypes(producerIn = @BodyType(Carrier.ANY), producerOut = @BodyType(Carrier.UNCHANGED)) public class LogEndpoint extends ProcessorEndpoint implements LineNumberAware { private volatile Processor logger; diff --git a/components/camel-mock/src/generated/resources/META-INF/org/apache/camel/component/mock/mock.json b/components/camel-mock/src/generated/resources/META-INF/org/apache/camel/component/mock/mock.json index eadcc424ddeb2..4982ad8453e7f 100644 --- a/components/camel-mock/src/generated/resources/META-INF/org/apache/camel/component/mock/mock.json +++ b/components/camel-mock/src/generated/resources/META-INF/org/apache/camel/component/mock/mock.json @@ -30,6 +30,10 @@ "autowiredEnabled": { "index": 2, "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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." }, "exchangeFormatter": { "index": 3, "kind": "property", "displayName": "Exchange Formatter", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExchangeFormatter", "deprecated": false, "autowired": true, "secret": false, "description": "To use a custom ExchangeFormatter to format the Exchange into a String suitable for logging." } }, + "bodyTypes": { + "producerIn": { "carriers": [ "any" ] }, + "producerOut": { "carriers": [ "unchanged" ] } + }, "properties": { "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of mock endpoint" }, "assertPeriod": { "index": 1, "kind": "parameter", "displayName": "Assert Period", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a grace period after which the mock will re-assert to ensure the preliminary assertion is still valid. This is used, for example, to assert that exactly a number of messages arrive. For example, if the expected count was set to 5, then the assertion is satisfied when five or more messages arrive. To ensure that exactly 5 messages arrive, then you would need to wait a little period to ensure no further message arrives. This is what you can use this method for. By default, this period is disabled." }, diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java index 6ac3b02ca1e5c..f3d9e83d1eb0d 100644 --- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java +++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java @@ -49,6 +49,9 @@ import org.apache.camel.Processor; import org.apache.camel.Producer; import org.apache.camel.RuntimeCamelException; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.BrowsableEndpoint; import org.apache.camel.spi.HeadersMapFactory; import org.apache.camel.spi.InterceptSendToEndpoint; @@ -97,6 +100,7 @@ */ @UriEndpoint(firstVersion = "1.0.0", scheme = "mock", title = "Mock", syntax = "mock:name", producerOnly = true, remote = false, internal = true, category = { Category.CORE, Category.TESTING }, lenientProperties = true) +@BodyTypes(producerIn = @BodyType(Carrier.ANY), producerOut = @BodyType(Carrier.UNCHANGED)) public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint, NotifyBuilderMatcher { private static final Logger LOG = LoggerFactory.getLogger(MockEndpoint.class); diff --git a/components/camel-mongodb/src/generated/resources/META-INF/org/apache/camel/component/mongodb/mongodb.json b/components/camel-mongodb/src/generated/resources/META-INF/org/apache/camel/component/mongodb/mongodb.json index 62ad7c16ba705..6bfb9c23245ef 100644 --- a/components/camel-mongodb/src/generated/resources/META-INF/org/apache/camel/component/mongodb/mongodb.json +++ b/components/camel-mongodb/src/generated/resources/META-INF/org/apache/camel/component/mongodb/mongodb.json @@ -58,6 +58,11 @@ "CamelMongoDbReturnDocumentType": { "index": 24, "kind": "header", "displayName": "", "group": "producer update one and return", "label": "producer update one and return", "required": false, "javaType": "com.mongodb.client.model.ReturnDocument", "enum": [ "BEFORE", "AFTER" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Indicates which document to return, the document before or after an update and return atomic operation.", "constantName": "org.apache.camel.component.mongodb.MongoDbConstants#RETURN_DOCUMENT" }, "CamelMongoDbOperationOption": { "index": 25, "kind": "header", "displayName": "", "group": "producer update one and options", "label": "producer update one and options", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Options to use. When set, options set in the headers will be ignored.", "constantName": "org.apache.camel.component.mongodb.MongoDbConstants#OPTIONS" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo" ], "javaType": "org.bson.Document", "byOption": [ { "option": "consumerType", "value": "changeStreams", "carriers": [ "pojo", "null" ] } ], "description": "The document added to the capped collection; with changeStreams the full document of the change, null when the change has none (an update without fullDocument=updateLookup)" }, + "producerIn": { "carriers": [ "any" ], "description": "A document or a query: a Document, a Map or JSON text; a List of them for insert, aggregate and update" }, + "producerOut": { "carriers": [ "unknown" ], "dependsOn": [ "outputType", "writeResultAsHeader" ], "byOption": [ { "option": "operation", "value": "findById", "carriers": [ "pojo", "null" ], "javaType": "org.bson.Document" }, { "option": "operation", "value": "findOneByQuery", "carriers": [ "pojo", "null" ], "javaType": "org.bson.Document" }, { "option": "operation", "value": "findOneAndDelete", "carriers": [ "pojo", "null" ], "javaType": "org.bson.Document" }, { "option": "operation", "value": "findOneAndReplace", "carriers": [ "pojo", "null" ], "javaType": "org.bson.Document" }, { "option": "operation", "value": "findOneAndUpdate", "carriers": [ "pojo", "null" ], "javaType": "org.bson.Document" }, { "option": "operation", "value": "findAll", "carriers": [ "list" ] }, { "option": "operation", "value": "findDistinct", "carriers": [ "list" ] }, { "option": "operation", "value": "aggregate", "carriers": [ "list" ] }, { "option": "operation", "value": "count", "carriers": [ "value" ], "javaType": "java.lang.Long" }, { "option": "operation", "value": "insert", "carriers": [ "pojo", "list" ] }, { "option": "operation", "value": "save", "carriers": [ "pojo" ] }, { "option": "operation", "value": "update", "carriers": [ "pojo" ], "javaType": "com.mongodb.client.result.UpdateResult" }, { "option": "operation", "value": "remove", "carriers": [ "pojo" ], "javaType": "com.mongodb.client.result.DeleteResult" }, { "option": "operation", "value": "bulkWrite", "carriers": [ "pojo" ], "javaType": "com.mongodb.bulk.BulkWriteResult" }, { "option": "operation", "value": "command", "carriers": [ "pojo" ], "javaType": "org.bson.Document" }, { "option": "operation", "value": "getDbStats", "carriers": [ "pojo" ], "javaType": "org.bson.Document" }, { "option": "operation", "value": "getColStats", "carriers": [ "pojo" ], "javaType": "org.bson.Document" } ], "description": "By the operation: a Document or null for a find of one, a List for findAll, findDistinct and aggregate, a Long for count, the document added for insert, the result of the driver for the other writes, and a Document for command and the stats" } + }, "properties": { "connectionBean": { "index": 0, "kind": "path", "displayName": "Connection Bean", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets the connection bean reference used to lookup a client for connecting to a database if no hosts parameter is present." }, "collection": { "index": 1, "kind": "parameter", "displayName": "Collection", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "endpointIdentity": true, "description": "Sets the name of the MongoDB collection to bind to this endpoint" }, diff --git a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java index 774d095c2b9b2..6b2515bd629c4 100644 --- a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java +++ b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java @@ -40,6 +40,9 @@ import org.apache.camel.Consumer; import org.apache.camel.Processor; import org.apache.camel.Producer; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.EndpointServiceLocation; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.StateRepository; @@ -68,6 +71,57 @@ */ @UriEndpoint(firstVersion = "2.19.0", scheme = "mongodb", title = "MongoDB", syntax = "mongodb:connectionBean", category = { Category.DATABASE }, headersClass = MongoDbConstants.class) +@BodyTypes(consumerOut = @BodyType(value = Carrier.POJO, javaType = "org.bson.Document", + byOption = @BodyType.When(option = "consumerType", value = "changeStreams", + carriers = { Carrier.POJO, Carrier.NULL }), + description = "The document added to the capped collection; with changeStreams the full" + + " document of the change, null when the change has none (an update" + + " without fullDocument=updateLookup)"), + producerIn = @BodyType(value = Carrier.ANY, + description = "A document or a query: a Document, a Map or JSON text; a List of them for" + + " insert, aggregate and update"), + producerOut = @BodyType(value = Carrier.UNKNOWN, dependsOn = { "outputType", "writeResultAsHeader" }, + byOption = { + @BodyType.When(option = "operation", value = "findById", + carriers = { Carrier.POJO, Carrier.NULL }, + javaType = "org.bson.Document"), + @BodyType.When(option = "operation", value = "findOneByQuery", + carriers = { Carrier.POJO, Carrier.NULL }, + javaType = "org.bson.Document"), + @BodyType.When(option = "operation", value = "findOneAndDelete", + carriers = { Carrier.POJO, Carrier.NULL }, + javaType = "org.bson.Document"), + @BodyType.When(option = "operation", value = "findOneAndReplace", + carriers = { Carrier.POJO, Carrier.NULL }, + javaType = "org.bson.Document"), + @BodyType.When(option = "operation", value = "findOneAndUpdate", + carriers = { Carrier.POJO, Carrier.NULL }, + javaType = "org.bson.Document"), + @BodyType.When(option = "operation", value = "findAll", carriers = Carrier.LIST), + @BodyType.When(option = "operation", value = "findDistinct", + carriers = Carrier.LIST), + @BodyType.When(option = "operation", value = "aggregate", carriers = Carrier.LIST), + @BodyType.When(option = "operation", value = "count", carriers = Carrier.VALUE, + javaType = "java.lang.Long"), + @BodyType.When(option = "operation", value = "insert", + carriers = { Carrier.POJO, Carrier.LIST }), + @BodyType.When(option = "operation", value = "save", carriers = Carrier.POJO), + @BodyType.When(option = "operation", value = "update", carriers = Carrier.POJO, + javaType = "com.mongodb.client.result.UpdateResult"), + @BodyType.When(option = "operation", value = "remove", carriers = Carrier.POJO, + javaType = "com.mongodb.client.result.DeleteResult"), + @BodyType.When(option = "operation", value = "bulkWrite", carriers = Carrier.POJO, + javaType = "com.mongodb.bulk.BulkWriteResult"), + @BodyType.When(option = "operation", value = "command", carriers = Carrier.POJO, + javaType = "org.bson.Document"), + @BodyType.When(option = "operation", value = "getDbStats", carriers = Carrier.POJO, + javaType = "org.bson.Document"), + @BodyType.When(option = "operation", value = "getColStats", carriers = Carrier.POJO, + javaType = "org.bson.Document") }, + description = "By the operation: a Document or null for a find of one, a List for" + + " findAll, findDistinct and aggregate, a Long for count, the document" + + " added for insert, the result of the driver for the other writes, and a" + + " Document for command and the stats")) public class MongoDbEndpoint extends DefaultEndpoint implements EndpointServiceLocation { private static final Logger LOG = LoggerFactory.getLogger(MongoDbEndpoint.class); diff --git a/components/camel-paho-mqtt5/src/generated/resources/META-INF/org/apache/camel/component/paho/mqtt5/paho-mqtt5.json b/components/camel-paho-mqtt5/src/generated/resources/META-INF/org/apache/camel/component/paho/mqtt5/paho-mqtt5.json index 0f3147d6b6422..94f903356cd54 100644 --- a/components/camel-paho-mqtt5/src/generated/resources/META-INF/org/apache/camel/component/paho/mqtt5/paho-mqtt5.json +++ b/components/camel-paho-mqtt5/src/generated/resources/META-INF/org/apache/camel/component/paho/mqtt5/paho-mqtt5.json @@ -66,6 +66,11 @@ "CamelPahoMqtt5OverrideTopic": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of topic to override and send to instead of topic specified on endpoint.", "constantName": "org.apache.camel.component.paho.mqtt5.PahoMqtt5Constants#CAMEL_PAHO_OVERRIDE_TOPIC" }, "CamelPahoMqtt5MsgProperties": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "consumer,producer", "required": false, "javaType": "org.eclipse.paho.mqttv5.common.packet.MqttProperties", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Consumer: The properties set on the incoming message. Producer: The properties to be set on the outgoing message.", "constantName": "org.apache.camel.component.paho.mqtt5.PahoMqtt5Constants#CAMEL_PAHO_MSG_PROPERTIES" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "bytes" ], "javaType": "byte[]", "description": "The payload of the MQTT message" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file" ], "description": "What converts to a byte array: text, bytes, a stream or a file, sent as the payload" }, + "producerOut": { "carriers": [ "unchanged" ] } + }, "properties": { "topic": { "index": 0, "kind": "path", "displayName": "Topic", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the topic" }, "automaticReconnect": { "index": 1, "kind": "parameter", "displayName": "Automatic Reconnect", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.paho.mqtt5.PahoMqtt5Configuration", "configurationField": "configuration", "description": "Sets whether the client will automatically attempt to reconnect to the server if the connection is lost. If set to false, the client will not attempt to automatically reconnect to the server in the event that the connection is lost. If set to true, in the event that the connection is lost, the client will attempt to reconnect to the server. It will initially wait 1 second before it attempts to reconnect, for every failed reconnect attempt, the delay will double until it is at 2 minutes at which point the delay will stay at 2 minutes." }, diff --git a/components/camel-paho-mqtt5/src/main/java/org/apache/camel/component/paho/mqtt5/PahoMqtt5Endpoint.java b/components/camel-paho-mqtt5/src/main/java/org/apache/camel/component/paho/mqtt5/PahoMqtt5Endpoint.java index de690231832c7..70dea3a4066c8 100644 --- a/components/camel-paho-mqtt5/src/main/java/org/apache/camel/component/paho/mqtt5/PahoMqtt5Endpoint.java +++ b/components/camel-paho-mqtt5/src/main/java/org/apache/camel/component/paho/mqtt5/PahoMqtt5Endpoint.java @@ -24,6 +24,9 @@ import org.apache.camel.Consumer; import org.apache.camel.Processor; import org.apache.camel.Producer; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.EndpointServiceLocation; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; @@ -44,6 +47,11 @@ @UriEndpoint(firstVersion = "3.8.0", scheme = "paho-mqtt5", title = "Paho MQTT 5", category = { Category.MESSAGING, Category.IOT }, syntax = "paho-mqtt5:topic", headersClass = PahoMqtt5Constants.class) +@BodyTypes(consumerOut = @BodyType(value = Carrier.BYTES, javaType = "byte[]", description = "The payload of the MQTT message"), + producerIn = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE }, + description = "What converts to a byte array: text, bytes, a stream or a file, sent as" + + " the payload"), + producerOut = @BodyType(Carrier.UNCHANGED)) public class PahoMqtt5Endpoint extends DefaultEndpoint implements EndpointServiceLocation { // Configuration members diff --git a/components/camel-platform-http/src/generated/resources/META-INF/org/apache/camel/component/platform/http/platform-http.json b/components/camel-platform-http/src/generated/resources/META-INF/org/apache/camel/component/platform/http/platform-http.json index e60f0367259fb..3c00abc0f66aa 100644 --- a/components/camel-platform-http/src/generated/resources/META-INF/org/apache/camel/component/platform/http/platform-http.json +++ b/components/camel-platform-http/src/generated/resources/META-INF/org/apache/camel/component/platform/http/platform-http.json @@ -33,6 +33,10 @@ "engine": { "index": 5, "kind": "property", "displayName": "Engine", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.platform.http.spi.PlatformHttpEngine", "deprecated": false, "autowired": false, "secret": false, "description": "An HTTP Server engine implementation to serve the requests" }, "headerFilterStrategy": { "index": 6, "kind": "property", "displayName": "Header Filter Strategy", "group": "filter", "label": "filter", "required": false, "type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message." } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "stream", "bytes", "null", "map", "file" ], "byOption": [ { "option": "useBodyHandler", "value": "false", "carriers": [ "pojo" ] } ], "description": "The request body: the stream cache with the Vert.x engine, a byte array with Spring Boot; null for a request without a body, such as a GET; a Map of the fields of a form (populateBodyWithForm); a File for an upload" }, + "consumerReply": { "carriers": [ "null", "text", "bytes", "stream" ], "description": "The response body: text, bytes, a stream or no body. A Map or a List fails: marshal it first" } + }, "properties": { "path": { "index": 0, "kind": "path", "displayName": "Path", "group": "consumer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The path under which this endpoint serves the HTTP requests, for proxy use 'proxy'" }, "consumes": { "index": 1, "kind": "parameter", "displayName": "Consumes", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The content type this endpoint accepts as an input, such as application\/xml or application\/json. null or *\/* mean no restriction." }, diff --git a/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java b/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java index c2c67935bff6d..2227077b50dd5 100644 --- a/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java +++ b/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java @@ -34,6 +34,9 @@ import org.apache.camel.component.platform.http.spi.PlatformHttpSecurityHandler; import org.apache.camel.http.base.HttpHeaderFilterStrategy; import org.apache.camel.http.base.OAuthHttpSecuritySupport; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.EndpointServiceLocation; import org.apache.camel.spi.HeaderFilterStrategy; import org.apache.camel.spi.HeaderFilterStrategyAware; @@ -51,6 +54,16 @@ @UriEndpoint(firstVersion = "3.0.0", scheme = "platform-http", title = "Platform HTTP", syntax = "platform-http:path", category = { Category.HTTP }, consumerOnly = true) @Metadata(annotations = { "protocol=http" }) +@BodyTypes(consumerOut = @BodyType(value = { Carrier.STREAM, Carrier.BYTES, Carrier.NULL, Carrier.MAP, Carrier.FILE }, + byOption = @BodyType.When(option = "useBodyHandler", value = "false", + carriers = Carrier.POJO), + description = "The request body: the stream cache with the Vert.x engine, a byte array" + + " with Spring Boot; null for a request without a body, such as a GET; a" + + " Map of the fields of a form (populateBodyWithForm); a File for an" + + " upload"), + consumerReply = @BodyType(value = { Carrier.NULL, Carrier.TEXT, Carrier.BYTES, Carrier.STREAM }, + description = "The response body: text, bytes, a stream or no body. A Map or a List" + + " fails: marshal it first")) public class PlatformHttpEndpoint extends DefaultEndpoint implements AsyncEndpoint, HeaderFilterStrategyAware, EndpointServiceLocation { diff --git a/components/camel-quartz/src/generated/resources/META-INF/org/apache/camel/component/quartz/quartz.json b/components/camel-quartz/src/generated/resources/META-INF/org/apache/camel/component/quartz/quartz.json index d56eb70d9f853..8b8cc7acc2acb 100644 --- a/components/camel-quartz/src/generated/resources/META-INF/org/apache/camel/component/quartz/quartz.json +++ b/components/camel-quartz/src/generated/resources/META-INF/org/apache/camel/component/quartz/quartz.json @@ -37,6 +37,9 @@ "autoStartScheduler": { "index": 10, "kind": "property", "displayName": "Auto Start Scheduler", "group": "scheduler", "label": "scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the scheduler should be auto started. This option is default true" }, "interruptJobsOnShutdown": { "index": 11, "kind": "property", "displayName": "Interrupt Jobs On Shutdown", "group": "scheduler", "label": "scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to interrupt jobs on shutdown, which forces the scheduler to shut down quicker and attempt to interrupt any running jobs. If this is enabled, then any running jobs can fail due to being interrupted. When a job is interrupted then Camel will mark the exchange to stop to continue routing and set java.util.concurrent.RejectedExecutionException as caused exception. Therefore, use this with care, as its often better to allow Camel jobs to complete and shutdown gracefully." } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "null" ], "description": "No body: the message only starts the route" } + }, "properties": { "groupName": { "index": 0, "kind": "path", "displayName": "Group Name", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Camel", "description": "The quartz group name to use. The combination of group name and trigger name should be unique." }, "triggerName": { "index": 1, "kind": "path", "displayName": "Trigger Name", "group": "consumer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The quartz trigger name to use. The combination of group name and trigger name should be unique." }, diff --git a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java index 7748cdc5d5647..1b71b5f21b8c1 100644 --- a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java +++ b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java @@ -30,6 +30,9 @@ import org.apache.camel.Processor; import org.apache.camel.Producer; import org.apache.camel.Route; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -61,6 +64,7 @@ */ @UriEndpoint(firstVersion = "2.12.0", scheme = "quartz", title = "Quartz", syntax = "quartz:groupName/triggerName", remote = false, consumerOnly = true, category = { Category.SCHEDULING }) +@BodyTypes(consumerOut = @BodyType(value = Carrier.NULL, description = "No body: the message only starts the route")) public class QuartzEndpoint extends DefaultEndpoint { private static final Logger LOG = LoggerFactory.getLogger(QuartzEndpoint.class); diff --git a/components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json b/components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json index 22417ab779dfc..f175ff957c19b 100644 --- a/components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json +++ b/components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json @@ -47,6 +47,8 @@ "useGlobalSslContextParameters": { "index": 20, "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." } }, "bodyTypes": { + "consumerOut": { "carriers": [ "stream", "bytes", "null", "map", "file" ], "dependsOn": [ "consumerComponentName" ], "description": "The request body as the HTTP consumer gives it (platform-http by default). With the json binding mode of the rest configuration, the object of the schema (bindingPackageScan), or a Map or a List" }, + "consumerReply": { "carriers": [ "null", "text", "bytes", "stream" ], "dependsOn": [ "consumerComponentName" ], "description": "The response body as the HTTP consumer writes it. With the json binding mode of the rest configuration, any object, which the binding writes as JSON" }, "producerIn": { "carriers": [ "null", "text", "bytes", "stream", "file" ], "dependsOn": [ "componentName" ], "description": "The request body of the operation, which the http component sends: text, bytes, a stream or a file. A Map or a List fails: marshal it first" }, "producerOut": { "carriers": [ "bytes", "stream", "null" ], "dependsOn": [ "componentName" ], "description": "The response body, as the http component gives it: a byte array or the stream cache; null for a response without a body" } }, diff --git a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java index 4f1c00d080713..bdc1e883077c2 100644 --- a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java +++ b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java @@ -95,7 +95,17 @@ */ @UriEndpoint(firstVersion = "3.1.0", scheme = "rest-openapi", title = "REST OpenApi", syntax = "rest-openapi:specificationUri#operationId", category = { Category.REST, Category.API }) -@BodyTypes(producerIn = @BodyType(value = { Carrier.NULL, Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE }, +@BodyTypes(consumerOut = @BodyType(value = { Carrier.STREAM, Carrier.BYTES, Carrier.NULL, Carrier.MAP, Carrier.FILE }, + dependsOn = "consumerComponentName", + description = "The request body as the HTTP consumer gives it (platform-http by default)." + + " With the json binding mode of the rest configuration, the object of the" + + " schema (bindingPackageScan), or a Map or a List"), + consumerReply = @BodyType(value = { Carrier.NULL, Carrier.TEXT, Carrier.BYTES, Carrier.STREAM }, + dependsOn = "consumerComponentName", + description = "The response body as the HTTP consumer writes it. With the json binding" + + " mode of the rest configuration, any object, which the binding writes as" + + " JSON"), + producerIn = @BodyType(value = { Carrier.NULL, Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE }, dependsOn = "componentName", description = "The request body of the operation, which the http component sends: text," + " bytes, a stream or a file. A Map or a List fails: marshal it first"), diff --git a/components/camel-rest/src/generated/resources/META-INF/org/apache/camel/component/rest/rest.json b/components/camel-rest/src/generated/resources/META-INF/org/apache/camel/component/rest/rest.json index 041ff7467c2e6..8ad7a7dbc0771 100644 --- a/components/camel-rest/src/generated/resources/META-INF/org/apache/camel/component/rest/rest.json +++ b/components/camel-rest/src/generated/resources/META-INF/org/apache/camel/component/rest/rest.json @@ -43,6 +43,12 @@ "Accept": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The media type such as: 'text\/xml', or 'application\/json' this REST service accepts.", "constantName": "org.apache.camel.component.rest.RestConstants#ACCEPT" }, "CamelHttpResponseCode": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "important": true, "description": "The http response code", "constantName": "org.apache.camel.component.rest.RestConstants#HTTP_RESPONSE_CODE" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "stream", "bytes", "null", "map", "file" ], "dependsOn": [ "consumerComponentName" ], "byOption": [ { "option": "bindingMode", "value": "json", "carriers": [ "map", "list", "pojo" ] } ], "description": "The request body as the HTTP consumer gives it (platform-http by default). With bindingMode json, the object of inType, or a Map or a List without inType" }, + "consumerReply": { "carriers": [ "null", "text", "bytes", "stream" ], "dependsOn": [ "consumerComponentName" ], "byOption": [ { "option": "bindingMode", "value": "json", "carriers": [ "any" ] } ], "description": "The response body as the HTTP consumer writes it. With bindingMode json, any object, which the binding writes as JSON" }, + "producerIn": { "carriers": [ "null", "text", "bytes", "stream", "file" ], "dependsOn": [ "producerComponentName" ], "byOption": [ { "option": "bindingMode", "value": "json", "carriers": [ "any" ] } ], "description": "The request body the HTTP producer sends (the http component by default). With bindingMode json, any object, which the binding writes as JSON" }, + "producerOut": { "carriers": [ "bytes", "stream", "null" ], "dependsOn": [ "producerComponentName", "outType" ], "description": "The response body as the HTTP producer gives it; with bindingMode json and outType, an object of outType" } + }, "properties": { "method": { "index": 0, "kind": "path", "displayName": "Method", "group": "common", "label": "common", "required": true, "type": "enum", "javaType": "java.lang.String", "enum": [ "get", "post", "put", "delete", "patch", "head", "trace", "connect", "options" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "HTTP method to use." }, "path": { "index": 1, "kind": "path", "displayName": "Path", "group": "common", "label": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The base path, can use * as path suffix to support wildcard HTTP route matching." }, diff --git a/components/camel-rest/src/main/java/org/apache/camel/component/rest/RestEndpoint.java b/components/camel-rest/src/main/java/org/apache/camel/component/rest/RestEndpoint.java index e4275bca1c72e..d83a749de8f37 100644 --- a/components/camel-rest/src/main/java/org/apache/camel/component/rest/RestEndpoint.java +++ b/components/camel-rest/src/main/java/org/apache/camel/component/rest/RestEndpoint.java @@ -26,6 +26,9 @@ import org.apache.camel.NoSuchBeanException; import org.apache.camel.Processor; import org.apache.camel.Producer; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.RestConfiguration; import org.apache.camel.spi.RestConsumerFactory; @@ -55,6 +58,27 @@ @Metadata(annotations = { "protocol=http", }) +@BodyTypes(consumerOut = @BodyType(value = { Carrier.STREAM, Carrier.BYTES, Carrier.NULL, Carrier.MAP, Carrier.FILE }, + dependsOn = "consumerComponentName", + byOption = @BodyType.When(option = "bindingMode", value = "json", + carriers = { Carrier.MAP, Carrier.LIST, Carrier.POJO }), + description = "The request body as the HTTP consumer gives it (platform-http by" + + " default). With bindingMode json, the object of inType, or a Map or a" + + " List without inType"), + consumerReply = @BodyType(value = { Carrier.NULL, Carrier.TEXT, Carrier.BYTES, Carrier.STREAM }, + dependsOn = "consumerComponentName", + byOption = @BodyType.When(option = "bindingMode", value = "json", carriers = Carrier.ANY), + description = "The response body as the HTTP consumer writes it. With bindingMode json," + + " any object, which the binding writes as JSON"), + producerIn = @BodyType(value = { Carrier.NULL, Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE }, + dependsOn = "producerComponentName", + byOption = @BodyType.When(option = "bindingMode", value = "json", carriers = Carrier.ANY), + description = "The request body the HTTP producer sends (the http component by default)." + + " With bindingMode json, any object, which the binding writes as JSON"), + producerOut = @BodyType(value = { Carrier.BYTES, Carrier.STREAM, Carrier.NULL }, + dependsOn = { "producerComponentName", "outType" }, + description = "The response body as the HTTP producer gives it; with bindingMode json and" + + " outType, an object of outType")) public class RestEndpoint extends DefaultEndpoint { public static final String[] DEFAULT_REST_CONSUMER_COMPONENTS diff --git a/components/camel-scheduler/src/generated/resources/META-INF/org/apache/camel/component/scheduler/scheduler.json b/components/camel-scheduler/src/generated/resources/META-INF/org/apache/camel/component/scheduler/scheduler.json index 491fc0b24d373..83c5065eeca03 100644 --- a/components/camel-scheduler/src/generated/resources/META-INF/org/apache/camel/component/scheduler/scheduler.json +++ b/components/camel-scheduler/src/generated/resources/META-INF/org/apache/camel/component/scheduler/scheduler.json @@ -34,6 +34,9 @@ "headers": { "CamelMessageTimestamp": { "index": 0, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The timestamp of the message", "constantName": "org.apache.camel.component.scheduler.SchedulerConstants#MESSAGE_TIMESTAMP" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "null" ], "description": "No body: the message only starts the route" } + }, "properties": { "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "consumer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the scheduler" }, "includeMetadata": { "index": 1, "kind": "parameter", "displayName": "Include Metadata", "group": "consumer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to include metadata in the exchange such as fired time, timer name, timer count etc." }, diff --git a/components/camel-scheduler/src/main/java/org/apache/camel/component/scheduler/SchedulerEndpoint.java b/components/camel-scheduler/src/main/java/org/apache/camel/component/scheduler/SchedulerEndpoint.java index 54ab073da275d..ac6aa6a500c9c 100644 --- a/components/camel-scheduler/src/main/java/org/apache/camel/component/scheduler/SchedulerEndpoint.java +++ b/components/camel-scheduler/src/main/java/org/apache/camel/component/scheduler/SchedulerEndpoint.java @@ -22,6 +22,9 @@ import org.apache.camel.Consumer; import org.apache.camel.Processor; import org.apache.camel.Producer; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -37,6 +40,7 @@ @UriEndpoint(firstVersion = "2.15.0", scheme = "scheduler", title = "Scheduler", syntax = "scheduler:name", remote = false, consumerOnly = true, category = { Category.CORE, Category.SCHEDULING }, headersClass = SchedulerConstants.class) +@BodyTypes(consumerOut = @BodyType(value = Carrier.NULL, description = "No body: the message only starts the route")) public class SchedulerEndpoint extends ScheduledPollEndpoint { @UriPath diff --git a/components/camel-snakeyaml/src/generated/resources/META-INF/org/apache/camel/component/snakeyaml/snakeYaml.json b/components/camel-snakeyaml/src/generated/resources/META-INF/org/apache/camel/component/snakeyaml/snakeYaml.json index cc69504fdca03..a24fa2186d37c 100644 --- a/components/camel-snakeyaml/src/generated/resources/META-INF/org/apache/camel/component/snakeyaml/snakeYaml.json +++ b/components/camel-snakeyaml/src/generated/resources/META-INF/org/apache/camel/component/snakeyaml/snakeYaml.json @@ -15,6 +15,12 @@ "modelName": "yaml", "modelJavaType": "org.apache.camel.model.dataformat.YAMLDataFormat" }, + "bodyTypes": { + "marshalIn": { "carriers": [ "any" ], "description": "A Map, a List or a POJO to write as YAML" }, + "marshalOut": { "carriers": [ "stream" ], "format": "yaml", "description": "The YAML in the stream cache, or a byte array when stream caching is off" }, + "unmarshalIn": { "carriers": [ "text", "bytes", "stream", "file" ], "format": "yaml" }, + "unmarshalOut": { "carriers": [ "map", "list" ], "dependsOn": [ "unmarshalType" ], "description": "A Map (LinkedHashMap) for a mapping, a List (ArrayList) for a sequence; a document that is a single value gives that value" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }, "library": { "index": 1, "kind": "attribute", "displayName": "Library", "group": "common", "required": false, "type": "enum", "javaType": "org.apache.camel.model.dataformat.YAMLLibrary", "enum": [ "SnakeYAML" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "SnakeYAML", "description": "Which yaml library to use. By default it is SnakeYAML." }, diff --git a/components/camel-snakeyaml/src/main/java/org/apache/camel/component/snakeyaml/SnakeYAMLDataFormat.java b/components/camel-snakeyaml/src/main/java/org/apache/camel/component/snakeyaml/SnakeYAMLDataFormat.java index 7957afe3e8826..56205efa65b3e 100644 --- a/components/camel-snakeyaml/src/main/java/org/apache/camel/component/snakeyaml/SnakeYAMLDataFormat.java +++ b/components/camel-snakeyaml/src/main/java/org/apache/camel/component/snakeyaml/SnakeYAMLDataFormat.java @@ -25,6 +25,9 @@ import org.apache.camel.CamelContext; import org.apache.camel.CamelContextAware; import org.apache.camel.Exchange; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.DataFormat; import org.apache.camel.spi.DataFormatName; import org.apache.camel.spi.annotations.Dataformat; @@ -47,6 +50,13 @@ * SnakeYAML */ @Dataformat("snakeYaml") +@BodyTypes(marshalIn = @BodyType(value = Carrier.ANY, description = "A Map, a List or a POJO to write as YAML"), + marshalOut = @BodyType(value = Carrier.STREAM, format = "yaml", + description = "The YAML in the stream cache, or a byte array when stream caching is off"), + unmarshalIn = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE }, format = "yaml"), + unmarshalOut = @BodyType(value = { Carrier.MAP, Carrier.LIST }, dependsOn = "unmarshalType", + description = "A Map (LinkedHashMap) for a mapping, a List (ArrayList) for a sequence; a" + + " document that is a single value gives that value")) public final class SnakeYAMLDataFormat extends ServiceSupport implements DataFormat, DataFormatName, CamelContextAware { private CamelContext camelContext; diff --git a/components/camel-xpath/src/generated/resources/META-INF/org/apache/camel/language/xpath/xpath.json b/components/camel-xpath/src/generated/resources/META-INF/org/apache/camel/language/xpath/xpath.json index 0a6a706898992..e7e50b9357a1e 100644 --- a/components/camel-xpath/src/generated/resources/META-INF/org/apache/camel/language/xpath/xpath.json +++ b/components/camel-xpath/src/generated/resources/META-INF/org/apache/camel/language/xpath/xpath.json @@ -15,6 +15,10 @@ "modelName": "xpath", "modelJavaType": "org.apache.camel.model.language.XPathExpression" }, + "bodyTypes": { + "expressionIn": { "carriers": [ "text", "bytes", "stream", "file", "pojo" ], "format": "xml", "description": "XML as text, bytes, a stream or a file, or a DOM" }, + "expressionOut": { "carriers": [ "pojo" ], "javaType": "org.w3c.dom.NodeList", "dependsOn": [ "resultType" ], "byOption": [ { "option": "resultQName", "value": "STRING", "carriers": [ "text" ], "javaType": "java.lang.String" }, { "option": "resultQName", "value": "NUMBER", "carriers": [ "value" ], "javaType": "java.lang.Double" }, { "option": "resultQName", "value": "BOOLEAN", "carriers": [ "value" ], "javaType": "java.lang.Boolean" }, { "option": "resultQName", "value": "NODE", "carriers": [ "pojo" ], "javaType": "org.w3c.dom.Node" } ], "description": "The nodes the expression selects" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node." }, "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax." }, diff --git a/components/camel-xpath/src/main/java/org/apache/camel/language/xpath/XPathLanguage.java b/components/camel-xpath/src/main/java/org/apache/camel/language/xpath/XPathLanguage.java index 2aca26d203812..1e846164b355b 100644 --- a/components/camel-xpath/src/main/java/org/apache/camel/language/xpath/XPathLanguage.java +++ b/components/camel-xpath/src/main/java/org/apache/camel/language/xpath/XPathLanguage.java @@ -25,6 +25,9 @@ import org.apache.camel.CamelContext; import org.apache.camel.Expression; import org.apache.camel.Predicate; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.PropertyConfigurer; import org.apache.camel.spi.annotations.Language; import org.apache.camel.support.SingleInputTypedLanguageSupport; @@ -34,6 +37,19 @@ * XPath language. */ @Language("xpath") +@BodyTypes(expressionIn = @BodyType(value = { Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE, Carrier.POJO }, + format = "xml", description = "XML as text, bytes, a stream or a file, or a DOM"), + expressionOut = @BodyType(value = Carrier.POJO, javaType = "org.w3c.dom.NodeList", dependsOn = "resultType", + byOption = { + @BodyType.When(option = "resultQName", value = "STRING", carriers = Carrier.TEXT, + javaType = "java.lang.String"), + @BodyType.When(option = "resultQName", value = "NUMBER", carriers = Carrier.VALUE, + javaType = "java.lang.Double"), + @BodyType.When(option = "resultQName", value = "BOOLEAN", carriers = Carrier.VALUE, + javaType = "java.lang.Boolean"), + @BodyType.When(option = "resultQName", value = "NODE", carriers = Carrier.POJO, + javaType = "org.w3c.dom.Node") }, + description = "The nodes the expression selects")) public class XPathLanguage extends SingleInputTypedLanguageSupport implements PropertyConfigurer { private QName resultQName; private Class documentType; diff --git a/core/camel-core-languages/src/generated/resources/META-INF/org/apache/camel/language/constant/constant.json b/core/camel-core-languages/src/generated/resources/META-INF/org/apache/camel/language/constant/constant.json index e1c1c40cb2ea8..9889e6d5b957e 100644 --- a/core/camel-core-languages/src/generated/resources/META-INF/org/apache/camel/language/constant/constant.json +++ b/core/camel-core-languages/src/generated/resources/META-INF/org/apache/camel/language/constant/constant.json @@ -15,6 +15,9 @@ "modelName": "constant", "modelJavaType": "org.apache.camel.model.language.ConstantExpression" }, + "bodyTypes": { + "expressionOut": { "carriers": [ "text" ], "javaType": "java.lang.String", "dependsOn": [ "resultType" ], "description": "The text as it is written; resource:classpath:name loads the text of the resource" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node." }, "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax." }, diff --git a/core/camel-core-languages/src/generated/resources/META-INF/org/apache/camel/language/simple/simple.json b/core/camel-core-languages/src/generated/resources/META-INF/org/apache/camel/language/simple/simple.json index 6de66be485c43..5648229337930 100644 --- a/core/camel-core-languages/src/generated/resources/META-INF/org/apache/camel/language/simple/simple.json +++ b/core/camel-core-languages/src/generated/resources/META-INF/org/apache/camel/language/simple/simple.json @@ -15,6 +15,10 @@ "modelName": "simple", "modelJavaType": "org.apache.camel.model.language.SimpleExpression" }, + "bodyTypes": { + "expressionIn": { "carriers": [ "any" ] }, + "expressionOut": { "carriers": [ "unknown" ], "description": "A text with functions gives text. A single function, such as ${body} or ${header.foo}, gives its value as it is" } + }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node." }, "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax." }, diff --git a/core/camel-core-languages/src/main/java/org/apache/camel/language/constant/ConstantLanguage.java b/core/camel-core-languages/src/main/java/org/apache/camel/language/constant/ConstantLanguage.java index f15bb94fd69c3..738723733d011 100644 --- a/core/camel-core-languages/src/main/java/org/apache/camel/language/constant/ConstantLanguage.java +++ b/core/camel-core-languages/src/main/java/org/apache/camel/language/constant/ConstantLanguage.java @@ -20,6 +20,9 @@ import org.apache.camel.NoTypeConversionAvailableException; import org.apache.camel.Predicate; import org.apache.camel.RuntimeCamelException; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.annotations.Language; import org.apache.camel.support.ExpressionToPredicateAdapter; import org.apache.camel.support.LanguageSupport; @@ -29,6 +32,9 @@ * A language for constant expressions. */ @Language("constant") +@BodyTypes(expressionOut = @BodyType(value = Carrier.TEXT, javaType = "java.lang.String", dependsOn = "resultType", + description = "The text as it is written; resource:classpath:name loads the text of the" + + " resource")) public class ConstantLanguage extends LanguageSupport { public static Expression constant(Object value) { diff --git a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java index ddfd3f7c4b0d2..a43ebbb47d4af 100644 --- a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java +++ b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java @@ -23,6 +23,9 @@ import org.apache.camel.Expression; import org.apache.camel.Predicate; import org.apache.camel.StaticService; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.annotations.Language; import org.apache.camel.support.CamelContextHelper; import org.apache.camel.support.ExpressionAdapter; @@ -40,6 +43,10 @@ * The Camel simple language. */ @Language(value = "simple", functionsClass = SimpleConstants.class, operatorsClass = SimpleOperatorConstants.class) +@BodyTypes(expressionIn = @BodyType(Carrier.ANY), + expressionOut = @BodyType(value = Carrier.UNKNOWN, + description = "A text with functions gives text. A single function, such as ${body} or" + + " ${header.foo}, gives its value as it is")) public class SimpleLanguage extends LanguageSupport implements StaticService { private static final Logger LOG = LoggerFactory.getLogger(SimpleLanguage.class); diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc index eb7e7c67263ce..e2b0b2b057cbc 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc @@ -1406,7 +1406,7 @@ its `application.properties` key as `configKey`. `camel_catalog_doc` without `optionsFilter` now lists the required options and the first 20 other options of a component in full, and the rest by name in `moreOptions` (`limit` lists more in full), and an answer is cut at -16 000 characters with a marker. An option of both the endpoint and the component is listed once, with `scope` +18 000 characters with a marker. An option of both the endpoint and the component is listed once, with `scope` set to `endpoint,component` and its `configKey`, instead of twice, and `matchedOptions` counts option names. A name that only matches a word of an EIP title (such as `retry`) no longer returns that EIP: the answer is a not-found with suggestions. diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang-mcp.adoc b/docs/user-manual/modules/ROOT/pages/camel-jbang-mcp.adoc index b39a4bd9e1fe1..305f64e8ccd0b 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-jbang-mcp.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-jbang-mcp.adoc @@ -315,8 +315,11 @@ project `directory` as an argument, the runtime tools take the integration `name (`mail.*` of smtp) are listed in `prefixOptions`. A filter that matches no option says so, with the closest option names. The answer lists the `sections` of the component page, those that contain the filter first, and `docPage=
` returns one. A full key (`camel.server.port`, `camel.jbang.dependencies`) answers - its group of `application.properties` keys, the key first. An answer is cut at 16 000 characters, with a - marker that says what was left out. + its group of `application.properties` keys, the key first. A component, data format or language that + declares its body types has them in `bodyTypes`, a line per side: what a `from:` gives the route + (`consumerOut`), what a `to:` can send (`producerIn`) and the body after it (`producerOut`), and so on (see + xref:camel-catalog.adoc#_body_types_in_the_catalog[Body types in the Catalog]). An answer is cut at 18 000 + characters, with a marker that says what was left out. `includeOptions` picks the options listed: `common` (the default) leaves out the deprecated and advanced ones and says how many with `omittedOptions`, `required` lists the required ones, `all` everything, `false` none; `optionsFilter` matches a keyword in the option names, descriptions and groups and searches all diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/CatalogDocs.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/CatalogDocs.java index b0028b185caaf..9f5196ce01280 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/CatalogDocs.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/CatalogDocs.java @@ -39,6 +39,7 @@ import org.apache.camel.tooling.model.ApiReferenceModel; import org.apache.camel.tooling.model.BaseModel; import org.apache.camel.tooling.model.BaseOptionModel; +import org.apache.camel.tooling.model.BodyTypeModel; import org.apache.camel.tooling.model.ComponentModel; import org.apache.camel.tooling.model.DataFormatModel; import org.apache.camel.tooling.model.EipModel; @@ -66,13 +67,10 @@ public final class CatalogDocs { /** The sub-pages of a language's documentation (simple has functions, operators, ognl and advanced). */ private static final List LANGUAGE_DOC_PAGES = List.of("functions", "operators", "ognl", "advanced"); - static final String BODY_TYPES_HINT = "the message body with the default options. consumerOut: the body a from:" - + " gives the route; consumerReply: the bodies it can reply with; producerIn:" - + " the bodies a to: can send; producerOut: the body after the to:; marshal," - + " unmarshal and expression In/Out: the same for a data format and a" - + " language. Carriers: text, bytes, stream, file, value, map, list," - + " iterator (no size, no index), pojo, null, unchanged, any, unknown. A side" - + " not listed is not known"; + static final String BODY_TYPES_HINT = "the body with the default options: consumerOut is what a from: gives the" + + " route, consumerReply what it can reply with, producerIn what a to: can" + + " send, producerOut the body after the to: (and so on for marshal, unmarshal" + + " and expression); a side not listed is not known"; /** * The rules a small model gets wrong most: functions live inside the placeholder, operators between placeholders. @@ -1642,11 +1640,57 @@ private static void addCommonModelFields(JsonObject result, BaseModel model) } if (!model.getBodyTypes().isEmpty()) { // what the body is after the step and what it needs, which the options do not say (CAMEL-24961) - result.put("bodyTypes", JsonMapper.asJsonObjectBodyTypes(model.getBodyTypes())); + result.put("bodyTypes", bodyTypes(model.getBodyTypes())); result.put("bodyTypesHint", BODY_TYPES_HINT); } } + /** + * The body types a line per side, as compact as the options are: the carriers, the Java type, the format, the + * description, the body for other option values, and the options that make it not known (CAMEL-24961). + */ + static JsonObject bodyTypes(Map bodyTypes) { + JsonObject answer = new JsonObject(); + for (Map.Entry entry : bodyTypes.entrySet()) { + BodyTypeModel side = entry.getValue(); + StringBuilder line = new StringBuilder(carriers(side.getCarriers(), side.getJavaType())); + if (side.getFormat() != null) { + line.append(", as ").append(side.getFormat()); + } + if (side.getDescription() != null) { + line.append(". ").append(side.getDescription()); + } + if (!side.getByOption().isEmpty()) { + List values = new ArrayList<>(); + for (BodyTypeModel.OptionBodyTypeModel option : side.getByOption()) { + values.add(option.getOption() + "=" + option.getValue() + ": " + + carriers(option.getCarriers(), option.getJavaType())); + } + line.append(". With ").append(String.join("; ", values)); + } + if (!side.getDependsOn().isEmpty()) { + line.append(". Not known when ").append(orList(side.getDependsOn())).append(" is set"); + } + answer.put(entry.getKey(), line.toString()); + } + return answer; + } + + private static String carriers(List carriers, String javaType) { + if (carriers.isEmpty()) { + // the build rejects a side without carriers, but a catalog read from elsewhere may have one + return "unknown"; + } + String answer = orList(carriers); + return javaType != null ? answer + " (" + javaType + ")" : answer; + } + + private static String orList(List values) { + return values.size() == 1 + ? values.get(0) + : String.join(", ", values.subList(0, values.size() - 1)) + " or " + values.get(values.size() - 1); + } + /** * The rules of an endpoint URI for this component, spelled out with its own path parts: what a small model gets * wrong most is a path option written as a query parameter or the other way round, and the YAML form. @@ -1712,9 +1756,10 @@ static String usage(ComponentModel model) { /** * The longest answer, in characters: activemq listed 88 options in 38 K characters, which a client rejected or - * spilled to a file instead of showing it to the model (CAMEL-25541). + * spilled to a file instead of showing it to the model (CAMEL-25541). Raised from 16000 for the body types + * (CAMEL-24961), which the jms components have on four sides. */ - static final int MAX_ANSWER_LENGTH = 16000; + static final int MAX_ANSWER_LENGTH = 18000; /** How much of the text of a page a cut answer keeps at least, before its lists are cut. */ static final int MIN_DOC_KEPT = 8000; diff --git a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ai/CatalogDocsTest.java b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ai/CatalogDocsTest.java index 1fdab178f0d9b..fc2998f5a31c9 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ai/CatalogDocsTest.java +++ b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ai/CatalogDocsTest.java @@ -28,6 +28,7 @@ import org.apache.camel.impl.DefaultCamelContext; import org.apache.camel.support.DefaultExchange; import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.tooling.model.BodyTypeModel; import org.apache.camel.tooling.model.EipModel; import org.apache.camel.util.json.JsonArray; import org.apache.camel.util.json.JsonObject; @@ -135,21 +136,47 @@ void componentOptionsSayWhetherTheyArePathOrQueryAndTheUriRulesComeAlong() throw @Test void theBodyTypesSayWhatTheBodyIsAfterAStep() throws Exception { - // CAMEL-24961: what the options of a component do not say + // CAMEL-24961: what the options of a component do not say, a line per side JsonObject xslt = catalogDoc(Map.of("name", "xslt", "kind", "component", "includeOptions", false)); - JsonObject out = ((JsonObject) xslt.get("bodyTypes")).getMap("producerOut"); - assertEquals(List.of("text"), out.getCollection("carriers")); - assertEquals("java.lang.String", out.getString("javaType")); - assertTrue(xslt.getString("bodyTypesHint").contains("A side not listed is not known")); + JsonObject sides = (JsonObject) xslt.get("bodyTypes"); + assertEquals("text, bytes, stream, file or pojo, as xml. The XML to transform: text, bytes, a stream, a file, a" + + " DOM or another javax.xml.transform.Source. A Map, a List or no body fails. With" + + " failOnNullBody=false: null, text, bytes, stream, file or pojo. Not known when source is set", + sides.getString("producerIn")); + assertTrue(sides.getString("producerOut").startsWith("text (java.lang.String). The result of the transformation." + + " With output=bytes: bytes (byte[]); output=DOM: pojo")); + assertTrue(xslt.getString("bodyTypesHint").contains("a side not listed is not known")); + + // the options that make a side not known read as a list + JsonObject jms = catalogDoc(Map.of("name", "jms", "kind", "component", "includeOptions", false)); + assertTrue(((JsonObject) jms.get("bodyTypes")).getString("producerIn") + .endsWith(". Not known when jmsMessageType, messageConverter or transferExchange is set")); JsonObject json = catalogDoc(Map.of("name", "json", "kind", "dataformat", "includeOptions", false)); - JsonObject unmarshalOut = ((JsonObject) json.get("bodyTypes")).getMap("unmarshalOut"); - assertEquals(List.of("map", "list"), unmarshalOut.getCollection("carriers")); + assertTrue(((JsonObject) json.get("bodyTypes")).getString("unmarshalOut").startsWith("map or list. ")); + + // a language: what its expressions read, and their result + JsonObject xpath = catalogDoc(Map.of("name", "xpath", "kind", "language", "includeOptions", false)); + assertTrue(((JsonObject) xpath.get("bodyTypes")).getString("expressionOut") + .startsWith("pojo (org.w3c.dom.NodeList). The nodes the expression selects. With resultQName=STRING: text")); // a component that does not declare them has none, rather than a guess - JsonObject kafka = catalogDoc(Map.of("name", "kafka", "kind", "component", "includeOptions", false)); - assertNull(kafka.get("bodyTypes")); - assertNull(kafka.get("bodyTypesHint")); + JsonObject jdbc = catalogDoc(Map.of("name", "jdbc", "kind", "component", "includeOptions", false)); + assertNull(jdbc.get("bodyTypes")); + assertNull(jdbc.get("bodyTypesHint")); + } + + @Test + void aBodyWithoutCarriersIsUnknown() { + // the build rejects it, but a catalog read from elsewhere may have one: the line says unknown + BodyTypeModel side = new BodyTypeModel(); + side.setCarriers(List.of("text")); + BodyTypeModel.OptionBodyTypeModel bytes = new BodyTypeModel.OptionBodyTypeModel(); + bytes.setOption("output"); + bytes.setValue("bytes"); + side.getByOption().add(bytes); + JsonObject lines = CatalogDocs.bodyTypes(Map.of(BodyTypeModel.PRODUCER_OUT, side)); + assertEquals("text. With output=bytes: unknown", lines.getString(BodyTypeModel.PRODUCER_OUT)); } @Test