use of com.evolveum.midpoint.xml.ns._public.common.common_3.ModificationPolicyConstraintType in project midpoint by Evolveum.
the class FocusProcessor method triggerRule.
private <F extends FocusType> void triggerRule(LensFocusContext<F> focusContext, EvaluatedPolicyRule policyRule) throws PolicyViolationException, SchemaException {
PolicyConstraintsType policyConstraints = policyRule.getPolicyConstraints();
if (policyConstraints == null) {
return;
}
for (ModificationPolicyConstraintType modificationConstraintType : policyConstraints.getModification()) {
focusContext.addPolicyRule(policyRule);
if (modificationConstraintMatches(focusContext, policyRule, modificationConstraintType)) {
EvaluatedPolicyRuleTrigger<?> trigger = new EvaluatedPolicyRuleTrigger<>(PolicyConstraintKindType.MODIFICATION, modificationConstraintType, "Focus " + focusContext.getHumanReadableName() + " was modified");
focusContext.triggerConstraint(policyRule, trigger);
}
}
}
Aggregations