Class StandardComponentRuleResultProcessor
- java.lang.Object
-
- com._1c.g5.aef2.standard.definitions.rules.StandardComponentRuleResultProcessor
-
- All Implemented Interfaces:
IRuleResultProcessor
- Direct Known Subclasses:
AdoptedObjectRuleResultProcessor
public class StandardComponentRuleResultProcessor extends Object implements IRuleResultProcessor
The rule result processor forStandardComponent
s.
It processes theComponentRuleTarget
s instances from the rule result and disables/enables the entire components.
-
-
Constructor Summary
Constructors Constructor Description StandardComponentRuleResultProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IRuleTarget
createMatchingRuleTarget(IDefinition definition)
Creates and returns the rule target that will be used to find the match in the rule results.boolean
isRefreshRequired(IRuleResult oldResult, IRuleResult newResult)
Returnstrue
if the processor cannot update enablement or visibility and the entire component refresh is required.boolean
needCreateComponent(IDefinition definition, IRuleResult ruleResult)
Returnstrue
if the component should be created by thecomponentDefinition
for the givenruleResult
.void
process(IComponent<?> component, IDefinition definition, IRuleResult oldRuleResult, IRuleResult newRuleResult)
Processes the givenoldRuleResult
andnewRuleResult
for the specifiedcomponent
and correspondingcomponentDefinition
.
-
-
-
Method Detail
-
needCreateComponent
public boolean needCreateComponent(IDefinition definition, IRuleResult ruleResult)
Description copied from interface:IRuleResultProcessor
Returnstrue
if the component should be created by thecomponentDefinition
for the givenruleResult
.- Specified by:
needCreateComponent
in interfaceIRuleResultProcessor
- Parameters:
definition
- the component definition, cannot benull
.ruleResult
- theIRuleResult
instance, cannot benull
.- Returns:
true
if the component should be created by thecomponentDefinition
for the givenruleResult
.
-
process
public void process(IComponent<?> component, IDefinition definition, IRuleResult oldRuleResult, IRuleResult newRuleResult)
Description copied from interface:IRuleResultProcessor
Processes the givenoldRuleResult
andnewRuleResult
for the specifiedcomponent
and correspondingcomponentDefinition
.- Specified by:
process
in interfaceIRuleResultProcessor
- Parameters:
component
- the component, cannot benull
.definition
- the definition of the component, cannot benull
.oldRuleResult
- the old rule result to process, cannot benull
newRuleResult
- the new rule result to process, cannot benull
.
-
isRefreshRequired
public boolean isRefreshRequired(IRuleResult oldResult, IRuleResult newResult)
Description copied from interface:IRuleResultProcessor
Returnstrue
if the processor cannot update enablement or visibility and the entire component refresh is required.- Specified by:
isRefreshRequired
in interfaceIRuleResultProcessor
- Parameters:
oldResult
- the old result, cannot benull
.newResult
- the new result, cannot benull
.- Returns:
true
if the processor cannot update enablement or visibility and the entire component refresh is required.
-
createMatchingRuleTarget
protected IRuleTarget createMatchingRuleTarget(IDefinition definition)
Creates and returns the rule target that will be used to find the match in the rule results.- Parameters:
definition
- the definition, cannot benull
.- Returns:
- a newly created rule target.
-
-