Simple syrup substitute agave

The Simple Expression Language was a really simple syrup substitute agave language when it was created, but has since grown more powerful. It is primarily intended for being a very small and simple language for evaluating Expression or Predicate without requiring any new dependencies or knowledge of other scripting languages such as Groovy. The simple language is designed with intend to cover almost all the common use cases when little need for scripting in your Camel routes.

At runtime the simple language will then us its built-in OGNL support which requires the camel-bean component. See also the CSimple language which is compiled. This can be used in situations to avoid clashes when using for example Spring property placeholder together with Camel. Whether to trim the value to remove leading and trailing whitespaces and line breaks. Exchange invoked using a Camel OGNL expression. This method returns the timestamp, if a timestamp exists. The message timestamp and exchange created are not the same.

An exchange always have a created timestamp which is the local timestamp when Camel created the exchange. Converts the body to the given type determined by its classname. The converted body can be null. Converts the body to the given type determined by its classname and then invoke methods using a Camel OGNL expression. Converts the body to a String and removes all line-breaks so the string is in one line.

Converts the body to the given type determined by its classname, and expects the body to be not null. Date object header with the key xxx. Date object in the exchange property with the key xxx. Invoking a bean expression using the Bean language. Specifying a method name you must use dot as separator. Camel will by default lookup a bean by the given name.

Lookup a property with the given key. If the key does not exists or has no value, then an optional default value can be specified. Checks whether a property placeholder with the given key exists or not. The result can be negated by prefixing the key with ! Returns the id of the current route the Exchange is being routed. Returns the id of the current step the Exchange is being routed.

Returns the name of the current thread. Can be used for logging purpose. To lookup a bean from the Registry with the given id. To refer to a type or field by its FQN name. To refer to a field you can append .

For example, you can refer to the constant field from Exchange as: org. The collate function iterates the message body and groups the data into sub lists of specified size. This method works similar to the collate method in Groovy. 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. The message history of the current exchange how it has been routed. This can be used if you do not want to log sensitive data from the message itself.

You can choose between default, classic, short and simple as the type. If no type is given the default is used. Camel’s OGNL support is for invoking methods only. Camel support accessing the length field of Java arrays.

The Simple and Bean languages now support a Camel OGNL notation for invoking beans in a chain like fashion. There is a special last keyword which can be used to get the last value from a list. There must be spaces around the operator. For matching if in a set of values, each element must be separated by comma. If you want to include an empty value, then it must be defined using double comma, eg ‘,,bronze,silver,gold’, which is a set of four values with an empty value and then the three medals.

CATEGORIES
TAGS
Share This