Class AbstractObjectDescriptor
java.lang.Object
com._1c.g5.properties.ui.descriptors.AbstractObjectDescriptor
The basic implementation of the object descriptor.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ManagingDefinitionBuilder<?>
Creates the definition builder.protected abstract void
doBuild()
Builds the definitions.protected ManagingDefinitionBuilder<?>
Returns the definition builder.Returns the root of definitions tree.protected Supplier<Iterable<IDefinition>>
Returns theSupplier
of the children definitions.
NOTE: it is a shortcut forprotected SectionDefinitionBuilder<Void,
?> navigateToSection
(String section) Navigates to the existing section using builder.protected ManagingDefinitionBuilder<?>
registerRefresher
(IRefresherFactory refresherFactory) Registers the specifiedrefresherFactory
in managing definition.protected ManagingDefinitionBuilder<?>
Sets theIRule
for root definition.protected SectionDefinitionBuilder<Void,
?> Adds the new section using builder.protected ManagingDefinitionBuilder<?>
setRuleResultProcessor
(IRuleResultProcessor ruleResultProcessor) Sets the givenIRuleResultProcessor
instance to managing definition.boolean
Returnstrue
if the descriptor supports a list of contexts.
-
Constructor Details
-
AbstractObjectDescriptor
public AbstractObjectDescriptor()
-
-
Method Details
-
getDefinition
Returns the root of definitions tree.- Returns:
- the root of definitions tree, never
null
.
-
supports
Returnstrue
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, nevernull
.- Returns:
true
if the descriptor supports the given list of contexts
-
doBuild
protected abstract void doBuild()Builds the definitions. -
section
Adds the new section using builder.- Parameters:
section
- - name of section to build, nevernull
.- Returns:
- the appropriate builder instance, never
null
.
-
rule
Sets theIRule
for root definition.- Parameters:
rule
- the rule, nevernull
.- Returns:
- the appropriate builder instance, never
null
.
-
setRuleResultProcessor
protected ManagingDefinitionBuilder<?> setRuleResultProcessor(IRuleResultProcessor ruleResultProcessor) Sets the givenIRuleResultProcessor
instance to managing definition.- Parameters:
ruleResultProcessor
- theIRuleResultProcessor
instance, cannot benull
.- Returns:
- the appropriate builder instance, never
null
.
-
registerRefresher
Registers the specifiedrefresherFactory
in managing definition.- Parameters:
refresherFactory
- theIRefresherFactory
, cannot benull
.- Returns:
- the appropriate builder instance, never
null
.
-
getBuilder
Returns the definition builder.- Returns:
- the definition builder, never
null
-
createBuilder
Creates the definition builder.- Returns:
- the definition builder, never
null
-
getDefinitionsSupplier
Returns theSupplier
of the children definitions.
NOTE: it is a shortcut forSupplier<Iterable
> supplier = () -> getDefinition().getChildren(); - Returns:
- the
Supplier
of the children definitions, nevernull
.
-