Package org.apache.camel.language.simple
Class SimpleExpressionBuilder
java.lang.Object
org.apache.camel.language.simple.SimpleExpressionBuilder
Expression builder used by the simple language.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classExpression adapter for OGNL expression from Message Header or Exchange property -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.camel.ExpressionbodyOgnlExpression(String ognl) Returns the expression for the exchanges inbound message body invoking methods defined in a simple OGNL notationstatic org.apache.camel.ExpressionbodyOgnlExpression(String name, String ognl) Returns the expression for the exchanges inbound message body converted to the given type and invoking methods on the converted body defined in a simple OGNL notationstatic org.apache.camel.ExpressioncacheExpression(org.apache.camel.Expression expression) Returns an expression that caches the evaluation of another expression and returns the cached value, to avoid re-evaluating the expression.static org.apache.camel.ExpressionReturns the expression for the exchanges camelContext invoking methods defined in a simple OGNL notationstatic org.apache.camel.ExpressioncollateExpression(String expression, int group) Returns an iterator to collate (iterate) the given expressionstatic org.apache.camel.ExpressiondateExpression(String command) static org.apache.camel.ExpressiondateExpression(String command, String pattern) static org.apache.camel.ExpressiondateExpression(String commandWithOffsets, String timezone, String pattern) static org.apache.camel.ExpressionReturns the expression for the exchange's exception invoking methods defined in a simple OGNL notationstatic org.apache.camel.ExpressionexchangeOgnlExpression(String ognl) Returns the expression for the exchange invoking methods defined in a simple OGNL notationstatic org.apache.camel.Expressionstatic org.apache.camel.Expressionstatic org.apache.camel.Expressionstatic org.apache.camel.Expressionstatic org.apache.camel.Expressionstatic org.apache.camel.Expressionstatic org.apache.camel.Expressionstatic org.apache.camel.Expressionstatic org.apache.camel.Expressionstatic org.apache.camel.Expressionstatic org.apache.camel.Expressionstatic org.apache.camel.Expressionstatic org.apache.camel.Expressionstatic org.apache.camel.Expressionstatic org.apache.camel.ExpressionhashExpression(String expression, String algorithm) Hashes the value using the given algorithmstatic org.apache.camel.ExpressionheadersOgnlExpression(String ognl) Returns the expression for the exchanges inbound message header invoking methods defined in a simple OGNL notationstatic org.apache.camel.ExpressioniifExpression(String predicate, String trueValue, String falseValue) A ternary condition expressionstatic org.apache.camel.ExpressionjoinExpression(String expression, String separator, String prefix) Joins together the values from the expressionstatic org.apache.camel.ExpressionlistExpression(String[] values) An expression that creates an ArrayListstatic org.apache.camel.ExpressionReturns the expression for the exchanges inbound message body converted to the given typestatic org.apache.camel.ExpressionmandatoryBodyOgnlExpression(String name, String ognl) Returns the expression for the exchanges inbound message body converted to the given type and invoking methods on the converted body defined in a simple OGNL notationstatic org.apache.camel.ExpressionmapExpression(String[] pairs) An expression that creates an LinkedHashMapstatic org.apache.camel.ExpressionmessageHistoryExpression(boolean detailed) Returns the message history (including exchange details or not)static org.apache.camel.ExpressionmessageOgnlExpression(String name, String ognl) Returns the expression for the message converted to the given type and invoking methods on the converted message defined in a simple OGNL notationstatic org.apache.camel.ExpressionnewEmptyExpression(String type) Returns a new empty object of the given typestatic org.apache.camel.ExpressionReturns the expression for thenullvaluestatic org.apache.camel.ExpressionpropertyOgnlExpression(String ognl) Returns an expression for the property value of exchange with the given name invoking methods defined in a simple OGNL notationstatic org.apache.camel.ExpressionrandomExpression(int max) Returns a random number between 0 and max (exclusive)static org.apache.camel.ExpressionrandomExpression(int min, int max) Returns a random number between min and max (exclusive)static org.apache.camel.ExpressionrandomExpression(String min, String max) Returns a random number between min and max (exclusive)static org.apache.camel.ExpressionreplaceExpression(String expression, String from, String to) Replaces string values from the expressionstatic org.apache.camel.ExpressionskipExpression(String expression, int number) Returns an iterator to skip (iterate) the given expressionstatic org.apache.camel.ExpressionskipIteratorExpression(org.apache.camel.Expression expression, int skip) static org.apache.camel.ExpressionsubstringExpression(String expression, String head, String tail) Substring string values from the expressionstatic org.apache.camel.ExpressiontypeExpression(String name) Returns an expression for a type valuestatic org.apache.camel.ExpressionuuidExpression(String generator) Returns an uuid string based on the given generator (default, classic, short, simple)static org.apache.camel.ExpressionReturns the expression for the variable invoking methods defined in a simple OGNL notation
-
Method Details
-
headersOgnlExpression
Returns the expression for the exchanges inbound message header invoking methods defined in a simple OGNL notation- Parameters:
ognl- methods to invoke on the header in a simple OGNL syntax
-
variablesOgnlExpression
Returns the expression for the variable invoking methods defined in a simple OGNL notation- Parameters:
ognl- methods to invoke on the variable in a simple OGNL syntax
-
messageHistoryExpression
public static org.apache.camel.Expression messageHistoryExpression(boolean detailed) Returns the message history (including exchange details or not) -
collateExpression
Returns an iterator to collate (iterate) the given expression -
skipExpression
Returns an iterator to skip (iterate) the given expression -
iifExpression
public static org.apache.camel.Expression iifExpression(String predicate, String trueValue, String falseValue) A ternary condition expression -
listExpression
An expression that creates an ArrayList -
mapExpression
An expression that creates an LinkedHashMap -
joinExpression
public static org.apache.camel.Expression joinExpression(String expression, String separator, String prefix) Joins together the values from the expression -
replaceExpression
public static org.apache.camel.Expression replaceExpression(String expression, String from, String to) Replaces string values from the expression -
substringExpression
public static org.apache.camel.Expression substringExpression(String expression, String head, String tail) Substring string values from the expression -
hashExpression
Hashes the value using the given algorithm -
randomExpression
Returns a random number between min and max (exclusive) -
randomExpression
public static org.apache.camel.Expression randomExpression(int max) Returns a random number between 0 and max (exclusive) -
randomExpression
public static org.apache.camel.Expression randomExpression(int min, int max) Returns a random number between min and max (exclusive) -
newEmptyExpression
Returns a new empty object of the given type -
uuidExpression
Returns an uuid string based on the given generator (default, classic, short, simple) -
fileNameExpression
public static org.apache.camel.Expression fileNameExpression() -
fileOnlyNameExpression
public static org.apache.camel.Expression fileOnlyNameExpression() -
fileNameNoExtensionExpression
public static org.apache.camel.Expression fileNameNoExtensionExpression() -
fileNameNoExtensionSingleExpression
public static org.apache.camel.Expression fileNameNoExtensionSingleExpression() -
fileOnlyNameNoExtensionExpression
public static org.apache.camel.Expression fileOnlyNameNoExtensionExpression() -
fileOnlyNameNoExtensionSingleExpression
public static org.apache.camel.Expression fileOnlyNameNoExtensionSingleExpression() -
fileExtensionExpression
public static org.apache.camel.Expression fileExtensionExpression() -
fileExtensionSingleExpression
public static org.apache.camel.Expression fileExtensionSingleExpression() -
fileParentExpression
public static org.apache.camel.Expression fileParentExpression() -
filePathExpression
public static org.apache.camel.Expression filePathExpression() -
fileAbsolutePathExpression
public static org.apache.camel.Expression fileAbsolutePathExpression() -
fileAbsoluteExpression
public static org.apache.camel.Expression fileAbsoluteExpression() -
fileSizeExpression
public static org.apache.camel.Expression fileSizeExpression() -
fileLastModifiedExpression
public static org.apache.camel.Expression fileLastModifiedExpression() -
dateExpression
-
dateExpression
-
dateExpression
-
skipIteratorExpression
public static org.apache.camel.Expression skipIteratorExpression(org.apache.camel.Expression expression, int skip) -
nullExpression
public static org.apache.camel.Expression nullExpression()Returns the expression for thenullvalue -
mandatoryBodyOgnlExpression
Returns the expression for the exchanges inbound message body converted to the given type and invoking methods on the converted body defined in a simple OGNL notation -
mandatoryBodyExpression
Returns the expression for the exchanges inbound message body converted to the given type -
messageOgnlExpression
Returns the expression for the message converted to the given type and invoking methods on the converted message defined in a simple OGNL notation -
bodyOgnlExpression
Returns the expression for the exchanges inbound message body converted to the given type and invoking methods on the converted body defined in a simple OGNL notation -
exchangeOgnlExpression
Returns the expression for the exchange invoking methods defined in a simple OGNL notation- Parameters:
ognl- methods to invoke on the exchange in a simple OGNL syntax
-
camelContextOgnlExpression
Returns the expression for the exchanges camelContext invoking methods defined in a simple OGNL notation- Parameters:
ognl- methods to invoke on the context in a simple OGNL syntax
-
bodyOgnlExpression
Returns the expression for the exchanges inbound message body invoking methods defined in a simple OGNL notation- Parameters:
ognl- methods to invoke on the body in a simple OGNL syntax
-
cacheExpression
public static org.apache.camel.Expression cacheExpression(org.apache.camel.Expression expression) Returns an expression that caches the evaluation of another expression and returns the cached value, to avoid re-evaluating the expression.- Parameters:
expression- the target expression to cache- Returns:
- the cached value
-
typeExpression
Returns an expression for a type value- Parameters:
name- the type name- Returns:
- an expression object which will return the type value
-
propertyOgnlExpression
Returns an expression for the property value of exchange with the given name invoking methods defined in a simple OGNL notation- Parameters:
ognl- methods to invoke on the property in a simple OGNL syntax
-
exchangeExceptionOgnlExpression
Returns the expression for the exchange's exception invoking methods defined in a simple OGNL notation- Parameters:
ognl- methods to invoke on the body in a simple OGNL syntax
-