|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.language.simple.SimpleLanguage
public class SimpleLanguage
A simple language which maps simple property style notations to access headers and bodies. Examples of supported expressions are:
SimpleDateFormat
patterns.
Supported commands are: now for current timestamp,
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.
BeanLanguage
PropertiesComponent
.
The locations parameter is optional and you can enter multiple locations separated with comma.
SimpleDateFormat
patterns.
Additional Supported commands are: file for the last modified timestamp of the file.
All the commands from SimpleLanguage
is also available.
Field Summary | |
---|---|
protected boolean |
allowEscape
|
protected Class<?> |
resultType
|
Constructor Summary | |
---|---|
SimpleLanguage()
Default constructor. |
Method Summary | |
---|---|
static void |
changeFunctionEndToken(String... endToken)
Change the end tokens used for functions. |
static void |
changeFunctionStartToken(String... startToken)
Change the start tokens used for functions. |
Expression |
createExpression(String expression)
Creates an expression based on the given string input |
Predicate |
createPredicate(String expression)
Creates a predicate based on the given string input |
Class<?> |
getResultType()
|
boolean |
isAllowEscape()
|
boolean |
isSingleton()
Whether this class supports being singleton or not. |
void |
setAllowEscape(boolean allowEscape)
|
void |
setFunctionEndToken(String endToken)
Change the end token used for functions. |
void |
setFunctionStartToken(String startToken)
Change the start token used for functions. |
void |
setResultType(Class<?> resultType)
|
static Expression |
simple(String expression)
|
static Expression |
simple(String expression,
Class<?> resultType)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Class<?> resultType
protected boolean allowEscape
Constructor Detail |
---|
public SimpleLanguage()
Method Detail |
---|
public Class<?> getResultType()
public void setResultType(Class<?> resultType)
public boolean isAllowEscape()
public void setAllowEscape(boolean allowEscape)
public boolean isSingleton()
IsSingleton
isSingleton
in interface IsSingleton
public Predicate createPredicate(String expression)
Language
createPredicate
in interface Language
expression
- the expression
public Expression createExpression(String expression)
Language
createExpression
in interface Language
expression
- the expression as a string input
public static Expression simple(String expression)
public static Expression simple(String expression, Class<?> resultType)
public static void changeFunctionStartToken(String... startToken)
startToken
- new start token(s) to be used for functionspublic static void changeFunctionEndToken(String... endToken)
endToken
- new end token(s) to be used for functionspublic void setFunctionStartToken(String startToken)
startToken
- new start token to be used for functionspublic void setFunctionEndToken(String endToken)
endToken
- new end token to be used for functions
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |