Class NumericConstraintEvaluator<C extends NumericThresholdPolicyConstraintType>
java.lang.Object
com.evolveum.midpoint.repo.common.activity.policy.evaluator.NumericConstraintEvaluator<C>
- All Implemented Interfaces:
ActivityPolicyConstraintEvaluator<C,EvaluatedNumericTrigger<C>>
- Direct Known Subclasses:
ExecutionAttemptsConstraintEvaluator
public abstract class NumericConstraintEvaluator<C extends NumericThresholdPolicyConstraintType>
extends Object
implements ActivityPolicyConstraintEvaluator<C,EvaluatedNumericTrigger<C>>
Evaluated numerically-bound constraints like
PolicyConstraintKind.EXECUTION_ATTEMPTS.
Currently limited to activities!-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LocalizableMessageprotected LocalizableMessagecreateMessage(LocalizableMessage constraintName, String defaultConstraintName, int realValue, int threshold, EvaluatorUtils.ThresholdType type) protected LocalizableMessagecreateShortMessage(LocalizableMessage constraintName, String defaultConstraintName, EvaluatorUtils.ThresholdType type) evaluate(jakarta.xml.bind.JAXBElement<C> element, ActivityPolicyRuleEvaluationContext context, OperationResult result) Evaluates particular constraint; returns relevant triggers.abstract Integerprotected abstract PolicyConstraintKindprotected abstract @Nullable Integerprotected booleanshouldTriggerOnEmptyConstraint(C constraint, Integer value) protected booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.repo.common.activity.policy.ActivityPolicyConstraintEvaluator
getDataNeeds
-
Constructor Details
-
NumericConstraintEvaluator
public NumericConstraintEvaluator()
-
-
Method Details
-
evaluate
public List<EvaluatedNumericTrigger<C>> evaluate(jakarta.xml.bind.JAXBElement<C> element, ActivityPolicyRuleEvaluationContext context, OperationResult result) Description copied from interface:ActivityPolicyConstraintEvaluatorEvaluates particular constraint; returns relevant triggers.- Specified by:
evaluatein interfaceActivityPolicyConstraintEvaluator<C extends NumericThresholdPolicyConstraintType,EvaluatedNumericTrigger<C extends NumericThresholdPolicyConstraintType>>
-
shouldTriggerOnNullValue
protected boolean shouldTriggerOnNullValue() -
shouldTriggerOnEmptyConstraint
-
getPolicyConstraintKind
-
getLocalValue
-
getPreexistingValue
@Nullable protected abstract @Nullable Integer getPreexistingValue(ActivityPolicyRuleEvaluationContext context) -
createEvaluatorName
-
createMessage
protected LocalizableMessage createMessage(LocalizableMessage constraintName, String defaultConstraintName, int realValue, int threshold, EvaluatorUtils.ThresholdType type) -
createShortMessage
protected LocalizableMessage createShortMessage(LocalizableMessage constraintName, String defaultConstraintName, EvaluatorUtils.ThresholdType type)
-