You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2026/01/29 09:48:27 UTC
(camel) branch sa created (now 35846ecffa3e)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a change to branch sa
in repository https://gitbox.apache.org/repos/asf/camel.git
at 35846ecffa3e CAMEL-22924: camel-attachments - Improve simple language
This branch includes the following new commits:
new 35846ecffa3e CAMEL-22924: camel-attachments - Improve simple language
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(camel) 01/01: CAMEL-22924: camel-attachments - Improve simple language
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch sa
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 35846ecffa3ebf6776ede0b5911eea6872ae77a8
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Jan 29 10:48:11 2026 +0100
CAMEL-22924: camel-attachments - Improve simple language
---
.../org/apache/camel/catalog/languages/simple.json | 193 +++++++++++----------
.../attachment/AttachmentExpressionBuilder.java | 79 +++++++++
.../camel/attachment/ByteArrayDataSource.java | 60 +++++++
.../camel/attachment/CSimpleAttachmentHelper.java | 42 +++++
.../camel/attachment/SimpleAttachmentFunction.java | 76 ++++++++
.../camel/attachment/SimpleAttachmentTest.java | 67 +++++++
.../csimple/joor/CSimpleAttachmentsTest.java | 55 ++++++
.../org/apache/camel/language/simple/simple.json | 193 +++++++++++----------
.../modules/languages/pages/simple-language.adoc | 31 +++-
.../camel/language/simple/SimpleConstants.java | 12 ++
.../simple/ast/SimpleFunctionExpression.java | 8 +-
.../java/org/apache/camel/util/MimeTypeHelper.java | 1 +
.../maven/packaging/UpdateMimeTypeHelper.java | 3 +-
13 files changed, 624 insertions(+), 196 deletions(-)
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 70b84761d245..59830496f75b 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
@@ -33,100 +33,103 @@
"attachmentsContentAsText.name": { "index": 6, "kind": "function", "displayName": "Attachments Content As Text", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The content of the attachment as text (ie String).", "ognl": false, "suffix": "}" },
"attachmentsHeader(key,name)": { "index": 7, "kind": "function", "displayName": "Attachments Header", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The attachment header with the given name.", "ognl": false, "suffix": "}" },
"attachmentsHeaderAs(key,name,type)": { "index": 8, "kind": "function", "displayName": "Attachments Header As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The attachment header with the given name, converted to the given type.", "ognl": false, "suffix": "}" },
- "attachmentsSize": { "index": 9, "kind": "function", "displayName": "Attachments Size", "group": "function", "label": "function", "required": false, "javaType": "int", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of attachments. Is 0 if there are no attachments.", "ognl": false, "suffix": "}" },
- "average(val...)": { "index": 10, "kind": "function", "displayName": "Average Number", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the average number from all the values (integral numbers only).", "ognl": false, "suffix": "}" },
- "base64Decode(exp)": { "index": 11, "kind": "function", "displayName": "Base64 Decode", "group": "function", "label": "function", "required": false, "javaType": "byte[]", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Base64 decodes the message body (or expression)", "ognl": false, "suffix": "}" },
- "base64Encode(exp)": { "index": 12, "kind": "function", "displayName": "Base64 Encode", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Base64 encodes the message body (or expression)", "ognl": false, "suffix": "}" },
- "bean(name.method)": { "index": 13, "kind": "function", "displayName": "Call Java Bean", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Calls a Java bean. The name of the bean can also refer to a class name using type prefix as follows `bean:type:com.foo.MyClass`. If no method name is given then Camel will automatic attempt to find the b [...]
- "body": { "index": 14, "kind": "function", "displayName": "Body", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message body", "ognl": true, "suffix": "}" },
- "bodyAs(type)": { "index": 15, "kind": "function", "displayName": "Body As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body to the given type (classname).", "ognl": true, "suffix": "}" },
- "bodyOneLine": { "index": 16, "kind": "function", "displayName": "Body One Line", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the body to a String and removes all line-breaks, so the string is in one line.", "ognl": false, "suffix": "}" },
- "bodyType": { "index": 17, "kind": "function", "displayName": "Body Type", "group": "function", "label": "function", "required": false, "javaType": "Class", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message body class type", "ognl": false, "suffix": "}" },
- "camelContext": { "index": 18, "kind": "function", "displayName": "Camel Context", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Camel Context", "ognl": true, "suffix": "}" },
- "camelId": { "index": 19, "kind": "function", "displayName": "Camel Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the CamelContext", "ognl": false, "suffix": "}" },
- "capitalize(exp)": { "index": 20, "kind": "function", "displayName": "Capitalize String Values", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Capitalizes the message body\/expression as a String value (upper case every words)", "ognl": false, "suffix": "}" },
- "ceil(exp)": { "index": 21, "kind": "function", "displayName": "Ceil Number", "group": "function", "label": "function", "required": false, "javaType": "Integer", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body (or expression) to a floating number and return the ceil value (rounded up to nearest integer).", "ognl": false, "suffix": "}" },
- "collate(num)": { "index": 22, "kind": "function", "displayName": "Group Message Body into Sub Lists", "group": "function", "label": "function", "required": false, "javaType": "java.util.Iterator", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The collate function iterates the message body and groups the data into sub lists of specified size. This can be used with the Splitter EIP to split a message body and group\/ba [...]
- "concat(exp,exp,separator)": { "index": 23, "kind": "function", "displayName": "Concat", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Performs a string concat using two expressions (message body as default) with optional separator", "ognl": false, "suffix": "}" },
- "convertTo(exp,type)": { "index": 24, "kind": "function", "displayName": "Convert To", "group": "function", "label": "function", "required": false, "javaType": "", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body (or expression) to the specified type.", "ognl": true, "suffix": "}" },
- "date(command)": { "index": 25, "kind": "function", "displayName": "Parse Date", "group": "function", "label": "function", "required": false, "javaType": "java.util.Date", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Evaluates to a java.util.Date object. Supported commands are: `now` for current timestamp, `millis` for current timestamp in millis (unix epoch), `exchangeCreated` for the timestamp when the current exch [...]
- "date-with-timezone(command:timezone:pattern)": { "index": 26, "kind": "function", "displayName": "Date Formatter", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Formats the date to a String using the given date pattern, and with support for timezone. Supported commands are: `now` for current timestamp, `exchangeCreated` for the timesta [...]
- "distinct(val...)": { "index": 27, "kind": "function", "displayName": "Distinct Values", "group": "function", "label": "function", "required": false, "javaType": "Set", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a set of all the values with duplicates removed", "ognl": false, "suffix": "}" },
- "empty(type)": { "index": 28, "kind": "function", "displayName": "Create Empty Object", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": true, "deprecationNote": "", "autowired": false, "secret": false, "description": "Creates a new empty object (decided by type). Use `string` to create an empty String. Use `list` to create an empty `java.util.ArrayList`. Use `map` to create an empty `java.util.LinkedHashMap`. Use `set` [...]
- "env.name": { "index": 29, "kind": "function", "displayName": "OS Environment Variable", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The OS environment variable with the given name", "ognl": false, "suffix": "}" },
- "exchange": { "index": 30, "kind": "function", "displayName": "Exchange", "group": "function", "label": "function", "required": false, "javaType": "org.apache.camel.Exchange", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The current exchange", "ognl": true, "suffix": "}" },
- "exchangeId": { "index": 31, "kind": "function", "displayName": "Exchange Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exchange id", "ognl": false, "suffix": "}" },
- "exchangeProperty.name": { "index": 32, "kind": "function", "displayName": "Exchange Property", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exchange property with the given name", "ognl": true, "suffix": "}" },
- "exception": { "index": 33, "kind": "function", "displayName": "Exception", "group": "function", "label": "function", "required": false, "javaType": "java.lang.Exception", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception object on the exchange (also from caught exceptions), is null if no exception present.", "ognl": true, "suffix": "}" },
- "exception.message": { "index": 34, "kind": "function", "displayName": "Exception Message", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception message (also from caught exceptions), is null if no exception present.", "ognl": false, "suffix": "}" },
- "exception.stackTrace": { "index": 35, "kind": "function", "displayName": "Exception Stacktrace", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception stacktrace (also from caught exceptions), is null if no exception present.", "ognl": false, "suffix": "}" },
- "forEach(exp,fun)": { "index": 36, "kind": "function", "displayName": "For Each call Function", "group": "function", "label": "function", "required": false, "javaType": "List", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a List containing the values returned by the function when applied to each value from the input expression", "ognl": false, "suffix": "}" },
- "floor(exp)": { "index": 37, "kind": "function", "displayName": "Floor Number", "group": "function", "label": "function", "required": false, "javaType": "Integer", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body (or expression) to a floating number and return the floor value (rounded down to nearest integer).", "ognl": false, "suffix": "}" },
- "fromRouteId": { "index": 38, "kind": "function", "displayName": "From Route Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The original route id where this exchange was created.", "ognl": false, "suffix": "}" },
- "hash(exp,algorithm)": { "index": 39, "kind": "function", "displayName": "Compute Hash Value", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a hashed value (string in hex decimal) of the message body\/expression using JDK MessageDigest. The algorithm can be SHA-256 (default) or SHA3-256.", "ognl": false, "suffix": "}" },
- "header.name": { "index": 40, "kind": "function", "displayName": "Header", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message header with the given name", "ognl": true, "suffix": "}" },
- "headerAs(key,type)": { "index": 41, "kind": "function", "displayName": "Header As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message header to the given type (classname).", "ognl": false, "suffix": "}" },
- "headers": { "index": 42, "kind": "function", "displayName": "Headers", "group": "function", "label": "function", "required": false, "javaType": "java.util.Map", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns all the message headers in a Map", "ognl": false, "suffix": "}" },
- "hostName": { "index": 43, "kind": "function", "displayName": "Host Name", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the local hostname (may be empty if not possible to resolve).", "ognl": false, "suffix": "}" },
- "id": { "index": 44, "kind": "function", "displayName": "Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message id", "ognl": false, "suffix": "}" },
- "iif(predicate,trueExp,falseExp)": { "index": 45, "kind": "function", "displayName": "If Then Else", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Evaluates the predicate and returns the value of trueExp or falseExp. This function is similar to the ternary operator in Java.", "ognl": false, "suffix": "}" },
- "isAlpha(exp)": { "index": 46, "kind": "function", "displayName": "Is Alphabetic Value", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the message body (or expression) is alphabetic value (A..Z). For more advanced checks use the `regex` operator.", "ognl": false, "suffix": "}" },
- "isAlphaNumeric(exp)": { "index": 47, "kind": "function", "displayName": "Is Alphabetic-Numeric Value", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the message body (or expression) is alphanumeric value (A..Z0-9). For more advanced checks use the `regex` operator.", "ognl": false, "suffix": "}" },
- "isEmpty(exp)": { "index": 48, "kind": "function", "displayName": "Is Empty", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the message body (or expression) is null or empty (list\/map types are tested if they have 0 elements).", "ognl": false, "suffix": "}" },
- "isNumeric(exp)": { "index": 49, "kind": "function", "displayName": "Is Numeric Value", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the message body (or expression) is numeric value (0..9). For more advanced checks use the `regex` operator.", "ognl": false, "suffix": "}" },
- "jq(input,exp)": { "index": 50, "kind": "function", "displayName": "JQ", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with JSon data, then this allows using the JQ language, for example, to extract data from the message body (in JSon format). This requires having camel-jq JAR on the classpath. For input (optional), you can [...]
- "jsonpath(input,exp)": { "index": 51, "kind": "function", "displayName": "JSonPath", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with JSon data, then this allows using the JSonPath language, for example, to extract data from the message body (in JSon format). This requires having camel-jsonpath JAR on the classpath. For i [...]
- "join(separator,prefix,exp)": { "index": 52, "kind": "function", "displayName": "Join", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The join function iterates the message body\/expression and joins the data into a string. The separator is by default a comma. The prefix is optional. The join uses the message body as source by default. [...]
- "length(exp)": { "index": 53, "kind": "function", "displayName": "Length", "group": "function", "label": "function", "required": false, "javaType": "int", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The payload length (number of bytes) of the message body (or expression).", "ognl": false, "suffix": "}" },
- "list(val...)": { "index": 54, "kind": "function", "displayName": "Create List of values", "group": "function", "label": "function", "required": false, "javaType": "java.util.ArrayList", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list function creates an ArrayList with the given set of values.", "ognl": false, "suffix": "}" },
- "lowercase(exp)": { "index": 55, "kind": "function", "displayName": "Lowercase", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Lowercases the message body (or expression)", "ognl": false, "suffix": "}" },
- "mandatoryBodyAs(type)": { "index": 56, "kind": "function", "displayName": "Mandatory Body As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body to the given type (classname). If the body is null then the function will fail with an exception", "ognl": true, "suffix": "}" },
- "map(key1,value1,...)": { "index": 57, "kind": "function", "displayName": "Create Map of pairs", "group": "function", "label": "function", "required": false, "javaType": "java.util.LinkedHashMap", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The map function creates a LinkedHashMap with the given set of pairs.", "ognl": false, "suffix": "}" },
- "max(val...)": { "index": 58, "kind": "function", "displayName": "Maximum Number", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the maximum number from all the values (integral numbers only).", "ognl": false, "suffix": "}" },
- "messageAs(type)": { "index": 59, "kind": "function", "displayName": "Message As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message to the given type (classname).", "ognl": true, "suffix": "}" },
- "messageHistory(boolean)": { "index": 60, "kind": "function", "displayName": "Print Message History", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message history of the current exchange (how it has been routed). This is similar to the route stack-trace message history the error handler logs in case of an unhandled exception. The b [...]
- "messageTimestamp": { "index": 61, "kind": "function", "displayName": "Message Timestamp", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message timestamp (millis since epoc) that this message originates from. Some systems like JMS, Kafka, AWS have a timestamp on the event\/message that Camel received. This method returns the timestam [...]
- "min(val...)": { "index": 62, "kind": "function", "displayName": "Minimum Number", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the minimum number from all the values (integral numbers only).", "ognl": false, "suffix": "}" },
- "newEmpty(type)": { "index": 63, "kind": "function", "displayName": "Create Empty Object", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Creates a new empty object (decided by type). Use `string` to create an empty String. Use `list` to create an empty `java.util.ArrayList`. Use `map` to create an empty `java.util.LinkedHashMap`. Use `s [...]
- "normalizeWhitespace(exp)": { "index": 64, "kind": "function", "displayName": "Normalize Whitespace", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Normalizes the whitespace in the message body (or expression) by cleaning up excess whitespaces.", "ognl": false, "suffix": "}" },
- "not": { "index": 65, "kind": "function", "displayName": "Not", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Evaluates the predicate and returns the opposite.", "ognl": false, "suffix": "}" },
- "null": { "index": 66, "kind": "function", "displayName": "Null", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Represents a null value", "ognl": false, "suffix": "}" },
- "originalBody": { "index": 67, "kind": "function", "displayName": "Original Body", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The original incoming body (only available if allowUseOriginalMessage=true).", "ognl": false, "suffix": "}" },
- "pad(exp,width,separator)": { "index": 68, "kind": "function", "displayName": "Pad String", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Pads the expression with extra padding if necessary, according the the total width. The separator is by default a space. If the width is negative then padding to the right, otherwise to the left.", "o [...]
- "pretty(exp)": { "index": 69, "kind": "function", "displayName": "Pretty Print", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the expression to a String, and attempts to pretty print if JSon or XML, otherwise the expression is returned as the String value.", "ognl": false, "suffix": "}" },
- "prettyBody": { "index": 70, "kind": "function", "displayName": "Pretty Body", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the body to a String, and attempts to pretty print if JSon or XML; otherwise the body is returned as the String value.", "ognl": false, "suffix": "}" },
- "properties:key:default": { "index": 71, "kind": "function", "displayName": "Property Placeholder", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Lookup a property placeholder with the given key. If the key does not exist nor has a value, then an optional default value can be specified.", "ognl": false, "suffix": "}" },
- "propertiesExist:key": { "index": 72, "kind": "function", "displayName": "Property Placeholder Exists", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Checks whether a property placeholder with the given key exists or not. The result can be negated by prefixing the key with !", "ognl": false, "suffix": "}" },
- "random(min,max)": { "index": 73, "kind": "function", "displayName": "Random", "group": "function", "label": "function", "required": false, "javaType": "int", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a random number between min and max (exclusive)", "ognl": false, "suffix": "}" },
- "ref:name": { "index": 74, "kind": "function", "displayName": "Bean By Id", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "To look up a bean from the Registry with the given name.", "ognl": false, "suffix": "}" },
- "replace(from,to,exp)": { "index": 75, "kind": "function", "displayName": "Replace String Values", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Replace all the string values in the message body\/expression. To make it easier to replace single and double quotes, then you can use XML escaped values `\\"` as double quote, `\\'` [...]
- "reverse(val...)": { "index": 76, "kind": "function", "displayName": "Reverse Values", "group": "function", "label": "function", "required": false, "javaType": "List", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a list of all the values, but in reverse order", "ognl": false, "suffix": "}" },
- "routeGroup": { "index": 77, "kind": "function", "displayName": "Route Group", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The route group of the current route the Exchange is being routed. Not all routes have a group assigned, so this may be null.", "ognl": false, "suffix": "}" },
- "routeId": { "index": 78, "kind": "function", "displayName": "Route Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The route id of the current route the Exchange is being routed", "ognl": false, "suffix": "}" },
- "setHeader(name,type,exp)": { "index": 79, "kind": "function", "displayName": "Set Header", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets a message header with the given expression (optional converting to the given type)", "ognl": false, "suffix": "}" },
- "setVariable(name,type,exp)": { "index": 80, "kind": "function", "displayName": "Set Variable", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets a variable with the given expression (optional converting to the given type)", "ognl": false, "suffix": "}" },
- "shuffle(val...)": { "index": 81, "kind": "function", "displayName": "Shuffle Values", "group": "function", "label": "function", "required": false, "javaType": "List", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a list of all the values shuffled in random order", "ognl": false, "suffix": "}" },
- "size(exp)": { "index": 82, "kind": "function", "displayName": "Size", "group": "function", "label": "function", "required": false, "javaType": "int", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the number of elements in collection or array based payloads. If the value is null then 0 is returned, otherwise 1.", "ognl": false, "suffix": "}" },
- "skip(num)": { "index": 83, "kind": "function", "displayName": "Skip First Items from the Message Body", "group": "function", "label": "function", "required": false, "javaType": "java.util.Iterator", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The skip function iterates the message body and skips the first number of items. This can be used with the Splitter EIP to split a message body and skip the first N number of [...]
- "split(exp,separator)": { "index": 84, "kind": "function", "displayName": "Split String Values", "group": "function", "label": "function", "required": false, "javaType": "String[]", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Splits the message body\/expression as a String value using the separator into a String array", "ognl": false, "suffix": "}" },
- "stepId": { "index": 85, "kind": "function", "displayName": "Step Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the id of the current step the Exchange is being routed.", "ognl": false, "suffix": "}" },
- "substring(head,tail)": { "index": 86, "kind": "function", "displayName": "Substring", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a substring of the message body\/expression. If only one positive number, then the returned string is clipped from the beginning. If only one negative number, then the returned string is clipped fr [...]
- "substringAfter(exp,before)": { "index": 87, "kind": "function", "displayName": "Substring After", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a substring of the message body\/expression that comes after. Returns null if nothing comes after.", "ognl": false, "suffix": "}" },
- "substringBefore(exp,before)": { "index": 88, "kind": "function", "displayName": "Substring Before", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a substring of the message body\/expression that comes before. Returns null if nothing comes before.", "ognl": false, "suffix": "}" },
- "substringBetween(exp,after,before)": { "index": 89, "kind": "function", "displayName": "Substring Between", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a substring of the message body\/expression that are between after and before. Returns null if nothing comes between.", "ognl": false, "suffix": "}" },
- "sum(val...)": { "index": 90, "kind": "function", "displayName": "Calculate Sum Number", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sums together all the values as integral numbers. This function can also be used to subtract by using negative numbers.", "ognl": false, "suffix": "}" },
- "sys.name": { "index": 91, "kind": "function", "displayName": "JVM System Property", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The JVM system property with the given name", "ognl": false, "suffix": "}" },
- "threadId": { "index": 92, "kind": "function", "displayName": "Thread Id", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the id of the current thread. Can be used for logging.", "ognl": false, "suffix": "}" },
- "threadName": { "index": 93, "kind": "function", "displayName": "Thread Name", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the name of the current thread. Can be used for logging.", "ognl": false, "suffix": "}" },
- "throwException(type,msg)": { "index": 94, "kind": "function", "displayName": "Throw Exception", "group": "function", "label": "function", "required": false, "javaType": "java.lang.Exception", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Deliberately throws an error. Uses IllegalArgumentException by default if no type is specified (use fully qualified classname).", "ognl": false, "suffix": "}" },
- "trim(exp)": { "index": 95, "kind": "function", "displayName": "Trim", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The trim function trims the message body (or expression) by removing all leading and trailing white spaces.", "ognl": false, "suffix": "}" },
- "type:name.field": { "index": 96, "kind": "function", "displayName": "Java Field Value", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "To refer to a type or field by its classname. To refer to a field, you can append .FIELD_NAME. For example, you can refer to the constant field from Exchange as: `org.apache.camel.Exchange.FILE_NAME`", " [...]
- "kindOfType(exp)": { "index": 97, "kind": "function", "displayName": "Kind of Type", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "What kind of type is the value (null,number,string,boolean,array,object)", "ognl": false, "suffix": "}" },
- "uppercase(exp)": { "index": 98, "kind": "function", "displayName": "Uppercase", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Uppercases the message body (or expression)", "ognl": false, "suffix": "}" },
- "uuid(type)": { "index": 99, "kind": "function", "displayName": "Generate UUID", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a UUID using the Camel `UuidGenerator`. You can choose between `default`, `classic`, `short` and `simple` as the type. If no type is given, the default is used. It is also possible to use a custom `UuidG [...]
- "variable.name": { "index": 100, "kind": "function", "displayName": "Variable", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The variable with the given name", "ognl": true, "suffix": "}" },
- "variableAs(key,type)": { "index": 101, "kind": "function", "displayName": "Variable As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the variable to the given type (classname).", "ognl": false, "suffix": "}" },
- "variables": { "index": 102, "kind": "function", "displayName": "Variables", "group": "function", "label": "function", "required": false, "javaType": "java.util.Map", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns all the variables from the current Exchange in a Map", "ognl": false, "suffix": "}" },
- "xpath(input,exp)": { "index": 103, "kind": "function", "displayName": "XPath", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with XML data, then this allows using the XPath language, for example, to extract data from the message body (in XML format). This requires having camel-xpath JAR on the classpath. For input (optiona [...]
+ "attachmentsKeys": { "index": 9, "kind": "function", "displayName": "Attachments Keys", "group": "function", "label": "function", "required": false, "javaType": "java.util.Set", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "All the attachment keys (filenames)", "ognl": false, "suffix": "}" },
+ "attachmentsSize": { "index": 10, "kind": "function", "displayName": "Attachments Size", "group": "function", "label": "function", "required": false, "javaType": "int", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of attachments. Is 0 if there are no attachments.", "ognl": false, "suffix": "}" },
+ "average(val...)": { "index": 11, "kind": "function", "displayName": "Average Number", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the average number from all the values (integral numbers only).", "ognl": false, "suffix": "}" },
+ "base64Decode(exp)": { "index": 12, "kind": "function", "displayName": "Base64 Decode", "group": "function", "label": "function", "required": false, "javaType": "byte[]", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Base64 decodes the message body (or expression)", "ognl": false, "suffix": "}" },
+ "base64Encode(exp)": { "index": 13, "kind": "function", "displayName": "Base64 Encode", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Base64 encodes the message body (or expression)", "ognl": false, "suffix": "}" },
+ "bean(name.method)": { "index": 14, "kind": "function", "displayName": "Call Java Bean", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Calls a Java bean. The name of the bean can also refer to a class name using type prefix as follows `bean:type:com.foo.MyClass`. If no method name is given then Camel will automatic attempt to find the b [...]
+ "body": { "index": 15, "kind": "function", "displayName": "Body", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message body", "ognl": true, "suffix": "}" },
+ "bodyAs(type)": { "index": 16, "kind": "function", "displayName": "Body As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body to the given type (classname).", "ognl": true, "suffix": "}" },
+ "bodyOneLine": { "index": 17, "kind": "function", "displayName": "Body One Line", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the body to a String and removes all line-breaks, so the string is in one line.", "ognl": false, "suffix": "}" },
+ "bodyType": { "index": 18, "kind": "function", "displayName": "Body Type", "group": "function", "label": "function", "required": false, "javaType": "Class", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message body class type", "ognl": false, "suffix": "}" },
+ "camelContext": { "index": 19, "kind": "function", "displayName": "Camel Context", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Camel Context", "ognl": true, "suffix": "}" },
+ "camelId": { "index": 20, "kind": "function", "displayName": "Camel Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the CamelContext", "ognl": false, "suffix": "}" },
+ "capitalize(exp)": { "index": 21, "kind": "function", "displayName": "Capitalize String Values", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Capitalizes the message body\/expression as a String value (upper case every words)", "ognl": false, "suffix": "}" },
+ "ceil(exp)": { "index": 22, "kind": "function", "displayName": "Ceil Number", "group": "function", "label": "function", "required": false, "javaType": "Integer", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body (or expression) to a floating number and return the ceil value (rounded up to nearest integer).", "ognl": false, "suffix": "}" },
+ "clearAttachments": { "index": 23, "kind": "function", "displayName": "Clear Attachments", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Removes all existing attachments on the message.", "ognl": false, "suffix": "}" },
+ "collate(num)": { "index": 24, "kind": "function", "displayName": "Group Message Body into Sub Lists", "group": "function", "label": "function", "required": false, "javaType": "java.util.Iterator", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The collate function iterates the message body and groups the data into sub lists of specified size. This can be used with the Splitter EIP to split a message body and group\/ba [...]
+ "concat(exp,exp,separator)": { "index": 25, "kind": "function", "displayName": "Concat", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Performs a string concat using two expressions (message body as default) with optional separator", "ognl": false, "suffix": "}" },
+ "convertTo(exp,type)": { "index": 26, "kind": "function", "displayName": "Convert To", "group": "function", "label": "function", "required": false, "javaType": "", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body (or expression) to the specified type.", "ognl": true, "suffix": "}" },
+ "date(command)": { "index": 27, "kind": "function", "displayName": "Parse Date", "group": "function", "label": "function", "required": false, "javaType": "java.util.Date", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Evaluates to a java.util.Date object. Supported commands are: `now` for current timestamp, `millis` for current timestamp in millis (unix epoch), `exchangeCreated` for the timestamp when the current exch [...]
+ "date-with-timezone(command:timezone:pattern)": { "index": 28, "kind": "function", "displayName": "Date Formatter", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Formats the date to a String using the given date pattern, and with support for timezone. Supported commands are: `now` for current timestamp, `exchangeCreated` for the timesta [...]
+ "distinct(val...)": { "index": 29, "kind": "function", "displayName": "Distinct Values", "group": "function", "label": "function", "required": false, "javaType": "Set", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a set of all the values with duplicates removed", "ognl": false, "suffix": "}" },
+ "empty(type)": { "index": 30, "kind": "function", "displayName": "Create Empty Object", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": true, "deprecationNote": "", "autowired": false, "secret": false, "description": "Creates a new empty object (decided by type). Use `string` to create an empty String. Use `list` to create an empty `java.util.ArrayList`. Use `map` to create an empty `java.util.LinkedHashMap`. Use `set` [...]
+ "env.name": { "index": 31, "kind": "function", "displayName": "OS Environment Variable", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The OS environment variable with the given name", "ognl": false, "suffix": "}" },
+ "exchange": { "index": 32, "kind": "function", "displayName": "Exchange", "group": "function", "label": "function", "required": false, "javaType": "org.apache.camel.Exchange", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The current exchange", "ognl": true, "suffix": "}" },
+ "exchangeId": { "index": 33, "kind": "function", "displayName": "Exchange Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exchange id", "ognl": false, "suffix": "}" },
+ "exchangeProperty.name": { "index": 34, "kind": "function", "displayName": "Exchange Property", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exchange property with the given name", "ognl": true, "suffix": "}" },
+ "exception": { "index": 35, "kind": "function", "displayName": "Exception", "group": "function", "label": "function", "required": false, "javaType": "java.lang.Exception", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception object on the exchange (also from caught exceptions), is null if no exception present.", "ognl": true, "suffix": "}" },
+ "exception.message": { "index": 36, "kind": "function", "displayName": "Exception Message", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception message (also from caught exceptions), is null if no exception present.", "ognl": false, "suffix": "}" },
+ "exception.stackTrace": { "index": 37, "kind": "function", "displayName": "Exception Stacktrace", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception stacktrace (also from caught exceptions), is null if no exception present.", "ognl": false, "suffix": "}" },
+ "forEach(exp,fun)": { "index": 38, "kind": "function", "displayName": "For Each call Function", "group": "function", "label": "function", "required": false, "javaType": "List", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a List containing the values returned by the function when applied to each value from the input expression", "ognl": false, "suffix": "}" },
+ "floor(exp)": { "index": 39, "kind": "function", "displayName": "Floor Number", "group": "function", "label": "function", "required": false, "javaType": "Integer", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body (or expression) to a floating number and return the floor value (rounded down to nearest integer).", "ognl": false, "suffix": "}" },
+ "fromRouteId": { "index": 40, "kind": "function", "displayName": "From Route Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The original route id where this exchange was created.", "ognl": false, "suffix": "}" },
+ "hash(exp,algorithm)": { "index": 41, "kind": "function", "displayName": "Compute Hash Value", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a hashed value (string in hex decimal) of the message body\/expression using JDK MessageDigest. The algorithm can be SHA-256 (default) or SHA3-256.", "ognl": false, "suffix": "}" },
+ "header.name": { "index": 42, "kind": "function", "displayName": "Header", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message header with the given name", "ognl": true, "suffix": "}" },
+ "headerAs(key,type)": { "index": 43, "kind": "function", "displayName": "Header As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message header to the given type (classname).", "ognl": false, "suffix": "}" },
+ "headers": { "index": 44, "kind": "function", "displayName": "Headers", "group": "function", "label": "function", "required": false, "javaType": "java.util.Map", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns all the message headers in a Map", "ognl": false, "suffix": "}" },
+ "hostName": { "index": 45, "kind": "function", "displayName": "Host Name", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the local hostname (may be empty if not possible to resolve).", "ognl": false, "suffix": "}" },
+ "id": { "index": 46, "kind": "function", "displayName": "Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message id", "ognl": false, "suffix": "}" },
+ "iif(predicate,trueExp,falseExp)": { "index": 47, "kind": "function", "displayName": "If Then Else", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Evaluates the predicate and returns the value of trueExp or falseExp. This function is similar to the ternary operator in Java.", "ognl": false, "suffix": "}" },
+ "isAlpha(exp)": { "index": 48, "kind": "function", "displayName": "Is Alphabetic Value", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the message body (or expression) is alphabetic value (A..Z). For more advanced checks use the `regex` operator.", "ognl": false, "suffix": "}" },
+ "isAlphaNumeric(exp)": { "index": 49, "kind": "function", "displayName": "Is Alphabetic-Numeric Value", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the message body (or expression) is alphanumeric value (A..Z0-9). For more advanced checks use the `regex` operator.", "ognl": false, "suffix": "}" },
+ "isEmpty(exp)": { "index": 50, "kind": "function", "displayName": "Is Empty", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the message body (or expression) is null or empty (list\/map types are tested if they have 0 elements).", "ognl": false, "suffix": "}" },
+ "isNumeric(exp)": { "index": 51, "kind": "function", "displayName": "Is Numeric Value", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the message body (or expression) is numeric value (0..9). For more advanced checks use the `regex` operator.", "ognl": false, "suffix": "}" },
+ "jq(input,exp)": { "index": 52, "kind": "function", "displayName": "JQ", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with JSon data, then this allows using the JQ language, for example, to extract data from the message body (in JSon format). This requires having camel-jq JAR on the classpath. For input (optional), you can [...]
+ "jsonpath(input,exp)": { "index": 53, "kind": "function", "displayName": "JSonPath", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with JSon data, then this allows using the JSonPath language, for example, to extract data from the message body (in JSon format). This requires having camel-jsonpath JAR on the classpath. For i [...]
+ "join(separator,prefix,exp)": { "index": 54, "kind": "function", "displayName": "Join", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The join function iterates the message body\/expression and joins the data into a string. The separator is by default a comma. The prefix is optional. The join uses the message body as source by default. [...]
+ "length(exp)": { "index": 55, "kind": "function", "displayName": "Length", "group": "function", "label": "function", "required": false, "javaType": "int", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The payload length (number of bytes) of the message body (or expression).", "ognl": false, "suffix": "}" },
+ "list(val...)": { "index": 56, "kind": "function", "displayName": "Create List of values", "group": "function", "label": "function", "required": false, "javaType": "java.util.ArrayList", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list function creates an ArrayList with the given set of values.", "ognl": false, "suffix": "}" },
+ "lowercase(exp)": { "index": 57, "kind": "function", "displayName": "Lowercase", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Lowercases the message body (or expression)", "ognl": false, "suffix": "}" },
+ "mandatoryBodyAs(type)": { "index": 58, "kind": "function", "displayName": "Mandatory Body As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body to the given type (classname). If the body is null then the function will fail with an exception", "ognl": true, "suffix": "}" },
+ "map(key1,value1,...)": { "index": 59, "kind": "function", "displayName": "Create Map of pairs", "group": "function", "label": "function", "required": false, "javaType": "java.util.LinkedHashMap", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The map function creates a LinkedHashMap with the given set of pairs.", "ognl": false, "suffix": "}" },
+ "max(val...)": { "index": 60, "kind": "function", "displayName": "Maximum Number", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the maximum number from all the values (integral numbers only).", "ognl": false, "suffix": "}" },
+ "messageAs(type)": { "index": 61, "kind": "function", "displayName": "Message As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message to the given type (classname).", "ognl": true, "suffix": "}" },
+ "messageHistory(boolean)": { "index": 62, "kind": "function", "displayName": "Print Message History", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message history of the current exchange (how it has been routed). This is similar to the route stack-trace message history the error handler logs in case of an unhandled exception. The b [...]
+ "messageTimestamp": { "index": 63, "kind": "function", "displayName": "Message Timestamp", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message timestamp (millis since epoc) that this message originates from. Some systems like JMS, Kafka, AWS have a timestamp on the event\/message that Camel received. This method returns the timestam [...]
+ "min(val...)": { "index": 64, "kind": "function", "displayName": "Minimum Number", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the minimum number from all the values (integral numbers only).", "ognl": false, "suffix": "}" },
+ "newEmpty(type)": { "index": 65, "kind": "function", "displayName": "Create Empty Object", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Creates a new empty object (decided by type). Use `string` to create an empty String. Use `list` to create an empty `java.util.ArrayList`. Use `map` to create an empty `java.util.LinkedHashMap`. Use `s [...]
+ "normalizeWhitespace(exp)": { "index": 66, "kind": "function", "displayName": "Normalize Whitespace", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Normalizes the whitespace in the message body (or expression) by cleaning up excess whitespaces.", "ognl": false, "suffix": "}" },
+ "not": { "index": 67, "kind": "function", "displayName": "Not", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Evaluates the predicate and returns the opposite.", "ognl": false, "suffix": "}" },
+ "null": { "index": 68, "kind": "function", "displayName": "Null", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Represents a null value", "ognl": false, "suffix": "}" },
+ "originalBody": { "index": 69, "kind": "function", "displayName": "Original Body", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The original incoming body (only available if allowUseOriginalMessage=true).", "ognl": false, "suffix": "}" },
+ "pad(exp,width,separator)": { "index": 70, "kind": "function", "displayName": "Pad String", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Pads the expression with extra padding if necessary, according the the total width. The separator is by default a space. If the width is negative then padding to the right, otherwise to the left.", "o [...]
+ "pretty(exp)": { "index": 71, "kind": "function", "displayName": "Pretty Print", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the expression to a String, and attempts to pretty print if JSon or XML, otherwise the expression is returned as the String value.", "ognl": false, "suffix": "}" },
+ "prettyBody": { "index": 72, "kind": "function", "displayName": "Pretty Body", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the body to a String, and attempts to pretty print if JSon or XML; otherwise the body is returned as the String value.", "ognl": false, "suffix": "}" },
+ "properties:key:default": { "index": 73, "kind": "function", "displayName": "Property Placeholder", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Lookup a property placeholder with the given key. If the key does not exist nor has a value, then an optional default value can be specified.", "ognl": false, "suffix": "}" },
+ "propertiesExist:key": { "index": 74, "kind": "function", "displayName": "Property Placeholder Exists", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Checks whether a property placeholder with the given key exists or not. The result can be negated by prefixing the key with !", "ognl": false, "suffix": "}" },
+ "random(min,max)": { "index": 75, "kind": "function", "displayName": "Random", "group": "function", "label": "function", "required": false, "javaType": "int", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a random number between min and max (exclusive)", "ognl": false, "suffix": "}" },
+ "ref:name": { "index": 76, "kind": "function", "displayName": "Bean By Id", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "To look up a bean from the Registry with the given name.", "ognl": false, "suffix": "}" },
+ "replace(from,to,exp)": { "index": 77, "kind": "function", "displayName": "Replace String Values", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Replace all the string values in the message body\/expression. To make it easier to replace single and double quotes, then you can use XML escaped values `\\"` as double quote, `\\'` [...]
+ "reverse(val...)": { "index": 78, "kind": "function", "displayName": "Reverse Values", "group": "function", "label": "function", "required": false, "javaType": "List", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a list of all the values, but in reverse order", "ognl": false, "suffix": "}" },
+ "routeGroup": { "index": 79, "kind": "function", "displayName": "Route Group", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The route group of the current route the Exchange is being routed. Not all routes have a group assigned, so this may be null.", "ognl": false, "suffix": "}" },
+ "routeId": { "index": 80, "kind": "function", "displayName": "Route Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The route id of the current route the Exchange is being routed", "ognl": false, "suffix": "}" },
+ "setVariable(key,exp)": { "index": 81, "kind": "function", "displayName": "Set Variable", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets an attachment with payload from the message body\/expression.", "ognl": false, "suffix": "}" },
+ "setHeader(name,type,exp)": { "index": 82, "kind": "function", "displayName": "Set Header", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets a message header with the given expression (optional converting to the given type)", "ognl": false, "suffix": "}" },
+ "setVariable(name,type,exp)": { "index": 83, "kind": "function", "displayName": "Set Variable", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets a variable with the given expression (optional converting to the given type)", "ognl": false, "suffix": "}" },
+ "shuffle(val...)": { "index": 84, "kind": "function", "displayName": "Shuffle Values", "group": "function", "label": "function", "required": false, "javaType": "List", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a list of all the values shuffled in random order", "ognl": false, "suffix": "}" },
+ "size(exp)": { "index": 85, "kind": "function", "displayName": "Size", "group": "function", "label": "function", "required": false, "javaType": "int", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the number of elements in collection or array based payloads. If the value is null then 0 is returned, otherwise 1.", "ognl": false, "suffix": "}" },
+ "skip(num)": { "index": 86, "kind": "function", "displayName": "Skip First Items from the Message Body", "group": "function", "label": "function", "required": false, "javaType": "java.util.Iterator", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The skip function iterates the message body and skips the first number of items. This can be used with the Splitter EIP to split a message body and skip the first N number of [...]
+ "split(exp,separator)": { "index": 87, "kind": "function", "displayName": "Split String Values", "group": "function", "label": "function", "required": false, "javaType": "String[]", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Splits the message body\/expression as a String value using the separator into a String array", "ognl": false, "suffix": "}" },
+ "stepId": { "index": 88, "kind": "function", "displayName": "Step Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the id of the current step the Exchange is being routed.", "ognl": false, "suffix": "}" },
+ "substring(head,tail)": { "index": 89, "kind": "function", "displayName": "Substring", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a substring of the message body\/expression. If only one positive number, then the returned string is clipped from the beginning. If only one negative number, then the returned string is clipped fr [...]
+ "substringAfter(exp,before)": { "index": 90, "kind": "function", "displayName": "Substring After", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a substring of the message body\/expression that comes after. Returns null if nothing comes after.", "ognl": false, "suffix": "}" },
+ "substringBefore(exp,before)": { "index": 91, "kind": "function", "displayName": "Substring Before", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a substring of the message body\/expression that comes before. Returns null if nothing comes before.", "ognl": false, "suffix": "}" },
+ "substringBetween(exp,after,before)": { "index": 92, "kind": "function", "displayName": "Substring Between", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a substring of the message body\/expression that are between after and before. Returns null if nothing comes between.", "ognl": false, "suffix": "}" },
+ "sum(val...)": { "index": 93, "kind": "function", "displayName": "Calculate Sum Number", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sums together all the values as integral numbers. This function can also be used to subtract by using negative numbers.", "ognl": false, "suffix": "}" },
+ "sys.name": { "index": 94, "kind": "function", "displayName": "JVM System Property", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The JVM system property with the given name", "ognl": false, "suffix": "}" },
+ "threadId": { "index": 95, "kind": "function", "displayName": "Thread Id", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the id of the current thread. Can be used for logging.", "ognl": false, "suffix": "}" },
+ "threadName": { "index": 96, "kind": "function", "displayName": "Thread Name", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the name of the current thread. Can be used for logging.", "ognl": false, "suffix": "}" },
+ "throwException(type,msg)": { "index": 97, "kind": "function", "displayName": "Throw Exception", "group": "function", "label": "function", "required": false, "javaType": "java.lang.Exception", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Deliberately throws an error. Uses IllegalArgumentException by default if no type is specified (use fully qualified classname).", "ognl": false, "suffix": "}" },
+ "trim(exp)": { "index": 98, "kind": "function", "displayName": "Trim", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The trim function trims the message body (or expression) by removing all leading and trailing white spaces.", "ognl": false, "suffix": "}" },
+ "type:name.field": { "index": 99, "kind": "function", "displayName": "Java Field Value", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "To refer to a type or field by its classname. To refer to a field, you can append .FIELD_NAME. For example, you can refer to the constant field from Exchange as: `org.apache.camel.Exchange.FILE_NAME`", " [...]
+ "kindOfType(exp)": { "index": 100, "kind": "function", "displayName": "Kind of Type", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "What kind of type is the value (null,number,string,boolean,array,object)", "ognl": false, "suffix": "}" },
+ "uppercase(exp)": { "index": 101, "kind": "function", "displayName": "Uppercase", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Uppercases the message body (or expression)", "ognl": false, "suffix": "}" },
+ "uuid(type)": { "index": 102, "kind": "function", "displayName": "Generate UUID", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a UUID using the Camel `UuidGenerator`. You can choose between `default`, `classic`, `short` and `simple` as the type. If no type is given, the default is used. It is also possible to use a custom `Uuid [...]
+ "variable.name": { "index": 103, "kind": "function", "displayName": "Variable", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The variable with the given name", "ognl": true, "suffix": "}" },
+ "variableAs(key,type)": { "index": 104, "kind": "function", "displayName": "Variable As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the variable to the given type (classname).", "ognl": false, "suffix": "}" },
+ "variables": { "index": 105, "kind": "function", "displayName": "Variables", "group": "function", "label": "function", "required": false, "javaType": "java.util.Map", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns all the variables from the current Exchange in a Map", "ognl": false, "suffix": "}" },
+ "xpath(input,exp)": { "index": 106, "kind": "function", "displayName": "XPath", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with XML data, then this allows using the XPath language, for example, to extract data from the message body (in XML format). This requires having camel-xpath JAR on the classpath. For input (optiona [...]
}
}
diff --git a/components/camel-attachments/src/main/java/org/apache/camel/attachment/AttachmentExpressionBuilder.java b/components/camel-attachments/src/main/java/org/apache/camel/attachment/AttachmentExpressionBuilder.java
index b6acbc2ad54d..c8fe2220ce82 100644
--- a/components/camel-attachments/src/main/java/org/apache/camel/attachment/AttachmentExpressionBuilder.java
+++ b/components/camel-attachments/src/main/java/org/apache/camel/attachment/AttachmentExpressionBuilder.java
@@ -16,9 +16,12 @@
*/
package org.apache.camel.attachment;
+import java.io.File;
+import java.io.InputStream;
import java.util.Iterator;
import jakarta.activation.DataHandler;
+import jakarta.activation.DataSource;
import org.apache.camel.CamelContext;
import org.apache.camel.CamelExecutionException;
@@ -29,6 +32,7 @@ import org.apache.camel.RuntimeCamelException;
import org.apache.camel.language.simple.SimpleExpressionBuilder;
import org.apache.camel.support.ExpressionAdapter;
import org.apache.camel.support.ObjectHelper;
+import org.apache.camel.support.ResourceHelper;
import static org.apache.camel.support.builder.ExpressionBuilder.simpleExpression;
@@ -62,6 +66,25 @@ public class AttachmentExpressionBuilder {
};
}
+ public static Expression attachmentsKeys() {
+ return new ExpressionAdapter() {
+ @Override
+ public Object evaluate(Exchange exchange) {
+ return toAttachmentMessage(exchange).getAttachmentNames();
+ }
+ };
+ }
+
+ public static Expression clearAttachments() {
+ return new ExpressionAdapter() {
+ @Override
+ public Object evaluate(Exchange exchange) {
+ toAttachmentMessage(exchange).clearAttachments();
+ return null;
+ }
+ };
+ }
+
public static Expression attachmentContent(final String key, final String type) {
return new ExpressionAdapter() {
private Class<?> clazz;
@@ -204,6 +227,62 @@ public class AttachmentExpressionBuilder {
});
}
+ /**
+ * Sets the attachment with the given expression value
+ */
+ public static Expression setAttachmentExpression(
+ final String attachmentName, final String expression) {
+ return new ExpressionAdapter() {
+ private Expression exp;
+
+ @Override
+ public void init(CamelContext context) {
+ exp = context.resolveLanguage("simple").createExpression(expression);
+ exp.init(context);
+ }
+
+ @Override
+ public Object evaluate(Exchange exchange) {
+ try {
+ Object value = exp.evaluate(exchange, Object.class);
+ if (value != null) {
+ AttachmentMessage am = toAttachmentMessage(exchange);
+ DataSource ds;
+ if (value instanceof File f) {
+ ds = new CamelFileDataSource(f, attachmentName);
+ } else if (value instanceof String str) {
+ byte[] data;
+ if (ResourceHelper.hasScheme(str)) {
+ InputStream is
+ = ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext(), str);
+ data = exchange.getContext().getTypeConverter().convertTo(byte[].class, is);
+ } else {
+ data = str.getBytes();
+ }
+ ds = new ByteArrayDataSource(attachmentName, data);
+ } else {
+ byte[] data = exchange.getContext().getTypeConverter().convertTo(byte[].class, value);
+ ds = new ByteArrayDataSource(attachmentName, data);
+ }
+ am.addAttachment(attachmentName, new DataHandler(ds));
+ } else {
+ AttachmentMessage am = toAttachmentMessage(exchange);
+ am.removeAttachment(attachmentName);
+ }
+ } catch (Exception e) {
+ throw RuntimeCamelException.wrapRuntimeCamelException(e);
+ }
+ // does not return anything
+ return null;
+ }
+
+ @Override
+ public String toString() {
+ return "setAttachment(" + attachmentName + "," + expression + ")";
+ }
+ };
+ }
+
private static DataHandler lookupDataHandlerByKey(Exchange exchange, String key) {
AttachmentMessage am = toAttachmentMessage(exchange);
var dh = am.getAttachment(key);
diff --git a/components/camel-attachments/src/main/java/org/apache/camel/attachment/ByteArrayDataSource.java b/components/camel-attachments/src/main/java/org/apache/camel/attachment/ByteArrayDataSource.java
new file mode 100644
index 000000000000..a26dd6b42c17
--- /dev/null
+++ b/components/camel-attachments/src/main/java/org/apache/camel/attachment/ByteArrayDataSource.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.attachment;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import jakarta.activation.DataSource;
+
+import org.apache.camel.util.MimeTypeHelper;
+
+/**
+ * A {@link DataSource} that are in-memory using a byte array
+ */
+public class ByteArrayDataSource implements DataSource {
+
+ private final String fileName;
+ private final byte[] data;
+
+ public ByteArrayDataSource(String fileName, byte[] data) {
+ this.fileName = fileName;
+ this.data = data;
+ }
+
+ @Override
+ public InputStream getInputStream() throws IOException {
+ return new ByteArrayInputStream(data);
+ }
+
+ @Override
+ public OutputStream getOutputStream() throws IOException {
+ throw new IOException("Not supported");
+ }
+
+ @Override
+ public String getContentType() {
+ return MimeTypeHelper.probeMimeType(fileName);
+ }
+
+ @Override
+ public String getName() {
+ return fileName;
+ }
+}
diff --git a/components/camel-attachments/src/main/java/org/apache/camel/attachment/CSimpleAttachmentHelper.java b/components/camel-attachments/src/main/java/org/apache/camel/attachment/CSimpleAttachmentHelper.java
index b6caaefb121a..979f20cd813c 100644
--- a/components/camel-attachments/src/main/java/org/apache/camel/attachment/CSimpleAttachmentHelper.java
+++ b/components/camel-attachments/src/main/java/org/apache/camel/attachment/CSimpleAttachmentHelper.java
@@ -16,11 +16,16 @@
*/
package org.apache.camel.attachment;
+import java.io.File;
+import java.io.InputStream;
import java.util.Map;
+import java.util.Set;
import jakarta.activation.DataHandler;
+import jakarta.activation.DataSource;
import org.apache.camel.Exchange;
+import org.apache.camel.support.ResourceHelper;
public class CSimpleAttachmentHelper {
@@ -42,6 +47,10 @@ public class CSimpleAttachmentHelper {
return toAttachmentMessage(exchange).getAttachments().size();
}
+ public static Set<String> attachmentsKeys(Exchange exchange) {
+ return toAttachmentMessage(exchange).getAttachmentNames();
+ }
+
public static Object attachmentContent(Exchange exchange, String key) throws Exception {
var dh = toAttachmentMessage(exchange).getAttachments().get(key);
if (dh != null) {
@@ -90,4 +99,37 @@ public class CSimpleAttachmentHelper {
return null;
}
+ public static Object setAttachment(Exchange exchange, String attachmentName, Object value) throws Exception {
+ if (value != null) {
+ AttachmentMessage am = toAttachmentMessage(exchange);
+ DataSource ds;
+ if (value instanceof File f) {
+ ds = new CamelFileDataSource(f, attachmentName);
+ } else if (value instanceof String str) {
+ byte[] data;
+ if (ResourceHelper.hasScheme(str)) {
+ InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext(), str);
+ data = exchange.getContext().getTypeConverter().convertTo(byte[].class, is);
+ } else {
+ data = str.getBytes();
+ }
+ ds = new ByteArrayDataSource(attachmentName, data);
+ } else {
+ byte[] data = exchange.getContext().getTypeConverter().convertTo(byte[].class, value);
+ ds = new ByteArrayDataSource(attachmentName, data);
+ }
+ am.addAttachment(attachmentName, new DataHandler(ds));
+ } else {
+ AttachmentMessage am = toAttachmentMessage(exchange);
+ am.removeAttachment(attachmentName);
+ }
+ return null;
+ }
+
+ public static Object clearAttachments(Exchange exchange) {
+ AttachmentMessage am = toAttachmentMessage(exchange);
+ am.clearAttachments();
+ return null;
+ }
+
}
diff --git a/components/camel-attachments/src/main/java/org/apache/camel/attachment/SimpleAttachmentFunction.java b/components/camel-attachments/src/main/java/org/apache/camel/attachment/SimpleAttachmentFunction.java
index 2b3b965aa142..9ae407793f4a 100644
--- a/components/camel-attachments/src/main/java/org/apache/camel/attachment/SimpleAttachmentFunction.java
+++ b/components/camel-attachments/src/main/java/org/apache/camel/attachment/SimpleAttachmentFunction.java
@@ -21,11 +21,13 @@ import org.apache.camel.Expression;
import org.apache.camel.language.simple.types.SimpleParserException;
import org.apache.camel.spi.SimpleLanguageFunctionFactory;
import org.apache.camel.spi.annotations.JdkService;
+import org.apache.camel.support.ResourceHelper;
import org.apache.camel.util.ObjectHelper;
import org.apache.camel.util.OgnlHelper;
import org.apache.camel.util.StringHelper;
import org.apache.camel.util.StringQuoteHelper;
+import static org.apache.camel.language.simple.ast.SimpleFunctionExpression.codeSplitSafe;
import static org.apache.camel.language.simple.ast.SimpleFunctionExpression.ifStartsWithReturnRemainder;
@JdkService(SimpleLanguageFunctionFactory.FACTORY + "/camel-attachments")
@@ -38,6 +40,10 @@ public class SimpleAttachmentFunction implements SimpleLanguageFunctionFactory {
} else if ("attachments.size".equals(function) || "attachments.size()".equals(function)
|| "attachments.length".equals(function) || "attachments.length()".equals(function)) {
return AttachmentExpressionBuilder.attachmentsSize();
+ } else if ("attachmentsKeys".equals(function)) {
+ return AttachmentExpressionBuilder.attachmentsKeys();
+ } else if ("clearAttachments".equals(function)) {
+ return AttachmentExpressionBuilder.clearAttachments();
}
String remainder = ifStartsWithReturnRemainder("attachmentContent(", function);
@@ -156,6 +162,33 @@ public class SimpleAttachmentFunction implements SimpleLanguageFunctionFactory {
return AttachmentExpressionBuilder.attachmentExpression(remainder);
}
}
+
+ // setAttachment function
+ remainder = ifStartsWithReturnRemainder("setAttachment(", function);
+ if (remainder != null) {
+ String values = StringHelper.beforeLast(remainder, ")");
+ if (values == null || ObjectHelper.isEmpty(values)) {
+ throw new SimpleParserException(
+ "Valid syntax: ${setAttachment(key)} or ${setAttachment(key,exp)} was: " + function,
+ index);
+ }
+ String[] tokens = StringQuoteHelper.splitSafeQuote(values, ',', false);
+ if (tokens.length < 1 || tokens.length > 2) {
+ throw new SimpleParserException(
+ "Valid syntax: ${setAttachment(key)} or ${setAttachment(key,exp)} was: " + function,
+ index);
+ }
+ String key = tokens[0];
+ String exp = null;
+ if (tokens.length == 2) {
+ exp = tokens[1];
+ }
+ if (exp == null || exp.isBlank()) {
+ exp = "${body}";
+ }
+ return AttachmentExpressionBuilder.setAttachmentExpression(key, exp);
+ }
+
return null;
}
@@ -166,6 +199,10 @@ public class SimpleAttachmentFunction implements SimpleLanguageFunctionFactory {
} else if ("attachments.size".equals(function) || "attachments.size()".equals(function)
|| "attachments.length".equals(function) || "attachments.length()".equals(function)) {
return "attachmentsSize(exchange)";
+ } else if ("attachmentsKeys".equals(function)) {
+ return "attachmentsKeys(exchange)";
+ } else if ("clearAttachments".equals(function)) {
+ return "clearAttachments(exchange)";
}
String remainder = ifStartsWithReturnRemainder("attachmentContent(", function);
@@ -279,6 +316,45 @@ public class SimpleAttachmentFunction implements SimpleLanguageFunctionFactory {
return "attachmentHeaderAs(exchange, \"" + key + "\", \"" + name + "\", " + type + ")";
}
+ // setAttachment function
+ remainder = ifStartsWithReturnRemainder("setAttachment(", function);
+ if (remainder != null) {
+ String values = StringHelper.beforeLast(remainder, ")");
+ if (values == null || ObjectHelper.isEmpty(values)) {
+ throw new SimpleParserException(
+ "Valid syntax: ${setAttachment(key)} or ${setAttachment(key,exp)} was: " + function,
+ index);
+ }
+ String[] tokens = codeSplitSafe(values, ',', true, true);
+ if (tokens.length < 1 || tokens.length > 2) {
+ throw new SimpleParserException(
+ "Valid syntax: ${setAttachment(key)} or ${setAttachment(key,exp)} was: " + function,
+ index);
+ }
+ // single quotes should be double quotes
+ for (int i = 0; i < tokens.length; i++) {
+ String s = tokens[i];
+ if (StringHelper.isSingleQuoted(s)) {
+ s = StringHelper.removeLeadingAndEndingQuotes(s);
+ s = StringQuoteHelper.doubleQuote(s);
+ tokens[i] = s;
+ }
+ }
+ // name must be in double quote as its a string value
+ String name = StringHelper.removeLeadingAndEndingQuotes(tokens[0]);
+ name = StringQuoteHelper.doubleQuote(name);
+ String exp;
+ if (tokens.length == 2) {
+ exp = tokens[1];
+ } else {
+ exp = "body";
+ }
+ if (ResourceHelper.hasScheme(exp)) {
+ exp = StringQuoteHelper.doubleQuote(exp);
+ }
+ return "Object value = " + exp + ";\n return setAttachment(exchange, " + name + ", value);";
+ }
+
return null;
}
diff --git a/components/camel-attachments/src/test/java/org/apache/camel/attachment/SimpleAttachmentTest.java b/components/camel-attachments/src/test/java/org/apache/camel/attachment/SimpleAttachmentTest.java
index d3c28535f65e..fe746aa3eceb 100644
--- a/components/camel-attachments/src/test/java/org/apache/camel/attachment/SimpleAttachmentTest.java
+++ b/components/camel-attachments/src/test/java/org/apache/camel/attachment/SimpleAttachmentTest.java
@@ -22,6 +22,7 @@ import jakarta.activation.DataHandler;
import org.apache.camel.Exchange;
import org.apache.camel.test.junit5.LanguageTestSupport;
+import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class SimpleAttachmentTest extends LanguageTestSupport {
@@ -67,6 +68,9 @@ public class SimpleAttachmentTest extends LanguageTestSupport {
exchange.getMessage(AttachmentMessage.class).removeAttachment("123.txt");
assertExpression("${attachments.size}", 0);
assertExpression("${attachments.length}", 0);
+
+ var set = exchange.getMessage(AttachmentMessage.class).getAttachmentNames();
+ assertExpression("${attachmentsKeys}", set);
}
@Test
@@ -143,4 +147,67 @@ public class SimpleAttachmentTest extends LanguageTestSupport {
String xml2 = context.getTypeConverter().convertTo(String.class, is2);
assertExpression("${attachmentContent(1)}", xml2);
}
+
+ @Test
+ public void testSetAttachmentFromBody() throws Exception {
+ exchange.getMessage(AttachmentMessage.class).clearAttachments();
+ assertExpression("${attachments.size}", 0);
+
+ exchange.getMessage().setBody("{id: 123, sku: 456}");
+
+ assertExpression("${setAttachment(myorder.json)}", null);
+
+ assertExpression("${attachment[0].name}", "myorder.json");
+ assertExpression("${attachment[0].contentType}", "application/json");
+ assertExpression("${attachment[0].content}", "{id: 123, sku: 456}");
+
+ var map = exchange.getMessage(AttachmentMessage.class).getAttachments();
+ Object is1 = map.get("myorder.json").getContent();
+ String json1 = context.getTypeConverter().convertTo(String.class, is1);
+ assertExpression("{id: 123, sku: 456}", json1);
+ }
+
+ @Test
+ public void testSetAttachmentFromVariable() throws Exception {
+ exchange.getMessage(AttachmentMessage.class).clearAttachments();
+ assertExpression("${attachments.size}", 0);
+
+ exchange.getMessage().setBody(null);
+ exchange.setVariable("myOrder", "{id: 123, sku: 456}");
+
+ assertExpression("${setAttachment(myorder.json,${variable.myOrder})}", null);
+
+ assertExpression("${attachment[0].name}", "myorder.json");
+ assertExpression("${attachment[0].contentType}", "application/json");
+ assertExpression("${attachment[0].content}", "{id: 123, sku: 456}");
+
+ var map = exchange.getMessage(AttachmentMessage.class).getAttachments();
+ Object is1 = map.get("myorder.json").getContent();
+ String json1 = context.getTypeConverter().convertTo(String.class, is1);
+ assertExpression("{id: 123, sku: 456}", json1);
+ }
+
+ @Test
+ public void testSetAttachmentFile() throws Exception {
+ exchange.getMessage(AttachmentMessage.class).clearAttachments();
+ assertExpression("${attachments.size}", 0);
+
+ assertExpression("${setAttachment(logger.properties,resource:file:src/test/resources/log4j2.properties)}", null);
+
+ assertExpression("${attachment[0].name}", "logger.properties");
+ assertExpression("${attachment[0].contentType}", "text/plain");
+
+ var map = exchange.getMessage(AttachmentMessage.class).getAttachments();
+ Object is1 = map.get("logger.properties").getContent();
+ String data = context.getTypeConverter().convertTo(String.class, is1);
+ Assertions.assertTrue(data.contains("target/camel-attachments-test.log"));
+ }
+
+ @Test
+ public void testClearAttachments() {
+ assertExpression("${attachments.size}", 3);
+ assertExpression("${clearAttachments}", null);
+ assertExpression("${attachments.size}", 0);
+ }
+
}
diff --git a/components/camel-csimple-joor/src/test/java/org/apache/camel/language/csimple/joor/CSimpleAttachmentsTest.java b/components/camel-csimple-joor/src/test/java/org/apache/camel/language/csimple/joor/CSimpleAttachmentsTest.java
index 95210abcdb24..dcbdf9bb2928 100644
--- a/components/camel-csimple-joor/src/test/java/org/apache/camel/language/csimple/joor/CSimpleAttachmentsTest.java
+++ b/components/camel-csimple-joor/src/test/java/org/apache/camel/language/csimple/joor/CSimpleAttachmentsTest.java
@@ -25,6 +25,7 @@ import org.apache.camel.attachment.AttachmentMessage;
import org.apache.camel.attachment.CamelFileDataSource;
import org.apache.camel.attachment.DefaultAttachment;
import org.apache.camel.test.junit5.LanguageTestSupport;
+import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class CSimpleAttachmentsTest extends LanguageTestSupport {
@@ -70,6 +71,9 @@ public class CSimpleAttachmentsTest extends LanguageTestSupport {
exchange.getMessage(AttachmentMessage.class).removeAttachment("123.txt");
assertExpression("${attachments.size}", 0);
assertExpression("${attachments.length}", 0);
+
+ var set = exchange.getMessage(AttachmentMessage.class).getAttachmentNames();
+ assertExpression("${attachmentsKeys}", set);
}
@Test
@@ -104,4 +108,55 @@ public class CSimpleAttachmentsTest extends LanguageTestSupport {
assertExpression("${attachmentContentType(123.txt)}", "text/plain");
}
+ @Test
+ public void testSetAttachmentFromBody() throws Exception {
+ exchange.getMessage(AttachmentMessage.class).clearAttachments();
+ assertExpression("${attachments.size}", 0);
+
+ exchange.getMessage().setBody("{id: 123, sku: 456}");
+
+ assertExpression("${setAttachment(myorder.json)}", null);
+
+ var map = exchange.getMessage(AttachmentMessage.class).getAttachments();
+ Object is1 = map.get("myorder.json").getContent();
+ String json1 = context.getTypeConverter().convertTo(String.class, is1);
+ assertExpression("{id: 123, sku: 456}", json1);
+ }
+
+ @Test
+ public void testSetAttachmentFromVariable() throws Exception {
+ exchange.getMessage(AttachmentMessage.class).clearAttachments();
+ assertExpression("${attachments.size}", 0);
+
+ exchange.getMessage().setBody(null);
+ exchange.setVariable("myOrder", "{id: 123, sku: 456}");
+
+ assertExpression("${setAttachment(myorder.json,${variable.myOrder})}", null);
+
+ var map = exchange.getMessage(AttachmentMessage.class).getAttachments();
+ Object is1 = map.get("myorder.json").getContent();
+ String json1 = context.getTypeConverter().convertTo(String.class, is1);
+ assertExpression("{id: 123, sku: 456}", json1);
+ }
+
+ @Test
+ public void testSetAttachmentFile() throws Exception {
+ exchange.getMessage(AttachmentMessage.class).clearAttachments();
+ assertExpression("${attachments.size}", 0);
+
+ assertExpression("${setAttachment(logger.properties,resource:file:src/test/resources/log4j2.properties)}", null);
+
+ var map = exchange.getMessage(AttachmentMessage.class).getAttachments();
+ Object is1 = map.get("logger.properties").getContent();
+ String data = context.getTypeConverter().convertTo(String.class, is1);
+ Assertions.assertTrue(data.contains("target/camel-csimple-joor-test.log"));
+ }
+
+ @Test
+ public void testClearAttachments() {
+ assertExpression("${attachments.size}", 3);
+ assertExpression("${clearAttachments}", null);
+ assertExpression("${attachments.size}", 0);
+ }
+
}
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 70b84761d245..59830496f75b 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
@@ -33,100 +33,103 @@
"attachmentsContentAsText.name": { "index": 6, "kind": "function", "displayName": "Attachments Content As Text", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The content of the attachment as text (ie String).", "ognl": false, "suffix": "}" },
"attachmentsHeader(key,name)": { "index": 7, "kind": "function", "displayName": "Attachments Header", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The attachment header with the given name.", "ognl": false, "suffix": "}" },
"attachmentsHeaderAs(key,name,type)": { "index": 8, "kind": "function", "displayName": "Attachments Header As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The attachment header with the given name, converted to the given type.", "ognl": false, "suffix": "}" },
- "attachmentsSize": { "index": 9, "kind": "function", "displayName": "Attachments Size", "group": "function", "label": "function", "required": false, "javaType": "int", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of attachments. Is 0 if there are no attachments.", "ognl": false, "suffix": "}" },
- "average(val...)": { "index": 10, "kind": "function", "displayName": "Average Number", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the average number from all the values (integral numbers only).", "ognl": false, "suffix": "}" },
- "base64Decode(exp)": { "index": 11, "kind": "function", "displayName": "Base64 Decode", "group": "function", "label": "function", "required": false, "javaType": "byte[]", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Base64 decodes the message body (or expression)", "ognl": false, "suffix": "}" },
- "base64Encode(exp)": { "index": 12, "kind": "function", "displayName": "Base64 Encode", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Base64 encodes the message body (or expression)", "ognl": false, "suffix": "}" },
- "bean(name.method)": { "index": 13, "kind": "function", "displayName": "Call Java Bean", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Calls a Java bean. The name of the bean can also refer to a class name using type prefix as follows `bean:type:com.foo.MyClass`. If no method name is given then Camel will automatic attempt to find the b [...]
- "body": { "index": 14, "kind": "function", "displayName": "Body", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message body", "ognl": true, "suffix": "}" },
- "bodyAs(type)": { "index": 15, "kind": "function", "displayName": "Body As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body to the given type (classname).", "ognl": true, "suffix": "}" },
- "bodyOneLine": { "index": 16, "kind": "function", "displayName": "Body One Line", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the body to a String and removes all line-breaks, so the string is in one line.", "ognl": false, "suffix": "}" },
- "bodyType": { "index": 17, "kind": "function", "displayName": "Body Type", "group": "function", "label": "function", "required": false, "javaType": "Class", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message body class type", "ognl": false, "suffix": "}" },
- "camelContext": { "index": 18, "kind": "function", "displayName": "Camel Context", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Camel Context", "ognl": true, "suffix": "}" },
- "camelId": { "index": 19, "kind": "function", "displayName": "Camel Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the CamelContext", "ognl": false, "suffix": "}" },
- "capitalize(exp)": { "index": 20, "kind": "function", "displayName": "Capitalize String Values", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Capitalizes the message body\/expression as a String value (upper case every words)", "ognl": false, "suffix": "}" },
- "ceil(exp)": { "index": 21, "kind": "function", "displayName": "Ceil Number", "group": "function", "label": "function", "required": false, "javaType": "Integer", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body (or expression) to a floating number and return the ceil value (rounded up to nearest integer).", "ognl": false, "suffix": "}" },
- "collate(num)": { "index": 22, "kind": "function", "displayName": "Group Message Body into Sub Lists", "group": "function", "label": "function", "required": false, "javaType": "java.util.Iterator", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The collate function iterates the message body and groups the data into sub lists of specified size. This can be used with the Splitter EIP to split a message body and group\/ba [...]
- "concat(exp,exp,separator)": { "index": 23, "kind": "function", "displayName": "Concat", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Performs a string concat using two expressions (message body as default) with optional separator", "ognl": false, "suffix": "}" },
- "convertTo(exp,type)": { "index": 24, "kind": "function", "displayName": "Convert To", "group": "function", "label": "function", "required": false, "javaType": "", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body (or expression) to the specified type.", "ognl": true, "suffix": "}" },
- "date(command)": { "index": 25, "kind": "function", "displayName": "Parse Date", "group": "function", "label": "function", "required": false, "javaType": "java.util.Date", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Evaluates to a java.util.Date object. Supported commands are: `now` for current timestamp, `millis` for current timestamp in millis (unix epoch), `exchangeCreated` for the timestamp when the current exch [...]
- "date-with-timezone(command:timezone:pattern)": { "index": 26, "kind": "function", "displayName": "Date Formatter", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Formats the date to a String using the given date pattern, and with support for timezone. Supported commands are: `now` for current timestamp, `exchangeCreated` for the timesta [...]
- "distinct(val...)": { "index": 27, "kind": "function", "displayName": "Distinct Values", "group": "function", "label": "function", "required": false, "javaType": "Set", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a set of all the values with duplicates removed", "ognl": false, "suffix": "}" },
- "empty(type)": { "index": 28, "kind": "function", "displayName": "Create Empty Object", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": true, "deprecationNote": "", "autowired": false, "secret": false, "description": "Creates a new empty object (decided by type). Use `string` to create an empty String. Use `list` to create an empty `java.util.ArrayList`. Use `map` to create an empty `java.util.LinkedHashMap`. Use `set` [...]
- "env.name": { "index": 29, "kind": "function", "displayName": "OS Environment Variable", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The OS environment variable with the given name", "ognl": false, "suffix": "}" },
- "exchange": { "index": 30, "kind": "function", "displayName": "Exchange", "group": "function", "label": "function", "required": false, "javaType": "org.apache.camel.Exchange", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The current exchange", "ognl": true, "suffix": "}" },
- "exchangeId": { "index": 31, "kind": "function", "displayName": "Exchange Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exchange id", "ognl": false, "suffix": "}" },
- "exchangeProperty.name": { "index": 32, "kind": "function", "displayName": "Exchange Property", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exchange property with the given name", "ognl": true, "suffix": "}" },
- "exception": { "index": 33, "kind": "function", "displayName": "Exception", "group": "function", "label": "function", "required": false, "javaType": "java.lang.Exception", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception object on the exchange (also from caught exceptions), is null if no exception present.", "ognl": true, "suffix": "}" },
- "exception.message": { "index": 34, "kind": "function", "displayName": "Exception Message", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception message (also from caught exceptions), is null if no exception present.", "ognl": false, "suffix": "}" },
- "exception.stackTrace": { "index": 35, "kind": "function", "displayName": "Exception Stacktrace", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception stacktrace (also from caught exceptions), is null if no exception present.", "ognl": false, "suffix": "}" },
- "forEach(exp,fun)": { "index": 36, "kind": "function", "displayName": "For Each call Function", "group": "function", "label": "function", "required": false, "javaType": "List", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a List containing the values returned by the function when applied to each value from the input expression", "ognl": false, "suffix": "}" },
- "floor(exp)": { "index": 37, "kind": "function", "displayName": "Floor Number", "group": "function", "label": "function", "required": false, "javaType": "Integer", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body (or expression) to a floating number and return the floor value (rounded down to nearest integer).", "ognl": false, "suffix": "}" },
- "fromRouteId": { "index": 38, "kind": "function", "displayName": "From Route Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The original route id where this exchange was created.", "ognl": false, "suffix": "}" },
- "hash(exp,algorithm)": { "index": 39, "kind": "function", "displayName": "Compute Hash Value", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a hashed value (string in hex decimal) of the message body\/expression using JDK MessageDigest. The algorithm can be SHA-256 (default) or SHA3-256.", "ognl": false, "suffix": "}" },
- "header.name": { "index": 40, "kind": "function", "displayName": "Header", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message header with the given name", "ognl": true, "suffix": "}" },
- "headerAs(key,type)": { "index": 41, "kind": "function", "displayName": "Header As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message header to the given type (classname).", "ognl": false, "suffix": "}" },
- "headers": { "index": 42, "kind": "function", "displayName": "Headers", "group": "function", "label": "function", "required": false, "javaType": "java.util.Map", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns all the message headers in a Map", "ognl": false, "suffix": "}" },
- "hostName": { "index": 43, "kind": "function", "displayName": "Host Name", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the local hostname (may be empty if not possible to resolve).", "ognl": false, "suffix": "}" },
- "id": { "index": 44, "kind": "function", "displayName": "Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message id", "ognl": false, "suffix": "}" },
- "iif(predicate,trueExp,falseExp)": { "index": 45, "kind": "function", "displayName": "If Then Else", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Evaluates the predicate and returns the value of trueExp or falseExp. This function is similar to the ternary operator in Java.", "ognl": false, "suffix": "}" },
- "isAlpha(exp)": { "index": 46, "kind": "function", "displayName": "Is Alphabetic Value", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the message body (or expression) is alphabetic value (A..Z). For more advanced checks use the `regex` operator.", "ognl": false, "suffix": "}" },
- "isAlphaNumeric(exp)": { "index": 47, "kind": "function", "displayName": "Is Alphabetic-Numeric Value", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the message body (or expression) is alphanumeric value (A..Z0-9). For more advanced checks use the `regex` operator.", "ognl": false, "suffix": "}" },
- "isEmpty(exp)": { "index": 48, "kind": "function", "displayName": "Is Empty", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the message body (or expression) is null or empty (list\/map types are tested if they have 0 elements).", "ognl": false, "suffix": "}" },
- "isNumeric(exp)": { "index": 49, "kind": "function", "displayName": "Is Numeric Value", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the message body (or expression) is numeric value (0..9). For more advanced checks use the `regex` operator.", "ognl": false, "suffix": "}" },
- "jq(input,exp)": { "index": 50, "kind": "function", "displayName": "JQ", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with JSon data, then this allows using the JQ language, for example, to extract data from the message body (in JSon format). This requires having camel-jq JAR on the classpath. For input (optional), you can [...]
- "jsonpath(input,exp)": { "index": 51, "kind": "function", "displayName": "JSonPath", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with JSon data, then this allows using the JSonPath language, for example, to extract data from the message body (in JSon format). This requires having camel-jsonpath JAR on the classpath. For i [...]
- "join(separator,prefix,exp)": { "index": 52, "kind": "function", "displayName": "Join", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The join function iterates the message body\/expression and joins the data into a string. The separator is by default a comma. The prefix is optional. The join uses the message body as source by default. [...]
- "length(exp)": { "index": 53, "kind": "function", "displayName": "Length", "group": "function", "label": "function", "required": false, "javaType": "int", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The payload length (number of bytes) of the message body (or expression).", "ognl": false, "suffix": "}" },
- "list(val...)": { "index": 54, "kind": "function", "displayName": "Create List of values", "group": "function", "label": "function", "required": false, "javaType": "java.util.ArrayList", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list function creates an ArrayList with the given set of values.", "ognl": false, "suffix": "}" },
- "lowercase(exp)": { "index": 55, "kind": "function", "displayName": "Lowercase", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Lowercases the message body (or expression)", "ognl": false, "suffix": "}" },
- "mandatoryBodyAs(type)": { "index": 56, "kind": "function", "displayName": "Mandatory Body As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body to the given type (classname). If the body is null then the function will fail with an exception", "ognl": true, "suffix": "}" },
- "map(key1,value1,...)": { "index": 57, "kind": "function", "displayName": "Create Map of pairs", "group": "function", "label": "function", "required": false, "javaType": "java.util.LinkedHashMap", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The map function creates a LinkedHashMap with the given set of pairs.", "ognl": false, "suffix": "}" },
- "max(val...)": { "index": 58, "kind": "function", "displayName": "Maximum Number", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the maximum number from all the values (integral numbers only).", "ognl": false, "suffix": "}" },
- "messageAs(type)": { "index": 59, "kind": "function", "displayName": "Message As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message to the given type (classname).", "ognl": true, "suffix": "}" },
- "messageHistory(boolean)": { "index": 60, "kind": "function", "displayName": "Print Message History", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message history of the current exchange (how it has been routed). This is similar to the route stack-trace message history the error handler logs in case of an unhandled exception. The b [...]
- "messageTimestamp": { "index": 61, "kind": "function", "displayName": "Message Timestamp", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message timestamp (millis since epoc) that this message originates from. Some systems like JMS, Kafka, AWS have a timestamp on the event\/message that Camel received. This method returns the timestam [...]
- "min(val...)": { "index": 62, "kind": "function", "displayName": "Minimum Number", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the minimum number from all the values (integral numbers only).", "ognl": false, "suffix": "}" },
- "newEmpty(type)": { "index": 63, "kind": "function", "displayName": "Create Empty Object", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Creates a new empty object (decided by type). Use `string` to create an empty String. Use `list` to create an empty `java.util.ArrayList`. Use `map` to create an empty `java.util.LinkedHashMap`. Use `s [...]
- "normalizeWhitespace(exp)": { "index": 64, "kind": "function", "displayName": "Normalize Whitespace", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Normalizes the whitespace in the message body (or expression) by cleaning up excess whitespaces.", "ognl": false, "suffix": "}" },
- "not": { "index": 65, "kind": "function", "displayName": "Not", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Evaluates the predicate and returns the opposite.", "ognl": false, "suffix": "}" },
- "null": { "index": 66, "kind": "function", "displayName": "Null", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Represents a null value", "ognl": false, "suffix": "}" },
- "originalBody": { "index": 67, "kind": "function", "displayName": "Original Body", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The original incoming body (only available if allowUseOriginalMessage=true).", "ognl": false, "suffix": "}" },
- "pad(exp,width,separator)": { "index": 68, "kind": "function", "displayName": "Pad String", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Pads the expression with extra padding if necessary, according the the total width. The separator is by default a space. If the width is negative then padding to the right, otherwise to the left.", "o [...]
- "pretty(exp)": { "index": 69, "kind": "function", "displayName": "Pretty Print", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the expression to a String, and attempts to pretty print if JSon or XML, otherwise the expression is returned as the String value.", "ognl": false, "suffix": "}" },
- "prettyBody": { "index": 70, "kind": "function", "displayName": "Pretty Body", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the body to a String, and attempts to pretty print if JSon or XML; otherwise the body is returned as the String value.", "ognl": false, "suffix": "}" },
- "properties:key:default": { "index": 71, "kind": "function", "displayName": "Property Placeholder", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Lookup a property placeholder with the given key. If the key does not exist nor has a value, then an optional default value can be specified.", "ognl": false, "suffix": "}" },
- "propertiesExist:key": { "index": 72, "kind": "function", "displayName": "Property Placeholder Exists", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Checks whether a property placeholder with the given key exists or not. The result can be negated by prefixing the key with !", "ognl": false, "suffix": "}" },
- "random(min,max)": { "index": 73, "kind": "function", "displayName": "Random", "group": "function", "label": "function", "required": false, "javaType": "int", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a random number between min and max (exclusive)", "ognl": false, "suffix": "}" },
- "ref:name": { "index": 74, "kind": "function", "displayName": "Bean By Id", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "To look up a bean from the Registry with the given name.", "ognl": false, "suffix": "}" },
- "replace(from,to,exp)": { "index": 75, "kind": "function", "displayName": "Replace String Values", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Replace all the string values in the message body\/expression. To make it easier to replace single and double quotes, then you can use XML escaped values `\\"` as double quote, `\\'` [...]
- "reverse(val...)": { "index": 76, "kind": "function", "displayName": "Reverse Values", "group": "function", "label": "function", "required": false, "javaType": "List", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a list of all the values, but in reverse order", "ognl": false, "suffix": "}" },
- "routeGroup": { "index": 77, "kind": "function", "displayName": "Route Group", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The route group of the current route the Exchange is being routed. Not all routes have a group assigned, so this may be null.", "ognl": false, "suffix": "}" },
- "routeId": { "index": 78, "kind": "function", "displayName": "Route Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The route id of the current route the Exchange is being routed", "ognl": false, "suffix": "}" },
- "setHeader(name,type,exp)": { "index": 79, "kind": "function", "displayName": "Set Header", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets a message header with the given expression (optional converting to the given type)", "ognl": false, "suffix": "}" },
- "setVariable(name,type,exp)": { "index": 80, "kind": "function", "displayName": "Set Variable", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets a variable with the given expression (optional converting to the given type)", "ognl": false, "suffix": "}" },
- "shuffle(val...)": { "index": 81, "kind": "function", "displayName": "Shuffle Values", "group": "function", "label": "function", "required": false, "javaType": "List", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a list of all the values shuffled in random order", "ognl": false, "suffix": "}" },
- "size(exp)": { "index": 82, "kind": "function", "displayName": "Size", "group": "function", "label": "function", "required": false, "javaType": "int", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the number of elements in collection or array based payloads. If the value is null then 0 is returned, otherwise 1.", "ognl": false, "suffix": "}" },
- "skip(num)": { "index": 83, "kind": "function", "displayName": "Skip First Items from the Message Body", "group": "function", "label": "function", "required": false, "javaType": "java.util.Iterator", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The skip function iterates the message body and skips the first number of items. This can be used with the Splitter EIP to split a message body and skip the first N number of [...]
- "split(exp,separator)": { "index": 84, "kind": "function", "displayName": "Split String Values", "group": "function", "label": "function", "required": false, "javaType": "String[]", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Splits the message body\/expression as a String value using the separator into a String array", "ognl": false, "suffix": "}" },
- "stepId": { "index": 85, "kind": "function", "displayName": "Step Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the id of the current step the Exchange is being routed.", "ognl": false, "suffix": "}" },
- "substring(head,tail)": { "index": 86, "kind": "function", "displayName": "Substring", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a substring of the message body\/expression. If only one positive number, then the returned string is clipped from the beginning. If only one negative number, then the returned string is clipped fr [...]
- "substringAfter(exp,before)": { "index": 87, "kind": "function", "displayName": "Substring After", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a substring of the message body\/expression that comes after. Returns null if nothing comes after.", "ognl": false, "suffix": "}" },
- "substringBefore(exp,before)": { "index": 88, "kind": "function", "displayName": "Substring Before", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a substring of the message body\/expression that comes before. Returns null if nothing comes before.", "ognl": false, "suffix": "}" },
- "substringBetween(exp,after,before)": { "index": 89, "kind": "function", "displayName": "Substring Between", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a substring of the message body\/expression that are between after and before. Returns null if nothing comes between.", "ognl": false, "suffix": "}" },
- "sum(val...)": { "index": 90, "kind": "function", "displayName": "Calculate Sum Number", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sums together all the values as integral numbers. This function can also be used to subtract by using negative numbers.", "ognl": false, "suffix": "}" },
- "sys.name": { "index": 91, "kind": "function", "displayName": "JVM System Property", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The JVM system property with the given name", "ognl": false, "suffix": "}" },
- "threadId": { "index": 92, "kind": "function", "displayName": "Thread Id", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the id of the current thread. Can be used for logging.", "ognl": false, "suffix": "}" },
- "threadName": { "index": 93, "kind": "function", "displayName": "Thread Name", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the name of the current thread. Can be used for logging.", "ognl": false, "suffix": "}" },
- "throwException(type,msg)": { "index": 94, "kind": "function", "displayName": "Throw Exception", "group": "function", "label": "function", "required": false, "javaType": "java.lang.Exception", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Deliberately throws an error. Uses IllegalArgumentException by default if no type is specified (use fully qualified classname).", "ognl": false, "suffix": "}" },
- "trim(exp)": { "index": 95, "kind": "function", "displayName": "Trim", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The trim function trims the message body (or expression) by removing all leading and trailing white spaces.", "ognl": false, "suffix": "}" },
- "type:name.field": { "index": 96, "kind": "function", "displayName": "Java Field Value", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "To refer to a type or field by its classname. To refer to a field, you can append .FIELD_NAME. For example, you can refer to the constant field from Exchange as: `org.apache.camel.Exchange.FILE_NAME`", " [...]
- "kindOfType(exp)": { "index": 97, "kind": "function", "displayName": "Kind of Type", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "What kind of type is the value (null,number,string,boolean,array,object)", "ognl": false, "suffix": "}" },
- "uppercase(exp)": { "index": 98, "kind": "function", "displayName": "Uppercase", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Uppercases the message body (or expression)", "ognl": false, "suffix": "}" },
- "uuid(type)": { "index": 99, "kind": "function", "displayName": "Generate UUID", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a UUID using the Camel `UuidGenerator`. You can choose between `default`, `classic`, `short` and `simple` as the type. If no type is given, the default is used. It is also possible to use a custom `UuidG [...]
- "variable.name": { "index": 100, "kind": "function", "displayName": "Variable", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The variable with the given name", "ognl": true, "suffix": "}" },
- "variableAs(key,type)": { "index": 101, "kind": "function", "displayName": "Variable As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the variable to the given type (classname).", "ognl": false, "suffix": "}" },
- "variables": { "index": 102, "kind": "function", "displayName": "Variables", "group": "function", "label": "function", "required": false, "javaType": "java.util.Map", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns all the variables from the current Exchange in a Map", "ognl": false, "suffix": "}" },
- "xpath(input,exp)": { "index": 103, "kind": "function", "displayName": "XPath", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with XML data, then this allows using the XPath language, for example, to extract data from the message body (in XML format). This requires having camel-xpath JAR on the classpath. For input (optiona [...]
+ "attachmentsKeys": { "index": 9, "kind": "function", "displayName": "Attachments Keys", "group": "function", "label": "function", "required": false, "javaType": "java.util.Set", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "All the attachment keys (filenames)", "ognl": false, "suffix": "}" },
+ "attachmentsSize": { "index": 10, "kind": "function", "displayName": "Attachments Size", "group": "function", "label": "function", "required": false, "javaType": "int", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of attachments. Is 0 if there are no attachments.", "ognl": false, "suffix": "}" },
+ "average(val...)": { "index": 11, "kind": "function", "displayName": "Average Number", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the average number from all the values (integral numbers only).", "ognl": false, "suffix": "}" },
+ "base64Decode(exp)": { "index": 12, "kind": "function", "displayName": "Base64 Decode", "group": "function", "label": "function", "required": false, "javaType": "byte[]", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Base64 decodes the message body (or expression)", "ognl": false, "suffix": "}" },
+ "base64Encode(exp)": { "index": 13, "kind": "function", "displayName": "Base64 Encode", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Base64 encodes the message body (or expression)", "ognl": false, "suffix": "}" },
+ "bean(name.method)": { "index": 14, "kind": "function", "displayName": "Call Java Bean", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Calls a Java bean. The name of the bean can also refer to a class name using type prefix as follows `bean:type:com.foo.MyClass`. If no method name is given then Camel will automatic attempt to find the b [...]
+ "body": { "index": 15, "kind": "function", "displayName": "Body", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message body", "ognl": true, "suffix": "}" },
+ "bodyAs(type)": { "index": 16, "kind": "function", "displayName": "Body As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body to the given type (classname).", "ognl": true, "suffix": "}" },
+ "bodyOneLine": { "index": 17, "kind": "function", "displayName": "Body One Line", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the body to a String and removes all line-breaks, so the string is in one line.", "ognl": false, "suffix": "}" },
+ "bodyType": { "index": 18, "kind": "function", "displayName": "Body Type", "group": "function", "label": "function", "required": false, "javaType": "Class", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message body class type", "ognl": false, "suffix": "}" },
+ "camelContext": { "index": 19, "kind": "function", "displayName": "Camel Context", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Camel Context", "ognl": true, "suffix": "}" },
+ "camelId": { "index": 20, "kind": "function", "displayName": "Camel Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the CamelContext", "ognl": false, "suffix": "}" },
+ "capitalize(exp)": { "index": 21, "kind": "function", "displayName": "Capitalize String Values", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Capitalizes the message body\/expression as a String value (upper case every words)", "ognl": false, "suffix": "}" },
+ "ceil(exp)": { "index": 22, "kind": "function", "displayName": "Ceil Number", "group": "function", "label": "function", "required": false, "javaType": "Integer", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body (or expression) to a floating number and return the ceil value (rounded up to nearest integer).", "ognl": false, "suffix": "}" },
+ "clearAttachments": { "index": 23, "kind": "function", "displayName": "Clear Attachments", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Removes all existing attachments on the message.", "ognl": false, "suffix": "}" },
+ "collate(num)": { "index": 24, "kind": "function", "displayName": "Group Message Body into Sub Lists", "group": "function", "label": "function", "required": false, "javaType": "java.util.Iterator", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The collate function iterates the message body and groups the data into sub lists of specified size. This can be used with the Splitter EIP to split a message body and group\/ba [...]
+ "concat(exp,exp,separator)": { "index": 25, "kind": "function", "displayName": "Concat", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Performs a string concat using two expressions (message body as default) with optional separator", "ognl": false, "suffix": "}" },
+ "convertTo(exp,type)": { "index": 26, "kind": "function", "displayName": "Convert To", "group": "function", "label": "function", "required": false, "javaType": "", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body (or expression) to the specified type.", "ognl": true, "suffix": "}" },
+ "date(command)": { "index": 27, "kind": "function", "displayName": "Parse Date", "group": "function", "label": "function", "required": false, "javaType": "java.util.Date", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Evaluates to a java.util.Date object. Supported commands are: `now` for current timestamp, `millis` for current timestamp in millis (unix epoch), `exchangeCreated` for the timestamp when the current exch [...]
+ "date-with-timezone(command:timezone:pattern)": { "index": 28, "kind": "function", "displayName": "Date Formatter", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Formats the date to a String using the given date pattern, and with support for timezone. Supported commands are: `now` for current timestamp, `exchangeCreated` for the timesta [...]
+ "distinct(val...)": { "index": 29, "kind": "function", "displayName": "Distinct Values", "group": "function", "label": "function", "required": false, "javaType": "Set", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a set of all the values with duplicates removed", "ognl": false, "suffix": "}" },
+ "empty(type)": { "index": 30, "kind": "function", "displayName": "Create Empty Object", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": true, "deprecationNote": "", "autowired": false, "secret": false, "description": "Creates a new empty object (decided by type). Use `string` to create an empty String. Use `list` to create an empty `java.util.ArrayList`. Use `map` to create an empty `java.util.LinkedHashMap`. Use `set` [...]
+ "env.name": { "index": 31, "kind": "function", "displayName": "OS Environment Variable", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The OS environment variable with the given name", "ognl": false, "suffix": "}" },
+ "exchange": { "index": 32, "kind": "function", "displayName": "Exchange", "group": "function", "label": "function", "required": false, "javaType": "org.apache.camel.Exchange", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The current exchange", "ognl": true, "suffix": "}" },
+ "exchangeId": { "index": 33, "kind": "function", "displayName": "Exchange Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exchange id", "ognl": false, "suffix": "}" },
+ "exchangeProperty.name": { "index": 34, "kind": "function", "displayName": "Exchange Property", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exchange property with the given name", "ognl": true, "suffix": "}" },
+ "exception": { "index": 35, "kind": "function", "displayName": "Exception", "group": "function", "label": "function", "required": false, "javaType": "java.lang.Exception", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception object on the exchange (also from caught exceptions), is null if no exception present.", "ognl": true, "suffix": "}" },
+ "exception.message": { "index": 36, "kind": "function", "displayName": "Exception Message", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception message (also from caught exceptions), is null if no exception present.", "ognl": false, "suffix": "}" },
+ "exception.stackTrace": { "index": 37, "kind": "function", "displayName": "Exception Stacktrace", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception stacktrace (also from caught exceptions), is null if no exception present.", "ognl": false, "suffix": "}" },
+ "forEach(exp,fun)": { "index": 38, "kind": "function", "displayName": "For Each call Function", "group": "function", "label": "function", "required": false, "javaType": "List", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a List containing the values returned by the function when applied to each value from the input expression", "ognl": false, "suffix": "}" },
+ "floor(exp)": { "index": 39, "kind": "function", "displayName": "Floor Number", "group": "function", "label": "function", "required": false, "javaType": "Integer", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body (or expression) to a floating number and return the floor value (rounded down to nearest integer).", "ognl": false, "suffix": "}" },
+ "fromRouteId": { "index": 40, "kind": "function", "displayName": "From Route Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The original route id where this exchange was created.", "ognl": false, "suffix": "}" },
+ "hash(exp,algorithm)": { "index": 41, "kind": "function", "displayName": "Compute Hash Value", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a hashed value (string in hex decimal) of the message body\/expression using JDK MessageDigest. The algorithm can be SHA-256 (default) or SHA3-256.", "ognl": false, "suffix": "}" },
+ "header.name": { "index": 42, "kind": "function", "displayName": "Header", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message header with the given name", "ognl": true, "suffix": "}" },
+ "headerAs(key,type)": { "index": 43, "kind": "function", "displayName": "Header As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message header to the given type (classname).", "ognl": false, "suffix": "}" },
+ "headers": { "index": 44, "kind": "function", "displayName": "Headers", "group": "function", "label": "function", "required": false, "javaType": "java.util.Map", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns all the message headers in a Map", "ognl": false, "suffix": "}" },
+ "hostName": { "index": 45, "kind": "function", "displayName": "Host Name", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the local hostname (may be empty if not possible to resolve).", "ognl": false, "suffix": "}" },
+ "id": { "index": 46, "kind": "function", "displayName": "Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message id", "ognl": false, "suffix": "}" },
+ "iif(predicate,trueExp,falseExp)": { "index": 47, "kind": "function", "displayName": "If Then Else", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Evaluates the predicate and returns the value of trueExp or falseExp. This function is similar to the ternary operator in Java.", "ognl": false, "suffix": "}" },
+ "isAlpha(exp)": { "index": 48, "kind": "function", "displayName": "Is Alphabetic Value", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the message body (or expression) is alphabetic value (A..Z). For more advanced checks use the `regex` operator.", "ognl": false, "suffix": "}" },
+ "isAlphaNumeric(exp)": { "index": 49, "kind": "function", "displayName": "Is Alphabetic-Numeric Value", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the message body (or expression) is alphanumeric value (A..Z0-9). For more advanced checks use the `regex` operator.", "ognl": false, "suffix": "}" },
+ "isEmpty(exp)": { "index": 50, "kind": "function", "displayName": "Is Empty", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the message body (or expression) is null or empty (list\/map types are tested if they have 0 elements).", "ognl": false, "suffix": "}" },
+ "isNumeric(exp)": { "index": 51, "kind": "function", "displayName": "Is Numeric Value", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the message body (or expression) is numeric value (0..9). For more advanced checks use the `regex` operator.", "ognl": false, "suffix": "}" },
+ "jq(input,exp)": { "index": 52, "kind": "function", "displayName": "JQ", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with JSon data, then this allows using the JQ language, for example, to extract data from the message body (in JSon format). This requires having camel-jq JAR on the classpath. For input (optional), you can [...]
+ "jsonpath(input,exp)": { "index": 53, "kind": "function", "displayName": "JSonPath", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with JSon data, then this allows using the JSonPath language, for example, to extract data from the message body (in JSon format). This requires having camel-jsonpath JAR on the classpath. For i [...]
+ "join(separator,prefix,exp)": { "index": 54, "kind": "function", "displayName": "Join", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The join function iterates the message body\/expression and joins the data into a string. The separator is by default a comma. The prefix is optional. The join uses the message body as source by default. [...]
+ "length(exp)": { "index": 55, "kind": "function", "displayName": "Length", "group": "function", "label": "function", "required": false, "javaType": "int", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The payload length (number of bytes) of the message body (or expression).", "ognl": false, "suffix": "}" },
+ "list(val...)": { "index": 56, "kind": "function", "displayName": "Create List of values", "group": "function", "label": "function", "required": false, "javaType": "java.util.ArrayList", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list function creates an ArrayList with the given set of values.", "ognl": false, "suffix": "}" },
+ "lowercase(exp)": { "index": 57, "kind": "function", "displayName": "Lowercase", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Lowercases the message body (or expression)", "ognl": false, "suffix": "}" },
+ "mandatoryBodyAs(type)": { "index": 58, "kind": "function", "displayName": "Mandatory Body As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body to the given type (classname). If the body is null then the function will fail with an exception", "ognl": true, "suffix": "}" },
+ "map(key1,value1,...)": { "index": 59, "kind": "function", "displayName": "Create Map of pairs", "group": "function", "label": "function", "required": false, "javaType": "java.util.LinkedHashMap", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The map function creates a LinkedHashMap with the given set of pairs.", "ognl": false, "suffix": "}" },
+ "max(val...)": { "index": 60, "kind": "function", "displayName": "Maximum Number", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the maximum number from all the values (integral numbers only).", "ognl": false, "suffix": "}" },
+ "messageAs(type)": { "index": 61, "kind": "function", "displayName": "Message As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message to the given type (classname).", "ognl": true, "suffix": "}" },
+ "messageHistory(boolean)": { "index": 62, "kind": "function", "displayName": "Print Message History", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message history of the current exchange (how it has been routed). This is similar to the route stack-trace message history the error handler logs in case of an unhandled exception. The b [...]
+ "messageTimestamp": { "index": 63, "kind": "function", "displayName": "Message Timestamp", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message timestamp (millis since epoc) that this message originates from. Some systems like JMS, Kafka, AWS have a timestamp on the event\/message that Camel received. This method returns the timestam [...]
+ "min(val...)": { "index": 64, "kind": "function", "displayName": "Minimum Number", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the minimum number from all the values (integral numbers only).", "ognl": false, "suffix": "}" },
+ "newEmpty(type)": { "index": 65, "kind": "function", "displayName": "Create Empty Object", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Creates a new empty object (decided by type). Use `string` to create an empty String. Use `list` to create an empty `java.util.ArrayList`. Use `map` to create an empty `java.util.LinkedHashMap`. Use `s [...]
+ "normalizeWhitespace(exp)": { "index": 66, "kind": "function", "displayName": "Normalize Whitespace", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Normalizes the whitespace in the message body (or expression) by cleaning up excess whitespaces.", "ognl": false, "suffix": "}" },
+ "not": { "index": 67, "kind": "function", "displayName": "Not", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Evaluates the predicate and returns the opposite.", "ognl": false, "suffix": "}" },
+ "null": { "index": 68, "kind": "function", "displayName": "Null", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Represents a null value", "ognl": false, "suffix": "}" },
+ "originalBody": { "index": 69, "kind": "function", "displayName": "Original Body", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The original incoming body (only available if allowUseOriginalMessage=true).", "ognl": false, "suffix": "}" },
+ "pad(exp,width,separator)": { "index": 70, "kind": "function", "displayName": "Pad String", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Pads the expression with extra padding if necessary, according the the total width. The separator is by default a space. If the width is negative then padding to the right, otherwise to the left.", "o [...]
+ "pretty(exp)": { "index": 71, "kind": "function", "displayName": "Pretty Print", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the expression to a String, and attempts to pretty print if JSon or XML, otherwise the expression is returned as the String value.", "ognl": false, "suffix": "}" },
+ "prettyBody": { "index": 72, "kind": "function", "displayName": "Pretty Body", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the body to a String, and attempts to pretty print if JSon or XML; otherwise the body is returned as the String value.", "ognl": false, "suffix": "}" },
+ "properties:key:default": { "index": 73, "kind": "function", "displayName": "Property Placeholder", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Lookup a property placeholder with the given key. If the key does not exist nor has a value, then an optional default value can be specified.", "ognl": false, "suffix": "}" },
+ "propertiesExist:key": { "index": 74, "kind": "function", "displayName": "Property Placeholder Exists", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Checks whether a property placeholder with the given key exists or not. The result can be negated by prefixing the key with !", "ognl": false, "suffix": "}" },
+ "random(min,max)": { "index": 75, "kind": "function", "displayName": "Random", "group": "function", "label": "function", "required": false, "javaType": "int", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a random number between min and max (exclusive)", "ognl": false, "suffix": "}" },
+ "ref:name": { "index": 76, "kind": "function", "displayName": "Bean By Id", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "To look up a bean from the Registry with the given name.", "ognl": false, "suffix": "}" },
+ "replace(from,to,exp)": { "index": 77, "kind": "function", "displayName": "Replace String Values", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Replace all the string values in the message body\/expression. To make it easier to replace single and double quotes, then you can use XML escaped values `\\"` as double quote, `\\'` [...]
+ "reverse(val...)": { "index": 78, "kind": "function", "displayName": "Reverse Values", "group": "function", "label": "function", "required": false, "javaType": "List", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a list of all the values, but in reverse order", "ognl": false, "suffix": "}" },
+ "routeGroup": { "index": 79, "kind": "function", "displayName": "Route Group", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The route group of the current route the Exchange is being routed. Not all routes have a group assigned, so this may be null.", "ognl": false, "suffix": "}" },
+ "routeId": { "index": 80, "kind": "function", "displayName": "Route Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The route id of the current route the Exchange is being routed", "ognl": false, "suffix": "}" },
+ "setVariable(key,exp)": { "index": 81, "kind": "function", "displayName": "Set Variable", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets an attachment with payload from the message body\/expression.", "ognl": false, "suffix": "}" },
+ "setHeader(name,type,exp)": { "index": 82, "kind": "function", "displayName": "Set Header", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets a message header with the given expression (optional converting to the given type)", "ognl": false, "suffix": "}" },
+ "setVariable(name,type,exp)": { "index": 83, "kind": "function", "displayName": "Set Variable", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets a variable with the given expression (optional converting to the given type)", "ognl": false, "suffix": "}" },
+ "shuffle(val...)": { "index": 84, "kind": "function", "displayName": "Shuffle Values", "group": "function", "label": "function", "required": false, "javaType": "List", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a list of all the values shuffled in random order", "ognl": false, "suffix": "}" },
+ "size(exp)": { "index": 85, "kind": "function", "displayName": "Size", "group": "function", "label": "function", "required": false, "javaType": "int", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the number of elements in collection or array based payloads. If the value is null then 0 is returned, otherwise 1.", "ognl": false, "suffix": "}" },
+ "skip(num)": { "index": 86, "kind": "function", "displayName": "Skip First Items from the Message Body", "group": "function", "label": "function", "required": false, "javaType": "java.util.Iterator", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The skip function iterates the message body and skips the first number of items. This can be used with the Splitter EIP to split a message body and skip the first N number of [...]
+ "split(exp,separator)": { "index": 87, "kind": "function", "displayName": "Split String Values", "group": "function", "label": "function", "required": false, "javaType": "String[]", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Splits the message body\/expression as a String value using the separator into a String array", "ognl": false, "suffix": "}" },
+ "stepId": { "index": 88, "kind": "function", "displayName": "Step Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the id of the current step the Exchange is being routed.", "ognl": false, "suffix": "}" },
+ "substring(head,tail)": { "index": 89, "kind": "function", "displayName": "Substring", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a substring of the message body\/expression. If only one positive number, then the returned string is clipped from the beginning. If only one negative number, then the returned string is clipped fr [...]
+ "substringAfter(exp,before)": { "index": 90, "kind": "function", "displayName": "Substring After", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a substring of the message body\/expression that comes after. Returns null if nothing comes after.", "ognl": false, "suffix": "}" },
+ "substringBefore(exp,before)": { "index": 91, "kind": "function", "displayName": "Substring Before", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a substring of the message body\/expression that comes before. Returns null if nothing comes before.", "ognl": false, "suffix": "}" },
+ "substringBetween(exp,after,before)": { "index": 92, "kind": "function", "displayName": "Substring Between", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a substring of the message body\/expression that are between after and before. Returns null if nothing comes between.", "ognl": false, "suffix": "}" },
+ "sum(val...)": { "index": 93, "kind": "function", "displayName": "Calculate Sum Number", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sums together all the values as integral numbers. This function can also be used to subtract by using negative numbers.", "ognl": false, "suffix": "}" },
+ "sys.name": { "index": 94, "kind": "function", "displayName": "JVM System Property", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The JVM system property with the given name", "ognl": false, "suffix": "}" },
+ "threadId": { "index": 95, "kind": "function", "displayName": "Thread Id", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the id of the current thread. Can be used for logging.", "ognl": false, "suffix": "}" },
+ "threadName": { "index": 96, "kind": "function", "displayName": "Thread Name", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the name of the current thread. Can be used for logging.", "ognl": false, "suffix": "}" },
+ "throwException(type,msg)": { "index": 97, "kind": "function", "displayName": "Throw Exception", "group": "function", "label": "function", "required": false, "javaType": "java.lang.Exception", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Deliberately throws an error. Uses IllegalArgumentException by default if no type is specified (use fully qualified classname).", "ognl": false, "suffix": "}" },
+ "trim(exp)": { "index": 98, "kind": "function", "displayName": "Trim", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The trim function trims the message body (or expression) by removing all leading and trailing white spaces.", "ognl": false, "suffix": "}" },
+ "type:name.field": { "index": 99, "kind": "function", "displayName": "Java Field Value", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "To refer to a type or field by its classname. To refer to a field, you can append .FIELD_NAME. For example, you can refer to the constant field from Exchange as: `org.apache.camel.Exchange.FILE_NAME`", " [...]
+ "kindOfType(exp)": { "index": 100, "kind": "function", "displayName": "Kind of Type", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "What kind of type is the value (null,number,string,boolean,array,object)", "ognl": false, "suffix": "}" },
+ "uppercase(exp)": { "index": 101, "kind": "function", "displayName": "Uppercase", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Uppercases the message body (or expression)", "ognl": false, "suffix": "}" },
+ "uuid(type)": { "index": 102, "kind": "function", "displayName": "Generate UUID", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns a UUID using the Camel `UuidGenerator`. You can choose between `default`, `classic`, `short` and `simple` as the type. If no type is given, the default is used. It is also possible to use a custom `Uuid [...]
+ "variable.name": { "index": 103, "kind": "function", "displayName": "Variable", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The variable with the given name", "ognl": true, "suffix": "}" },
+ "variableAs(key,type)": { "index": 104, "kind": "function", "displayName": "Variable As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the variable to the given type (classname).", "ognl": false, "suffix": "}" },
+ "variables": { "index": 105, "kind": "function", "displayName": "Variables", "group": "function", "label": "function", "required": false, "javaType": "java.util.Map", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns all the variables from the current Exchange in a Map", "ognl": false, "suffix": "}" },
+ "xpath(input,exp)": { "index": 106, "kind": "function", "displayName": "XPath", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with XML data, then this allows using the XPath language, for example, to extract data from the message body (in XML format). This requires having camel-xpath JAR on the classpath. For input (optiona [...]
}
}
diff --git a/core/camel-core-languages/src/main/docs/modules/languages/pages/simple-language.adoc b/core/camel-core-languages/src/main/docs/modules/languages/pages/simple-language.adoc
index 6f1912d6c81d..ba44eb8dee2a 100644
--- a/core/camel-core-languages/src/main/docs/modules/languages/pages/simple-language.adoc
+++ b/core/camel-core-languages/src/main/docs/modules/languages/pages/simple-language.adoc
@@ -647,9 +647,12 @@ This requires having `camel-attachments` JAR on the classpath.
|`attachmentContentAsText(key)` | `String` | The content of the attachment as text (ie `String`).
|`attachmentHeader(key,name)` | `Object` | The attachment header with the given name.
|`attachmentHeaderAs(key,name,type)` | `<T>` | The attachment header with the given name, converted to the given type.
+|`attachmentsKeys` | `Set` | All the attachment keys (filenames).
|`attachment[key]` | `DataHandler` | The `jakarta.activation.DataHandler` for the given attachment.
|`attachments.size` | `int` | The number of attachments. Is 0 if there are no attachments.
|`attachments` | `Map` | All the attachments as a `Map<String,jakarta.activation.DataHandler>`.
+|`setAttachment(key,exp)` | `null` | Sets an attachment with payload from the message body/expression.
+|`clearAttachments` | `null` | Removes all existing attachments on the message.
|====
The attachment functions are only used with components that supports `javax.attachments` APIs
@@ -661,10 +664,32 @@ Suppose you are using `camel-platform-http` to expose a HTTP endpoint that suppo
then you can use `${attachments.size}` to know how many files are attached. The other functions are used
to access attachment content, headers and metadata.
-For example if a XML file was uploaded as `mydata.xml`, then you can access metadata such as
+The key is either the filename such as `${attachmentContent(mydata.xml)}` or by index (0 based) `${attachmentContent(0)}`.
+
+To know the names of the files you can use `$\{attachmentsKeys}` which returns a `Set` will all the keys.
+
+If the attached file is text based, you can access the payload via `${attachmentContentAsText(mydata.xml)}` or by index `${attachmentContentAsText(0)}`
+which returns the payload as a `String` value.
+
+For example if an XML file was uploaded as `mydata.xml`, then you can access metadata such as
`${attachment[0].name` returns `mydata.xml`, and `${attachment[0].contentType` return `text/xml`, and
-`${attachment[2].content}` returns the XML payload. You can also use by filename `${attachmentContent(mydata.xml)}`
-or by index `${attachmentContent(0)}`.
+`${attachment[0].content}` returns the XML payload.
+
+If the content is binary or other formats, you can use Camels xref:manual::type-converter.adoc[Type Converter] to
+convert the payload into the given Object of choice, for example as a byte array: `${attachmentContentAs(mydata.xml,byte[])}`
+
+The `setAttachment` function is used for adding,updating or removing attachments. If the expression is `null` then
+any existing attachment is removed, such as `${setAttachment(mydata.xml,null)}`.
+
+You can add an attachment such as `${setAttachment(mydata2.xml)}`, which then will use the current message body
+as the payload. You can also use an expression such as from a variable `${setAttachment(mydata2.xml,${variable.mydata})}`.
+
+TIP: Camel will automatically detect the content-type of the attachment.
+
+The payload of the attachment can also refer to resources from the file system, or classpath by prefixing with `resource:` as follows
+`${setAttachment(mydata2.xml,resource:file:/inbox/mydata2.xml)}`
+
+To make the file name dynamic you can store the name in a variable such as: `${setAttachment(mydata2.xml,resource:file:${variable.attchmentName})}`
=== Base64 Functions
diff --git a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleConstants.java b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleConstants.java
index 5a84831eff72..3c55aa7dd0bb 100644
--- a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleConstants.java
+++ b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleConstants.java
@@ -53,6 +53,10 @@ public final class SimpleConstants {
label = "function")
public static final String ATTACHMENTS_HEADER_AS = "attachmentsHeaderAs(key,name,type)";
+ @Metadata(description = "All the attachment keys (filenames)", javaType = "java.util.Set",
+ label = "function")
+ public static final String ATTACHMENTS_KEYS = "attachmentsKeys";
+
@Metadata(description = "The number of attachments. Is 0 if there are no attachments.", javaType = "int",
label = "function")
public static final String ATTACHMENTS_SIZE = "attachmentsSize";
@@ -100,6 +104,10 @@ public final class SimpleConstants {
label = "function", javaType = "Integer", displayName = "Ceil Number")
public static final String CEIL = "ceil(exp)";
+ @Metadata(description = "Removes all existing attachments on the message.",
+ label = "function", javaType = "Object")
+ public static final String CLEAR_ATTACHMENTS = "clearAttachments";
+
@Metadata(description = "The collate function iterates the message body and groups the data into sub lists of specified size. This can be used with the Splitter EIP to split a message body and group/batch the split sub message into a group of N sub lists.",
label = "function", javaType = "java.util.Iterator", displayName = "Group Message Body into Sub Lists")
public static final String COLLATE = "collate(num)";
@@ -321,6 +329,10 @@ public final class SimpleConstants {
label = "function")
public static final String ROUTE_ID = "routeId";
+ @Metadata(description = "Sets an attachment with payload from the message body/expression.",
+ label = "function", javaType = "Object")
+ public static final String SET_ATTACHMENT = "setVariable(key,exp)";
+
@Metadata(description = "Sets a message header with the given expression (optional converting to the given type)",
label = "function", javaType = "Object")
public static final String SET_HEADER = "setHeader(name,type,exp)";
diff --git a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java
index 3088d1dff064..29e0b2d88ab2 100644
--- a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java
+++ b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java
@@ -346,7 +346,9 @@ public class SimpleFunctionExpression extends LiteralExpression {
}
// attachments
- if ("attachments".equals(function) || ifStartsWithReturnRemainder("attachment", function) != null) {
+ if ("attachments".equals(function) || "clearAttachments".equals(function)
+ || ifStartsWithReturnRemainder("setAttachment", function) != null
+ || ifStartsWithReturnRemainder("attachment", function) != null) {
Expression exp = createSimpleAttachments(camelContext, function);
if (exp != null) {
return exp;
@@ -1793,7 +1795,9 @@ public class SimpleFunctionExpression extends LiteralExpression {
}
// attachments
- if ("attachments".equals(function) || ifStartsWithReturnRemainder("attachment", function) != null) {
+ if ("attachments".equals(function) || "clearAttachments".equals(function)
+ || ifStartsWithReturnRemainder("setAttachment", function) != null
+ || ifStartsWithReturnRemainder("attachment", function) != null) {
String code = createCodeAttachments(camelContext, function);
if (code != null) {
return code;
diff --git a/core/camel-util/src/main/java/org/apache/camel/util/MimeTypeHelper.java b/core/camel-util/src/main/java/org/apache/camel/util/MimeTypeHelper.java
index a663e4b85ba1..65e8b4f2e68e 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/MimeTypeHelper.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/MimeTypeHelper.java
@@ -679,6 +679,7 @@ public class MimeTypeHelper {
case "prc" -> "application/x-mobipocket-ebook";
case "pre" -> "application/vnd.lotus-freelance";
case "prf" -> "application/pics-rules";
+ case "properties" -> "text/plain";
case "ps" -> "application/postscript";
case "psb" -> "application/vnd.3gpp.pic-bw-small";
case "psd" -> "image/vnd.adobe.photoshop";
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateMimeTypeHelper.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateMimeTypeHelper.java
index edc5a0e8c993..f1b7541c0748 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateMimeTypeHelper.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateMimeTypeHelper.java
@@ -69,9 +69,10 @@ public class UpdateMimeTypeHelper extends AbstractGeneratorMojo {
}
Map<String, String> types = new TreeMap<>();
- // extra for yaml
+ // extra mime types
types.put("yaml", "text/yaml");
types.put("yml", "text/yaml");
+ types.put("properties", "text/plain");
try (Stream<String> s = Files.lines(mimeFile.toPath())) {
for (String line : s.toList()) {