Class NestedPropertiesBuilder

java.lang.Object
org.apache.commons.digester3.binder.NestedPropertiesBuilder
All Implemented Interfaces:
RuleProvider<SetNestedPropertiesRule>

public final class NestedPropertiesBuilder extends Object
Builder chained when invoking LinkedRuleBuilder.setNestedProperties().
Since:
3.0
  • Method Details

    • ignoreElement

      Allows ignore a matching element.
      Parameters:
      elementName - The child xml element to be ignored
      Returns:
      this builder instance
    • addAlias

      @Deprecated public NestedPropertiesBuilder addAlias(String elementName, String propertyName)
      Deprecated.
      Allows element2property mapping to be overridden.
      Parameters:
      elementName - The child xml element to match
      propertyName - The java bean property to be assigned the value
      Returns:
      this builder instance
    • addAlias

      Allows element2property mapping to be overridden.
      Parameters:
      elementName - The child xml element to match
      Returns:
      the property alias builder
      Since:
      3.2
    • trimData

      public NestedPropertiesBuilder trimData(boolean trimData)
      When set to true, any text within child elements will have leading and trailing whitespace removed before assignment to the target object.
      Parameters:
      trimData - Flag to set any text within child elements will have leading and trailing whitespace removed
      Returns:
      this builder instance
    • allowUnknownChildElements

      public NestedPropertiesBuilder allowUnknownChildElements(boolean allowUnknownChildElements)
      Determines whether an error is reported when a nested element is encountered for which there is no corresponding property-setter method.
      Parameters:
      allowUnknownChildElements - flag to ignore any child element for which there is no corresponding object property
      Returns:
      this builder instance
    • createRule

      Provides an instance of Rule. Must never return null.
      Returns:
      an instance of Rule.
      See Also:
    • then

      public final LinkedRuleBuilder then()
      Come back to the main LinkedRuleBuilder.
      Returns:
      the main LinkedRuleBuilder
    • getNamespaceURI

      public final String getNamespaceURI()
      Returns the namespace URI for which this Rule is relevant, if any.
      Returns:
      The namespace URI for which this Rule is relevant, if any
    • get

      public final SetNestedPropertiesRule get()
      Provides an instance of Rule. Must never return null.
      Specified by:
      get in interface RuleProvider<R extends Rule>
      Returns:
      an instance of Rule.
    • reportError

      protected final void reportError(String methodChain, String message)
    • getPattern

      public final String getPattern()
      Returns the rule pattern associated to this builder.
      Returns:
      The rule pattern associated to this builder