Class 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 Detail

      • Builder

        public Builder()
    • Method Detail

      • 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
      • 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.
      • 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).
      • 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 context
        target - the target object
        properties - 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 context
        target - the target object
        key - the property key
        value - the property value
        Returns:
        true if the property was bound