public class ExpressionClauseSupport<T> extends Object
Constructor and Description |
---|
ExpressionClauseSupport(T result) |
Modifier and Type | Method and Description |
---|---|
T |
attachments()
An expression of the inbound message attachments
|
T |
body()
An expression of an inbound message body
|
T |
body(Class<?> expectedType)
An expression of an inbound message body converted to the expected type
|
protected void |
configureExpression(CamelContext camelContext,
Expression expression) |
T |
constant(Object value)
Specify the constant expression value
|
protected Expression |
createExpression(CamelContext camelContext) |
T |
el(String text)
Evaluates the EL
Language from JSP and JSF using the JUEL library
|
T |
exchange()
An expression of the exchange
|
T |
exchangePattern()
An expression of the exchange pattern
|
T |
exchangeProperty(String name)
An expression of an exchange property of the given name
|
T |
expression(Expression expression)
Specify an
Expression instance |
T |
expression(ExpressionDefinition expression) |
ExpressionDefinition |
getExpressionType() |
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 |
javaScript(String text)
Evaluates a JavaScript
expression
|
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,
Class<?> resultType)
Evaluates a Json Path
expression
|
T |
jxpath(String text)
Evaluates a JXPath expression
|
T |
jxpath(String text,
boolean lenient)
Evaluates a JXPath expression
|
T |
language(String language,
String expression)
Evaluates a given language name with the expression text
|
T |
method(Class<?> beanType)
|
T |
ognl(String text)
Evaluates an OGNL
expression
|
T |
outBody()
An expression of an outbound message body
|
T |
outBody(Class<?> expectedType)
An expression of an outbound message body converted to the expected type
|
T |
outHeader(String name)
An expression of an outbound message header of the given name
|
T |
outHeaders()
An expression of the outbound headers
|
T |
outMessage()
An expression of an inbound message
|
T |
php(String text)
Evaluates a PHP
expression
|
T |
properties()
An expression of the exchange properties
|
T |
property(String name)
Deprecated.
use
exchangeProperty(String) instead |
T |
python(String text)
Evaluates a Python
expression
|
T |
ref(String ref)
|
T |
ruby(String text)
Evaluates a Ruby
expression
|
void |
setExpressionType(ExpressionDefinition expressionType) |
void |
setExpressionValue(Expression expressionValue) |
T |
simple(String text)
Evaluates a Simple
expression
|
T |
simple(String text,
Class<?> resultType)
Evaluates a Simple
expression
|
T |
spel(String text)
Evaluates an SpEL
expression
|
T |
sql(String text)
Evaluates an SQL
expression
|
T |
terser(String text)
Evaluates an HL7 Terser
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,
int group)
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 |
tokenize(String token,
String headerName,
boolean regex,
boolean skipFirst)
Evaluates a token expression on the given header
|
T |
tokenize(String token,
String headerName,
boolean regex,
int group)
Evaluates a token expression on the given header
|
T |
tokenize(String token,
String headerName,
boolean regex,
int group,
boolean skipFirst)
Evaluates a token expression on the given header
|
T |
tokenizePair(String startToken,
String endToken,
boolean includeTokens)
Evaluates a token pair expression on the message body
|
T |
tokenizeXMLPair(String tagName,
String inheritNamespaceTagName,
int group)
Evaluates a token pair expression on the message body with XML content
|
T |
vtdxml(String text)
Evaluates an XPath
expression using the VTD-XML library
|
T |
vtdxml(String text,
Map<String,String> namespaces)
Evaluates an XPath
expression using the VTD-XML library
with the specified set of namespace prefixes and URIs
|
T |
vtdxml(String text,
Namespaces namespaces)
Evaluates an XPath
expression using the VTD-XML library
with the specified set of namespace prefixes and URIs
|
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,
Namespaces namespaces)
Evaluates an XPath
expression with the specified result type and set of namespace
prefixes and URIs
|
T |
xpath(String text,
Class<?> resultType,
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,
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,
Namespaces namespaces)
Evaluates an XQuery expression
with the specified result type and set of namespace prefixes and URIs
|
T |
xquery(String text,
Class<?> resultType,
Namespaces namespaces,
String headerName)
Evaluates an XQuery expression
with the specified result type and set of namespace prefixes and URIs
|
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,
Namespaces namespaces)
Evaluates an XQuery expression
with the specified set of namespace prefixes and URIs
|
T |
xquery(String text,
String headerName)
Evaluates an XQuery
expression
|
T |
xtokenize(String path,
char mode,
Namespaces namespaces,
int group)
Evaluates an XML token expression on the message body with XML content
|
public ExpressionClauseSupport(T result)
public T expression(Expression expression)
Expression
instancepublic T expression(ExpressionDefinition expression)
public T outMessage()
public T body(Class<?> expectedType)
public T outBody(Class<?> expectedType)
public T outHeader(String name)
public T outHeaders()
public T attachments()
public T exchangePattern()
@Deprecated public T property(String name)
exchangeProperty(String)
insteadpublic T exchangeProperty(String name)
public T properties()
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 el(String text)
text
- the expression to be evaluatedpublic T groovy(String text)
text
- the expression to be evaluatedpublic T javaScript(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 jxpath(String text)
text
- the expression to be evaluatedpublic T jxpath(String text, boolean lenient)
text
- the expression to be evaluatedlenient
- to configure whether lenient is in use or notpublic T ognl(String text)
text
- the expression to be evaluatedpublic T mvel(String text)
text
- the expression to be evaluatedpublic T php(String text)
text
- the expression to be evaluatedpublic T python(String text)
text
- the expression to be evaluatedpublic T ref(String ref)
ref
- refers to the expression to be evaluatedpublic T ruby(String text)
text
- the expression to be evaluatedpublic T spel(String text)
text
- the expression to be evaluatedpublic T sql(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 terser(String text)
text
- the expression to be evaluatedpublic T tokenize(String token)
token
- the tokenpublic 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 very first elementpublic T tokenize(String token, boolean regex)
token
- the tokenregex
- whether the token is a regular expression or notpublic 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, 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 tokenize(String token, String headerName, boolean regex, int group)
token
- the tokenheaderName
- name of header to tokenizeregex
- whether the token is a regular expression or notgroup
- to group by number of partspublic T tokenize(String token, String headerName, boolean regex, boolean skipFirst)
token
- the tokenheaderName
- name of header to tokenizeregex
- whether the token is a regular expression or notskipFirst
- whether to skip the very first elementpublic T tokenize(String token, String headerName, boolean regex, int group, boolean skipFirst)
token
- the tokenheaderName
- name of header to tokenizeregex
- whether the token is a regular expression or notgroup
- to group by number of partsskipFirst
- whether to skip the very first elementpublic T tokenizePair(String startToken, String endToken, boolean includeTokens)
startToken
- the start tokenendToken
- the end tokenincludeTokens
- whether to include tokenspublic T tokenizeXMLPair(String tagName, String inheritNamespaceTagName, int group)
tagName
- the the tag name of the child nodes to tokenizeinheritNamespaceTagName
- optional parent or root tag name that contains namespace(s) to inheritgroup
- to group by the given numberpublic T xtokenize(String path, char mode, Namespaces namespaces, int group)
path
- the xpath like path notation specifying the child nodes to tokenizemode
- one of 'i', 'w', or 'u' to inject the namespaces to the token, to
wrap the token with its ancestor contet, or to unwrap to its element childnamespaces
- the namespace map to the namespace bindingsgroup
- to group by the given numberpublic T vtdxml(String text)
text
- the expression to be evaluatedpublic T vtdxml(String text, Namespaces namespaces)
text
- the expression to be evaluatednamespaces
- the namespace prefix and URIs to usepublic T vtdxml(String text, Map<String,String> namespaces)
text
- the expression to be evaluatednamespaces
- the namespace prefix and URIs to usepublic 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, 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, Namespaces namespaces, String headerName)
text
- the expression to be evaluatedresultType
- the return type expected by the expressionnamespaces
- the namespace prefix and URIs to useheaderName
- the name of the header to apply the expression topublic 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, 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, 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, Namespaces namespaces, String headerName)
text
- the expression to be evaluatedresultType
- the return type expected by the expressionnamespaces
- the namespace prefix and URIs to useheaderName
- the name of the header to apply the expression topublic 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, 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 Expression getExpressionValue()
public void setExpressionValue(Expression expressionValue)
public ExpressionDefinition getExpressionType()
public void setExpressionType(ExpressionDefinition expressionType)
protected Expression createExpression(CamelContext camelContext)
protected void configureExpression(CamelContext camelContext, Expression expression)
Apache Camel