|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.builder.ExpressionBuilder
public final class ExpressionBuilder
A helper class for working with expressions.
Method Summary | ||
---|---|---|
static Expression |
append(Expression left,
Expression right)
Appends the String evaluations of the two expressions together |
|
static Expression |
attachmentsExpression()
Returns an expression for the inbound message attachments |
|
static Expression |
attachmentValuesExpression()
Returns an expression for the inbound message attachments |
|
static Expression |
beanExpression(Class<?> beanType,
String methodName)
|
|
static Expression |
beanExpression(Object bean,
String methodName)
|
|
static Expression |
beanExpression(String expression)
|
|
static Expression |
beanExpression(String beanRef,
String methodName)
|
|
static Expression |
bodyExpression()
Returns the expression for the exchanges inbound message body |
|
static
|
bodyExpression(Class<T> type)
Returns the expression for the exchanges inbound message body converted to the given type |
|
static Expression |
bodyExpression(String name)
Returns the expression for the exchanges inbound message body converted to the given type |
|
static Expression |
bodyOgnlExpression(String ognl)
Returns the expression for the exchanges inbound message body invoking methods defined in a simple OGNL notation |
|
static Expression |
bodyTypeExpression()
Returns the expression for the exchanges inbound message body type |
|
static Expression |
camelContextExpression()
Returns an expression for the CamelContext |
|
static Expression |
camelContextPropertiesExpression()
Returns an expression for the properties of the camel context |
|
static Expression |
camelContextPropertyExpression(String propertyName)
Returns an expression for the property value of the camel context with the given name |
|
static Expression |
concatExpression(Collection<Expression> expressions)
Returns an expression which returns the string concatenation value of the various expressions |
|
static Expression |
concatExpression(Collection<Expression> expressions,
String expression)
Returns an expression which returns the string concatenation value of the various expressions |
|
static Expression |
constantExpression(Object value)
Returns an expression for the constant value |
|
static Expression |
convertToExpression(Expression expression,
Class type)
Returns an expression which converts the given expression to the given type |
|
static Expression |
convertToExpression(Expression expression,
Expression type)
Returns an expression which converts the given expression to the given type the type expression is evaluated to |
|
static Expression |
dateExpression(String command,
String pattern)
|
|
static Expression |
exchangeExceptionExpression()
Returns an expression for an exception set on the exchange |
|
static Expression |
exchangeExceptionExpression(Class<Exception> type)
Returns an expression for an exception set on the exchange Is used to get the caused exception that typically have been wrapped in some sort of Camel wrapper exception |
|
static Expression |
exchangeExceptionMessageExpression()
Returns an expression for an exception message set on the exchange |
|
static Expression |
exchangeExceptionOgnlExpression(String ognl)
Returns the expression for the exchanges exception invoking methods defined in a simple OGNL notation |
|
static Expression |
exchangeExceptionStackTraceExpression()
Returns an expression for an exception stacktrace set on the exchange |
|
static Expression |
exchangeExpression()
Returns the expression for the exchange |
|
static Expression |
exchangeIdExpression()
Returns an Expression for the exchange id |
|
static Expression |
exchangePatternExpression()
Returns an expression for the exchange pattern |
|
static Expression |
faultBodyExpression()
Returns the expression for the fault messages body |
|
static
|
faultBodyExpression(Class<T> type)
Returns the expression for the exchanges fault message body converted to the given type |
|
static Expression |
fileAbsoluteExpression()
|
|
static Expression |
fileAbsolutePathExpression()
|
|
static Expression |
fileExtensionExpression()
|
|
static Expression |
fileLastModifiedExpression()
|
|
static Expression |
fileNameExpression()
|
|
static Expression |
fileNameNoExtensionExpression()
|
|
static Expression |
fileOnlyNameExpression()
|
|
static Expression |
fileOnlyNameNoExtensionExpression()
|
|
static Expression |
fileParentExpression()
|
|
static Expression |
filePathExpression()
|
|
static Expression |
fileSizeExpression()
|
|
static Expression |
headerExpression(String headerName)
Returns an expression for the header value with the given name Will fallback and look in properties if not found in headers. |
|
static
|
headerExpression(String headerName,
Class<T> type)
Returns an expression for the header value with the given name converted to the given type Will fallback and look in properties if not found in headers. |
|
static Expression |
headerExpression(String headerName,
String name)
Returns an expression for the header value with the given name converted to the given type Will fallback and look in properties if not found in headers. |
|
static Expression |
headersExpression()
Returns an expression for the inbound message headers |
|
static Expression |
headersOgnlExpression(String ognl)
Returns the expression for the exchanges inbound message header invoking methods defined in a simple OGNL notation |
|
static Expression |
inMessageExpression()
Returns the expression for the IN message |
|
static
|
mandatoryBodyExpression(Class<T> type)
Returns the expression for the exchanges inbound message body converted to the given type. |
|
static
|
mandatoryBodyExpression(Class<T> type,
boolean nullBodyAllowed)
Returns the expression for the exchanges inbound message body converted to the given type |
|
static Expression |
mandatoryBodyExpression(String name)
Returns the expression for the exchanges inbound message body converted to the given type |
|
static Expression |
messageIdExpression()
Returns an Expression for the inbound message id |
|
static Expression |
outBodyExpression()
Returns the expression for the out messages body |
|
static
|
outBodyExpression(Class<T> type)
Returns the expression for the exchanges outbound message body converted to the given type |
|
static Expression |
outHeaderExpression(String headerName)
Returns an expression for the out header value with the given name Will fallback and look in properties if not found in headers. |
|
static Expression |
outHeadersExpression()
Returns an expression for the outbound message headers |
|
static Expression |
outMessageExpression()
Returns the expression for the OUT message |
|
static Expression |
prepend(Expression left,
Expression right)
Prepends the String evaluations of the two expressions together |
|
static Expression |
propertiesComponentExpression(String key,
String locations)
|
|
static Expression |
propertiesExpression()
Returns an expression for the properties of exchange |
|
static Expression |
propertyExpression(String propertyName)
Returns an expression for the property value of exchange with the given name |
|
static Expression |
propertyOgnlExpression(String ognl)
Returns an expression for the property value of exchange with the given name invoking methods defined in a simple OGNL notation |
|
static Expression |
refExpression(String ref)
Returns an expression for lookup a bean in the Registry |
|
static Expression |
regexReplaceAll(Expression expression,
String regex,
Expression replacementExpression)
Transforms the expression into a String then performs the regex replaceAll to transform the String and return the result |
|
static Expression |
regexReplaceAll(Expression expression,
String regex,
String replacement)
Transforms the expression into a String then performs the regex replaceAll to transform the String and return the result |
|
static Expression |
regexTokenizeExpression(Expression expression,
String regexTokenizer)
Returns a tokenize expression which will tokenize the string with the given regex |
|
static Expression |
registryExpression()
Returns an expression for the Registry |
|
static Expression |
simpleExpression(String expression)
|
|
static Expression |
sortExpression(Expression expression,
Comparator comparator)
Returns a sort expression which will sort the expression with the given comparator. |
|
static Expression |
systemEnvironmentExpression(String propertyName)
Returns an expression for a system environment value with the given name |
|
static Expression |
systemEnvironmentExpression(String propertyName,
String defaultValue)
Returns an expression for a system environment value with the given name |
|
static Expression |
systemPropertyExpression(String propertyName)
Returns an expression for a system property value with the given name |
|
static Expression |
systemPropertyExpression(String propertyName,
String defaultValue)
Returns an expression for a system property value with the given name |
|
static Expression |
threadNameExpression()
Returns the expression for the current thread name |
|
static Expression |
toExpression(String uri)
Returns an expression processing the exchange to the given endpoint uri |
|
static Expression |
tokenizeExpression(Expression expression,
String token)
Returns a tokenize expression which will tokenize the string with the given token |
|
static Expression |
tokenizePairExpression(String startToken,
String endToken,
boolean includeTokens)
Returns an TokenPairExpressionIterator expression |
|
static Expression |
tokenizeXMLExpression(String tagName,
String inheritNamespaceTagName)
Returns an TokenXMLPairExpressionIterator expression |
|
static Expression |
typeConverterExpression()
Returns an expression for the type converter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Expression attachmentsExpression()
public static Expression attachmentValuesExpression()
public static Expression headerExpression(String headerName)
headerName
- the name of the header the expression will return
public static <T> Expression headerExpression(String headerName, Class<T> type)
headerName
- the name of the header the expression will returntype
- the type to convert to
public static Expression headerExpression(String headerName, String name)
headerName
- the name of the header the expression will returnname
- the type to convert to as a FQN class name
public static Expression headersOgnlExpression(String ognl)
ognl
- methods to invoke on the header in a simple OGNL syntaxpublic static Expression headersExpression()
public static Expression outHeaderExpression(String headerName)
headerName
- the name of the header the expression will return
public static Expression outHeadersExpression()
public static Expression exchangePatternExpression()
Exchange.getPattern()
public static Expression exchangeExceptionExpression()
Exchange.getException()
public static Expression exchangeExceptionExpression(Class<Exception> type)
type
- the exception type
Exchange.getException(Class)
public static Expression exchangeExceptionOgnlExpression(String ognl)
ognl
- methods to invoke on the body in a simple OGNL syntaxpublic static Expression typeConverterExpression()
public static Expression registryExpression()
Registry
public static Expression refExpression(String ref)
Registry
public static Expression camelContextExpression()
CamelContext
public static Expression exchangeExceptionMessageExpression()
public static Expression exchangeExceptionStackTraceExpression()
public static Expression propertyExpression(String propertyName)
propertyName
- the name of the property the expression will return
public static Expression propertyOgnlExpression(String ognl)
ognl
- methods to invoke on the property in a simple OGNL syntaxpublic static Expression propertiesExpression()
public static Expression camelContextPropertiesExpression()
public static Expression camelContextPropertyExpression(String propertyName)
propertyName
- the name of the property the expression will return
public static Expression systemPropertyExpression(String propertyName)
propertyName
- the name of the system property the expression will return
public static Expression systemPropertyExpression(String propertyName, String defaultValue)
propertyName
- the name of the system property the expression will returndefaultValue
- default value to return if no system property exists
public static Expression systemEnvironmentExpression(String propertyName)
propertyName
- the name of the system environment the expression will return
public static Expression systemEnvironmentExpression(String propertyName, String defaultValue)
propertyName
- the name of the system environment the expression will returndefaultValue
- default value to return if no system environment exists
public static Expression constantExpression(Object value)
value
- the value the expression will return
public static Expression bodyExpression()
public static Expression bodyOgnlExpression(String ognl)
ognl
- methods to invoke on the body in a simple OGNL syntaxpublic static <T> Expression bodyExpression(Class<T> type)
public static Expression bodyExpression(String name)
public static Expression mandatoryBodyExpression(String name)
public static Expression threadNameExpression()
public static <T> Expression mandatoryBodyExpression(Class<T> type)
public static <T> Expression mandatoryBodyExpression(Class<T> type, boolean nullBodyAllowed)
type
- the typenullBodyAllowed
- whether null bodies is allowed and if so a null is returned,
otherwise an exception is thrownpublic static Expression bodyTypeExpression()
public static Expression outBodyExpression()
public static <T> Expression outBodyExpression(Class<T> type)
public static Expression faultBodyExpression()
public static <T> Expression faultBodyExpression(Class<T> type)
public static Expression exchangeExpression()
public static Expression inMessageExpression()
public static Expression outMessageExpression()
public static Expression convertToExpression(Expression expression, Class type)
public static Expression convertToExpression(Expression expression, Expression type)
public static Expression tokenizeExpression(Expression expression, String token)
public static Expression tokenizePairExpression(String startToken, String endToken, boolean includeTokens)
TokenPairExpressionIterator
expression
public static Expression tokenizeXMLExpression(String tagName, String inheritNamespaceTagName)
TokenXMLPairExpressionIterator
expression
public static Expression regexTokenizeExpression(Expression expression, String regexTokenizer)
public static Expression sortExpression(Expression expression, Comparator comparator)
List
object to allow sorting.
public static Expression regexReplaceAll(Expression expression, String regex, String replacement)
public static Expression regexReplaceAll(Expression expression, String regex, Expression replacementExpression)
public static Expression append(Expression left, Expression right)
public static Expression prepend(Expression left, Expression right)
public static Expression concatExpression(Collection<Expression> expressions)
expressions
- the expression to be concatenated dynamically
public static Expression concatExpression(Collection<Expression> expressions, String expression)
expressions
- the expression to be concatenated dynamicallyexpression
- the text description of the expression
public static Expression messageIdExpression()
public static Expression exchangeIdExpression()
public static Expression dateExpression(String command, String pattern)
public static Expression simpleExpression(String expression)
public static Expression beanExpression(String expression)
public static Expression beanExpression(Class<?> beanType, String methodName)
public static Expression beanExpression(Object bean, String methodName)
public static Expression beanExpression(String beanRef, String methodName)
public static Expression toExpression(String uri)
uri
- endpoint uri to send the exchange to
public static Expression fileNameExpression()
public static Expression fileOnlyNameExpression()
public static Expression fileNameNoExtensionExpression()
public static Expression fileOnlyNameNoExtensionExpression()
public static Expression fileExtensionExpression()
public static Expression fileParentExpression()
public static Expression filePathExpression()
public static Expression fileAbsolutePathExpression()
public static Expression fileAbsoluteExpression()
public static Expression fileSizeExpression()
public static Expression fileLastModifiedExpression()
public static Expression propertiesComponentExpression(String key, String locations)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |