Class PolicyRuleApplicabilityUtil
java.lang.Object
com.evolveum.midpoint.schema.policy.PolicyRuleApplicabilityUtil
Code to determine whether a policy rule is to be applied in a given situation, i.e., when the application
to a focus object, an assignment, a projection, or an activity is being considered.
The idea is that during processing, we gather policy rules from various sources (from system configuration,
from object marks, from assignments, from tasks/activities) and we have to know which of them should be applied e.g.
when a specific assignment is being processed.
General algorithm for applicability determination is:
. If `evaluationTarget` (`assignment`, `object`, `projection`, `activity`) for the rule is set, it is used as authoritative
information.
. If it's not (which is good for simplicity), we apply some heuristics based on the constraints used in the rule.
See specific methods for details.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanReturnstrueif this policy rule can be applied to a projection.static booleanReturnstrueif this policy rule can be applied to an assignment.static booleanReturnstrueif this policy rule can be applied to a focus object as a whole.static booleanReturnstrueif this policy rule can be applied to a projection.
-
Constructor Details
-
PolicyRuleApplicabilityUtil
public PolicyRuleApplicabilityUtil()
-
-
Method Details
-
isApplicableToAssignment
Returnstrueif this policy rule can be applied to an assignment.- See Also:
-
isApplicableToFocusObject
Returnstrueif this policy rule can be applied to a focus object as a whole.- See Also:
-
isApplicableToProjection
Returnstrueif this policy rule can be applied to a projection. Currently, we don't provide heuristics here. These rules must be explicitly marked by `evaluationTarget`.- See Also:
-
isApplicableToActivity
Returnstrueif this policy rule can be applied to a projection. Currently, we don't support `evaluationTarget` setting here, because the distinction can be based solely on the presence of activity-specific constraints.
-