org.apache.camel.language.simple
Class FileLanguage
java.lang.Object
org.apache.camel.language.simple.AbstractSimpleLanguage
org.apache.camel.language.simple.FileLanguage
- All Implemented Interfaces:
- Language
public class FileLanguage
- extends AbstractSimpleLanguage
File language is an extension to Simple language to add file specific expressions.
Examples of supported file expressions are:
- file:name to access the file name
- file:name.noext to access the file name with no extension
- file:parent to access the parent file name
- file:path to access the file path name
- file:absolute to access the absolute file name
- file:canonical.path to access the canonical path name
- date:<command>:<pattern> for date formatting using the
SimpleDateFormat
patterns.
Supported commands are: now for current timestamp, file for the last modified timestamp of the file.
in.header.xxx or header.xxx to use the Date object in the in header.
out.header.xxx to use the Date object in the out header.
- bean:<bean expression> to invoke a bean using the
BeanLanguage
- simple:<simple expression> to invoke the simple expression, however simple: can be obmitted as this language
extends the simple language
All the simple expression is also available so you can eg use ${in.header.foo} to access the foo header.
- See Also:
SimpleLanguage
,
BeanLanguage
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileLanguage
public FileLanguage()
file
public static Expression file(String expression)
createSimpleExpression
protected Expression<FileExchange> createSimpleExpression(String expression)
- Description copied from class:
AbstractSimpleLanguage
- Creates the simple expression based on the extracted content from the ${ } place holders
- Specified by:
createSimpleExpression
in class AbstractSimpleLanguage
- Parameters:
expression
- the content between ${ and }
- Returns:
- the expression
Copyright © 2008 IONA Open Source Community. All Rights Reserved.