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 for StandardComponents.
It processes the ComponentRuleTargets instances from the rule result and disables/enables the entire components.
  • Constructor Details

    • StandardComponentRuleResultProcessor

      public StandardComponentRuleResultProcessor()
  • Method Details

    • needCreateComponent

      public boolean needCreateComponent(IDefinition definition, IRuleResult ruleResult)
      Description copied from interface: IRuleResultProcessor
      Returns true if the component should be created by the componentDefinition for the given ruleResult.
      Specified by:
      needCreateComponent in interface IRuleResultProcessor
      Parameters:
      definition - the component definition, cannot be null.
      ruleResult - the IRuleResult instance, cannot be null.
      Returns:
      true if the component should be created by the componentDefinition for the given ruleResult.
    • process

      public void process(IComponent<?> component, IDefinition definition, IRuleResult oldRuleResult, IRuleResult newRuleResult)
      Description copied from interface: IRuleResultProcessor
      Processes the given oldRuleResult and newRuleResult for the specified component and corresponding componentDefinition.
      Specified by:
      process in interface IRuleResultProcessor
      Parameters:
      component - the component, cannot be null.
      definition - the definition of the component, cannot be null.
      oldRuleResult - the old rule result to process, cannot be null
      newRuleResult - the new rule result to process, cannot be null.
    • isRefreshRequired

      public boolean isRefreshRequired(IRuleResult oldResult, IRuleResult newResult)
      Description copied from interface: IRuleResultProcessor
      Returns true if the processor cannot update enablement or visibility and the entire component refresh is required.
      Specified by:
      isRefreshRequired in interface IRuleResultProcessor
      Parameters:
      oldResult - the old result, cannot be null.
      newResult - the new result, cannot be null.
      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 be null.
      Returns:
      a newly created rule target.