Class PolicyRuleTypeUtil
- java.lang.Object
-
- com.evolveum.midpoint.schema.util.PolicyRuleTypeUtil
-
public class PolicyRuleTypeUtil extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPolicyRuleTypeUtil.LazyMapConstraintsResolver
-
Constructor Summary
Constructors Constructor Description PolicyRuleTypeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanaccept(PolicyConstraintsType pc, com.evolveum.midpoint.schema.util.PolicyRuleTypeUtil.ConstraintVisitor visitor, boolean deep, boolean alsoRoots, QName rootElementName, boolean ignoreRefs)Returns false if the process was stopped by the consumer.static StringcreateId(String containingObjectOid)static StringcreateId(String containingObjectOid, Long containerId)static <T extends PolicyActionType>
List<T>filterActions(List<PolicyActionType> actions, Class<T> clazz)static List<PolicyActionType>getAllActions(PolicyActionsType actions)static @NotNull List<EvaluatedExclusionTriggerType>getAllExclusionTriggers(List<EvaluatedPolicyRuleType> rules)static @NotNull List<TimeValidityPolicyConstraintType>getTimeValidityConstraints(PolicyRuleType policyRule)static booleanhasNotificationActions(PolicyRuleType policyRule)static booleanisApplicableToAssignment(PolicyRuleType rule)Returns true if this policy rule can be applied to an assignment.static booleanisApplicableToObject(PolicyRuleType rule)Returns true if this policy rule can be applied to an object as a whole.static voidresolveReferences(List<PolicyRuleType> rules, Collection<? extends PolicyRuleType> otherRules, PrismContext prismContext)static List<javax.xml.bind.JAXBElement<AbstractPolicyConstraintType>>toConstraintsList(PolicyConstraintsType pc, boolean deep, boolean ignoreRefs)static StringtoDiagShortcut(PolicyConstraintKindType constraintKind)static StringtoShortString(PolicyActionsType actions)static StringtoShortString(PolicyActionsType actions, List<PolicyActionType> enabledActions)static StringtoShortString(PolicyConstraintsType constraints)static StringtoShortString(PolicyConstraintsType constraints, char join)static StringtoShortString(PolicyRuleType rule)static StringtoShortString(javax.xml.bind.JAXBElement<? extends AbstractPolicyConstraintType> constraint)static booleantriggerCollectionsEqual(Collection<EvaluatedPolicyRuleTriggerType> triggers, Collection<EvaluatedPolicyRuleTriggerType> currentTriggersUnpacked)static voidvisit(List<EvaluatedPolicyRuleTriggerType> triggers, Consumer<EvaluatedPolicyRuleTriggerType> visitor)
-
-
-
Method Detail
-
toShortString
public static String toShortString(PolicyRuleType rule)
-
toShortString
public static String toShortString(javax.xml.bind.JAXBElement<? extends AbstractPolicyConstraintType> constraint)
-
toShortString
public static String toShortString(PolicyConstraintsType constraints)
-
toShortString
public static String toShortString(PolicyConstraintsType constraints, char join)
-
toShortString
public static String toShortString(PolicyActionsType actions)
-
toShortString
public static String toShortString(PolicyActionsType actions, List<PolicyActionType> enabledActions)
- Parameters:
enabledActions- if null we don't consider action enabled/disabled state
-
toDiagShortcut
public static String toDiagShortcut(PolicyConstraintKindType constraintKind)
-
visit
public static void visit(List<EvaluatedPolicyRuleTriggerType> triggers, Consumer<EvaluatedPolicyRuleTriggerType> visitor)
-
triggerCollectionsEqual
public static boolean triggerCollectionsEqual(Collection<EvaluatedPolicyRuleTriggerType> triggers, Collection<EvaluatedPolicyRuleTriggerType> currentTriggersUnpacked)
-
getAllActions
public static List<PolicyActionType> getAllActions(PolicyActionsType actions)
-
filterActions
public static <T extends PolicyActionType> List<T> filterActions(List<PolicyActionType> actions, Class<T> clazz)
-
getTimeValidityConstraints
@NotNull public static @NotNull List<TimeValidityPolicyConstraintType> getTimeValidityConstraints(PolicyRuleType policyRule)
-
hasNotificationActions
public static boolean hasNotificationActions(PolicyRuleType policyRule)
-
accept
public static boolean accept(PolicyConstraintsType pc, com.evolveum.midpoint.schema.util.PolicyRuleTypeUtil.ConstraintVisitor visitor, boolean deep, boolean alsoRoots, QName rootElementName, boolean ignoreRefs)
Returns false if the process was stopped by the consumer. All references should be resolved.
-
toConstraintsList
public static List<javax.xml.bind.JAXBElement<AbstractPolicyConstraintType>> toConstraintsList(PolicyConstraintsType pc, boolean deep, boolean ignoreRefs)
-
isApplicableToAssignment
public static boolean isApplicableToAssignment(PolicyRuleType rule)
Returns true if this policy rule can be applied to an assignment. By default, rules that have only object-related constraints, are said to be applicable to objects only (even if technically they could be applied to assignments as well).
-
isApplicableToObject
public static boolean isApplicableToObject(PolicyRuleType rule)
Returns true if this policy rule can be applied to an object as a whole.
-
resolveReferences
public static void resolveReferences(List<PolicyRuleType> rules, Collection<? extends PolicyRuleType> otherRules, PrismContext prismContext)
-
getAllExclusionTriggers
@NotNull public static @NotNull List<EvaluatedExclusionTriggerType> getAllExclusionTriggers(List<EvaluatedPolicyRuleType> rules)
-
-