org.apache.camel.language.simple
Class SimpleLanguage

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

public class SimpleLanguage
extends SimpleLanguageSupport

A simple language which maps simple property style notations to access headers and bodies. Examples of supported expressions are:

The simple language now also includes file language out of the box which means the following expression is also supported:

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.

Version:
$Revision: 898656 $

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

Constructor Detail

SimpleLanguage

public SimpleLanguage()
Method Detail

simple

public static Expression simple(String expression)

createSimpleExpression

protected Expression createSimpleExpression(String expression,
                                            boolean strict)
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 }
strict - whether it is strict mode or not, if strict it will throw a ExpressionIllegalSyntaxException if the expression was not known. Set to false to support constant expressions
Returns:
the expression

createSimpleFileExpression

public Expression createSimpleFileExpression(String remainder)

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 © 2007-2010 The Apache Software Foundation. All Rights Reserved.