Class ManagingDefinitionBuilder<T extends ManagingDefinitionBuilder<T>>
- java.lang.Object
-
- com._1c.g5.aef2.standard.definitions.builders.AbstractBuilder<R,T>
-
- com._1c.g5.aef2.standard.definitions.builders.AbstractContainerDefinitionBuilder<ManagingDefinition,T>
-
- com._1c.g5.aef2.standard.definitions.builders.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 theManagingDefinition
instance as root.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ManagingDefinitionBuilder()
Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ManagingDefinition
build()
Returns the root of the builded tree of definitions.static ManagingDefinitionBuilder<?>
builder()
Creates a new builder instance.protected SectionDefinitionBuilder<Void,?>
insertSection(Supplier<SectionDefinition> provider, Consumer<SectionDefinition> endAction)
Inserts the section provided byprovider
and returns the section builder instance that allows to setup section.SectionDefinitionBuilder<Void,?>
navigateToSection(String title)
Navigates to the existing section.T
registerRefresher(IRefresherFactory refresherFactory)
Registers the specifiedrefresherFactory
in managing definition.T
rule(IRule rule)
Sets the given rule instance to managing definition.SectionDefinitionBuilder<Void,?>
section(String title)
Returns the section builder instance that allows to setup section.T
setRuleResultProcessor(IRuleResultProcessor processor)
Sets the givenIRuleResultProcessor
instance to managing definition.-
Methods inherited from class com._1c.g5.aef2.standard.definitions.builders.AbstractContainerDefinitionBuilder
getAndIncrementPosition, getPosition, insert, setPosition
-
Methods inherited from class com._1c.g5.aef2.standard.definitions.builders.AbstractBuilder
apply, self
-
-
-
-
Method Detail
-
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 benull
.- Returns:
- the builder instance, never
null
.
-
setRuleResultProcessor
public T setRuleResultProcessor(IRuleResultProcessor processor)
Sets the givenIRuleResultProcessor
instance to managing definition.- Parameters:
processor
- theIRuleResultProcessor
instance, cannot benull
.- Returns:
- the builder instance, never
null
.
-
registerRefresher
public T registerRefresher(IRefresherFactory refresherFactory)
Registers the specifiedrefresherFactory
in managing definition.- Parameters:
refresherFactory
- theIRefresherFactory
, cannot benull
.- 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 benull
- Returns:
- the section builder instance, never
null
.
-
navigateToSection
public SectionDefinitionBuilder<Void,?> navigateToSection(String title)
Navigates to the existing section.- Parameters:
title
- the title of the section, cannot benull
- Returns:
- the section builder instance, never
null
.
-
build
public ManagingDefinition build()
Returns the root of the builded tree of definitions.- Overrides:
build
in classAbstractBuilder<ManagingDefinition,T extends ManagingDefinitionBuilder<T>>
- Returns:
- the builded
ManagingDefinition
instance, nevernull
.
-
insertSection
protected SectionDefinitionBuilder<Void,?> insertSection(Supplier<SectionDefinition> provider, Consumer<SectionDefinition> endAction)
Inserts the section provided byprovider
and returns the section builder instance that allows to setup section.- Parameters:
provider
- the definition provider, cannot benull
endAction
- the endAction the action performed the builder ends section building.- Returns:
- the section builder instance, never
null
.
-
-