org.apache.camel.language.simple
Class FileLanguage

java.lang.Object
  extended by org.apache.camel.language.simple.SimpleLanguageSupport
      extended by org.apache.camel.language.simple.FileLanguage
All Implemented Interfaces:
IsSingleton, Language

public class FileLanguage
extends SimpleLanguageSupport

File language is an extension to Simple language to add file specific expressions. Examples of supported file expressions are:

The relative file is the filename with the starting directory clipped, as opposed to path that will return the full path including the starting directory.
The only file is the filename only with all paths clipped.
All the simple expression is also available so you can eg use ${in.header.foo} to access the foo header.

See Also:
SimpleLanguage, BeanLanguage

Field Summary
 
Fields inherited from class org.apache.camel.language.simple.SimpleLanguageSupport
log, PATTERN
 
Constructor Summary
FileLanguage()
           
 
Method Summary
protected  Expression createSimpleExpression(String expression)
          Creates the simple expression based on the extracted content from the ${ } place holders
static Expression file(String expression)
           
 boolean isSingleton()
          Wheter this class supports being singleton or not.
 
Methods inherited from class org.apache.camel.language.simple.SimpleLanguageSupport
createComplexConcatExpression, createConstantExpression, createConstantExpression, createExpression, createPredicate, ifStartsWithReturnRemainder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileLanguage

public FileLanguage()
Method Detail

file

public static Expression file(String expression)

createSimpleExpression

protected Expression createSimpleExpression(String expression)
Description copied from class: SimpleLanguageSupport
Creates the simple expression based on the extracted content from the ${ } place holders

Specified by:
createSimpleExpression in class SimpleLanguageSupport
Parameters:
expression - the content between ${ and }
Returns:
the expression

isSingleton

public boolean isSingleton()
Description copied from interface: IsSingleton
Wheter this class supports being singleton or not.

Returns:
true to be a single shared instance, false to create new instances.


Copyright © 2009 Apache Software Foundation. All Rights Reserved.