Interface CamelExpressionClause<T extends MessageProcessor.Builder<?,?>,F,E>


public interface CamelExpressionClause<T extends MessageProcessor.Builder<?,?>,F,E>
  • Method Details

    • getExpressionType

      F getExpressionType()
    • getExpressionValue

      E getExpressionValue()
    • expression

      T expression(E expression)
    • language

      T language(F factory)
    • constant

      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

      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

      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

      T exchange()
      An expression of the exchange
    • inMessage

      T inMessage()
      An expression of an inbound message
    • body

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

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

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

      T headers()
      An expression of the inbound headers
    • exchangePattern

      T exchangePattern()
      An expression of the exchange pattern
    • exchangeProperty

      T exchangeProperty(String name)
      An expression of an exchange property of the given name
    • exchangeProperties

      T exchangeProperties()
      An expression of the exchange properties
    • variable

      T variable(String name)
      An expression of a variable with the given name
    • method

      T method(String ref)
      Evaluates an expression using the <a href="http://camel.apache.org/bean-language.html>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

      T method(Object instance)
      Evaluates an expression using the <a href="http://camel.apache.org/bean-language.html>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

      T method(Class<?> beanType)
      Evaluates an expression using the <a href="http://camel.apache.org/bean-language.html>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

      T method(String ref, String method)
      Evaluates an expression using the <a href="http://camel.apache.org/bean-language.html>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
      method - the name of the method to invoke on the bean
      Returns:
      the builder to continue processing the DSL
    • method

      T method(String ref, Object scope)
      Evaluates an expression using the <a href="http://camel.apache.org/bean-language.html>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
      scope - the scope of the bean
      Returns:
      the builder to continue processing the DSL
    • method

      T method(String ref, String method, Object scope)
      Evaluates an expression using the <a href="http://camel.apache.org/bean-language.html>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
      method - the name of the method to invoke on the bean
      scope - the scope of the bean
      Returns:
      the builder to continue processing the DSL
    • method

      T method(Object instance, String method)
      Evaluates an expression using the <a href="http://camel.apache.org/bean-language.html>bean language which basically means the bean is invoked to determine the expression value.
      Parameters:
      instance - the existing instance of the bean
      method - the name of the method to invoke on the bean
      Returns:
      the builder to continue processing the DSL
    • method

      T method(Class<?> beanType, String method)
      Evaluates an expression using the <a href="http://camel.apache.org/bean-language.html>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
      method - the name of the method to invoke on the bean
      Returns:
      the builder to continue processing the DSL
    • method

      T method(Class<?> beanType, Object scope)
      Evaluates an expression using the <a href="http://camel.apache.org/bean-language.html>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
      scope - the scope of the bean
      Returns:
      the builder to continue processing the DSL
    • method

      T method(Class<?> beanType, String method, Object scope)
      Evaluates an expression using the <a href="http://camel.apache.org/bean-language.html>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
      method - the name of the method to invoke on the bean
      scope - the scope of the bean
      Returns:
      the builder to continue processing the DSL
    • groovy

      T groovy(String text)
      Evaluates a Groovy expression
      Parameters:
      text - the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • js

      T js(String text)
      Evaluates a JavaScript expression.
      Parameters:
      text - the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • js

      T js(String text, Class<?> resultType)
      Evaluates an JavaScript expression
      Parameters:
      text - the expression to be evaluated
      resultType - the return type expected by the expression
      Returns:
      the builder to continue processing the DSL
    • joor

      @Deprecated(since="4.3.0") T joor(String text)
      Deprecated.
      Evaluates an JOOR expression
      Parameters:
      text - the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • joor

      @Deprecated(since="4.3.0") T joor(String text, Class<?> resultType)
      Deprecated.
      Evaluates an JOOR expression
      Parameters:
      text - the expression to be evaluated
      resultType - the return type expected by the expression
      Returns:
      the builder to continue processing the DSL
    • java

      T java(String text)
      Evaluates an Java expression
      Parameters:
      text - the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • java

      T java(String text, Class<?> resultType)
      Evaluates an Java expression
      Parameters:
      text - the expression to be evaluated
      resultType - the return type expected by the expression
      Returns:
      the builder to continue processing the DSL
    • jq

      T jq(String text)
      Evaluates JQ expression
      Parameters:
      text - the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • jq

      T jq(String text, Class<?> resultType)
      Evaluates JQ expression
      Parameters:
      text - the expression to be evaluated
      resultType - the return type expected by the expression
      Returns:
      the builder to continue processing the DSL
    • datasonnet

      T datasonnet(String text)
      Parameters:
      text - the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • jsonpath

      T jsonpath(String text)
      Parameters:
      text - the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • jsonpath

      T jsonpath(String text, boolean suppressExceptions)
      Parameters:
      text - the expression to be evaluated
      suppressExceptions - whether to suppress exceptions such as PathNotFoundException
      Returns:
      the builder to continue processing the DSL
    • jsonpath

      T jsonpath(String text, boolean suppressExceptions, boolean allowSimple)
      Parameters:
      text - the expression to be evaluated
      suppressExceptions - whether to suppress exceptions such as PathNotFoundException
      allowSimple - whether to allow in inlined simple exceptions in the json path expression
      Returns:
      the builder to continue processing the DSL
    • jsonpath

      T jsonpath(String text, Class<?> resultType)
      Parameters:
      text - the expression to be evaluated
      resultType - the return type expected by the expression
      Returns:
      the builder to continue processing the DSL
    • jsonpath

      T jsonpath(String text, boolean suppressExceptions, Class<?> resultType)
      Parameters:
      text - the expression to be evaluated
      suppressExceptions - whether to suppress exceptions such as PathNotFoundException
      resultType - the return type expected by the expression
      Returns:
      the builder to continue processing the DSL
    • jsonpath

      T jsonpath(String text, boolean suppressExceptions, boolean allowSimple, Class<?> resultType)
      Parameters:
      text - the expression to be evaluated
      suppressExceptions - whether to suppress exceptions such as PathNotFoundException
      allowSimple - whether to allow in inlined simple exceptions in the json path expression
      resultType - the return type expected by the expression
      Returns:
      the builder to continue processing the DSL
    • jsonpathWriteAsString

      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

      T jsonpathWriteAsString(String text, Class<?> resultType)
      Evaluates a Json Path expression with writeAsString enabled.
      Parameters:
      text - the expression to be evaluated
      resultType - the return type expected by the expression
      Returns:
      the builder to continue processing the DSL
    • jsonpathWriteAsString

      T jsonpathWriteAsString(String text, boolean suppressExceptions)
      Evaluates a Json Path expression with writeAsString enabled.
      Parameters:
      text - the expression to be evaluated
      suppressExceptions - whether to suppress exceptions such as PathNotFoundException
      Returns:
      the builder to continue processing the DSL
    • jsonpathWriteAsString

      T jsonpathWriteAsString(String text, boolean suppressExceptions, Class<?> resultType)
      Evaluates a Json Path expression with writeAsString enabled.
      Parameters:
      text - the expression to be evaluated
      suppressExceptions - whether to suppress exceptions such as PathNotFoundException
      resultType - the return type expected by the expression
      Returns:
      the builder to continue processing the DSL
    • jsonpathWriteAsString

      T jsonpathWriteAsString(String text, boolean suppressExceptions, boolean allowSimple)
      Evaluates a Json Path expression with writeAsString enabled.
      Parameters:
      text - the expression to be evaluated
      suppressExceptions - whether to suppress exceptions such as PathNotFoundException
      allowSimple - whether to allow in inlined simple exceptions in the json path expression
      Returns:
      the builder to continue processing the DSL
    • jsonpathUnpack

      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 evaluated
      resultType - the return type expected by the expression
      Returns:
      the builder to continue processing the DSL
    • ognl

      T ognl(String text)
      Evaluates an OGNL expression
      Parameters:
      text - the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • python

      T python(String text)
      Evaluates a Python expression.
      Parameters:
      text - the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • python

      T python(String text, Class<?> resultType)
      Evaluates Python expression
      Parameters:
      text - the expression to be evaluated
      resultType - the return type expected by the expression
      Returns:
      the builder to continue processing the DSL
    • mvel

      T mvel(String text)
      Evaluates a MVEL expression
      Parameters:
      text - the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • ref

      T ref(String ref)
      Evaluates an expression by looking up existing expressions from the registry
      Parameters:
      ref - refers to the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • spel

      T spel(String text)
      Evaluates an SpEL expression
      Parameters:
      text - the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • csimple

      T csimple(String text)
      Evaluates a compiled simple expression
      Parameters:
      text - the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • csimple

      T csimple(String text, Class<?> resultType)
      Evaluates a compiled simple expression
      Parameters:
      text - the expression to be evaluated
      resultType - the return type expected by the expression
      Returns:
      the builder to continue processing the DSL
    • simple

      T simple(String text)
      Evaluates a Simple expression
      Parameters:
      text - the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • simple

      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
    • hl7terser

      T hl7terser(String text)
      Parameters:
      text - the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • tokenize

      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

      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

      T tokenize(String token, int group, boolean skipFirst)
      Evaluates a token expression on the message body
      Parameters:
      token - the token
      group - to group by the given number
      skipFirst - whether to skip the very first element
      Returns:
      the builder to continue processing the DSL
    • tokenize

      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

      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

      T tokenize(String token, boolean regex, int group, boolean skipFirst)
      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
      skipFirst - whether to skip the very first element
      Returns:
      the builder to continue processing the DSL
    • tokenize

      T tokenize(String token, boolean regex, String group, boolean skipFirst)
      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
      skipFirst - whether to skip the very first element
      Returns:
      the builder to continue processing the DSL
    • tokenizePair

      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

      T tokenizeXMLPair(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 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
    • tokenizeXMLPair

      T tokenizeXMLPair(String tagName, String inheritNamespaceTagName, String group)
      Evaluates a token pair expression on the message body with XML content
      Parameters:
      tagName - 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
    • xtokenize

      T xtokenize(String path, char mode, Object namespaces, int group)
      Evaluates an XML token expression on the message body with XML content
      Parameters:
      path - the xpath like path notation specifying the child nodes to tokenize
      mode - one of 'i', 'w', or 'u' to inject the namespaces to the token, to wrap the token with its ancestor contet, or to unwrap to its element child
      namespaces - the namespace map to the namespace bindings
      group - to group by the given number
      Returns:
      the builder to continue processing the DSL
    • xpath

      T xpath(String text)
      Evaluates an XPath expression
      Parameters:
      text - the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • xpath

      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

      T xpath(String text, Class<?> resultType, Object 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

      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

      T xpath(String text, Object 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

      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

      T xquery(String text)
      Evaluates an XQuery expression
      Parameters:
      text - the expression to be evaluated
      Returns:
      the builder to continue processing the DSL
    • xquery

      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

      T xquery(String text, Class<?> resultType, Object 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

      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

      T xquery(String text, Object 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

      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
    • wasm

      T wasm(String functionName, String module)
      Evaluates Wasm expression
      Parameters:
      functionName - the name of the Wasm function to be evaluated
      module - the Wasm module providing the expression function
      Returns:
      the builder to continue processing the DSL
    • wasm

      T wasm(String functionName, String module, Class<?> resultType)
      Evaluates Wasm expression
      Parameters:
      functionName - the name of the Wasm function to be evaluated
      module - the Wasm module providing the expression function
      resultType - the return type expected by the expression
      Returns:
      the builder to continue processing the DSL
    • language

      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