Package org.apache.camel.support
Class PropertyBindingSupport.Builder
- java.lang.Object
-
- org.apache.camel.support.PropertyBindingSupport.Builder
-
- Enclosing class:
- PropertyBindingSupport
public static class PropertyBindingSupport.Builder extends Object
To use a fluent builder style to configure this property binding support.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbind()Binds the properties to the target object, and removes the property that was bound from properties.booleanbind(org.apache.camel.CamelContext camelContext, Object target, String key, Object value)Binds the property to the target object.booleanbind(org.apache.camel.CamelContext camelContext, Object target, Map<String,Object> properties)Binds the properties to the target object, and removes the property that was bound from properties.PropertyBindingSupport.BuilderwithAllowPrivateSetter(boolean allowPrivateSetter)Whether properties should be filtered by prefix.PropertyBindingSupport.BuilderwithCamelContext(org.apache.camel.CamelContext camelContext)CamelContext to be usedPropertyBindingSupport.BuilderwithConfigurer(org.apache.camel.spi.PropertyConfigurer configurer)Whether to use the configurer to configure the properties.PropertyBindingSupport.BuilderwithDeepNesting(boolean deepNesting)Whether deep nesting is in use, where Camel will attempt to walk as deep as possible by creating new objects in the OGNL graph if a property has a setter and the object can be created from a default no-arg constructor.PropertyBindingSupport.BuilderwithFlattenProperties(boolean flattenProperties)Whether properties should be flattened (when properties is a map of maps).PropertyBindingSupport.BuilderwithFluentBuilder(boolean fluentBuilder)Whether fluent builder is allowed as a valid getter/setterPropertyBindingSupport.BuilderwithIgnoreCase(boolean ignoreCase)Whether to ignore case in the property names (keys).PropertyBindingSupport.BuilderwithListener(PropertyBindingListener listener)To use the property binding listener.PropertyBindingSupport.BuilderwithMandatory(boolean mandatory)Whether all parameters should be mandatory and successfully boundPropertyBindingSupport.BuilderwithNesting(boolean nesting)Whether nesting is in usePropertyBindingSupport.BuilderwithOptional(boolean optional)Whether parameters can be optional such as configuring endpoints that are lenientPropertyBindingSupport.BuilderwithOptionPrefix(String optionPrefix)Whether properties should be filtered by prefix.PropertyBindingSupport.BuilderwithPlaceholder(boolean placeholder)Whether to use Camels property placeholder to resolve placeholders on keys and valuesPropertyBindingSupport.BuilderwithProperties(Map<String,Object> properties)The properties to use for bindingPropertyBindingSupport.BuilderwithProperty(String key, Object value)Adds property to use for bindingPropertyBindingSupport.BuilderwithReference(boolean reference)Whether reference parameter (syntax starts with #) is in usePropertyBindingSupport.BuilderwithReflection(boolean reflection)Whether to allow using reflection (when there is no configurer available).PropertyBindingSupport.BuilderwithRemoveParameters(boolean removeParameters)Whether parameters should be removed when its boundPropertyBindingSupport.BuilderwithTarget(Object target)Target object that should have parameters bound
-
-
-
Method Detail
-
withCamelContext
public PropertyBindingSupport.Builder withCamelContext(org.apache.camel.CamelContext camelContext)
CamelContext to be used
-
withTarget
public PropertyBindingSupport.Builder withTarget(Object target)
Target object that should have parameters bound
-
withProperties
public PropertyBindingSupport.Builder withProperties(Map<String,Object> properties)
The properties to use for binding
-
withProperty
public PropertyBindingSupport.Builder withProperty(String key, Object value)
Adds property to use for binding
-
withRemoveParameters
public PropertyBindingSupport.Builder withRemoveParameters(boolean removeParameters)
Whether parameters should be removed when its bound
-
withFlattenProperties
public PropertyBindingSupport.Builder withFlattenProperties(boolean flattenProperties)
Whether properties should be flattened (when properties is a map of maps).
-
withMandatory
public PropertyBindingSupport.Builder withMandatory(boolean mandatory)
Whether all parameters should be mandatory and successfully bound
-
withOptional
public PropertyBindingSupport.Builder withOptional(boolean optional)
Whether parameters can be optional such as configuring endpoints that are lenient
-
withNesting
public PropertyBindingSupport.Builder withNesting(boolean nesting)
Whether nesting is in use
-
withDeepNesting
public PropertyBindingSupport.Builder withDeepNesting(boolean deepNesting)
Whether deep nesting is in use, where Camel will attempt to walk as deep as possible by creating new objects in the OGNL graph if a property has a setter and the object can be created from a default no-arg constructor.
-
withReference
public PropertyBindingSupport.Builder withReference(boolean reference)
Whether reference parameter (syntax starts with #) is in use
-
withPlaceholder
public PropertyBindingSupport.Builder withPlaceholder(boolean placeholder)
Whether to use Camels property placeholder to resolve placeholders on keys and values
-
withFluentBuilder
public PropertyBindingSupport.Builder withFluentBuilder(boolean fluentBuilder)
Whether fluent builder is allowed as a valid getter/setter
-
withAllowPrivateSetter
public PropertyBindingSupport.Builder withAllowPrivateSetter(boolean allowPrivateSetter)
Whether properties should be filtered by prefix. * Note that the prefix is removed from the key before the property is bound.
-
withIgnoreCase
public PropertyBindingSupport.Builder withIgnoreCase(boolean ignoreCase)
Whether to ignore case in the property names (keys).
-
withOptionPrefix
public PropertyBindingSupport.Builder withOptionPrefix(String optionPrefix)
Whether properties should be filtered by prefix. Note that the prefix is removed from the key before the property is bound.
-
withConfigurer
public PropertyBindingSupport.Builder withConfigurer(org.apache.camel.spi.PropertyConfigurer configurer)
Whether to use the configurer to configure the properties.
-
withReflection
public PropertyBindingSupport.Builder withReflection(boolean reflection)
Whether to allow using reflection (when there is no configurer available).
-
withListener
public PropertyBindingSupport.Builder withListener(PropertyBindingListener listener)
To use the property binding listener.
-
bind
public boolean bind()
Binds the properties to the target object, and removes the property that was bound from properties.- Returns:
- true if one or more properties was bound
-
bind
public boolean bind(org.apache.camel.CamelContext camelContext, Object target, Map<String,Object> properties)Binds the properties to the target object, and removes the property that was bound from properties.- Parameters:
camelContext- the camel contexttarget- the target objectproperties- the properties where the bound properties will be removed from- Returns:
- true if one or more properties was bound
-
bind
public boolean bind(org.apache.camel.CamelContext camelContext, Object target, String key, Object value)Binds the property to the target object.- Parameters:
camelContext- the camel contexttarget- the target objectkey- the property keyvalue- the property value- Returns:
- true if the property was bound
-
-