Search in sources :

Example 1 with AugmentedTrigger

use of com.evolveum.midpoint.model.api.util.EvaluatedPolicyRuleUtil.AugmentedTrigger 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);
}
Also used : AugmentedTrigger(com.evolveum.midpoint.model.api.util.EvaluatedPolicyRuleUtil.AugmentedTrigger) EvaluatedPolicyRuleType(com.evolveum.midpoint.xml.ns._public.common.common_3.EvaluatedPolicyRuleType) EvaluatedPolicyRuleTriggerType(com.evolveum.midpoint.xml.ns._public.common.common_3.EvaluatedPolicyRuleTriggerType) TreeNode(com.evolveum.midpoint.util.TreeNode) ArrayList(java.util.ArrayList)

Aggregations

AugmentedTrigger (com.evolveum.midpoint.model.api.util.EvaluatedPolicyRuleUtil.AugmentedTrigger)1 TreeNode (com.evolveum.midpoint.util.TreeNode)1 EvaluatedPolicyRuleTriggerType (com.evolveum.midpoint.xml.ns._public.common.common_3.EvaluatedPolicyRuleTriggerType)1 EvaluatedPolicyRuleType (com.evolveum.midpoint.xml.ns._public.common.common_3.EvaluatedPolicyRuleType)1 ArrayList (java.util.ArrayList)1