Package org.apache.camel.language.simple
Class SimpleConstants
java.lang.Object
org.apache.camel.language.simple.SimpleConstants
@Metadata(label="function",
annotations={"prefix=${","suffix=}"})
public final class SimpleConstants
extends Object
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
BODY
@Metadata(description="The message body", javaType="Object", label="function,ognl") public static final String BODY- See Also:
-
PRETTY_BODY
@Metadata(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.", javaType="String", label="function") public static final String PRETTY_BODY- See Also:
-
BODY_ONE_LINE
@Metadata(description="Converts the body to a String and removes all line-breaks, so the string is in one line.", javaType="String", label="function") public static final String BODY_ONE_LINE- See Also:
-
ORIGINAL_BODY
@Metadata(description="The original incoming body (only available if allowUseOriginalMessage=true).", javaType="Object", label="function") public static final String ORIGINAL_BODY- See Also:
-
ID
@Metadata(description="The message id", javaType="String", label="function") public static final String ID- See Also:
-
MESSAGE_TIMESTAMP
@Metadata(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 timestamp if a timestamp exists. The message timestamp and exchange created are different. An exchange always has a created timestamp which is the local timestamp when Camel created the exchange. The message timestamp is only available in some Camel components when the consumer is able to extract the timestamp from the source event. If the message has no timestamp, then 0 is returned.", javaType="long", label="function") public static final String MESSAGE_TIMESTAMP- See Also:
-
EXCHANGE_ID
@Metadata(description="The exchange id", javaType="String", label="function") public static final String EXCHANGE_ID- See Also:
-
EXCHANGE
@Metadata(description="The current exchange", javaType="org.apache.camel.Exchange", label="function,ognl") public static final String EXCHANGE- See Also:
-
EXCEPTION
@Metadata(description="The exception object on the exchange (also from caught exceptions), is null if no exception present.", javaType="java.lang.Exception", label="function,ognl") public static final String EXCEPTION- See Also:
-
EXCEPTION_MESSAGE
@Metadata(description="The exception message (also from caught exceptions), is null if no exception present.", javaType="String", label="function", displayName="Exception Message") public static final String EXCEPTION_MESSAGE- See Also:
-
EXCEPTION_STACKTRACE
@Metadata(description="The exception stacktrace (also from caught exceptions), is null if no exception present.", javaType="String", label="function", displayName="Exception Stacktrace") public static final String EXCEPTION_STACKTRACE- See Also:
-
THREAD_ID
@Metadata(description="Returns the id of the current thread. Can be used for logging.", javaType="long", label="function") public static final String THREAD_ID- See Also:
-
THREAD_NAME
@Metadata(description="Returns the name of the current thread. Can be used for logging.", javaType="String", label="function") public static final String THREAD_NAME- See Also:
-
HOST_NAME
@Metadata(description="Returns the local hostname (may be empty if not possible to resolve).", javaType="String", label="function") public static final String HOST_NAME- See Also:
-
CAMEL_ID
@Metadata(description="The name of the CamelContext", javaType="String", label="function") public static final String CAMEL_ID- See Also:
-
ROUTE_ID
@Metadata(description="The route id of the current route the Exchange is being routed", javaType="String", label="function") public static final String ROUTE_ID- See Also:
-
FROM_ROUTE_ID
@Metadata(description="The original route id where this exchange was created.", javaType="String", label="function") public static final String FROM_ROUTE_ID- See Also:
-
ROUTE_GROUP
@Metadata(description="Returns the route group of the current route the Exchange is being routed. Not all routes have a group assigned, so this may be null.", javaType="String", label="function") public static final String ROUTE_GROUP- See Also:
-
STEP_ID
@Metadata(description="Returns the id of the current step the Exchange is being routed.", javaType="String", label="function") public static final String STEP_ID- See Also:
-
NULL
@Metadata(description="Represents a null value", label="function", javaType="Object") public static final String NULL- See Also:
-
MESSAGE_AS
@Metadata(description="Converts the message to the given type (classname).", label="function,ognl", javaType="Object") public static final String MESSAGE_AS- See Also:
-
BODY_AS
@Metadata(description="Converts the message body to the given type (classname).", label="function,ognl", javaType="Object") public static final String BODY_AS- See Also:
-
MANDATORY_BODY_AS
@Metadata(description="Converts the message body to the given type (classname). If the body is null then the function will fail with an exception", label="function,ognl", javaType="Object") public static final String MANDATORY_BODY_AS- See Also:
-
HEADER_AS
@Metadata(description="Converts the message header to the given type (classname).", label="function", javaType="Object") public static final String HEADER_AS- See Also:
-
HEADERS
@Metadata(description="Returns all the message headers in a Map", label="function", javaType="java.util.Map") public static final String HEADERS- See Also:
-
HEADER
@Metadata(description="The message header with the given name", label="function,ognl", javaType="Object") public static final String HEADER- See Also:
-
VARIABLE_AS
@Metadata(description="Converts the variable to the given type (classname).", label="function", javaType="Object") public static final String VARIABLE_AS- See Also:
-
VARIABLES
@Metadata(description="Returns all the variables from the current Exchange in a Map", label="function", javaType="java.util.Map") public static final String VARIABLES- See Also:
-
VARIABLE
@Metadata(description="The variable with the given name", label="function,ognl", javaType="Object") public static final String VARIABLE- See Also:
-
EXCHANGE_PROPERTY
@Metadata(description="The exchange property with the given name", label="function,ognl", javaType="Object") public static final String EXCHANGE_PROPERTY- See Also:
-
CAMEL_CONTEXT
@Metadata(description="The Camel Context", label="function,ognl", javaType="Object") public static final String CAMEL_CONTEXT- See Also:
-
JQ
@Metadata(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 choose `header:key`, `exchangeProperty:key` or `variable:key` to use as input for the JSon payload instead of the message body.", label="function", javaType="Object", displayName="JQ") public static final String JQ- See Also:
-
JSONPATH
@Metadata(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 input (optional), you can choose `header:key`, `exchangeProperty:key` or `variable:key` to use as input for the JSon payload instead of the message body.", label="function", javaType="Object", displayName="JSonPath") public static final String JSONPATH- See Also:
-
XPATH
@Metadata(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 (optional), you can choose `header:key`, `exchangeProperty:key` or `variable:key` to use as input for the XML payload instead of the message body.", label="function", javaType="Object", displayName="XPath") public static final String XPATH- See Also:
-
SYS
@Metadata(description="The JVM system property with the given name", label="function", javaType="Object", displayName="JVM System Property") public static final String SYS- See Also:
-
ENV
@Metadata(description="The OS environment variable with the given name", label="function", javaType="Object", displayName="OS Environment Variable") public static final String ENV- See Also:
-
PRETTY
@Metadata(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.", label="function", javaType="String", displayName="Pretty Print") public static final String PRETTY- See Also:
-
DATE
@Metadata(description="Evaluates to a java.util.Date object. Supported commands are: `now` for current timestamp, `exchangeCreated` for the timestamp when the current exchange was created, `header.xxx` to use the Long/Date object in the header with the key xxx. `variable.xxx` to use the Long/Date in the variable with the key xxx. `exchangeProperty.xxx` to use the Long/Date object in the exchange property with the key xxx. `file` for the last modified timestamp of the file (available with a File consumer). Command accepts offsets such as: `now-24h` or `header.xxx+1h` or even `now+1h30m-100`.", label="function", javaType="java.util.Date", displayName="Parse Date") public static final String DATE- See Also:
-
DATE_WITH_TIMEZONE
@Metadata(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 timestamp when the current exchange was created, `header.xxx` to use the Long/Date object in the header with the key xxx. `variable.xxx` to use the Long/Date in the variable with the key xxx. `exchangeProperty.xxx` to use the Long/Date object in the exchange property with the key xxx. `file` for the last modified timestamp of the file (available with a File consumer). Command accepts offsets such as: `now-24h` or `header.xxx+1h` or even `now+1h30m-100`.", label="function", javaType="String", displayName="Date Formatter") public static final String DATE_WITH_TIMEZONE- See Also:
-
BEAN
@Metadata(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 best method to use.", label="function", javaType="Object", displayName="Call Java Bean") public static final String BEAN- See Also:
-
PROPERTIES_EXIST
@Metadata(description="Checks whether a property placeholder with the given key exists or not. The result can be negated by prefixing the key with !", label="function", javaType="boolean", displayName="Property Placeholder Exists") public static final String PROPERTIES_EXIST- See Also:
-
PROPERTIES
@Metadata(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.", label="function", javaType="String", displayName="Property Placeholder") public static final String PROPERTIES- See Also:
-
REF
@Metadata(description="To look up a bean from the Registry with the given name.", label="function", javaType="Object", displayName="Bean By Id") public static final String REF- See Also:
-
TYPE
@Metadata(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`", label="function", javaType="Object", displayName="Java Field Value") public static final String TYPE- See Also:
-
REPLACE
@Metadata(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, `\\'` as single quote, and `\\∅` as empty value.", label="function", javaType="String", displayName="Replace String Values") public static final String REPLACE- See Also:
-
SUBSTRING
@Metadata(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 from the beginning. Otherwise the returned string is clipped between the head and tail positions.", label="function", javaType="String") public static final String SUBSTRING- See Also:
-
RANDOM
@Metadata(description="Returns a random number between min (included) and max (excluded).", label="function", javaType="int", displayName="Generate Random Number") public static final String RANDOM- See Also:
-
SKIP
@Metadata(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 items.", label="function", javaType="java.util.Iterator", displayName="Skip First Items from the Message Body") public static final String SKIP- See Also:
-
COLLATE
@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- See Also:
-
JOIN
@Metadata(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. It is possible to refer to another source (simple language) such as a header via the exp parameter. For example `join(\'&\',\'id=\',\'$\\{header.ids}\')`.", label="function", javaType="String") public static final String JOIN- See Also:
-
MESSAGE_HISTORY
@Metadata(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 boolean can be used to turn off detailed information to be less verbose, and avoid printing sensitive data from the message.", label="function", javaType="String", displayName="Print Message History") public static final String MESSAGE_HISTORY- See Also:
-
UUID
@Metadata(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 `UuidGenerator` and bind the bean to the xref:manual::registry.adoc[Registry] with an id. For example `${uuid(myGenerator)}` where the ID is _myGenerator_.", label="function", javaType="String", displayName="Generate UUID") public static final String UUID- See Also:
-
HASH
@Metadata(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.", label="function", javaType="String", displayName="Compute Hash Value") public static final String HASH- See Also:
-
EMPTY
@Metadata(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`.", label="function", javaType="Object", displayName="Create Empty Object") public static final String EMPTY- See Also:
-
IIF
@Metadata(description="Evaluates the predicate and returns the value of trueExp or falseExp. This function is similar to the ternary operator in Java.", label="function", javaType="Object", displayName="If Then Else") public static final String IIF- See Also:
-
LIST
@Metadata(description="The list function creates an ArrayList with the given set of values.", label="function", javaType="java.util.ArrayList", displayName="Create List of values") public static final String LIST- See Also:
-
MAP
@Metadata(description="The map function creates a LinkedHashMap with the given set of pairs.", label="function", javaType="java.util.LinkedHashMap", displayName="Create Map of pairs") public static final String MAP- See Also:
-
ATTACHMENTS
@Metadata(description="All the attachments as a Map<String,DataHandler.", javaType="java.util.Map", label="function") public static final String ATTACHMENTS- See Also:
-
ATTACHMENTS_SIZE
@Metadata(description="The number of attachments. Is 0 if there are no attachments.", javaType="int", label="function") public static final String ATTACHMENTS_SIZE- See Also:
-
ATTACHMENTS_CONTENT_AS_TEXT
@Metadata(description="The content of the attachment as text (ie String).", javaType="String", label="function") public static final String ATTACHMENTS_CONTENT_AS_TEXT- See Also:
-
ATTACHMENTS_CONTENT
@Metadata(description="The content of the attachment", javaType="Object", label="function") public static final String ATTACHMENTS_CONTENT- See Also:
-
ATTACHMENTS_CONTENT_AS
@Metadata(description="The content of the attachment, converted to the given type.", javaType="Object", label="function") public static final String ATTACHMENTS_CONTENT_AS- See Also:
-
ATTACHMENTS_HEADER
@Metadata(description="The attachment header with the given name.", javaType="String", label="function") public static final String ATTACHMENTS_HEADER- See Also:
-
ATTACHMENTS_HEADER_AS
@Metadata(description="The attachment header with the given name, converted to the given type.", javaType="Object", label="function") public static final String ATTACHMENTS_HEADER_AS- See Also:
-
ATTACHMENT
@Metadata(description="The DataHandler for the given attachment.", javaType="jakarta.activation.DataHandler", label="function,ognl") public static final String ATTACHMENT- See Also:
-
-
Constructor Details
-
SimpleConstants
public SimpleConstants()
-