org.apache.camel.builder
Class ExpressionClauseSupport<T>

java.lang.Object
  extended by org.apache.camel.builder.ExpressionClauseSupport<T>
Direct Known Subclasses:
AssertionClause

public class ExpressionClauseSupport<T>
extends Object

A support class for building expression clauses.

Version:

Constructor Summary
ExpressionClauseSupport(T result)
           
 
Method Summary
 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 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 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)
          Evaluates an expression using the
 T method(Class<?> beanType, String method)
          Evaluates an expression using the
 T method(Object instance)
          Evaluates an expression using the
 T method(Object instance, String method)
          Evaluates an expression using the
 T method(String bean)
          Evaluates an expression using the
 T method(String bean, String method)
          Evaluates an expression using the
 T mvel(String text)
          Evaluates a MVEL expression
 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)
          An expression of an exchange property of the given name
 T python(String text)
          Evaluates a Python expression
 T ref(String ref)
          Evaluates a Expression by looking up existing Expression from the Registry
 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 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, 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, int group)
          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 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, 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 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, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionClauseSupport

public ExpressionClauseSupport(T result)
Method Detail

expression

public T expression(Expression expression)
Specify an Expression instance


expression

public T expression(ExpressionDefinition expression)

constant

public T constant(Object value)
Specify the constant expression value


exchange

public T exchange()
An expression of the exchange


inMessage

public T inMessage()
An expression of an inbound message


outMessage

public T outMessage()
An expression of an inbound message


body

public T body()
An expression of an inbound message body


body

public T body(Class<?> expectedType)
An expression of an inbound message body converted to the expected type


outBody

public T outBody()
An expression of an outbound message body


outBody

public T outBody(Class<?> expectedType)
An expression of an outbound message body converted to the expected type


header

public T header(String name)
An expression of an inbound message header of the given name


headers

public T headers()
An expression of the inbound headers


outHeader

public T outHeader(String name)
An expression of an outbound message header of the given name


outHeaders

public T outHeaders()
An expression of the outbound headers


attachments

public T attachments()
An expression of the inbound message attachments


exchangePattern

public T exchangePattern()
An expression of the exchange pattern


property

public T property(String name)
An expression of an exchange property of the given name


properties

public T properties()
An expression of the exchange properties


method

public T method(String bean)
Evaluates an expression using the

method

public T method(Object instance)
Evaluates an expression using the

method

public T method(Class<?> beanType)
Evaluates an expression using the

method

public T method(String bean,
                String method)
Evaluates an expression using the

method

public T method(Object instance,
                String method)
Evaluates an expression using the

method

public T method(Class<?> beanType,
                String method)
Evaluates an expression using the

el

public T el(String text)
Evaluates the EL Language from JSP and JSF using the JUEL library

Parameters:
text - the expression to be evaluated
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

javaScript

public T javaScript(String text)
Evaluates a JavaScript expression

Parameters:
text - the expression to be evaluated
Returns:
the builder to continue processing the DSL

jxpath

public T jxpath(String text)
Evaluates a JXPath expression

Parameters:
text - the expression to be evaluated
Returns:
the builder to continue processing the DSL

jxpath

public T jxpath(String text,
                boolean lenient)
Evaluates a JXPath expression

Parameters:
text - the expression to be evaluated
lenient - to configure whether lenient is in use or not
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

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

php

public T php(String text)
Evaluates a PHP 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

ref

public T ref(String ref)
Evaluates a Expression by looking up existing Expression from the Registry

Parameters:
ref - refers to the expression to be evaluated
Returns:
the builder to continue processing the DSL

ruby

public T ruby(String text)
Evaluates a Ruby expression

Parameters:
text - the expression to be evaluated
Returns:
the builder to continue processing the DSL

spel

public T spel(String text)
Evaluates an SpEL expression

Parameters:
text - the expression to be evaluated
Returns:
the builder to continue processing the DSL

sql

public T sql(String text)
Evaluates an SQL expression

Parameters:
text - the expression to be evaluated
Returns:
the builder to continue processing the DSL

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 evaluated
resultType - 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,
                  int group)
Evaluates a token expression on the message body

Parameters:
token - the token
group - to group by the given number
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 token
regex - 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,
                  int group)
Evaluates a token expression on the message body

Parameters:
token - the token
regex - whether the token is a regular expression or not
group - to group by the given number
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 token
headerName - 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 token
headerName - name of header to tokenize
regex - whether the token is a regular expression or not
Returns:
the builder to continue processing the DSL

tokenize

public T tokenize(String token,
                  String headerName,
                  boolean regex,
                  int group)
Evaluates a token expression on the given header

Parameters:
token - the token
headerName - name of header to tokenize
regex - whether the token is a regular expression or not
group - to group by number of parts
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 token
endToken - the end token
includeTokens - whether to include tokens
Returns:
the builder to continue processing the DSL

tokenizeXMLPair

public T tokenizeXMLPair(String tagName,
                         String inheritNamespaceTagName,
                         int group)
Evaluates a token pair expression on the message body with XML content

Parameters:
tagName - the the tag name of the child nodes to tokenize
inheritNamespaceTagName - optional parent or root tag name that contains namespace(s) to inherit
group - to group by the given number
Returns:
the builder to continue processing the DSL

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,
               Class<?> resultType)
Evaluates an XPath expression with the specified result type

Parameters:
text - the expression to be evaluated
resultType - the return type expected by the expression
Returns:
the builder to continue processing the DSL

xpath

public T xpath(String text,
               Class<?> resultType,
               Namespaces namespaces)
Evaluates an XPath expression with the specified result type and set of namespace prefixes and URIs

Parameters:
text - the expression to be evaluated
resultType - the return type expected by the expression
namespaces - 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 evaluated
resultType - the return type expected by the expression
namespaces - the namespace prefix and URIs to use
Returns:
the builder to continue processing the DSL

xpath

public T xpath(String text,
               Namespaces namespaces)
Evaluates an XPath expression with the specified set of namespace prefixes and URIs

Parameters:
text - the expression to be evaluated
namespaces - 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 evaluated
namespaces - 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,
                Class<?> resultType)
Evaluates an XQuery expression with the specified result type

Parameters:
text - the expression to be evaluated
resultType - the return type expected by the expression
Returns:
the builder to continue processing the DSL

xquery

public T xquery(String text,
                Class<?> resultType,
                Namespaces namespaces)
Evaluates an XQuery expression with the specified result type and set of namespace prefixes and URIs

Parameters:
text - the expression to be evaluated
resultType - the return type expected by the expression
namespaces - 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 evaluated
resultType - the return type expected by the expression
namespaces - the namespace prefix and URIs to use
Returns:
the builder to continue processing the DSL

xquery

public T xquery(String text,
                Namespaces namespaces)
Evaluates an XQuery expression with the specified set of namespace prefixes and URIs

Parameters:
text - the expression to be evaluated
namespaces - 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 evaluated
namespaces - 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 language
expression - the expression in the given language
Returns:
the builder to continue processing the DSL

getExpressionValue

public Expression getExpressionValue()

setExpressionValue

public void setExpressionValue(Expression expressionValue)

getExpressionType

public ExpressionDefinition getExpressionType()

setExpressionType

public void setExpressionType(ExpressionDefinition expressionType)

createExpression

protected Expression createExpression(CamelContext camelContext)

configureExpression

protected void configureExpression(CamelContext camelContext,
                                   Expression expression)


Apache CAMEL