Class PolicyRuleCounterUpdater

java.lang.Object
com.evolveum.midpoint.repo.common.activity.policy.PolicyRuleCounterUpdater

public abstract class PolicyRuleCounterUpdater extends Object
This class is responsible for updating the counters of evaluated activity (TODO - only activity [povol]) policy rules. It checks which rules have been triggered and have a threshold, and increments their counters accordingly.
  • Constructor Details

    • PolicyRuleCounterUpdater

      public PolicyRuleCounterUpdater()
  • Method Details

    • getIncrementedPolicyRuleCounter

      protected Integer getIncrementedPolicyRuleCounter(String ruleIdentifier)
      Returns the already incremented counter value for the given rule identifier, or null if it has not been incremented yet.
    • storeIncrementedPolicyRuleCounter

      protected void storeIncrementedPolicyRuleCounter(String ruleIdentifier, Integer counter)
      Callback method that can be used to store/cache counters.
    • getPolicyRules

      @NotNull protected abstract @NotNull Collection<? extends EvaluatedPolicyRule> getPolicyRules()
      Returns list of evaluated policy rules that should be considered for counter updates.
    • getExecutionSupport

      @NotNull protected abstract @NotNull ExecutionSupport getExecutionSupport()
      Returns execution support (instance of activity run) that is used to handle counter updates and to determine the execution mode (production vs simulation)
    • updateCounters

      Updates counters for the triggered "counter-style" rules in repo (activity state) and in memory (rules themselves).
      Throws:
      SchemaException
      ObjectNotFoundException
      ObjectAlreadyExistsException