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 ValueBuilderbean(Class<?> beanType, String method)Deprecated.static ValueBuilderbean(Object beanOrBeanRef)Deprecated.usemethod(Object)static ValueBuilderbean(Object beanOrBeanRef, String method)Deprecated.usemethod(Class, String)(Object, String)}static ValueBuilderbody()Returns a predicate and value builder for the inbound body on an exchangestatic <T> ValueBuilderbodyAs(Class<T> type)Returns a predicate and value builder for the inbound message body as a specific typestatic ValueBuilderconstant(Object value)Returns a constant expressionstatic ValueBuilderconstant(Object value, boolean trim)Returns a constant expressionstatic ValueBuilderconstant(String value, Class<?> resultType)Returns a constant expressionstatic ValueBuildercsimple(String value)Returns a csimple expressionstatic ValueBuildercsimple(String value, Class<?> resultType)Returns a csimple expressionstatic ValueBuilderexceptionMessage()Returns a predicate and value builder for the exception message on an exchangestatic ValueBuilderexceptionStackTrace()Returns a predicate and value builder for the exception stacktrace on an exchangestatic ValueBuilderexchangeProperty(String name)Returns a predicate and value builder for properties on an exchangestatic ValueBuilderheader(String name)Returns a predicate and value builder for headers on an exchangestatic ValueBuilderjoor(String value)Returns a JOOR expression value builderstatic ValueBuilderjoor(String value, Class<?> resultType)Returns a JOOR expression value builderstatic ValueBuilderjq(String value)Returns a JQ expression value builderstatic ValueBuilderjq(String value, Class<?> resultType)Returns a JQ expression value builderstatic ValueBuilderjsonpath(String value)Returns a JSonPath expression value builderstatic ValueBuilderjsonpath(String value, Class<?> resultType)Returns a JSonPath expression value builderstatic ValueBuilderlanguage(String language, String expression)Returns a constant expressionstatic ValueBuildermethod(Class<?> beanType, String method)Returns a method call expression value builderstatic ValueBuildermethod(Object beanOrBeanRef)Returns a method call expression value builder.static ValueBuildermethod(Object beanOrBeanRef, String method)Returns a method call expression value builder.static ValueBuilderregexReplaceAll(org.apache.camel.Expression content, String regex, String replacement)Returns an expression that replaces all occurrences of the regular expression with the given replacementstatic ValueBuilderregexReplaceAll(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 ValueBuildersimple(String value)Returns a simple expressionstatic ValueBuildersimple(String value, Class<?> resultType)Returns a simple expressionstatic ValueBuildersystemProperty(String name)Returns an expression for the given system propertystatic ValueBuildersystemProperty(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
-
-