Class ManagingDefinitionBuilder<T extends ManagingDefinitionBuilder<T>>

Direct Known Subclasses:
DtManagingDefinitionBuilder

public class ManagingDefinitionBuilder<T extends ManagingDefinitionBuilder<T>> extends AbstractContainerDefinitionBuilder<ManagingDefinition,T>
The managing definition builder. Allows to build the tree of definitions with the ManagingDefinition instance as root.
  • Constructor Details

    • ManagingDefinitionBuilder

      protected ManagingDefinitionBuilder()
      Creates a new instance.
  • Method Details

    • builder

      public static ManagingDefinitionBuilder<?> builder()
      Creates a new builder instance.
      Returns:
      a newly created builder, never null.
    • rule

      public T rule(IRule rule)
      Sets the given rule instance to managing definition.
      Parameters:
      rule - the rule, cannot be null.
      Returns:
      the builder instance, never null.
    • setRuleResultProcessor

      public T setRuleResultProcessor(IRuleResultProcessor processor)
      Sets the given IRuleResultProcessor instance to managing definition.
      Parameters:
      processor - the IRuleResultProcessor instance, cannot be null.
      Returns:
      the builder instance, never null.
    • registerRefresher

      public T registerRefresher(IRefresherFactory refresherFactory)
      Registers the specified refresherFactory in managing definition.
      Parameters:
      refresherFactory - the IRefresherFactory, cannot be null.
      Returns:
      the builder instance, never null.
    • section

      public SectionDefinitionBuilder<Void,?> section(String title)
      Returns the section builder instance that allows to setup section.
      Parameters:
      title - the title of the section, cannot be null
      Returns:
      the section builder instance, never null.
    • build

      public ManagingDefinition build()
      Returns the root of the builded tree of definitions.
      Overrides:
      build in class AbstractBuilder<ManagingDefinition,T extends ManagingDefinitionBuilder<T>>
      Returns:
      the builded ManagingDefinition instance, never null.
    • insertSection

      protected SectionDefinitionBuilder<Void,?> insertSection(Supplier<SectionDefinition> provider, Consumer<SectionDefinition> endAction)
      Inserts the section provided by provider and returns the section builder instance that allows to setup section.
      Parameters:
      provider - the definition provider, cannot be null
      endAction - the endAction the action performed the builder ends section building.
      Returns:
      the section builder instance, never null.