public class ExpressionBuilder extends Object
Constructor and Description |
---|
ExpressionBuilder() |
Modifier and Type | Method and Description |
---|---|
static org.apache.camel.Expression |
append(org.apache.camel.Expression left,
org.apache.camel.Expression right)
Appends the String evaluations of the two expressions together
|
static org.apache.camel.Expression |
beanExpression(Object bean,
String method) |
static org.apache.camel.Expression |
beanExpression(String expression) |
static org.apache.camel.Expression |
bodyExpression()
Returns the expression for the exchanges inbound message body
|
static org.apache.camel.Expression |
bodyExpression(BiFunction<Object,Map<String,Object>,Object> function)
Returns a functional expression for the exchanges inbound message body and headers
|
static <T> org.apache.camel.Expression |
bodyExpression(Class<T> type)
Returns the expression for the exchanges inbound message body converted
to the given type
|
static <T> org.apache.camel.Expression |
bodyExpression(Class<T> bodyType,
BiFunction<T,Map<String,Object>,Object> function)
Returns a functional expression for the exchanges inbound message body converted to a desired type and headers
|
static <T> org.apache.camel.Expression |
bodyExpression(Class<T> bodyType,
Function<T,Object> function)
Returns a functional expression for the exchanges inbound message body converted to a desired type
|
static org.apache.camel.Expression |
bodyExpression(org.apache.camel.Expression name)
Returns the expression for the exchanges inbound message body converted
to the given type
|
static org.apache.camel.Expression |
bodyExpression(Function<Object,Object> function)
Returns a functional expression for the exchanges inbound message body
|
static org.apache.camel.Expression |
bodyExpression(String name)
Returns the expression for the exchanges inbound message body converted
to the given type
|
static org.apache.camel.Expression |
bodyOneLine()
Returns the expression for the message body as a one-line string
|
static org.apache.camel.Expression |
bodyTypeExpression()
Returns the expression for the exchanges inbound message body type
|
static org.apache.camel.Expression |
camelContextExpression()
Returns an expression for the
CamelContext |
static org.apache.camel.Expression |
camelContextNameExpression()
Returns an expression for the
CamelContext name |
static org.apache.camel.Expression |
camelContextPropertiesExpression()
Returns an expression for the properties of the camel context
|
static org.apache.camel.Expression |
camelContextPropertyExpression(org.apache.camel.Expression propertyName)
Returns an expression for the property value of the camel context with the given name
|
static org.apache.camel.Expression |
camelContextPropertyExpression(String propertyName)
Returns an expression for the property value of the camel context with the given name
|
static org.apache.camel.Expression |
concatExpression(Collection<org.apache.camel.Expression> expressions)
Returns an expression which returns the string concatenation value of the various
expressions
|
static org.apache.camel.Expression |
concatExpression(Collection<org.apache.camel.Expression> expressions,
String description)
Returns an expression which returns the string concatenation value of the various
expressions
|
static org.apache.camel.Expression |
constantExpression(Object value)
Returns an expression for the constant value
|
static org.apache.camel.Expression |
convertToExpression(org.apache.camel.Expression expression,
Class<?> type)
Returns an expression which converts the given expression to the given type
|
static org.apache.camel.Expression |
convertToExpression(org.apache.camel.Expression expression,
org.apache.camel.Expression type)
Returns an expression which converts the given expression to the given type the type
expression is evaluated to
|
static org.apache.camel.Expression |
exchangeExceptionExpression()
Returns an expression for an exception set on the exchange
|
static org.apache.camel.Expression |
exchangeExceptionExpression(Class<Exception> type)
Returns an expression for an exception set on the exchange
Is used to get the caused exception that typically have been wrapped in some sort
of Camel wrapper exception
|
static org.apache.camel.Expression |
exchangeExceptionMessageExpression()
Returns an expression for an exception message set on the exchange
|
static org.apache.camel.Expression |
exchangeExceptionStackTraceExpression()
Returns an expression for an exception stacktrace set on the exchange
|
static org.apache.camel.Expression |
exchangeExpression()
Returns the expression for the exchange
|
static org.apache.camel.Expression |
exchangeExpression(Function<org.apache.camel.Exchange,Object> function)
Returns a functional expression for the exchange
|
static org.apache.camel.Expression |
exchangeIdExpression()
Returns an Expression for the exchange id
|
static org.apache.camel.Expression |
exchangePatternExpression()
Returns an expression for the exchange pattern
|
static org.apache.camel.Expression |
exchangePropertiesExpression()
Returns an expression for the exchange properties of exchange
|
static org.apache.camel.Expression |
exchangePropertyExpression(org.apache.camel.Expression propertyName)
Returns an expression for the property value of exchange with the given name
|
static org.apache.camel.Expression |
exchangePropertyExpression(String propertyName)
Returns an expression for the property value of exchange with the given name
|
static org.apache.camel.Expression |
groupIteratorExpression(org.apache.camel.Expression expression,
String token,
String group,
boolean skipFirst) |
static org.apache.camel.Expression |
groupXmlIteratorExpression(org.apache.camel.Expression expression,
String group) |
static org.apache.camel.Expression |
headerExpression(org.apache.camel.Expression headerName)
Returns an expression for the header value with the given name
Will fallback and look in properties if not found in headers.
|
static org.apache.camel.Expression |
headerExpression(org.apache.camel.Expression headerName,
org.apache.camel.Expression typeName)
Returns an expression for the header value with the given name converted to the given type
Will fallback and look in properties if not found in headers.
|
static org.apache.camel.Expression |
headerExpression(String headerName)
Returns an expression for the header value with the given name
Will fallback and look in properties if not found in headers.
|
static <T> org.apache.camel.Expression |
headerExpression(String headerName,
Class<T> type)
Returns an expression for the header value with the given name converted to the given type
Will fallback and look in properties if not found in headers.
|
static org.apache.camel.Expression |
headerExpression(String headerName,
String typeName)
Returns an expression for the header value with the given name converted to the given type
Will fallback and look in properties if not found in headers.
|
static org.apache.camel.Expression |
headersExpression()
Returns an expression for the inbound message headers
|
static org.apache.camel.Expression |
hostnameExpression()
Returns the expression for the local hostname
|
static org.apache.camel.Expression |
inMessageExpression()
Returns the expression for the IN message
|
static org.apache.camel.Expression |
inMessageExpression(Function<org.apache.camel.Message,Object> function)
Returns a functional expression for the IN message
|
static org.apache.camel.Expression |
languageExpression(String languageName,
org.apache.camel.spi.Language language,
String expression)
Returns an expression for evaluating the expression/predicate using the given language
|
static org.apache.camel.Expression |
languageExpression(String language,
String expression)
Returns an expression for evaluating the expression/predicate using the given language
|
static <T> org.apache.camel.Expression |
mandatoryBodyExpression(Class<T> type)
Returns the expression for the exchanges inbound message body converted
to the given type.
|
static <T> org.apache.camel.Expression |
mandatoryBodyExpression(Class<T> type,
boolean nullBodyAllowed)
Returns the expression for the exchanges inbound message body converted
to the given type
|
static org.apache.camel.Expression |
messageExpression()
Returns the expression for the IN message
|
static org.apache.camel.Expression |
messageExpression(Function<org.apache.camel.Message,Object> function)
Returns a functional expression for the IN message
|
static org.apache.camel.Expression |
messageIdExpression()
Returns an Expression for the inbound message id
|
static org.apache.camel.Expression |
prepend(org.apache.camel.Expression left,
org.apache.camel.Expression right)
Prepends the String evaluations of the two expressions together
|
static org.apache.camel.Expression |
propertiesComponentExpression(String key,
String defaultValue) |
static org.apache.camel.Expression |
refExpression(org.apache.camel.Expression ref)
Returns an expression for lookup a bean in the
Registry |
static org.apache.camel.Expression |
refExpression(String ref)
Returns an expression for lookup a bean in the
Registry |
static org.apache.camel.Expression |
regexReplaceAll(org.apache.camel.Expression expression,
String regex,
org.apache.camel.Expression replacementExpression)
Transforms the expression into a String then performs the regex
replaceAll to transform the String and return the result
|
static org.apache.camel.Expression |
regexReplaceAll(org.apache.camel.Expression expression,
String regex,
String replacement)
Transforms the expression into a String then performs the regex
replaceAll to transform the String and return the result
|
static org.apache.camel.Expression |
regexTokenizeExpression(org.apache.camel.Expression expression,
String regexTokenizer)
Returns a tokenize expression which will tokenize the string with the
given regex
|
static org.apache.camel.Expression |
registryExpression()
Returns an expression for the
Registry |
static org.apache.camel.Expression |
routeIdExpression()
Returns an Expression for the route id
|
static org.apache.camel.Expression |
simpleExpression(String expression) |
static org.apache.camel.Expression |
skipFirstExpression(org.apache.camel.Expression expression)
Returns an expression that skips the first element
|
static org.apache.camel.Expression |
sortExpression(org.apache.camel.Expression expression,
Comparator comparator)
Returns a sort expression which will sort the expression with the given comparator.
|
static org.apache.camel.Expression |
stepIdExpression()
Returns the expression for the current step id (if any)
|
static org.apache.camel.Expression |
systemEnvironmentExpression(org.apache.camel.Expression propertyName,
org.apache.camel.Expression defaultValue)
Returns an expression for a system environment value with the given name
|
static org.apache.camel.Expression |
systemEnvironmentExpression(String propertyName)
Returns an expression for a system environment value with the given name
|
static org.apache.camel.Expression |
systemEnvironmentExpression(String propertyName,
String defaultValue)
Returns an expression for a system environment value with the given name
|
static org.apache.camel.Expression |
systemPropertyExpression(org.apache.camel.Expression exprName,
org.apache.camel.Expression defaultValue)
Returns an expression for a system property value with the given name
|
static org.apache.camel.Expression |
systemPropertyExpression(String propertyName)
Returns an expression for a system property value with the given name
|
static org.apache.camel.Expression |
systemPropertyExpression(String propertyName,
String defaultValue)
Returns an expression for a system property value with the given name
|
static org.apache.camel.Expression |
threadNameExpression()
Returns the expression for the current thread name
|
static org.apache.camel.Expression |
tokenizeExpression(org.apache.camel.Expression expression,
org.apache.camel.Expression token)
Returns a tokenize expression which will tokenize the string with the
given token
|
static org.apache.camel.Expression |
tokenizeExpression(org.apache.camel.Expression expression,
String token)
Returns a tokenize expression which will tokenize the string with the
given token
|
static org.apache.camel.Expression |
tokenizePairExpression(String startToken,
String endToken,
boolean includeTokens)
Returns an
TokenPairExpressionIterator expression |
static org.apache.camel.Expression |
tokenizeXMLAwareExpression(String path,
char mode) |
static org.apache.camel.Expression |
tokenizeXMLAwareExpression(String path,
char mode,
int group) |
static org.apache.camel.Expression |
tokenizeXMLAwareExpression(String path,
char mode,
int group,
Namespaces namespaces) |
static org.apache.camel.Expression |
tokenizeXMLAwareExpression(String headerName,
String path,
char mode,
int group,
Namespaces namespaces) |
static org.apache.camel.Expression |
tokenizeXMLExpression(String tagName,
String inheritNamespaceTagName)
Returns an
TokenXMLExpressionIterator expression |
static org.apache.camel.Expression |
typeConverterExpression()
Returns an expression for the type converter
|
public static org.apache.camel.Expression headerExpression(String headerName)
headerName
- the name of the header the expression will returnpublic static org.apache.camel.Expression headerExpression(org.apache.camel.Expression headerName)
headerName
- the name of the header the expression will returnpublic static <T> org.apache.camel.Expression headerExpression(String headerName, Class<T> type)
headerName
- the name of the header the expression will returntype
- the type to convert topublic static org.apache.camel.Expression headerExpression(String headerName, String typeName)
headerName
- the name of the header the expression will returntypeName
- the type to convert to as a FQN class namepublic static org.apache.camel.Expression headerExpression(org.apache.camel.Expression headerName, org.apache.camel.Expression typeName)
headerName
- the name of the header the expression will returntypeName
- the type to convert to as a FQN class namepublic static org.apache.camel.Expression headersExpression()
public static org.apache.camel.Expression exchangePatternExpression()
Exchange.getPattern()
public static org.apache.camel.Expression exchangeExceptionExpression()
Exchange.getException()
public static org.apache.camel.Expression exchangeExceptionExpression(Class<Exception> type)
type
- the exception typeExchange.getException(Class)
public static org.apache.camel.Expression typeConverterExpression()
public static org.apache.camel.Expression registryExpression()
Registry
public static org.apache.camel.Expression refExpression(String ref)
Registry
public static org.apache.camel.Expression refExpression(org.apache.camel.Expression ref)
Registry
public static org.apache.camel.Expression camelContextExpression()
CamelContext
public static org.apache.camel.Expression camelContextNameExpression()
CamelContext
namepublic static org.apache.camel.Expression exchangeExceptionMessageExpression()
public static org.apache.camel.Expression exchangeExceptionStackTraceExpression()
public static org.apache.camel.Expression exchangePropertyExpression(String propertyName)
propertyName
- the name of the property the expression will returnpublic static org.apache.camel.Expression exchangePropertyExpression(org.apache.camel.Expression propertyName)
propertyName
- the name of the property the expression will returnpublic static org.apache.camel.Expression exchangePropertiesExpression()
public static org.apache.camel.Expression camelContextPropertiesExpression()
public static org.apache.camel.Expression camelContextPropertyExpression(String propertyName)
propertyName
- the name of the property the expression will returnpublic static org.apache.camel.Expression camelContextPropertyExpression(org.apache.camel.Expression propertyName)
propertyName
- the name of the property the expression will returnpublic static org.apache.camel.Expression systemPropertyExpression(String propertyName)
propertyName
- the name of the system property the expression will returnpublic static org.apache.camel.Expression systemPropertyExpression(String propertyName, String defaultValue)
propertyName
- the name of the system property the expression will returndefaultValue
- default value to return if no system property existspublic static org.apache.camel.Expression systemPropertyExpression(org.apache.camel.Expression exprName, org.apache.camel.Expression defaultValue)
exprName
- the name of the system property the expression will returndefaultValue
- default value to return if no system property existspublic static org.apache.camel.Expression systemEnvironmentExpression(String propertyName)
propertyName
- the name of the system environment the expression will returnpublic static org.apache.camel.Expression systemEnvironmentExpression(String propertyName, String defaultValue)
propertyName
- the name of the system environment the expression will returndefaultValue
- default value to return if no system environment existspublic static org.apache.camel.Expression systemEnvironmentExpression(org.apache.camel.Expression propertyName, org.apache.camel.Expression defaultValue)
propertyName
- the name of the system environment the expression will returndefaultValue
- default value to return if no system environment existspublic static org.apache.camel.Expression constantExpression(Object value)
value
- the value the expression will returnpublic static org.apache.camel.Expression languageExpression(String languageName, org.apache.camel.spi.Language language, String expression)
languageName
- the language namelanguage
- the languageexpression
- the expression or predicatepublic static org.apache.camel.Expression languageExpression(String language, String expression)
expression
- the expression or predicatepublic static org.apache.camel.Expression bodyExpression()
public static org.apache.camel.Expression bodyExpression(Function<Object,Object> function)
public static org.apache.camel.Expression bodyExpression(BiFunction<Object,Map<String,Object>,Object> function)
public static <T> org.apache.camel.Expression bodyExpression(Class<T> bodyType, Function<T,Object> function)
public static <T> org.apache.camel.Expression bodyExpression(Class<T> bodyType, BiFunction<T,Map<String,Object>,Object> function)
public static <T> org.apache.camel.Expression bodyExpression(Class<T> type)
public static org.apache.camel.Expression bodyExpression(String name)
public static org.apache.camel.Expression bodyExpression(org.apache.camel.Expression name)
public static org.apache.camel.Expression threadNameExpression()
public static org.apache.camel.Expression hostnameExpression()
public static org.apache.camel.Expression stepIdExpression()
public static <T> org.apache.camel.Expression mandatoryBodyExpression(Class<T> type)
public static <T> org.apache.camel.Expression mandatoryBodyExpression(Class<T> type, boolean nullBodyAllowed)
type
- the typenullBodyAllowed
- whether null bodies is allowed and if so a null is returned,
otherwise an exception is thrownpublic static org.apache.camel.Expression bodyTypeExpression()
public static org.apache.camel.Expression exchangeExpression()
public static org.apache.camel.Expression exchangeExpression(Function<org.apache.camel.Exchange,Object> function)
public static org.apache.camel.Expression messageExpression()
public static org.apache.camel.Expression messageExpression(Function<org.apache.camel.Message,Object> function)
public static org.apache.camel.Expression inMessageExpression()
public static org.apache.camel.Expression inMessageExpression(Function<org.apache.camel.Message,Object> function)
public static org.apache.camel.Expression convertToExpression(org.apache.camel.Expression expression, Class<?> type)
public static org.apache.camel.Expression convertToExpression(org.apache.camel.Expression expression, org.apache.camel.Expression type)
public static org.apache.camel.Expression tokenizeExpression(org.apache.camel.Expression expression, String token)
public static org.apache.camel.Expression tokenizeExpression(org.apache.camel.Expression expression, org.apache.camel.Expression token)
public static org.apache.camel.Expression skipFirstExpression(org.apache.camel.Expression expression)
public static org.apache.camel.Expression regexTokenizeExpression(org.apache.camel.Expression expression, String regexTokenizer)
public static org.apache.camel.Expression groupXmlIteratorExpression(org.apache.camel.Expression expression, String group)
public static org.apache.camel.Expression groupIteratorExpression(org.apache.camel.Expression expression, String token, String group, boolean skipFirst)
public static org.apache.camel.Expression sortExpression(org.apache.camel.Expression expression, Comparator comparator)
List
object to allow sorting.public static org.apache.camel.Expression regexReplaceAll(org.apache.camel.Expression expression, String regex, String replacement)
public static org.apache.camel.Expression regexReplaceAll(org.apache.camel.Expression expression, String regex, org.apache.camel.Expression replacementExpression)
public static org.apache.camel.Expression append(org.apache.camel.Expression left, org.apache.camel.Expression right)
public static org.apache.camel.Expression prepend(org.apache.camel.Expression left, org.apache.camel.Expression right)
public static org.apache.camel.Expression concatExpression(Collection<org.apache.camel.Expression> expressions)
expressions
- the expression to be concatenated dynamicallypublic static org.apache.camel.Expression concatExpression(Collection<org.apache.camel.Expression> expressions, String description)
expressions
- the expression to be concatenated dynamicallydescription
- the text description of the expressionpublic static org.apache.camel.Expression messageIdExpression()
public static org.apache.camel.Expression exchangeIdExpression()
public static org.apache.camel.Expression routeIdExpression()
public static org.apache.camel.Expression simpleExpression(String expression)
public static org.apache.camel.Expression beanExpression(String expression)
public static org.apache.camel.Expression propertiesComponentExpression(String key, String defaultValue)
public static org.apache.camel.Expression tokenizePairExpression(String startToken, String endToken, boolean includeTokens)
TokenPairExpressionIterator
expressionpublic static org.apache.camel.Expression tokenizeXMLExpression(String tagName, String inheritNamespaceTagName)
TokenXMLExpressionIterator
expressionpublic static org.apache.camel.Expression tokenizeXMLAwareExpression(String path, char mode)
public static org.apache.camel.Expression tokenizeXMLAwareExpression(String path, char mode, int group)
public static org.apache.camel.Expression tokenizeXMLAwareExpression(String path, char mode, int group, Namespaces namespaces)
public static org.apache.camel.Expression tokenizeXMLAwareExpression(String headerName, String path, char mode, int group, Namespaces namespaces)
public static org.apache.camel.Expression bodyOneLine()
Apache Camel