Class EvaluatedPolicyRuleTrigger<CT extends AbstractPolicyConstraintType>

java.lang.Object
com.evolveum.midpoint.model.api.context.EvaluatedPolicyRuleTrigger<CT>
All Implemented Interfaces:
DebugDumpable, Serializable
Direct Known Subclasses:
EvaluatedAlwaysTrueTrigger, EvaluatedCollectionStatsTrigger, EvaluatedCompositeTrigger, EvaluatedCustomConstraintTrigger, EvaluatedExclusionTrigger, EvaluatedHasAssignmentTrigger, EvaluatedModificationTrigger, EvaluatedMultiplicityTrigger, EvaluatedOrphanedTrigger, EvaluatedSituationTrigger, EvaluatedStateTrigger, EvaluatedTimeValidityTrigger, EvaluatedTransitionTrigger

public abstract class EvaluatedPolicyRuleTrigger<CT extends AbstractPolicyConstraintType> extends Object implements DebugDumpable, Serializable
Description of a situation that caused a trigger of the policy rule.
Author:
semancik
See Also:
  • Constructor Details

  • Method Details

    • getConstraintKind

      @NotNull public @NotNull PolicyConstraintKindType getConstraintKind()
      The kind of constraint that caused the trigger.
    • getConstraint

      @NotNull public CT getConstraint()
    • getMessage

      public LocalizableMessage getMessage()
      Human-readable message associated with this trigger. The message explain why the rule was triggered. It can be used in the logs, as an error message, in the audit trail and so on.
    • getShortMessage

      public LocalizableMessage getShortMessage()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • debugDump

      public String debugDump(int indent)
      Specified by:
      debugDump in interface DebugDumpable
    • isHidden

      public boolean isHidden()
    • isFinal

      public boolean isFinal()
    • debugDumpSpecific

      protected void debugDumpSpecific(StringBuilder sb, int indent)
    • toDiagShortcut

      public String toDiagShortcut()
    • toEvaluatedPolicyRuleTriggerBean

      public EvaluatedPolicyRuleTriggerType toEvaluatedPolicyRuleTriggerBean(@NotNull @NotNull PolicyRuleExternalizationOptions options, @Nullable @Nullable EvaluatedAssignment newOwner)
    • fillCommonContent

      protected void fillCommonContent(EvaluatedPolicyRuleTriggerType tt)
    • getInnerTriggers

      public Collection<EvaluatedPolicyRuleTrigger<?>> getInnerTriggers()
    • isEnforcementOverride

      public boolean isEnforcementOverride()
    • getTargetObjects

      public Collection<? extends PrismObject<?>> getTargetObjects()
      Returns:
      Target object(s) that were matched by constraint that produced this trigger. For example: target of the assignment that was added (and that matched "assignment" constraint).
    • isRelevantForNewOwner

      public boolean isRelevantForNewOwner(@Nullable @Nullable EvaluatedAssignment newOwner)
      Use in connection to foreign policy rules - see the documentation in AssociatedPolicyRule. For exclusion triggers the behavior of this method is quite clear. But for other kinds of triggers (on the foreign rule) we return always `true`, as we have no way of knowing whether they are relevant in the context of "the other side". This may change in the future, after we'll learn how to understand this. Hope it will not cause any harm in the meanwhile.