Class AbstractObjectDescriptor
- java.lang.Object
-
- com._1c.g5.v8.dt.ui.aef.descriptor.AbstractObjectDescriptor
-
- Direct Known Subclasses:
AbstractFormAttributeDescriptor
,BaseFormattingCellPropertiesDcsDescriptor
,CatalogPredefinedItemDescriptor
,CharacteristicsDescriptionDescriptor
,ChartOfAccountsPredefinedItemDescriptor
,ChartOfCalculationTypesPredefinedItemDescriptor
,ChartOfCharacteristicTypesPredefinedItemDescriptor
,ExternalObjectProjectLanguageDescriptor
,FormAdditionDescriptor
,FormAutoCommandBarDescriptor
,FormButtonDescriptor
,FormCommandDescriptor
,FormContextMenuDescriptor
,FormDecorationDescriptor
,FormDescriptor
,FormExtendedTooltipDescriptor
,FormFieldDescriptor
,FormGroupDescriptor
,FormParameterDescriptor
,FormTableDescriptor
,GraphicalSchemeCaseDescriptor
,GraphicalSchemeDescriptor
,GraphicalSchemeItemDescriptor
,MdObjectDescriptor
public abstract class AbstractObjectDescriptor extends Object
The basic implementation of the object descriptor.
-
-
Constructor Summary
Constructors Constructor Description AbstractObjectDescriptor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected DtManagingDefinitionBuilder<?>
createBuilder()
Creates the definition builder.protected abstract void
doBuild()
Builds the definitions.protected DtManagingDefinitionBuilder<?>
getBuilder()
Returns the definition builder.IManagingDefinition
getDefinition()
Returns the root of definitions tree.protected Supplier<Iterable<IDefinition>>
getDefinitionsSupplier()
Returns theSupplier
of the children definitions.
NOTE: it is a shortcut forprotected DtSectionDefinitionBuilder<Void,?>
navigateToSection(Section section)
Navigates to the existing section using builder.protected DtManagingDefinitionBuilder<?>
registerRefresher(IRefresherFactory refresherFactory)
Registers the specifiedrefresherFactory
in managing definition.protected DtManagingDefinitionBuilder<?>
rule(IRule rule)
Sets theIRule
for root definition.protected DtSectionDefinitionBuilder<Void,?>
section(Section section)
Adds the new section using builder.protected DtManagingDefinitionBuilder<?>
setRuleResultProcessor(IRuleResultProcessor ruleResultProcessor)
Sets the givenIRuleResultProcessor
instance to managing definition.boolean
supports(Object... contexts)
Returnstrue
if the descriptor supports a list of contexts.
-
-
-
Method Detail
-
getDefinition
public IManagingDefinition getDefinition()
Returns the root of definitions tree.- Returns:
- the root of definitions tree.
-
supports
public boolean supports(Object... contexts)
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- Returns:
true
if the descriptor supports the given list of contexts
-
doBuild
protected abstract void doBuild()
Builds the definitions.
-
section
protected DtSectionDefinitionBuilder<Void,?> section(Section section)
Adds the new section using builder.- Parameters:
section
- theSection
.- Returns:
- the appropriate builder instance.
-
navigateToSection
protected DtSectionDefinitionBuilder<Void,?> navigateToSection(Section section)
Navigates to the existing section using builder.- Parameters:
section
- theSection
.- Returns:
- the appropriate builder instance.
-
rule
protected DtManagingDefinitionBuilder<?> rule(IRule rule)
Sets theIRule
for root definition.- Parameters:
rule
- the rule.- Returns:
- the appropriate builder instance.
-
setRuleResultProcessor
protected DtManagingDefinitionBuilder<?> setRuleResultProcessor(IRuleResultProcessor ruleResultProcessor)
Sets the givenIRuleResultProcessor
instance to managing definition.- Parameters:
processor
- theIRuleResultProcessor
instance, cannot benull
.- Returns:
- the appropriate builder instance, never
null
.
-
registerRefresher
protected DtManagingDefinitionBuilder<?> registerRefresher(IRefresherFactory refresherFactory)
Registers the specifiedrefresherFactory
in managing definition.- Parameters:
refresherFactory
- theIRefresherFactory
, cannot benull
.- Returns:
- the appropriate builder instance, never
null
.
-
getBuilder
protected DtManagingDefinitionBuilder<?> getBuilder()
Returns the definition builder.- Returns:
- the definition builder, never
null
-
createBuilder
protected DtManagingDefinitionBuilder<?> createBuilder()
Creates the definition builder.- Returns:
- the definition builder, never
null
-
getDefinitionsSupplier
protected Supplier<Iterable<IDefinition>> getDefinitionsSupplier()
Returns theSupplier
of the children definitions.
NOTE: it is a shortcut forSupplier
> supplier = () -> getDefinition().getChildren(); - Returns:
- the
Supplier
of the children definitions, nevernull
.
-
-