Class ExpressionBuilder


  • public class ExpressionBuilder
    extends Object
    A helper class for working with expressions.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.apache.camel.Expression append​(org.apache.camel.Expression left, org.apache.camel.Expression right)
      Appends the String evaluations of the two expressions together
      static org.apache.camel.Expression beanExpression​(Object bean, String method)  
      static org.apache.camel.Expression beanExpression​(String expression)  
      static org.apache.camel.Expression beanExpression​(org.apache.camel.Expression expression, String method)  
      static org.apache.camel.Expression bodyExpression()
      Returns the expression for the exchanges inbound message body
      static <T> org.apache.camel.Expression bodyExpression​(Class<T> type)
      Returns the expression for the exchanges inbound message body converted to the given type
      static <T> org.apache.camel.Expression bodyExpression​(Class<T> bodyType, BiFunction<T,​Map<String,​Object>,​Object> function)
      Returns a functional expression for the exchanges inbound message body converted to a desired type and headers
      static <T> org.apache.camel.Expression bodyExpression​(Class<T> bodyType, Function<T,​Object> function)
      Returns a functional expression for the exchanges inbound message body converted to a desired type
      static org.apache.camel.Expression bodyExpression​(String name)
      Returns the expression for the exchanges inbound message body converted to the given type
      static org.apache.camel.Expression bodyExpression​(BiFunction<Object,​Map<String,​Object>,​Object> function)
      Returns a functional expression for the exchanges inbound message body and headers
      static org.apache.camel.Expression bodyExpression​(Function<Object,​Object> function)
      Returns a functional expression for the exchanges inbound message body
      static org.apache.camel.Expression bodyExpression​(org.apache.camel.Expression name)
      Returns the expression for the exchanges inbound message body converted to the given type
      static org.apache.camel.Expression bodyOneLine()
      Returns the expression for the message body as a one-line string
      static org.apache.camel.Expression bodyTypeExpression()
      Returns the expression for the exchanges inbound message body type
      static org.apache.camel.Expression camelContextExpression()
      Returns an expression for the CamelContext
      static org.apache.camel.Expression camelContextNameExpression()
      Returns an expression for the CamelContext name
      static org.apache.camel.Expression camelContextPropertiesExpression()
      Returns an expression for the properties of the camel context
      static org.apache.camel.Expression camelContextPropertyExpression​(String propertyName)
      Returns an expression for the property value of the camel context with the given name
      static org.apache.camel.Expression camelContextPropertyExpression​(org.apache.camel.Expression propertyName)
      Returns an expression for the property value of the camel context with the given name
      static org.apache.camel.Expression concatExpression​(Collection<org.apache.camel.Expression> expressions)
      Returns an expression which returns the string concatenation value of the various expressions
      static org.apache.camel.Expression concatExpression​(Collection<org.apache.camel.Expression> expressions, String description)
      Returns an expression which returns the string concatenation value of the various expressions
      static org.apache.camel.Expression constantExpression​(Object value)
      Returns an expression for the constant value
      static org.apache.camel.Expression convertToExpression​(org.apache.camel.Expression expression, Class<?> type)
      Returns an expression which converts the given expression to the given type
      static org.apache.camel.Expression convertToExpression​(org.apache.camel.Expression expression, org.apache.camel.Expression type)
      Returns an expression which converts the given expression to the given type the type expression is evaluated to
      static org.apache.camel.Expression exchangeExceptionExpression()
      Returns an expression for an exception set on the exchange
      static org.apache.camel.Expression exchangeExceptionExpression​(Class<Exception> type)
      Returns an expression for an exception set on the exchange
      static org.apache.camel.Expression exchangeExceptionMessageExpression()
      Returns an expression for an exception message set on the exchange
      static org.apache.camel.Expression exchangeExceptionStackTraceExpression()
      Returns an expression for an exception stacktrace set on the exchange
      static org.apache.camel.Expression exchangeExpression()
      Returns the expression for the exchange
      static org.apache.camel.Expression exchangeExpression​(Function<org.apache.camel.Exchange,​Object> function)
      Returns a functional expression for the exchange
      static org.apache.camel.Expression exchangeIdExpression()
      Returns an Expression for the exchange id
      static org.apache.camel.Expression exchangePatternExpression()
      Returns an expression for the exchange pattern
      static org.apache.camel.Expression exchangePropertiesExpression()
      Returns an expression for the exchange properties of exchange
      static org.apache.camel.Expression exchangePropertyExpression​(String propertyName)
      Returns an expression for the property value of exchange with the given name
      static org.apache.camel.Expression exchangePropertyExpression​(org.apache.camel.Expression propertyName)
      Returns an expression for the property value of exchange with the given name
      static org.apache.camel.Expression groupIteratorExpression​(org.apache.camel.Expression expression, String token, String group, boolean skipFirst)  
      static org.apache.camel.Expression groupXmlIteratorExpression​(org.apache.camel.Expression expression, String group)  
      static org.apache.camel.Expression headerExpression​(String headerName)
      Returns an expression for the header value with the given name
      static <T> org.apache.camel.Expression headerExpression​(String headerName, Class<T> type)
      Returns an expression for the header value with the given name converted to the given type
      static org.apache.camel.Expression headerExpression​(String headerName, String typeName)
      Returns an expression for the header value with the given name converted to the given type
      static org.apache.camel.Expression headerExpression​(org.apache.camel.Expression headerName)
      Returns an expression for the header value with the given name
      static org.apache.camel.Expression headerExpression​(org.apache.camel.Expression headerName, org.apache.camel.Expression typeName)
      Returns an expression for the header value with the given name converted to the given type
      static org.apache.camel.Expression headersExpression()
      Returns an expression for the inbound message headers
      static org.apache.camel.Expression hostnameExpression()
      Returns the expression for the local hostname
      static org.apache.camel.Expression inMessageExpression()
      Returns the expression for the IN message
      static org.apache.camel.Expression inMessageExpression​(Function<org.apache.camel.Message,​Object> function)
      Returns a functional expression for the IN message
      static org.apache.camel.Expression languageExpression​(String language, String expression)
      Returns an expression for evaluating the expression/predicate using the given language
      static org.apache.camel.Expression languageExpression​(String languageName, org.apache.camel.spi.Language language, String expression)
      Returns an expression for evaluating the expression/predicate using the given language
      static <T> org.apache.camel.Expression mandatoryBodyExpression​(Class<T> type)
      Returns the expression for the exchanges inbound message body converted to the given type.
      static <T> org.apache.camel.Expression mandatoryBodyExpression​(Class<T> type, boolean nullBodyAllowed)
      Returns the expression for the exchanges inbound message body converted to the given type
      static org.apache.camel.Expression messageExpression()
      Returns the expression for the IN message
      static org.apache.camel.Expression messageExpression​(Function<org.apache.camel.Message,​Object> function)
      Returns a functional expression for the IN message
      static org.apache.camel.Expression messageIdExpression()
      Returns an Expression for the inbound message id
      static org.apache.camel.Expression messageTimestampExpression()
      Returns an Expression for the inbound message timestamp
      static org.apache.camel.Expression prepend​(org.apache.camel.Expression left, org.apache.camel.Expression right)
      Prepends the String evaluations of the two expressions together
      static org.apache.camel.Expression propertiesComponentExist​(String key, boolean negate)  
      static org.apache.camel.Expression propertiesComponentExpression​(String key, String defaultValue)  
      static org.apache.camel.Expression refExpression​(String ref)
      Returns an expression for lookup a bean in the Registry
      static org.apache.camel.Expression refExpression​(org.apache.camel.Expression ref)
      Returns an expression for lookup a bean in the Registry
      static org.apache.camel.Expression regexReplaceAll​(org.apache.camel.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 org.apache.camel.Expression regexReplaceAll​(org.apache.camel.Expression expression, String regex, org.apache.camel.Expression replacementExpression)
      Transforms the expression into a String then performs the regex replaceAll to transform the String and return the result
      static org.apache.camel.Expression regexTokenizeExpression​(org.apache.camel.Expression expression, String regexTokenizer)
      Returns a tokenize expression which will tokenize the string with the given regex
      static org.apache.camel.Expression registryExpression()
      Returns an expression for the Registry
      static org.apache.camel.Expression routeIdExpression()
      Returns an Expression for the route id
      static org.apache.camel.Expression simpleExpression​(String expression)  
      static org.apache.camel.Expression skipFirstExpression​(org.apache.camel.Expression expression)
      Returns an expression that skips the first element
      static org.apache.camel.Expression sortExpression​(org.apache.camel.Expression expression, Comparator comparator)
      Returns a sort expression which will sort the expression with the given comparator.
      static org.apache.camel.Expression stepIdExpression()
      Returns the expression for the current step id (if any)
      static org.apache.camel.Expression systemEnvironmentExpression​(String propertyName)
      Returns an expression for a system environment value with the given name
      static org.apache.camel.Expression systemEnvironmentExpression​(String propertyName, String defaultValue)
      Returns an expression for a system environment value with the given name
      static org.apache.camel.Expression systemEnvironmentExpression​(org.apache.camel.Expression propertyName, org.apache.camel.Expression defaultValue)
      Returns an expression for a system environment value with the given name
      static org.apache.camel.Expression systemPropertyExpression​(String propertyName)
      Returns an expression for a system property value with the given name
      static org.apache.camel.Expression systemPropertyExpression​(String propertyName, String defaultValue)
      Returns an expression for a system property value with the given name
      static org.apache.camel.Expression systemPropertyExpression​(org.apache.camel.Expression exprName, org.apache.camel.Expression defaultValue)
      Returns an expression for a system property value with the given name
      static org.apache.camel.Expression threadNameExpression()
      Returns the expression for the current thread name
      static org.apache.camel.Expression tokenizeExpression​(org.apache.camel.Expression expression, String token)
      Returns a tokenize expression which will tokenize the string with the given token
      static org.apache.camel.Expression tokenizeExpression​(org.apache.camel.Expression expression, org.apache.camel.Expression token)
      Returns a tokenize expression which will tokenize the string with the given token
      static org.apache.camel.Expression tokenizePairExpression​(String startToken, String endToken, boolean includeTokens)
      Returns an TokenPairExpressionIterator expression
      static org.apache.camel.Expression tokenizeXMLAwareExpression​(String path, char mode)  
      static org.apache.camel.Expression tokenizeXMLAwareExpression​(String path, char mode, int group)  
      static org.apache.camel.Expression tokenizeXMLAwareExpression​(String path, char mode, int group, Namespaces namespaces)  
      static org.apache.camel.Expression tokenizeXMLAwareExpression​(String headerName, String path, char mode, int group, Namespaces namespaces)  
      static org.apache.camel.Expression tokenizeXMLExpression​(String tagName, String inheritNamespaceTagName)
      Returns an TokenXMLExpressionIterator expression
      static org.apache.camel.Expression typeConverterExpression()
      Returns an expression for the type converter
    • Constructor Detail

      • ExpressionBuilder

        public ExpressionBuilder()
    • Method Detail

      • headerExpression

        public static org.apache.camel.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.

        Parameters:
        headerName - the name of the header the expression will return
        Returns:
        an expression object which will return the header value
      • headerExpression

        public static org.apache.camel.Expression headerExpression​(org.apache.camel.Expression headerName)
        Returns an expression for the header value with the given name

        Will fallback and look in properties if not found in headers.

        Parameters:
        headerName - the name of the header the expression will return
        Returns:
        an expression object which will return the header value
      • headerExpression

        public static <T> org.apache.camel.Expression 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.

        Parameters:
        headerName - the name of the header the expression will return
        type - the type to convert to
        Returns:
        an expression object which will return the header value
      • headerExpression

        public static org.apache.camel.Expression headerExpression​(String headerName,
                                                                   String typeName)
        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.

        Parameters:
        headerName - the name of the header the expression will return
        typeName - the type to convert to as a FQN class name
        Returns:
        an expression object which will return the header value
      • headerExpression

        public static org.apache.camel.Expression headerExpression​(org.apache.camel.Expression headerName,
                                                                   org.apache.camel.Expression typeName)
        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.

        Parameters:
        headerName - the name of the header the expression will return
        typeName - the type to convert to as a FQN class name
        Returns:
        an expression object which will return the header value
      • headersExpression

        public static org.apache.camel.Expression headersExpression()
        Returns an expression for the inbound message headers
        Returns:
        an expression object which will return the inbound headers
      • exchangePatternExpression

        public static org.apache.camel.Expression exchangePatternExpression()
        Returns an expression for the exchange pattern
        Returns:
        an expression object which will return the exchange pattern
        See Also:
        Exchange.getPattern()
      • exchangeExceptionExpression

        public static org.apache.camel.Expression exchangeExceptionExpression()
        Returns an expression for an exception set on the exchange
        Returns:
        an expression object which will return the exception set on the exchange
        See Also:
        Exchange.getException()
      • exchangeExceptionExpression

        public static org.apache.camel.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

        Parameters:
        type - the exception type
        Returns:
        an expression object which will return the exception set on the exchange
        See Also:
        Exchange.getException(Class)
      • typeConverterExpression

        public static org.apache.camel.Expression typeConverterExpression()
        Returns an expression for the type converter
        Returns:
        an expression object which will return the type converter
      • registryExpression

        public static org.apache.camel.Expression registryExpression()
        Returns an expression for the Registry
        Returns:
        an expression object which will return the registry
      • refExpression

        public static org.apache.camel.Expression refExpression​(String ref)
        Returns an expression for lookup a bean in the Registry
        Returns:
        an expression object which will return the bean
      • refExpression

        public static org.apache.camel.Expression refExpression​(org.apache.camel.Expression ref)
        Returns an expression for lookup a bean in the Registry
        Returns:
        an expression object which will return the bean
      • camelContextExpression

        public static org.apache.camel.Expression camelContextExpression()
        Returns an expression for the CamelContext
        Returns:
        an expression object which will return the camel context
      • camelContextNameExpression

        public static org.apache.camel.Expression camelContextNameExpression()
        Returns an expression for the CamelContext name
        Returns:
        an expression object which will return the camel context name
      • exchangeExceptionMessageExpression

        public static org.apache.camel.Expression exchangeExceptionMessageExpression()
        Returns an expression for an exception message set on the exchange
        Returns:
        an expression object which will return the exception message set on the exchange
      • exchangeExceptionStackTraceExpression

        public static org.apache.camel.Expression exchangeExceptionStackTraceExpression()
        Returns an expression for an exception stacktrace set on the exchange
        Returns:
        an expression object which will return the exception stacktrace set on the exchange
      • exchangePropertyExpression

        public static org.apache.camel.Expression exchangePropertyExpression​(String propertyName)
        Returns an expression for the property value of exchange with the given name
        Parameters:
        propertyName - the name of the property the expression will return
        Returns:
        an expression object which will return the property value
      • exchangePropertyExpression

        public static org.apache.camel.Expression exchangePropertyExpression​(org.apache.camel.Expression propertyName)
        Returns an expression for the property value of exchange with the given name
        Parameters:
        propertyName - the name of the property the expression will return
        Returns:
        an expression object which will return the property value
      • exchangePropertiesExpression

        public static org.apache.camel.Expression exchangePropertiesExpression()
        Returns an expression for the exchange properties of exchange
        Returns:
        an expression object which will return the exchange properties
      • camelContextPropertiesExpression

        public static org.apache.camel.Expression camelContextPropertiesExpression()
        Returns an expression for the properties of the camel context
        Returns:
        an expression object which will return the properties
      • camelContextPropertyExpression

        public static org.apache.camel.Expression camelContextPropertyExpression​(String propertyName)
        Returns an expression for the property value of the camel context with the given name
        Parameters:
        propertyName - the name of the property the expression will return
        Returns:
        an expression object which will return the property value
      • camelContextPropertyExpression

        public static org.apache.camel.Expression camelContextPropertyExpression​(org.apache.camel.Expression propertyName)
        Returns an expression for the property value of the camel context with the given name
        Parameters:
        propertyName - the name of the property the expression will return
        Returns:
        an expression object which will return the property value
      • systemPropertyExpression

        public static org.apache.camel.Expression systemPropertyExpression​(String propertyName)
        Returns an expression for a system property value with the given name
        Parameters:
        propertyName - the name of the system property the expression will return
        Returns:
        an expression object which will return the system property value
      • systemPropertyExpression

        public static org.apache.camel.Expression systemPropertyExpression​(String propertyName,
                                                                           String defaultValue)
        Returns an expression for a system property value with the given name
        Parameters:
        propertyName - the name of the system property the expression will return
        defaultValue - default value to return if no system property exists
        Returns:
        an expression object which will return the system property value
      • systemPropertyExpression

        public static org.apache.camel.Expression systemPropertyExpression​(org.apache.camel.Expression exprName,
                                                                           org.apache.camel.Expression defaultValue)
        Returns an expression for a system property value with the given name
        Parameters:
        exprName - the name of the system property the expression will return
        defaultValue - default value to return if no system property exists
        Returns:
        an expression object which will return the system property value
      • systemEnvironmentExpression

        public static org.apache.camel.Expression systemEnvironmentExpression​(String propertyName)
        Returns an expression for a system environment value with the given name
        Parameters:
        propertyName - the name of the system environment the expression will return
        Returns:
        an expression object which will return the system property value
      • systemEnvironmentExpression

        public static org.apache.camel.Expression systemEnvironmentExpression​(String propertyName,
                                                                              String defaultValue)
        Returns an expression for a system environment value with the given name
        Parameters:
        propertyName - the name of the system environment the expression will return
        defaultValue - default value to return if no system environment exists
        Returns:
        an expression object which will return the system environment value
      • systemEnvironmentExpression

        public static org.apache.camel.Expression systemEnvironmentExpression​(org.apache.camel.Expression propertyName,
                                                                              org.apache.camel.Expression defaultValue)
        Returns an expression for a system environment value with the given name
        Parameters:
        propertyName - the name of the system environment the expression will return
        defaultValue - default value to return if no system environment exists
        Returns:
        an expression object which will return the system environment value
      • constantExpression

        public static org.apache.camel.Expression constantExpression​(Object value)
        Returns an expression for the constant value
        Parameters:
        value - the value the expression will return
        Returns:
        an expression object which will return the constant value
      • languageExpression

        public static org.apache.camel.Expression languageExpression​(String languageName,
                                                                     org.apache.camel.spi.Language language,
                                                                     String expression)
        Returns an expression for evaluating the expression/predicate using the given language
        Parameters:
        languageName - the language name
        language - the language
        expression - the expression or predicate
        Returns:
        an expression object which will evaluate the expression/predicate using the given language
      • languageExpression

        public static org.apache.camel.Expression languageExpression​(String language,
                                                                     String expression)
        Returns an expression for evaluating the expression/predicate using the given language
        Parameters:
        expression - the expression or predicate
        Returns:
        an expression object which will evaluate the expression/predicate using the given language
      • bodyExpression

        public static org.apache.camel.Expression bodyExpression()
        Returns the expression for the exchanges inbound message body
      • bodyExpression

        public static org.apache.camel.Expression bodyExpression​(Function<Object,​Object> function)
        Returns a functional expression for the exchanges inbound message body
      • bodyExpression

        public static org.apache.camel.Expression bodyExpression​(BiFunction<Object,​Map<String,​Object>,​Object> function)
        Returns a functional expression for the exchanges inbound message body and headers
      • bodyExpression

        public static <T> org.apache.camel.Expression bodyExpression​(Class<T> bodyType,
                                                                     Function<T,​Object> function)
        Returns a functional expression for the exchanges inbound message body converted to a desired type
      • bodyExpression

        public static <T> org.apache.camel.Expression bodyExpression​(Class<T> bodyType,
                                                                     BiFunction<T,​Map<String,​Object>,​Object> function)
        Returns a functional expression for the exchanges inbound message body converted to a desired type and headers
      • bodyExpression

        public static <T> org.apache.camel.Expression bodyExpression​(Class<T> type)
        Returns the expression for the exchanges inbound message body converted to the given type
      • bodyExpression

        public static org.apache.camel.Expression bodyExpression​(String name)
        Returns the expression for the exchanges inbound message body converted to the given type
      • bodyExpression

        public static org.apache.camel.Expression bodyExpression​(org.apache.camel.Expression name)
        Returns the expression for the exchanges inbound message body converted to the given type
      • threadNameExpression

        public static org.apache.camel.Expression threadNameExpression()
        Returns the expression for the current thread name
      • hostnameExpression

        public static org.apache.camel.Expression hostnameExpression()
        Returns the expression for the local hostname
      • stepIdExpression

        public static org.apache.camel.Expression stepIdExpression()
        Returns the expression for the current step id (if any)
      • mandatoryBodyExpression

        public static <T> org.apache.camel.Expression mandatoryBodyExpression​(Class<T> type)
        Returns the expression for the exchanges inbound message body converted to the given type.

        Does not allow null bodies.

      • mandatoryBodyExpression

        public static <T> org.apache.camel.Expression mandatoryBodyExpression​(Class<T> type,
                                                                              boolean nullBodyAllowed)
        Returns the expression for the exchanges inbound message body converted to the given type
        Parameters:
        type - the type
        nullBodyAllowed - whether null bodies is allowed and if so a null is returned, otherwise an exception is thrown
      • bodyTypeExpression

        public static org.apache.camel.Expression bodyTypeExpression()
        Returns the expression for the exchanges inbound message body type
      • exchangeExpression

        public static org.apache.camel.Expression exchangeExpression()
        Returns the expression for the exchange
      • exchangeExpression

        public static org.apache.camel.Expression exchangeExpression​(Function<org.apache.camel.Exchange,​Object> function)
        Returns a functional expression for the exchange
      • messageExpression

        public static org.apache.camel.Expression messageExpression()
        Returns the expression for the IN message
      • messageExpression

        public static org.apache.camel.Expression messageExpression​(Function<org.apache.camel.Message,​Object> function)
        Returns a functional expression for the IN message
      • inMessageExpression

        public static org.apache.camel.Expression inMessageExpression()
        Returns the expression for the IN message
      • inMessageExpression

        public static org.apache.camel.Expression inMessageExpression​(Function<org.apache.camel.Message,​Object> function)
        Returns a functional expression for the IN message
      • convertToExpression

        public static org.apache.camel.Expression convertToExpression​(org.apache.camel.Expression expression,
                                                                      Class<?> type)
        Returns an expression which converts the given expression to the given type
      • convertToExpression

        public static org.apache.camel.Expression convertToExpression​(org.apache.camel.Expression expression,
                                                                      org.apache.camel.Expression type)
        Returns an expression which converts the given expression to the given type the type expression is evaluated to
      • tokenizeExpression

        public static org.apache.camel.Expression tokenizeExpression​(org.apache.camel.Expression expression,
                                                                     String token)
        Returns a tokenize expression which will tokenize the string with the given token
      • tokenizeExpression

        public static org.apache.camel.Expression tokenizeExpression​(org.apache.camel.Expression expression,
                                                                     org.apache.camel.Expression token)
        Returns a tokenize expression which will tokenize the string with the given token
      • skipFirstExpression

        public static org.apache.camel.Expression skipFirstExpression​(org.apache.camel.Expression expression)
        Returns an expression that skips the first element
      • regexTokenizeExpression

        public static org.apache.camel.Expression regexTokenizeExpression​(org.apache.camel.Expression expression,
                                                                          String regexTokenizer)
        Returns a tokenize expression which will tokenize the string with the given regex
      • groupXmlIteratorExpression

        public static org.apache.camel.Expression groupXmlIteratorExpression​(org.apache.camel.Expression expression,
                                                                             String group)
      • groupIteratorExpression

        public static org.apache.camel.Expression groupIteratorExpression​(org.apache.camel.Expression expression,
                                                                          String token,
                                                                          String group,
                                                                          boolean skipFirst)
      • sortExpression

        public static org.apache.camel.Expression sortExpression​(org.apache.camel.Expression expression,
                                                                 Comparator comparator)
        Returns a sort expression which will sort the expression with the given comparator.

        The expression is evaluated as a List object to allow sorting.

      • regexReplaceAll

        public static org.apache.camel.Expression regexReplaceAll​(org.apache.camel.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
      • regexReplaceAll

        public static org.apache.camel.Expression regexReplaceAll​(org.apache.camel.Expression expression,
                                                                  String regex,
                                                                  org.apache.camel.Expression replacementExpression)
        Transforms the expression into a String then performs the regex replaceAll to transform the String and return the result
      • append

        public static org.apache.camel.Expression append​(org.apache.camel.Expression left,
                                                         org.apache.camel.Expression right)
        Appends the String evaluations of the two expressions together
      • prepend

        public static org.apache.camel.Expression prepend​(org.apache.camel.Expression left,
                                                          org.apache.camel.Expression right)
        Prepends the String evaluations of the two expressions together
      • concatExpression

        public static org.apache.camel.Expression concatExpression​(Collection<org.apache.camel.Expression> expressions)
        Returns an expression which returns the string concatenation value of the various expressions
        Parameters:
        expressions - the expression to be concatenated dynamically
        Returns:
        an expression which when evaluated will return the concatenated values
      • concatExpression

        public static org.apache.camel.Expression concatExpression​(Collection<org.apache.camel.Expression> expressions,
                                                                   String description)
        Returns an expression which returns the string concatenation value of the various expressions
        Parameters:
        expressions - the expression to be concatenated dynamically
        description - the text description of the expression
        Returns:
        an expression which when evaluated will return the concatenated values
      • messageIdExpression

        public static org.apache.camel.Expression messageIdExpression()
        Returns an Expression for the inbound message id
      • messageTimestampExpression

        public static org.apache.camel.Expression messageTimestampExpression()
        Returns an Expression for the inbound message timestamp
      • exchangeIdExpression

        public static org.apache.camel.Expression exchangeIdExpression()
        Returns an Expression for the exchange id
      • routeIdExpression

        public static org.apache.camel.Expression routeIdExpression()
        Returns an Expression for the route id
      • simpleExpression

        public static org.apache.camel.Expression simpleExpression​(String expression)
      • beanExpression

        public static org.apache.camel.Expression beanExpression​(String expression)
      • beanExpression

        public static org.apache.camel.Expression beanExpression​(Object bean,
                                                                 String method)
      • beanExpression

        public static org.apache.camel.Expression beanExpression​(org.apache.camel.Expression expression,
                                                                 String method)
      • propertiesComponentExpression

        public static org.apache.camel.Expression propertiesComponentExpression​(String key,
                                                                                String defaultValue)
      • propertiesComponentExist

        public static org.apache.camel.Expression propertiesComponentExist​(String key,
                                                                           boolean negate)
      • tokenizePairExpression

        public static org.apache.camel.Expression tokenizePairExpression​(String startToken,
                                                                         String endToken,
                                                                         boolean includeTokens)
        Returns an TokenPairExpressionIterator expression
      • tokenizeXMLExpression

        public static org.apache.camel.Expression tokenizeXMLExpression​(String tagName,
                                                                        String inheritNamespaceTagName)
        Returns an TokenXMLExpressionIterator expression
      • tokenizeXMLAwareExpression

        public static org.apache.camel.Expression tokenizeXMLAwareExpression​(String path,
                                                                             char mode)
      • tokenizeXMLAwareExpression

        public static org.apache.camel.Expression tokenizeXMLAwareExpression​(String path,
                                                                             char mode,
                                                                             int group)
      • tokenizeXMLAwareExpression

        public static org.apache.camel.Expression tokenizeXMLAwareExpression​(String path,
                                                                             char mode,
                                                                             int group,
                                                                             Namespaces namespaces)
      • tokenizeXMLAwareExpression

        public static org.apache.camel.Expression tokenizeXMLAwareExpression​(String headerName,
                                                                             String path,
                                                                             char mode,
                                                                             int group,
                                                                             Namespaces namespaces)
      • bodyOneLine

        public static org.apache.camel.Expression bodyOneLine()
        Returns the expression for the message body as a one-line string