Package org.apache.camel.builder
Class Builder
- java.lang.Object
-
- org.apache.camel.builder.Builder
-
public final class Builder extends Object
A helper class for including portions of the expression and predicate Java DSL Implementation of this builder should favor build expressions using the definition classes from the org.apache.camel.model.language package, to build the routes using the same types as it would happen when using XML DSL.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ValueBuilder
bean(Class<?> beanType, String method)
Deprecated.static ValueBuilder
bean(Object beanOrBeanRef)
Deprecated.usemethod(Object)
static ValueBuilder
bean(Object beanOrBeanRef, String method)
Deprecated.usemethod(Class, String)
(Object, String)}static ValueBuilder
body()
Returns a predicate and value builder for the inbound body on an exchangestatic <T> ValueBuilder
bodyAs(Class<T> type)
Returns a predicate and value builder for the inbound message body as a specific typestatic ValueBuilder
constant(Object value)
Returns a constant expressionstatic ValueBuilder
constant(Object value, boolean trim)
Returns a constant expressionstatic ValueBuilder
constant(String value, Class<?> resultType)
Returns a constant expressionstatic ValueBuilder
csimple(String value)
Returns a csimple expressionstatic ValueBuilder
csimple(String value, Class<?> resultType)
Returns a csimple expressionstatic ValueBuilder
exceptionMessage()
Returns a predicate and value builder for the exception message on an exchangestatic ValueBuilder
exceptionStackTrace()
Returns a predicate and value builder for the exception stacktrace on an exchangestatic ValueBuilder
exchangeProperty(String name)
Returns a predicate and value builder for properties on an exchangestatic ValueBuilder
header(String name)
Returns a predicate and value builder for headers on an exchangestatic ValueBuilder
joor(String value)
Returns a JOOR expression value builderstatic ValueBuilder
joor(String value, Class<?> resultType)
Returns a JOOR expression value builderstatic ValueBuilder
jq(String value)
Returns a JQ expression value builderstatic ValueBuilder
jq(String value, Class<?> resultType)
Returns a JQ expression value builderstatic ValueBuilder
jsonpath(String value)
Returns a JSonPath expression value builderstatic ValueBuilder
jsonpath(String value, Class<?> resultType)
Returns a JSonPath expression value builderstatic ValueBuilder
language(String language, String expression)
Returns a constant expressionstatic ValueBuilder
method(Class<?> beanType, String method)
Returns a method call expression value builderstatic ValueBuilder
method(Object beanOrBeanRef)
Returns a method call expression value builder.static ValueBuilder
method(Object beanOrBeanRef, String method)
Returns a method call expression value builder.static ValueBuilder
regexReplaceAll(org.apache.camel.Expression content, String regex, String replacement)
Returns an expression that replaces all occurrences of the regular expression with the given replacementstatic ValueBuilder
regexReplaceAll(org.apache.camel.Expression content, String regex, org.apache.camel.Expression replacement)
Returns an expression that replaces all occurrences of the regular expression with the given replacementstatic ValueBuilder
simple(String value)
Returns a simple expressionstatic ValueBuilder
simple(String value, Class<?> resultType)
Returns a simple expressionstatic ValueBuilder
systemProperty(String name)
Returns an expression for the given system propertystatic ValueBuilder
systemProperty(String name, String defaultValue)
Returns an expression for the given system property
-
-
-
Method Detail
-
bean
@Deprecated public static ValueBuilder bean(Object beanOrBeanRef)
Deprecated.usemethod(Object)
Returns a bean expression value builder. This method accepts dual parameters. Either an bean instance or a reference to a bean (String).- Parameters:
beanOrBeanRef
- either an instanceof a bean or a reference to bean to lookup in the Registry- Returns:
- the builder
-
bean
@Deprecated public static ValueBuilder bean(Object beanOrBeanRef, String method)
Deprecated.usemethod(Class, String)
(Object, String)}Returns a bean expression value builder. This method accepts dual parameters. Either an bean instance or a reference to a bean (String).- Parameters:
beanOrBeanRef
- either an instanceof a bean or a reference to bean to lookup in the Registrymethod
- the method name- Returns:
- the builder
-
bean
@Deprecated public static ValueBuilder bean(Class<?> beanType, String method)
Deprecated.Returns a bean expression value builder- Parameters:
beanType
- the bean class which will be invokedmethod
- name of method to invoke- Returns:
- the builder
-
method
public static ValueBuilder method(Object beanOrBeanRef)
Returns a method call expression value builder. This method accepts dual parameters. Either an bean instance or a reference to a bean (String).- Parameters:
beanOrBeanRef
- either an instanceof a bean or a reference to bean to lookup in the Registry- Returns:
- the builder
-
method
public static ValueBuilder method(Object beanOrBeanRef, String method)
Returns a method call expression value builder. This method accepts dual parameters. Either an bean instance or a reference to a bean (String).- Parameters:
beanOrBeanRef
- either an instanceof a bean or a reference to bean to lookup in the Registrymethod
- the method name- Returns:
- the builder
-
method
public static ValueBuilder method(Class<?> beanType, String method)
Returns a method call expression value builder- Parameters:
beanType
- the bean class which will be invokedmethod
- name of method to invoke- Returns:
- the builder
-
constant
public static ValueBuilder constant(Object value)
Returns a constant expression
-
constant
public static ValueBuilder constant(String value, Class<?> resultType)
Returns a constant expression
-
constant
public static ValueBuilder constant(Object value, boolean trim)
Returns a constant expression
-
language
public static ValueBuilder language(String language, String expression)
Returns a constant expression
-
csimple
public static ValueBuilder csimple(String value)
Returns a csimple expression
-
csimple
public static ValueBuilder csimple(String value, Class<?> resultType)
Returns a csimple expression
-
simple
public static ValueBuilder simple(String value)
Returns a simple expression
-
simple
public static ValueBuilder simple(String value, Class<?> resultType)
Returns a simple expression
-
joor
public static ValueBuilder joor(String value)
Returns a JOOR expression value builder
-
joor
public static ValueBuilder joor(String value, Class<?> resultType)
Returns a JOOR expression value builder
-
jq
public static ValueBuilder jq(String value)
Returns a JQ expression value builder
-
jq
public static ValueBuilder jq(String value, Class<?> resultType)
Returns a JQ expression value builder
-
jsonpath
public static ValueBuilder jsonpath(String value)
Returns a JSonPath expression value builder
-
jsonpath
public static ValueBuilder jsonpath(String value, Class<?> resultType)
Returns a JSonPath expression value builder- Parameters:
value
- The JSonPath expressionresultType
- The result type that the JSonPath expression will return.
-
header
public static ValueBuilder header(String name)
Returns a predicate and value builder for headers on an exchange
-
exchangeProperty
public static ValueBuilder exchangeProperty(String name)
Returns a predicate and value builder for properties on an exchange
-
body
public static ValueBuilder body()
Returns a predicate and value builder for the inbound body on an exchange
-
bodyAs
public static <T> ValueBuilder bodyAs(Class<T> type)
Returns a predicate and value builder for the inbound message body as a specific type
-
systemProperty
public static ValueBuilder systemProperty(String name)
Returns an expression for the given system property
-
systemProperty
public static ValueBuilder systemProperty(String name, String defaultValue)
Returns an expression for the given system property
-
exceptionMessage
public static ValueBuilder exceptionMessage()
Returns a predicate and value builder for the exception message on an exchange
-
exceptionStackTrace
public static ValueBuilder exceptionStackTrace()
Returns a predicate and value builder for the exception stacktrace on an exchange
-
regexReplaceAll
public static ValueBuilder regexReplaceAll(org.apache.camel.Expression content, String regex, String replacement)
Returns an expression that replaces all occurrences of the regular expression with the given replacement
-
regexReplaceAll
public static ValueBuilder regexReplaceAll(org.apache.camel.Expression content, String regex, org.apache.camel.Expression replacement)
Returns an expression that replaces all occurrences of the regular expression with the given replacement
-
-