Class PolicyRuleTypeUtil
- java.lang.Object
-
- com.evolveum.midpoint.schema.util.PolicyRuleTypeUtil
-
public class PolicyRuleTypeUtil extends Object
- Author:
- mederly
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PolicyRuleTypeUtil.LazyMapConstraintsResolver
-
Constructor Summary
Constructors Constructor Description PolicyRuleTypeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.static <T extends PolicyActionType>
List<T>filterActions(List<PolicyActionType> actions, Class<T> clazz)
static List<PolicyActionType>
getAllActions(PolicyActionsType actions)
static List<EvaluatedExclusionTriggerType>
getAllExclusionTriggers(List<EvaluatedPolicyRuleType> rules)
static boolean
isApplicableToAssignment(PolicyRuleType rule)
Returns true if this policy rule can be applied to an assignment.static boolean
isApplicableToObject(PolicyRuleType rule)
Returns true if this policy rule can be applied to an object as a whole.static void
resolveReferences(PolicyConstraintsType pc, com.evolveum.midpoint.schema.util.PolicyRuleTypeUtil.ConstraintResolver resolver)
static void
resolveReferences(List<PolicyRuleType> rules, Collection<? extends PolicyRuleType> otherRules, PrismContext prismContext)
static List<javax.xml.bind.JAXBElement<AbstractPolicyConstraintType>>
toConstraintsList(PolicyConstraintsType pc, boolean deep, boolean ignoreRefs)
static String
toDiagShortcut(PolicyConstraintKindType constraintKind)
static String
toShortString(PolicyActionsType actions, List<PolicyActionType> enabledActions)
static String
toShortString(PolicyConstraintsType constraints)
static String
toShortString(PolicyConstraintsType constraints, char join)
static boolean
triggerCollectionsEqual(Collection<EvaluatedPolicyRuleTriggerType> triggers, Collection<EvaluatedPolicyRuleTriggerType> currentTriggersUnpacked)
static void
visit(List<EvaluatedPolicyRuleTriggerType> triggers, Consumer<EvaluatedPolicyRuleTriggerType> visitor)
-
-
-
Method Detail
-
toShortString
public static String toShortString(PolicyConstraintsType constraints)
-
toShortString
public static String toShortString(PolicyConstraintsType constraints, char join)
-
toShortString
public static String toShortString(PolicyActionsType actions, List<PolicyActionType> enabledActions)
-
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)
-
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(PolicyConstraintsType pc, com.evolveum.midpoint.schema.util.PolicyRuleTypeUtil.ConstraintResolver resolver) throws ObjectNotFoundException, SchemaException
-
resolveReferences
public static void resolveReferences(List<PolicyRuleType> rules, Collection<? extends PolicyRuleType> otherRules, PrismContext prismContext) throws SchemaException, ObjectNotFoundException
-
getAllExclusionTriggers
@NotNull public static List<EvaluatedExclusionTriggerType> getAllExclusionTriggers(List<EvaluatedPolicyRuleType> rules)
-
-