use of com.evolveum.midpoint.xml.ns._public.common.common_3.EvaluatedPolicyRuleTriggerType in project midpoint by Evolveum.
the class EvaluatedTriggerGroupDto method initializeFromRules.
public static EvaluatedTriggerGroupDto initializeFromRules(List<EvaluatedPolicyRuleType> rules, boolean highlighted, UniquenessFilter uniquenessFilter) {
List<AugmentedTrigger<HighlightingInformation>> augmentedTriggers = new ArrayList<>();
for (EvaluatedPolicyRuleType rule : rules) {
for (EvaluatedPolicyRuleTriggerType trigger : rule.getTrigger()) {
augmentedTriggers.add(new AugmentedTrigger<>(trigger, new HighlightingInformation(highlighted)));
}
}
List<TreeNode<AugmentedTrigger<HighlightingInformation>>> triggerTrees = arrangeForPresentationExt(augmentedTriggers, uniquenessFilter);
return new EvaluatedTriggerGroupDto(null, triggerTrees);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.EvaluatedPolicyRuleTriggerType in project midpoint by Evolveum.
the class EvaluatedPolicyRuleTrigger method toEvaluatedPolicyRuleTriggerType.
public EvaluatedPolicyRuleTriggerType toEvaluatedPolicyRuleTriggerType(EvaluatedPolicyRule owningRule) {
EvaluatedPolicyRuleTriggerType rv = new EvaluatedPolicyRuleTriggerType();
fillCommonContent(rv, owningRule);
return rv;
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.EvaluatedPolicyRuleTriggerType in project midpoint by Evolveum.
the class EvaluatedPolicyRuleTrigger method fillCommonContent.
protected void fillCommonContent(EvaluatedPolicyRuleTriggerType tt, EvaluatedPolicyRule owningRule) {
tt.setRuleName(owningRule.getName());
tt.setConstraintKind(constraintKind);
tt.setConstraint(constraint);
tt.setMessage(message);
if (owningRule.getAssignmentPath() != null) {
tt.setAssignmentPath(owningRule.getAssignmentPath().toAssignmentPathType());
}
ObjectType directOwner = owningRule.getDirectOwner();
if (directOwner != null) {
tt.setDirectOwnerRef(ObjectTypeUtil.createObjectRef(directOwner));
tt.setDirectOwnerDisplayName(ObjectTypeUtil.getDisplayName(directOwner));
}
}
Aggregations