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.path to access the absolute file path name
- file:canonical.path to access the canonical path name
- file:length to access the file length as a Long type
- date:<command>:<pattern> for date formatting using the
SimpleDateFormat
patterns.
Additional Supported commands are: file for the last modified timestamp of the file.
All the commands from SimpleLanguage
is also avaiable.
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 © 2010 IONA Open Source Community. All Rights Reserved.