...
Expression | Description |
---|---|
file:name | refers to the file name |
file:name.noext | refers to the file name with no extension |
file:parent | refers to the file parent |
file:path | refers to the file path |
file:absolute | refers to the absolute file |
file:canonical.path | refers to the canonical path |
data:command:pattern | for date formatting using the |
bean:bean expression | invoking a bean expression using the Bean language. |
simple:simple expression | to invoke the simple expression, however simple: can be omitted as this language extends the simple language |
...
Code Block |
---|
expression="../backup/${date:now:yyyyMMdd}/type-${in.header.type}/backup-of-${file:name.noext}.bak"
|
If you have a custom Date you want to use in the expression then Camel supports retrieving dates from the message header.
Code Block |
---|
expression="orders/order-${in.header.customerId}-${date:in.header.orderDate:yyyyMMdd}.xml"
|
And finally we can also use a bean expression to invoke a POJO class that generates some String output (or convertible to String) to be used:
...