Class PolicyRuleCounterUpdater
java.lang.Object
com.evolveum.midpoint.repo.common.activity.policy.PolicyRuleCounterUpdater
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract @NotNull ExecutionSupportReturns execution support (instance of activity run) that is used to handle counter updates and to determine the execution mode (production vs simulation)protected IntegergetIncrementedPolicyRuleCounter(String ruleIdentifier) Returns the already incremented counter value for the given rule identifier, or null if it has not been incremented yet.protected abstract @NotNull Collection<? extends EvaluatedPolicyRule>Returns list of evaluated policy rules that should be considered for counter updates.protected voidstoreIncrementedPolicyRuleCounter(String ruleIdentifier, Integer counter) Callback method that can be used to store/cache counters.voidupdateCounters(OperationResult result) Updates counters for the triggered "counter-style" rules in repo (activity state) and in memory (rules themselves).
-
Constructor Details
-
PolicyRuleCounterUpdater
public PolicyRuleCounterUpdater()
-
-
Method Details
-
getIncrementedPolicyRuleCounter
Returns the already incremented counter value for the given rule identifier, or null if it has not been incremented yet. -
storeIncrementedPolicyRuleCounter
Callback method that can be used to store/cache counters. -
getPolicyRules
Returns list of evaluated policy rules that should be considered for counter updates. -
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
public void updateCounters(OperationResult result) throws SchemaException, ObjectNotFoundException, ObjectAlreadyExistsException Updates counters for the triggered "counter-style" rules in repo (activity state) and in memory (rules themselves).
-