public class ExpressionClause<T> extends Object implements org.apache.camel.Expression, org.apache.camel.Predicate
Constructor and Description |
---|
ExpressionClause(T result) |
Modifier and Type | Method and Description |
---|---|
T |
body()
An expression of an inbound message body
|
T |
body(BiFunction<Object,Map<String,Object>,Object> function)
A functional expression of an inbound message body and headers
|
T |
body(Class<?> expectedType)
An expression of an inbound message body converted to the expected type
|
<B> T |
body(Class<B> expectedType,
BiFunction<B,Map<String,Object>,Object> function)
A functional expression of an inbound message body converted to the
expected type and headers
|
<B> T |
body(Class<B> expectedType,
Function<B,Object> function)
A functional expression of an inbound message body converted to the
expected type
|
T |
body(Function<Object,Object> function)
A functional expression of an inbound message body
|
T |
body(Supplier<Object> supplier)
A functional expression of an inbound message body
|
T |
constant(Object value)
Specify the constant expression value.
|
<T> T |
evaluate(org.apache.camel.Exchange exchange,
Class<T> type) |
T |
exchange()
An expression of the exchange
|
T |
exchange(Function<org.apache.camel.Exchange,Object> function)
A functional expression of the exchange
|
T |
exchangeProperties()
An expression of the exchange properties
|
T |
exchangeProperty(String name)
An expression of an exchange property of the given name
|
T |
expression(org.apache.camel.Expression expression)
Specify an
Expression instance |
org.apache.camel.ExpressionFactory |
getExpressionType() |
org.apache.camel.Expression |
getExpressionValue() |
T |
groovy(String text)
Evaluates a Groovy
expression
|
T |
header(String name)
An expression of an inbound message header of the given name
|
T |
headers()
An expression of the inbound headers
|
T |
inMessage()
An expression of an inbound message
|
T |
inMessage(Function<org.apache.camel.Message,Object> function)
A functional expression of an inbound message
|
T |
jsonpath(String text)
Evaluates a Json Path
expression
|
T |
jsonpath(String text,
boolean suppressExceptions)
Evaluates a Json Path
expression
|
T |
jsonpath(String text,
boolean suppressExceptions,
Class<?> resultType)
Evaluates a Json Path
expression
|
T |
jsonpath(String text,
boolean suppressExceptions,
Class<?> resultType,
String headerName)
Evaluates a Json Path
expression
|
T |
jsonpath(String text,
Class<?> resultType)
Evaluates a Json Path
expression
|
T |
jsonpathWriteAsString(String text)
Evaluates a Json Path
expression with writeAsString enabled.
|
T |
jsonpathWriteAsString(String text,
boolean suppressExceptions)
Evaluates a Json Path
expression with writeAsString enabled.
|
T |
jsonpathWriteAsString(String text,
boolean suppressExceptions,
String headerName)
Evaluates a Json Path
expression with writeAsString enabled.
|
T |
language(String language,
String expression)
Evaluates a given language name with the expression text
|
boolean |
matches(org.apache.camel.Exchange exchange) |
T |
message()
An expression of an inbound message
|
T |
message(Function<org.apache.camel.Message,Object> function)
A functional expression of an inbound message
|
T |
method(Class<?> beanType)
Evaluates an expression using the
bean language
which basically means the bean is invoked to determine the expression
value.
|
T |
method(Class<?> beanType,
String method)
Evaluates an expression using the
bean language
which basically means the bean is invoked to determine the expression
value.
|
T |
method(Object instance)
Evaluates an expression using the
bean language
which basically means the bean is invoked to determine the expression
value.
|
T |
method(Object instance,
String method)
Evaluates an expression using the
bean language
which basically means the bean is invoked to determine the expression
value.
|
T |
method(String bean)
Evaluates an expression using the
bean language
which basically means the bean is invoked to determine the expression
value.
|
T |
method(String bean,
String method)
Evaluates an expression using the
bean language
which basically means the bean is invoked to determine the expression
value.
|
T |
mvel(String text)
Evaluates a MVEL
expression
|
T |
ognl(String text)
Evaluates an OGNL
expression
|
T |
ref(String ref)
Evaluates a Ref
expression
|
T |
simple(String text)
Evaluates a Simple
expression
|
T |
simple(String text,
Class<?> resultType)
Evaluates a Simple
expression
|
T |
spel(String text)
Evaluates a SpEL
expression
|
T |
tokenize(String token)
Evaluates a token expression on the message body
|
T |
tokenize(String token,
boolean regex)
Evaluates a token expression on the message body
|
T |
tokenize(String token,
boolean regex,
boolean skipFirst)
Evaluates a token expression on the message body
|
T |
tokenize(String token,
boolean regex,
int group)
Evaluates a token expression on the message body
|
T |
tokenize(String token,
boolean regex,
int group,
boolean skipFirst)
Evaluates a token expression on the message body
|
T |
tokenize(String token,
boolean regex,
int group,
String groupDelimiter,
boolean skipFirst)
Evaluates a token expression on the message body
|
T |
tokenize(String token,
boolean regex,
String group)
Evaluates a token expression on the message body
|
T |
tokenize(String token,
boolean regex,
String group,
boolean skipFirst)
Evaluates a token expression on the message body
|
T |
tokenize(String token,
int group)
Evaluates a token expression on the message body
|
T |
tokenize(String token,
int group,
boolean skipFirst)
Evaluates a token expression on the message body
|
T |
tokenize(String token,
String headerName)
Evaluates a token expression on the given header
|
T |
tokenize(String token,
String headerName,
boolean regex)
Evaluates a token expression on the given header
|
T |
tokenizePair(String startToken,
String endToken)
Evaluates a token pair expression on the message body.
|
T |
tokenizePair(String startToken,
String endToken,
boolean includeTokens)
Evaluates a token pair expression on the message body
|
T |
tokenizeXML(String tagName)
Evaluates a XML token expression on the message body with XML content
|
T |
tokenizeXML(String tagName,
int group)
Evaluates a XML token expression on the message body with XML content
|
T |
tokenizeXML(String tagName,
String inheritNamespaceTagName)
Evaluates a token pair expression on the message body with XML content
|
T |
tokenizeXML(String tagName,
String inheritNamespaceTagName,
int group)
Evaluates a token pair expression on the message body with XML content
|
T |
xpath(String text)
Evaluates an XPath
expression
|
T |
xpath(String text,
Class<?> resultType)
Evaluates an XPath
expression with the specified result type
|
T |
xpath(String text,
Class<?> resultType,
Map<String,String> namespaces)
Evaluates an XPath
expression with the specified result type and set of namespace
prefixes and URIs
|
T |
xpath(String text,
Class<?> resultType,
org.apache.camel.support.builder.Namespaces namespaces)
Evaluates an XPath
expression with the specified result type and set of namespace
prefixes and URIs
|
T |
xpath(String text,
Class<?> resultType,
org.apache.camel.support.builder.Namespaces namespaces,
String headerName)
Evaluates an XPath
expression with the specified result type and set of namespace
prefixes and URIs on the supplied header name's contents
|
T |
xpath(String text,
Class<?> resultType,
String headerName)
Evaluates an XPath
expression with the specified result type on the supplied header
name's contents
|
T |
xpath(String text,
Map<String,String> namespaces)
Evaluates an XPath
expression with the specified set of namespace prefixes and URIs
|
T |
xpath(String text,
org.apache.camel.support.builder.Namespaces namespaces)
Evaluates an XPath
expression with the specified set of namespace prefixes and URIs
|
T |
xpath(String text,
String headerName)
Evaluates an XPath
expression on the supplied header name's contents
|
T |
xquery(String text)
Evaluates an XQuery
expression
|
T |
xquery(String text,
Class<?> resultType)
Evaluates an XQuery
expression with the specified result type
|
T |
xquery(String text,
Class<?> resultType,
Map<String,String> namespaces)
Evaluates an XQuery
expression with the specified result type and set of namespace
prefixes and URIs
|
T |
xquery(String text,
Class<?> resultType,
org.apache.camel.support.builder.Namespaces namespaces)
Evaluates an XQuery
expression with the specified result type and set of namespace
prefixes and URIs
|
T |
xquery(String text,
Class<?> resultType,
org.apache.camel.support.builder.Namespaces namespaces,
String headerName)
Evaluates an XQuery
expression with the specified result type
|
T |
xquery(String text,
Class<?> resultType,
String headerName)
Evaluates an XQuery
expression with the specified result type
|
T |
xquery(String text,
Map<String,String> namespaces)
Evaluates an XQuery
expression with the specified set of namespace prefixes and URIs
|
T |
xquery(String text,
org.apache.camel.support.builder.Namespaces namespaces)
Evaluates an XQuery
expression with the specified set of namespace prefixes and URIs
|
T |
xquery(String text,
String headerName)
Evaluates an XPath
expression on the supplied header name's contents
|
T |
xtokenize(String path,
char mode,
org.apache.camel.support.builder.Namespaces namespaces) |
T |
xtokenize(String path,
char mode,
org.apache.camel.support.builder.Namespaces namespaces,
int group) |
T |
xtokenize(String path,
org.apache.camel.support.builder.Namespaces namespaces) |
public ExpressionClause(T result)
public T expression(org.apache.camel.Expression expression)
Expression
instancepublic T constant(Object value)
public T exchange(Function<org.apache.camel.Exchange,Object> function)
public T message(Function<org.apache.camel.Message,Object> function)
public T inMessage(Function<org.apache.camel.Message,Object> function)
public T body(Function<Object,Object> function)
public T body(BiFunction<Object,Map<String,Object>,Object> function)
public T body(Class<?> expectedType)
public <B> T body(Class<B> expectedType, Function<B,Object> function)
public <B> T body(Class<B> expectedType, BiFunction<B,Map<String,Object>,Object> function)
public T exchangeProperty(String name)
public T exchangeProperties()
public T method(String bean)
bean
- the name of the bean looked up the registrypublic T method(Object instance)
instance
- the instance of the beanpublic T method(Class<?> beanType)
beanType
- the Class of the bean which we want to invokepublic T method(String bean, String method)
bean
- the name of the bean looked up the registrymethod
- the name of the method to invoke on the beanpublic T method(Object instance, String method)
instance
- the instance of the beanmethod
- the name of the method to invoke on the beanpublic T method(Class<?> beanType, String method)
beanType
- the Class of the bean which we want to invokemethod
- the name of the method to invoke on the beanpublic T groovy(String text)
text
- the expression to be evaluatedpublic T jsonpath(String text)
text
- the expression to be evaluatedpublic T jsonpath(String text, boolean suppressExceptions)
text
- the expression to be evaluatedsuppressExceptions
- whether to suppress exceptions such as
PathNotFoundExceptionpublic T jsonpath(String text, Class<?> resultType)
text
- the expression to be evaluatedresultType
- the return type expected by the expressionpublic T jsonpath(String text, boolean suppressExceptions, Class<?> resultType)
text
- the expression to be evaluatedsuppressExceptions
- whether to suppress exceptions such as
PathNotFoundExceptionresultType
- the return type expected by the expressionpublic T jsonpath(String text, boolean suppressExceptions, Class<?> resultType, String headerName)
text
- the expression to be evaluatedsuppressExceptions
- whether to suppress exceptions such as
PathNotFoundExceptionresultType
- the return type expected by the expressionheaderName
- the name of the header to apply the expression topublic T jsonpathWriteAsString(String text)
text
- the expression to be evaluatedpublic T jsonpathWriteAsString(String text, boolean suppressExceptions)
text
- the expression to be evaluatedsuppressExceptions
- whether to suppress exceptions such as
PathNotFoundExceptionpublic T jsonpathWriteAsString(String text, boolean suppressExceptions, String headerName)
text
- the expression to be evaluatedsuppressExceptions
- whether to suppress exceptions such as
PathNotFoundExceptionheaderName
- the name of the header to apply the expression topublic T ognl(String text)
text
- the expression to be evaluatedpublic T mvel(String text)
text
- the expression to be evaluatedpublic T ref(String ref)
ref
- refers to the expression to be evaluatedpublic T spel(String text)
text
- the expression to be evaluatedpublic T simple(String text)
text
- the expression to be evaluatedpublic T simple(String text, Class<?> resultType)
text
- the expression to be evaluatedresultType
- the result typepublic T tokenize(String token)
token
- the tokenpublic T tokenize(String token, boolean regex)
token
- the tokenregex
- whether the token is a regular expression or notpublic T tokenize(String token, boolean regex, boolean skipFirst)
token
- the tokenregex
- whether the token is a regular expression or notskipFirst
- whether to skip the first elementpublic T tokenize(String token, boolean regex, int group)
token
- the tokenregex
- whether the token is a regular expression or notgroup
- to group by the given numberpublic T tokenize(String token, boolean regex, String group)
token
- the tokenregex
- whether the token is a regular expression or notgroup
- to group by the given numberpublic T tokenize(String token, boolean regex, int group, boolean skipFirst)
token
- the tokenregex
- whether the token is a regular expression or notgroup
- to group by the given numberskipFirst
- whether to skip the first elementpublic T tokenize(String token, boolean regex, String group, boolean skipFirst)
token
- the tokenregex
- whether the token is a regular expression or notgroup
- to group by the given numberskipFirst
- whether to skip the first elementpublic T tokenize(String token, boolean regex, int group, String groupDelimiter, boolean skipFirst)
token
- the tokenregex
- whether the token is a regular expression or notgroup
- to group by the given numberskipFirst
- whether to skip the first elementpublic T tokenize(String token, int group)
token
- the tokengroup
- to group by the given numberpublic T tokenize(String token, int group, boolean skipFirst)
token
- the tokengroup
- to group by the given numberskipFirst
- whether to skip the first elementpublic T tokenize(String token, String headerName)
token
- the tokenheaderName
- name of header to tokenizepublic T tokenize(String token, String headerName, boolean regex)
token
- the tokenheaderName
- name of header to tokenizeregex
- whether the token is a regular expression or notpublic T tokenizePair(String startToken, String endToken)
startToken
- the start tokenendToken
- the end tokenpublic T tokenizePair(String startToken, String endToken, boolean includeTokens)
startToken
- the start tokenendToken
- the end tokenincludeTokens
- whether to include tokenspublic T tokenizeXML(String tagName)
tagName
- the tag name of the child nodes to tokenizepublic T tokenizeXML(String tagName, int group)
tagName
- the tag name of the child nodes to tokenizegroup
- to group by the given numberpublic T tokenizeXML(String tagName, String inheritNamespaceTagName)
tagName
- the tag name of the child nodes to tokenizeinheritNamespaceTagName
- parent or root tag name that contains
namespace(s) to inheritpublic T tokenizeXML(String tagName, String inheritNamespaceTagName, int group)
tagName
- the tag name of the child nodes to tokenizeinheritNamespaceTagName
- parent or root tag name that contains
namespace(s) to inheritgroup
- to group by the given numberpublic T xtokenize(String path, char mode, org.apache.camel.support.builder.Namespaces namespaces)
public T xtokenize(String path, char mode, org.apache.camel.support.builder.Namespaces namespaces, int group)
public T xpath(String text)
text
- the expression to be evaluatedpublic T xpath(String text, String headerName)
text
- the expression to be evaluatedheaderName
- the name of the header to apply the expression topublic T xpath(String text, Class<?> resultType)
text
- the expression to be evaluatedresultType
- the return type expected by the expressionpublic T xpath(String text, Class<?> resultType, String headerName)
text
- the expression to be evaluatedresultType
- the return type expected by the expressionheaderName
- the name of the header to apply the expression topublic T xpath(String text, Class<?> resultType, org.apache.camel.support.builder.Namespaces namespaces)
text
- the expression to be evaluatedresultType
- the return type expected by the expressionnamespaces
- the namespace prefix and URIs to usepublic T xpath(String text, Class<?> resultType, org.apache.camel.support.builder.Namespaces namespaces, String headerName)
text
- the expression to be evaluatedresultType
- the return type expected by the expressionheaderName
- the name of the header to apply the expression tonamespaces
- the namespace prefix and URIs to usepublic T xpath(String text, Class<?> resultType, Map<String,String> namespaces)
text
- the expression to be evaluatedresultType
- the return type expected by the expressionnamespaces
- the namespace prefix and URIs to usepublic T xpath(String text, org.apache.camel.support.builder.Namespaces namespaces)
text
- the expression to be evaluatednamespaces
- the namespace prefix and URIs to usepublic T xpath(String text, Map<String,String> namespaces)
text
- the expression to be evaluatednamespaces
- the namespace prefix and URIs to usepublic T xquery(String text)
text
- the expression to be evaluatedpublic T xquery(String text, String headerName)
text
- the expression to be evaluatedheaderName
- the name of the header to apply the expression topublic T xquery(String text, Class<?> resultType)
text
- the expression to be evaluatedresultType
- the return type expected by the expressionpublic T xquery(String text, Class<?> resultType, String headerName)
text
- the expression to be evaluatedresultType
- the return type expected by the expressionheaderName
- the name of the header to apply the expression topublic T xquery(String text, Class<?> resultType, org.apache.camel.support.builder.Namespaces namespaces)
text
- the expression to be evaluatedresultType
- the return type expected by the expressionnamespaces
- the namespace prefix and URIs to usepublic T xquery(String text, Class<?> resultType, org.apache.camel.support.builder.Namespaces namespaces, String headerName)
text
- the expression to be evaluatedresultType
- the return type expected by the expressionheaderName
- the name of the header to apply the expression tonamespaces
- the namespace prefix and URIs to usepublic T xquery(String text, Class<?> resultType, Map<String,String> namespaces)
text
- the expression to be evaluatedresultType
- the return type expected by the expressionnamespaces
- the namespace prefix and URIs to usepublic T xquery(String text, org.apache.camel.support.builder.Namespaces namespaces)
text
- the expression to be evaluatednamespaces
- the namespace prefix and URIs to usepublic T xquery(String text, Map<String,String> namespaces)
text
- the expression to be evaluatednamespaces
- the namespace prefix and URIs to usepublic T language(String language, String expression)
language
- the name of the languageexpression
- the expression in the given languagepublic org.apache.camel.Expression getExpressionValue()
public org.apache.camel.ExpressionFactory getExpressionType()
public <T> T evaluate(org.apache.camel.Exchange exchange, Class<T> type)
evaluate
in interface org.apache.camel.Expression
public boolean matches(org.apache.camel.Exchange exchange)
matches
in interface org.apache.camel.Predicate
Apache Camel