Package org.apache.camel.builder
Class ExpressionClause<T>
- java.lang.Object
-
- org.apache.camel.builder.ExpressionClause<T>
-
- All Implemented Interfaces:
org.apache.camel.Expression
,org.apache.camel.Predicate
public class ExpressionClause<T> extends Object implements org.apache.camel.Expression, org.apache.camel.Predicate
Represents an expression clause within the DSL which when the expression is complete the clause continues to another part of the DSL
-
-
Constructor Summary
Constructors Constructor Description ExpressionClause(T result)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
body()
An expression of an inbound message bodyT
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 typeT
body(BiFunction<Object,Map<String,Object>,Object> function)
A functional expression of an inbound message body and headersT
body(Function<Object,Object> function)
A functional expression of an inbound message bodyT
constant(Object value)
Specify the constant expression value.T
constant(Object value, boolean trim)
Specify the constant expression value.T
constant(String value, Class<?> resultType)
Specify the constant expression value.T
csimple(String value)
Returns a compiled simple expression value builderT
csimple(String value, Class<?> resultType)
Returns a compile simple expression value builderT
datasonnet(String text)
Evaluates a Datasonnet expression<T> T
evaluate(org.apache.camel.Exchange exchange, Class<T> type)
T
exchange()
An expression of the exchangeT
exchange(Function<org.apache.camel.Exchange,Object> function)
A functional expression of the exchangeT
exchangeProperties()
An expression of the exchange propertiesT
exchangeProperty(String name)
An expression of an exchange property of the given nameT
expression(org.apache.camel.Expression expression)
Specify anExpression
instanceorg.apache.camel.ExpressionFactory
getExpressionType()
org.apache.camel.Expression
getExpressionValue()
T
groovy(String text)
Evaluates a Groovy expressionT
header(String name)
An expression of an inbound message header of the given nameT
headers()
An expression of the inbound headersvoid
init(org.apache.camel.CamelContext context)
void
initPredicate(org.apache.camel.CamelContext context)
T
inMessage()
An expression of an inbound messageT
inMessage(Function<org.apache.camel.Message,Object> function)
A functional expression of an inbound messageT
joor(String value)
Returns a JOOR expression value builderT
joor(String value, Class<?> resultType)
Returns a JOOR expression value builderT
jq(String value)
Evaluates a JQ expressionT
jq(String value, Class<?> resultType)
Evaluates a JQ expressionT
jq(String value, Class<?> resultType, String headerOrPropertyName)
Evaluates a JQ expressionT
jq(String value, Class<?> resultType, String headerName, String propertyName)
Evaluates a JQ expressionT
jq(String value, String headerOrPropertyName)
Evaluates a JQ expressionT
jq(String value, String headerName, String propertyName)
Evaluates a JQ expressionT
js(String value)
Returns a JavaScript expression value builderT
js(String value, Class<?> resultType)
Returns a JavaScript expression value builderT
jsonpath(String text)
Evaluates a Json Path expressionT
jsonpath(String text, boolean suppressExceptions)
Evaluates a Json Path expressionT
jsonpath(String text, boolean suppressExceptions, Class<?> resultType)
Evaluates a Json Path expressionT
jsonpath(String text, boolean suppressExceptions, Class<?> resultType, String headerName)
Evaluates a Json Path expressionT
jsonpath(String text, Class<?> resultType)
Evaluates a Json Path expressionT
jsonpathUnpack(String text, Class<?> resultType)
Evaluates a Json Path expression with unpacking a single-element array into an object enabled.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, Class<?> resultType)
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
jsonpathWriteAsString(String text, Class<?> resultType)
Evaluates a Json Path expression with writeAsString enabled.T
language(String language, String expression)
Evaluates a given language name with the expression textboolean
matches(org.apache.camel.Exchange exchange)
T
message()
An expression of an inbound messageT
message(Function<org.apache.camel.Message,Object> function)
A functional expression of an inbound messageT
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(Class<?> beanType, String method, org.apache.camel.BeanScope scope)
Evaluates an expression using the bean language which basically means the bean is invoked to determine the expression value.T
method(Class<?> beanType, org.apache.camel.BeanScope scope)
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 ref)
Evaluates an expression using the bean language which basically means the bean is invoked to determine the expression value.T
method(String ref, String method)
Evaluates an expression using the bean language which basically means the bean is invoked to determine the expression value.T
method(String ref, String method, org.apache.camel.BeanScope scope)
Evaluates an expression using the bean language which basically means the bean is invoked to determine the expression value.T
method(String ref, org.apache.camel.BeanScope scope)
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 expressionT
ognl(String text)
Evaluates an OGNL expressionT
python(String text)
Evaluates a Python expression.T
python(String text, Class<?> resultType)
Evaluates a Python expression.T
ref(String ref)
Evaluates a Ref expressionT
simple(String text)
Evaluates a Simple expressionT
simple(String text, Class<?> resultType)
Evaluates a Simple expressionT
spel(String text)
Evaluates a SpEL expressionT
tokenize(String token)
Evaluates a token expression on the message bodyT
tokenize(String token, boolean regex)
Evaluates a token expression on the message bodyT
tokenize(String token, boolean regex, boolean skipFirst)
Evaluates a token expression on the message bodyT
tokenize(String token, boolean regex, int group)
Evaluates a token expression on the message bodyT
tokenize(String token, boolean regex, int group, boolean skipFirst)
Evaluates a token expression on the message bodyT
tokenize(String token, boolean regex, int group, String groupDelimiter, boolean skipFirst)
Evaluates a token expression on the message bodyT
tokenize(String token, boolean regex, String group)
Evaluates a token expression on the message bodyT
tokenize(String token, boolean regex, String group, boolean skipFirst)
Evaluates a token expression on the message bodyT
tokenize(String token, int group)
Evaluates a token expression on the message bodyT
tokenize(String token, int group, boolean skipFirst)
Evaluates a token expression on the message bodyT
tokenize(String token, String headerName)
Evaluates a token expression on the given headerT
tokenize(String token, String headerName, boolean regex)
Evaluates a token expression on the given headerT
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 bodyT
tokenizeXML(String tagName)
Evaluates a XML token expression on the message body with XML contentT
tokenizeXML(String tagName, int group)
Evaluates a XML token expression on the message body with XML contentT
tokenizeXML(String tagName, String inheritNamespaceTagName)
Evaluates a token pair expression on the message body with XML contentT
tokenizeXML(String tagName, String inheritNamespaceTagName, int group)
Evaluates a token pair expression on the message body with XML contentT
xpath(String text)
Evaluates an XPath expressionT
xpath(String text, Class<?> resultType)
Evaluates an XPath expression with the specified result typeT
xpath(String text, Class<?> resultType, String headerName)
Evaluates an XPath expression with the specified result type on the supplied header name's contentsT
xpath(String text, Class<?> resultType, Map<String,String> namespaces)
Evaluates an XPath expression with the specified result type and set of namespace prefixes and URIsT
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 URIsT
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 contentsT
xpath(String text, String headerName)
Evaluates an XPath expression on the supplied header name's contentsT
xpath(String text, Map<String,String> namespaces)
Evaluates an XPath expression with the specified set of namespace prefixes and URIsT
xpath(String text, org.apache.camel.support.builder.Namespaces namespaces)
Evaluates an XPath expression with the specified set of namespace prefixes and URIsT
xquery(String text)
Evaluates an XQuery expressionT
xquery(String text, Class<?> resultType)
Evaluates an XQuery expression with the specified result typeT
xquery(String text, Class<?> resultType, String headerName)
Evaluates an XQuery expression with the specified result typeT
xquery(String text, Class<?> resultType, Map<String,String> namespaces)
Evaluates an XQuery expression with the specified result type and set of namespace prefixes and URIsT
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 URIsT
xquery(String text, Class<?> resultType, org.apache.camel.support.builder.Namespaces namespaces, String headerName)
Evaluates an XQuery expression with the specified result typeT
xquery(String text, String headerName)
Evaluates an XPath expression on the supplied header name's contentsT
xquery(String text, Map<String,String> namespaces)
Evaluates an XQuery expression with the specified set of namespace prefixes and URIsT
xquery(String text, org.apache.camel.support.builder.Namespaces namespaces)
Evaluates an XQuery expression with the specified set of namespace prefixes and URIsT
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)
-
-
-
Constructor Detail
-
ExpressionClause
public ExpressionClause(T result)
-
-
Method Detail
-
expression
public T expression(org.apache.camel.Expression expression)
Specify anExpression
instance
-
constant
public T constant(Object value)
Specify the constant expression value. Important: this is a fixed constant value that is only set once during starting up the route, do not use this if you want dynamic values during routing.
-
constant
public T constant(String value, Class<?> resultType)
Specify the constant expression value. Important: this is a fixed constant value that is only set once during starting up the route, do not use this if you want dynamic values during routing.
-
constant
public T constant(Object value, boolean trim)
Specify the constant expression value. Important: this is a fixed constant value that is only set once during starting up the route, do not use this if you want dynamic values during routing.
-
exchange
public T exchange()
An expression of the exchange
-
exchange
public T exchange(Function<org.apache.camel.Exchange,Object> function)
A functional expression of the exchange
-
message
public T message()
An expression of an inbound message
-
message
public T message(Function<org.apache.camel.Message,Object> function)
A functional expression of an inbound message
-
inMessage
public T inMessage()
An expression of an inbound message
-
inMessage
public T inMessage(Function<org.apache.camel.Message,Object> function)
A functional expression of an inbound message
-
body
public T body()
An expression of an inbound message body
-
body
public T body(Function<Object,Object> function)
A functional expression of an inbound message body
-
body
public T body(BiFunction<Object,Map<String,Object>,Object> function)
A functional expression of an inbound message body and headers
-
body
public T body(Class<?> expectedType)
An expression of an inbound message body converted to the expected type
-
body
public <B> T body(Class<B> expectedType, Function<B,Object> function)
A functional expression of an inbound message body converted to the expected type
-
body
public <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
-
headers
public T headers()
An expression of the inbound headers
-
exchangeProperty
public T exchangeProperty(String name)
An expression of an exchange property of the given name
-
exchangeProperties
public T exchangeProperties()
An expression of the exchange properties
-
method
public T method(String ref)
Evaluates an expression using the bean language which basically means the bean is invoked to determine the expression value.- Parameters:
ref
- the name (bean id) of the bean to lookup from the registry- Returns:
- the builder to continue processing the DSL
-
method
public T method(Object instance)
Evaluates an expression using the bean language which basically means the bean is invoked to determine the expression value.- Parameters:
instance
- the existing instance of the bean- Returns:
- the builder to continue processing the DSL
-
method
public T method(Class<?> beanType)
Evaluates an expression using the bean language which basically means the bean is invoked to determine the expression value. Will lookup in registry and if there is a single instance of the same type, then the existing bean is used, otherwise a new bean is created (requires a default no-arg constructor).- Parameters:
beanType
- the Class of the bean which we want to invoke- Returns:
- the builder to continue processing the DSL
-
method
public T method(String ref, String method)
Evaluates an expression using the bean language which basically means the bean is invoked to determine the expression value.- Parameters:
ref
- the name (bean id) of the bean to lookup from the registrymethod
- the name of the method to invoke on the bean- Returns:
- the builder to continue processing the DSL
-
method
public T method(String ref, org.apache.camel.BeanScope scope)
Evaluates an expression using the bean language which basically means the bean is invoked to determine the expression value.- Parameters:
ref
- the name (bean id) of the bean to lookup from the registryscope
- the scope of the bean- Returns:
- the builder to continue processing the DSL
-
method
public T method(String ref, String method, org.apache.camel.BeanScope scope)
Evaluates an expression using the bean language which basically means the bean is invoked to determine the expression value.- Parameters:
ref
- the name (bean id) of the bean to lookup from the registrymethod
- the name of the method to invoke on the beanscope
- the scope of the bean- Returns:
- the builder to continue processing the DSL
-
method
public 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.- Parameters:
instance
- the existing instance of the beanmethod
- the name of the method to invoke on the bean- Returns:
- the builder to continue processing the DSL
-
method
public 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. Will lookup in registry and if there is a single instance of the same type, then the existing bean is used, otherwise a new bean is created (requires a default no-arg constructor).- Parameters:
beanType
- the Class of the bean which we want to invokemethod
- the name of the method to invoke on the bean- Returns:
- the builder to continue processing the DSL
-
method
public T method(Class<?> beanType, org.apache.camel.BeanScope scope)
Evaluates an expression using the bean language which basically means the bean is invoked to determine the expression value. Will lookup in registry and if there is a single instance of the same type, then the existing bean is used, otherwise a new bean is created (requires a default no-arg constructor).- Parameters:
beanType
- the Class of the bean which we want to invokescope
- the scope of the bean- Returns:
- the builder to continue processing the DSL
-
method
public T method(Class<?> beanType, String method, org.apache.camel.BeanScope scope)
Evaluates an expression using the bean language which basically means the bean is invoked to determine the expression value. Will lookup in registry and if there is a single instance of the same type, then the existing bean is used, otherwise a new bean is created (requires a default no-arg constructor).- Parameters:
beanType
- the Class of the bean which we want to invokemethod
- the name of the method to invoke on the beanscope
- the scope of the bean- Returns:
- the builder to continue processing the DSL
-
groovy
public T groovy(String text)
Evaluates a Groovy expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
jq
public T jq(String value)
Evaluates a JQ expression- Parameters:
value
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
jq
public T jq(String value, Class<?> resultType)
Evaluates a JQ expression- Parameters:
value
- the expression to be evaluatedresultType
- the return type expected by the expression- Returns:
- the builder to continue processing the DSL
-
jq
public T jq(String value, String headerOrPropertyName)
Evaluates a JQ expression- Parameters:
value
- the expression to be evaluatedheaderOrPropertyName
- the name of the header or property to apply the expression to- Returns:
- the builder to continue processing the DSL
-
jq
public T jq(String value, String headerName, String propertyName)
Evaluates a JQ expression- Parameters:
value
- the expression to be evaluatedheaderName
- the name of the header to apply the expression topropertyName
- the name of the property to apply the expression to- Returns:
- the builder to continue processing the DSL
-
jq
public T jq(String value, Class<?> resultType, String headerOrPropertyName)
Evaluates a JQ expression- Parameters:
value
- the expression to be evaluatedresultType
- the return type expected by the expressionheaderOrPropertyName
- the name of the header or property to apply the expression to- Returns:
- the builder to continue processing the DSL
-
jq
public T jq(String value, Class<?> resultType, String headerName, String propertyName)
Evaluates a JQ expression- Parameters:
value
- the expression to be evaluatedresultType
- the return type expected by the expressionheaderName
- the name of the header to apply the expression topropertyName
- the name of the property to apply the expression to- Returns:
- the builder to continue processing the DSL
-
datasonnet
public T datasonnet(String text)
Evaluates a Datasonnet expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
jsonpath
public T jsonpath(String text)
Evaluates a Json Path expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
jsonpath
public T jsonpath(String text, boolean suppressExceptions)
Evaluates a Json Path expression- Parameters:
text
- the expression to be evaluatedsuppressExceptions
- whether to suppress exceptions such as PathNotFoundException- Returns:
- the builder to continue processing the DSL
-
jsonpath
public T jsonpath(String text, Class<?> resultType)
Evaluates a Json Path expression- Parameters:
text
- the expression to be evaluatedresultType
- the return type expected by the expression- Returns:
- the builder to continue processing the DSL
-
jsonpath
public T jsonpath(String text, boolean suppressExceptions, Class<?> resultType)
Evaluates a Json Path expression- Parameters:
text
- the expression to be evaluatedsuppressExceptions
- whether to suppress exceptions such as PathNotFoundExceptionresultType
- the return type expected by the expression- Returns:
- the builder to continue processing the DSL
-
jsonpath
public T jsonpath(String text, boolean suppressExceptions, Class<?> resultType, String headerName)
Evaluates a Json Path expression- Parameters:
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 to- Returns:
- the builder to continue processing the DSL
-
jsonpathWriteAsString
public T jsonpathWriteAsString(String text)
Evaluates a Json Path expression with writeAsString enabled.- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
jsonpathWriteAsString
public T jsonpathWriteAsString(String text, Class<?> resultType)
Evaluates a Json Path expression with writeAsString enabled.- Parameters:
text
- the expression to be evaluatedresultType
- the return type expected by the expression- Returns:
- the builder to continue processing the DSL
-
jsonpathWriteAsString
public T jsonpathWriteAsString(String text, boolean suppressExceptions)
Evaluates a Json Path expression with writeAsString enabled.- Parameters:
text
- the expression to be evaluatedsuppressExceptions
- whether to suppress exceptions such as PathNotFoundException- Returns:
- the builder to continue processing the DSL
-
jsonpathWriteAsString
public T jsonpathWriteAsString(String text, boolean suppressExceptions, Class<?> resultType)
Evaluates a Json Path expression with writeAsString enabled.- Parameters:
text
- the expression to be evaluatedsuppressExceptions
- whether to suppress exceptions such as PathNotFoundExceptionresultType
- the return type expected by the expression- Returns:
- the builder to continue processing the DSL
-
jsonpathWriteAsString
public T jsonpathWriteAsString(String text, boolean suppressExceptions, String headerName)
Evaluates a Json Path expression with writeAsString enabled.- Parameters:
text
- the expression to be evaluatedsuppressExceptions
- whether to suppress exceptions such as PathNotFoundExceptionheaderName
- the name of the header to apply the expression to- Returns:
- the builder to continue processing the DSL
-
jsonpathUnpack
public T jsonpathUnpack(String text, Class<?> resultType)
Evaluates a Json Path expression with unpacking a single-element array into an object enabled.- Parameters:
text
- the expression to be evaluatedresultType
- the return type expected by the expression- Returns:
- the builder to continue processing the DSL
-
ognl
public T ognl(String text)
Evaluates an OGNL expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
python
public T python(String text)
Evaluates a Python expression.- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
python
public T python(String text, Class<?> resultType)
Evaluates a Python expression.- Parameters:
text
- the expression to be evaluatedresultType
- the return type expected by the expression- Returns:
- the builder to continue processing the DSL
-
mvel
public T mvel(String text)
Evaluates a MVEL expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
ref
public T ref(String ref)
Evaluates a Ref expression- Parameters:
ref
- refers to the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
spel
public T spel(String text)
Evaluates a SpEL expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
csimple
public T csimple(String value, Class<?> resultType)
Returns a compile simple expression value builder
-
simple
public T simple(String text)
Evaluates a Simple expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
simple
public T simple(String text, Class<?> resultType)
Evaluates a Simple expression- Parameters:
text
- the expression to be evaluatedresultType
- the result type- Returns:
- the builder to continue processing the DSL
-
tokenize
public T tokenize(String token)
Evaluates a token expression on the message body- Parameters:
token
- the token- Returns:
- the builder to continue processing the DSL
-
tokenize
public T tokenize(String token, boolean regex)
Evaluates a token expression on the message body- Parameters:
token
- the tokenregex
- whether the token is a regular expression or not- Returns:
- the builder to continue processing the DSL
-
tokenize
public T tokenize(String token, boolean regex, boolean skipFirst)
Evaluates a token expression on the message body- Parameters:
token
- the tokenregex
- whether the token is a regular expression or notskipFirst
- whether to skip the first element- Returns:
- the builder to continue processing the DSL
-
tokenize
public T tokenize(String token, boolean regex, int group)
Evaluates a token expression on the message body- Parameters:
token
- the tokenregex
- whether the token is a regular expression or notgroup
- to group by the given number- Returns:
- the builder to continue processing the DSL
-
tokenize
public T tokenize(String token, boolean regex, String group)
Evaluates a token expression on the message body- Parameters:
token
- the tokenregex
- whether the token is a regular expression or notgroup
- to group by the given number- Returns:
- the builder to continue processing the DSL
-
tokenize
public T tokenize(String token, boolean regex, int group, boolean skipFirst)
Evaluates a token expression on the message body- Parameters:
token
- the tokenregex
- whether the token is a regular expression or notgroup
- to group by the given numberskipFirst
- whether to skip the first element- Returns:
- the builder to continue processing the DSL
-
tokenize
public T tokenize(String token, boolean regex, String group, boolean skipFirst)
Evaluates a token expression on the message body- Parameters:
token
- the tokenregex
- whether the token is a regular expression or notgroup
- to group by the given numberskipFirst
- whether to skip the first element- Returns:
- the builder to continue processing the DSL
-
tokenize
public T tokenize(String token, boolean regex, int group, String groupDelimiter, boolean skipFirst)
Evaluates a token expression on the message body- Parameters:
token
- the tokenregex
- whether the token is a regular expression or notgroup
- to group by the given numberskipFirst
- whether to skip the first element- Returns:
- the builder to continue processing the DSL
-
tokenize
public T tokenize(String token, int group)
Evaluates a token expression on the message body- Parameters:
token
- the tokengroup
- to group by the given number- Returns:
- the builder to continue processing the DSL
-
tokenize
public T tokenize(String token, int group, boolean skipFirst)
Evaluates a token expression on the message body- Parameters:
token
- the tokengroup
- to group by the given numberskipFirst
- whether to skip the first element- Returns:
- the builder to continue processing the DSL
-
tokenize
public T tokenize(String token, String headerName)
Evaluates a token expression on the given header- Parameters:
token
- the tokenheaderName
- name of header to tokenize- Returns:
- the builder to continue processing the DSL
-
tokenize
public T tokenize(String token, String headerName, boolean regex)
Evaluates a token expression on the given header- Parameters:
token
- the tokenheaderName
- name of header to tokenizeregex
- whether the token is a regular expression or not- Returns:
- the builder to continue processing the DSL
-
tokenizePair
public T tokenizePair(String startToken, String endToken)
Evaluates a token pair expression on the message body. Tokens is not included.- Parameters:
startToken
- the start tokenendToken
- the end token- Returns:
- the builder to continue processing the DSL
-
tokenizePair
public T tokenizePair(String startToken, String endToken, boolean includeTokens)
Evaluates a token pair expression on the message body- Parameters:
startToken
- the start tokenendToken
- the end tokenincludeTokens
- whether to include tokens- Returns:
- the builder to continue processing the DSL
-
tokenizeXML
public T tokenizeXML(String tagName)
Evaluates a XML token expression on the message body with XML content- Parameters:
tagName
- the tag name of the child nodes to tokenize- Returns:
- the builder to continue processing the DSL
-
tokenizeXML
public T tokenizeXML(String tagName, int group)
Evaluates a XML token expression on the message body with XML content- Parameters:
tagName
- the tag name of the child nodes to tokenizegroup
- to group by the given number- Returns:
- the builder to continue processing the DSL
-
tokenizeXML
public T tokenizeXML(String tagName, String inheritNamespaceTagName)
Evaluates a token pair expression on the message body with XML content- Parameters:
tagName
- the tag name of the child nodes to tokenizeinheritNamespaceTagName
- parent or root tag name that contains namespace(s) to inherit- Returns:
- the builder to continue processing the DSL
-
tokenizeXML
public T tokenizeXML(String tagName, String inheritNamespaceTagName, int group)
Evaluates a token pair expression on the message body with XML content- Parameters:
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 number- Returns:
- the builder to continue processing the DSL
-
xtokenize
public T xtokenize(String path, char mode, org.apache.camel.support.builder.Namespaces namespaces)
-
xtokenize
public T xtokenize(String path, char mode, org.apache.camel.support.builder.Namespaces namespaces, int group)
-
xpath
public T xpath(String text)
Evaluates an XPath expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
xpath
public T xpath(String text, String headerName)
Evaluates an XPath expression on the supplied header name's contents- Parameters:
text
- the expression to be evaluatedheaderName
- the name of the header to apply the expression to- Returns:
- the builder to continue processing the DSL
-
xpath
public T xpath(String text, Class<?> resultType)
Evaluates an XPath expression with the specified result type- Parameters:
text
- the expression to be evaluatedresultType
- the return type expected by the expression- Returns:
- the builder to continue processing the DSL
-
xpath
public T xpath(String text, Class<?> resultType, String headerName)
Evaluates an XPath expression with the specified result type on the supplied header name's contents- Parameters:
text
- the expression to be evaluatedresultType
- the return type expected by the expressionheaderName
- the name of the header to apply the expression to- Returns:
- the builder to continue processing the DSL
-
xpath
public 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- Parameters:
text
- the expression to be evaluatedresultType
- the return type expected by the expressionnamespaces
- the namespace prefix and URIs to use- Returns:
- the builder to continue processing the DSL
-
xpath
public 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- Parameters:
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 use- Returns:
- the builder to continue processing the DSL
-
xpath
public 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- Parameters:
text
- the expression to be evaluatedresultType
- the return type expected by the expressionnamespaces
- the namespace prefix and URIs to use- Returns:
- the builder to continue processing the DSL
-
xpath
public T xpath(String text, org.apache.camel.support.builder.Namespaces namespaces)
Evaluates an XPath expression with the specified set of namespace prefixes and URIs- Parameters:
text
- the expression to be evaluatednamespaces
- the namespace prefix and URIs to use- Returns:
- the builder to continue processing the DSL
-
xpath
public T xpath(String text, Map<String,String> namespaces)
Evaluates an XPath expression with the specified set of namespace prefixes and URIs- Parameters:
text
- the expression to be evaluatednamespaces
- the namespace prefix and URIs to use- Returns:
- the builder to continue processing the DSL
-
xquery
public T xquery(String text)
Evaluates an XQuery expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
xquery
public T xquery(String text, String headerName)
Evaluates an XPath expression on the supplied header name's contents- Parameters:
text
- the expression to be evaluatedheaderName
- the name of the header to apply the expression to- Returns:
- the builder to continue processing the DSL
-
xquery
public T xquery(String text, Class<?> resultType)
Evaluates an XQuery expression with the specified result type- Parameters:
text
- the expression to be evaluatedresultType
- the return type expected by the expression- Returns:
- the builder to continue processing the DSL
-
xquery
public T xquery(String text, Class<?> resultType, String headerName)
Evaluates an XQuery expression with the specified result type- Parameters:
text
- the expression to be evaluatedresultType
- the return type expected by the expressionheaderName
- the name of the header to apply the expression to- Returns:
- the builder to continue processing the DSL
-
xquery
public 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- Parameters:
text
- the expression to be evaluatedresultType
- the return type expected by the expressionnamespaces
- the namespace prefix and URIs to use- Returns:
- the builder to continue processing the DSL
-
xquery
public T xquery(String text, Class<?> resultType, org.apache.camel.support.builder.Namespaces namespaces, String headerName)
Evaluates an XQuery expression with the specified result type- Parameters:
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 use- Returns:
- the builder to continue processing the DSL
-
xquery
public 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- Parameters:
text
- the expression to be evaluatedresultType
- the return type expected by the expressionnamespaces
- the namespace prefix and URIs to use- Returns:
- the builder to continue processing the DSL
-
xquery
public T xquery(String text, org.apache.camel.support.builder.Namespaces namespaces)
Evaluates an XQuery expression with the specified set of namespace prefixes and URIs- Parameters:
text
- the expression to be evaluatednamespaces
- the namespace prefix and URIs to use- Returns:
- the builder to continue processing the DSL
-
xquery
public T xquery(String text, Map<String,String> namespaces)
Evaluates an XQuery expression with the specified set of namespace prefixes and URIs- Parameters:
text
- the expression to be evaluatednamespaces
- the namespace prefix and URIs to use- Returns:
- the builder to continue processing the DSL
-
language
public T language(String language, String expression)
Evaluates a given language name with the expression text- Parameters:
language
- the name of the languageexpression
- the expression in the given language- Returns:
- the builder to continue processing the DSL
-
getExpressionValue
public org.apache.camel.Expression getExpressionValue()
-
getExpressionType
public org.apache.camel.ExpressionFactory getExpressionType()
-
init
public void init(org.apache.camel.CamelContext context)
- Specified by:
init
in interfaceorg.apache.camel.Expression
- Specified by:
init
in interfaceorg.apache.camel.Predicate
-
initPredicate
public void initPredicate(org.apache.camel.CamelContext context)
- Specified by:
initPredicate
in interfaceorg.apache.camel.Predicate
-
evaluate
public <T> T evaluate(org.apache.camel.Exchange exchange, Class<T> type)
- Specified by:
evaluate
in interfaceorg.apache.camel.Expression
-
matches
public boolean matches(org.apache.camel.Exchange exchange)
- Specified by:
matches
in interfaceorg.apache.camel.Predicate
-
-