Class PolicyRuleTypeUtil
java.lang.Object
com.evolveum.midpoint.schema.util.PolicyRuleTypeUtil
Utility class related to policy rules, common to all layers (up to GUI).
TODO consider splitting into more focused classes
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanaccept(PolicyConstraintsType pc, PolicyRuleTypeUtil.ConstraintVisitor visitor, boolean deep, boolean alsoRoots, QName rootElementName, boolean ignoreRefs) Visits all constraints in givenPolicyConstraintsType.static voidaccept(List<EvaluatedPolicyRuleTriggerType> triggers, Consumer<EvaluatedPolicyRuleTriggerType> visitor) static Stringstatic Stringstatic <T extends PolicyActionType>
List<PolicyActionConfigItem<T>>filterActions(@NotNull Collection<? extends PolicyActionConfigItem<?>> actionsConfigItems, @NotNull Class<T> actionBeanClass) static @NotNull List<EvaluatedExclusionTriggerType>static voidresolveConstraintReferences(List<PolicyRuleType> rules, Collection<? extends PolicyRuleType> otherRules) FIXME what about the origin of the constraints?static List<jakarta.xml.bind.JAXBElement<AbstractPolicyConstraintType>>toConstraintsList(PolicyConstraintsType pc, boolean ignoreRefs) Returns the top-level list of constraints under aPolicyConstraintsType.static booleantriggerCollectionsEqual(Collection<EvaluatedPolicyRuleTriggerType> triggers, Collection<EvaluatedPolicyRuleTriggerType> currentTriggersUnpacked)
-
Constructor Details
-
PolicyRuleTypeUtil
public PolicyRuleTypeUtil()
-
-
Method Details
-
accept
public static void accept(List<EvaluatedPolicyRuleTriggerType> triggers, Consumer<EvaluatedPolicyRuleTriggerType> visitor) -
triggerCollectionsEqual
public static boolean triggerCollectionsEqual(Collection<EvaluatedPolicyRuleTriggerType> triggers, Collection<EvaluatedPolicyRuleTriggerType> currentTriggersUnpacked) -
filterActions
public static <T extends PolicyActionType> List<PolicyActionConfigItem<T>> filterActions(@NotNull @NotNull Collection<? extends PolicyActionConfigItem<?>> actionsConfigItems, @NotNull @NotNull Class<T> actionBeanClass) -
accept
public static boolean accept(PolicyConstraintsType pc, PolicyRuleTypeUtil.ConstraintVisitor visitor, boolean deep, boolean alsoRoots, QName rootElementName, boolean ignoreRefs) Visits all constraints in givenPolicyConstraintsType.- Parameters:
pc- the constraints to visitdeep- whether we want to recursely visit embedded constraints (and, or, not, transition)alsoRoots- whether we want to call the visitor also for the root (rootElementName must be set then)ignoreRefs-falseif we want to visit referenced constraints (which must be resolved then)- Returns:
falseif the process was stopped by thePolicyRuleTypeUtil.ConstraintVisitor.
-
toConstraintsList
public static List<jakarta.xml.bind.JAXBElement<AbstractPolicyConstraintType>> toConstraintsList(PolicyConstraintsType pc, boolean ignoreRefs) Returns the top-level list of constraints under aPolicyConstraintsType.- Parameters:
ignoreRefs- iffalse, the returned list will also contain referenced constraints (which must be resolved then)
-
resolveConstraintReferences
public static void resolveConstraintReferences(List<PolicyRuleType> rules, Collection<? extends PolicyRuleType> otherRules) FIXME what about the origin of the constraints? -
getAllExclusionTriggers
@NotNull public static @NotNull List<EvaluatedExclusionTriggerType> getAllExclusionTriggers(List<EvaluatedPolicyRuleType> rules) -
createId
-
createId
-