Interface EvaluatedClockworkPolicyRule

All Superinterfaces:
Cloneable, DebugDumpable, com.evolveum.midpoint.repo.common.policy.EvaluatedPolicyRule, Serializable
All Known Subinterfaces:
DirectlyEvaluatedClockworkPolicyRule, ForeignEvaluatedClockworkPolicyRule

public interface EvaluatedClockworkPolicyRule extends com.evolveum.midpoint.repo.common.policy.EvaluatedPolicyRule
A policy rule that was evaluated during clockwork processing. It is either: - DirectlyEvaluatedClockworkPolicyRule, i.e., rule that was evaluated on an object or an assignment (this is a typical scenario), - or ForeignEvaluatedClockworkPolicyRule, i.e., a rule that was evaluated and triggered on an assignment, but is relevant also to a different assignment. This is typical for exclusion constraints that may be defined only on one side (e.g. `Judge` having a rule "`Judge` excludes `Pirate`"), but should be applied also to the other side (`Pirate`). The purpose of this class is to provide the necessary functionality when such rules are returned by EvaluatedAssignment.getAllAssociatedPolicyRules() method. A care must be taken how to interpret data returned from various getters in the case of foreign rules. Please see ForeignEvaluatedClockworkPolicyRule for details.
  • Method Details

    • getOriginatingAssignment

      @Nullable @Nullable EvaluatedAssignment getOriginatingAssignment()
      The assignment that brought this policy rule to the focus or to the assignment target object. May be missing e.g. for object-related global policy rules or object collection related policy rules. (Note that assignment-related global policy rules have a value here.)
    • getEvaluatedAssignment

      @Deprecated default EvaluatedAssignment getEvaluatedAssignment()
      Deprecated.
    • getAssignmentOverride

      @Nullable default @Nullable EvaluatedAssignment getAssignmentOverride()
      For foreign rules, i.e. those that were "transplanted" to a different EvaluatedAssignment, here it is.
    • getAssignmentOverrideShortDump

      default String getAssignmentOverrideShortDump()
    • getRelevantTriggersFilter

      @NotNull default @NotNull com.evolveum.midpoint.repo.common.policy.TriggerFilter getRelevantTriggersFilter()
      Returns a filter that keeps only triggers that are relevant for a policy rule after it was "transplanted" to a different assignment. Approximate solution for now.
      See Also:
    • isTriggered

      boolean isTriggered()
      Was this rule triggered, i.e. are there any triggers? We do not distinguish between relevant and irrelevant triggers here, as foreign rules should have always some triggers, so this is always `true` for them.
      Specified by:
      isTriggered in interface com.evolveum.midpoint.repo.common.policy.EvaluatedPolicyRule
    • isEvaluated

      boolean isEvaluated()
      Was the rule already evaluated?
    • isGlobal

      boolean isGlobal()
      Is this a global policy rule?
    • getRelevantExclusionTriggers

      @NotNull @NotNull Collection<EvaluatedExclusionTrigger> getRelevantExclusionTriggers()
      Returns all exclusion triggers that are relevant for the assignment owning this direct/foreign rule.
      See Also:
    • toShortString

      String toShortString()
      Returns short, (more or less) user-level characterization of this object.
    • getTriggeredRulesCount

      static int getTriggeredRulesCount(Collection<? extends EvaluatedClockworkPolicyRule> policyRules)