Class AbstractObjectDescriptor

java.lang.Object
com._1c.g5.properties.ui.descriptors.AbstractObjectDescriptor

public abstract class AbstractObjectDescriptor extends Object
The basic implementation of the object descriptor.
  • Constructor Details

    • AbstractObjectDescriptor

      public AbstractObjectDescriptor()
  • Method Details

    • getDefinition

      public IManagingDefinition getDefinition()
      Returns the root of definitions tree.
      Returns:
      the root of definitions tree, never null.
    • supports

      public boolean supports(Object... contexts)
      Returns true if the descriptor supports a list of contexts.

      Note. The clients with @ContextDependent annotation must override the method. Otherwise it is not intended to be called.

      Parameters:
      contexts - The list of contexts, never null.
      Returns:
      true if the descriptor supports the given list of contexts
    • doBuild

      protected abstract void doBuild()
      Builds the definitions.
    • section

      protected SectionDefinitionBuilder<Void,?> section(String section)
      Adds the new section using builder.
      Parameters:
      section - - name of section to build, never null.
      Returns:
      the appropriate builder instance, never null.
    • rule

      protected ManagingDefinitionBuilder<?> rule(IRule rule)
      Sets the IRule for root definition.
      Parameters:
      rule - the rule, never null.
      Returns:
      the appropriate builder instance, never null.
    • setRuleResultProcessor

      protected ManagingDefinitionBuilder<?> setRuleResultProcessor(IRuleResultProcessor ruleResultProcessor)
      Sets the given IRuleResultProcessor instance to managing definition.
      Parameters:
      ruleResultProcessor - the IRuleResultProcessor instance, cannot be null.
      Returns:
      the appropriate builder instance, never null.
    • registerRefresher

      protected ManagingDefinitionBuilder<?> registerRefresher(IRefresherFactory refresherFactory)
      Registers the specified refresherFactory in managing definition.
      Parameters:
      refresherFactory - the IRefresherFactory, cannot be null.
      Returns:
      the appropriate builder instance, never null.
    • getBuilder

      protected ManagingDefinitionBuilder<?> getBuilder()
      Returns the definition builder.
      Returns:
      the definition builder, never null
    • createBuilder

      protected ManagingDefinitionBuilder<?> createBuilder()
      Creates the definition builder.
      Returns:
      the definition builder, never null
    • getDefinitionsSupplier

      protected Supplier<Iterable<IDefinition>> getDefinitionsSupplier()
      Returns the Supplier of the children definitions.
      NOTE: it is a shortcut for
        
            Supplier<Iterable> supplier = () -> getDefinition().getChildren();
        
       
      It is used in rules.
      Returns:
      the Supplier of the children definitions, never null.