Class EvaluatedExclusionTrigger
- java.lang.Object
-
- com.evolveum.midpoint.model.api.context.EvaluatedPolicyRuleTrigger<ExclusionPolicyConstraintType>
-
- com.evolveum.midpoint.model.api.context.EvaluatedExclusionTrigger
-
- All Implemented Interfaces:
DebugDumpable
,Serializable
public class EvaluatedExclusionTrigger extends EvaluatedPolicyRuleTrigger<ExclusionPolicyConstraintType>
Represents triggered exclusion constraint. [NOTE] ==== When present in "foreign policy rules" (EvaluatedAssignment.getAllAssociatedPolicyRules()
), then the values inconflictingAssignment
,conflictingTarget
,thisTarget
and so on may be misleading. They are correct with regards to the original evaluated assignment, but not for the other one. Hence, to get the correct values, usegetRealConflictingAssignment(EvaluatedAssignment)
. ====- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description EvaluatedExclusionTrigger(@NotNull ExclusionPolicyConstraintType constraint, LocalizableMessage message, LocalizableMessage shortMessage, @NotNull EvaluatedAssignment thisAssignment, @NotNull EvaluatedAssignment conflictingAssignment, @NotNull ObjectType thisTarget, @NotNull ObjectType conflictingTarget, @NotNull AssignmentPath thisPath, @NotNull AssignmentPath conflictingPath, boolean enforcementOverride)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
debugDumpSpecific(StringBuilder sb, int indent)
boolean
equals(Object o)
@NotNull EvaluatedAssignment
getConflictingAssignment()
@NotNull AssignmentPath
getConflictingPath()
@NotNull ObjectType
getConflictingTarget()
@NotNull EvaluatedAssignment
getRealConflictingAssignment(@NotNull EvaluatedAssignment owner)
Collection<? extends PrismObject<?>>
getTargetObjects()
@NotNull EvaluatedAssignment
getThisAssignment()
@NotNull AssignmentPath
getThisPath()
@NotNull ObjectType
getThisTarget()
int
hashCode()
boolean
isRelevantForNewOwner(@Nullable EvaluatedAssignment newOwner)
Use in connection to foreign policy rules - see the documentation inAssociatedPolicyRule
.EvaluatedExclusionTriggerType
toEvaluatedPolicyRuleTriggerBean(@NotNull PolicyRuleExternalizationOptions options, @Nullable EvaluatedAssignment newOwner)
-
Methods inherited from class com.evolveum.midpoint.model.api.context.EvaluatedPolicyRuleTrigger
debugDump, fillCommonContent, getConstraint, getConstraintKind, getInnerTriggers, getMessage, getShortMessage, isEnforcementOverride, isFinal, isHidden, toDiagShortcut, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
-
-
-
Constructor Detail
-
EvaluatedExclusionTrigger
public EvaluatedExclusionTrigger(@NotNull @NotNull ExclusionPolicyConstraintType constraint, LocalizableMessage message, LocalizableMessage shortMessage, @NotNull @NotNull EvaluatedAssignment thisAssignment, @NotNull @NotNull EvaluatedAssignment conflictingAssignment, @NotNull @NotNull ObjectType thisTarget, @NotNull @NotNull ObjectType conflictingTarget, @NotNull @NotNull AssignmentPath thisPath, @NotNull @NotNull AssignmentPath conflictingPath, boolean enforcementOverride)
-
-
Method Detail
-
getConflictingAssignment
@NotNull public @NotNull EvaluatedAssignment getConflictingAssignment()
-
getRealConflictingAssignment
@NotNull public @NotNull EvaluatedAssignment getRealConflictingAssignment(@NotNull @NotNull EvaluatedAssignment owner)
-
getConflictingTarget
@NotNull public @NotNull ObjectType getConflictingTarget()
-
getConflictingPath
@NotNull public @NotNull AssignmentPath getConflictingPath()
-
getThisAssignment
@NotNull public @NotNull EvaluatedAssignment getThisAssignment()
-
getThisTarget
@NotNull public @NotNull ObjectType getThisTarget()
-
getThisPath
@NotNull public @NotNull AssignmentPath getThisPath()
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classEvaluatedPolicyRuleTrigger<ExclusionPolicyConstraintType>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classEvaluatedPolicyRuleTrigger<ExclusionPolicyConstraintType>
-
debugDumpSpecific
protected void debugDumpSpecific(StringBuilder sb, int indent)
- Overrides:
debugDumpSpecific
in classEvaluatedPolicyRuleTrigger<ExclusionPolicyConstraintType>
-
toEvaluatedPolicyRuleTriggerBean
public EvaluatedExclusionTriggerType toEvaluatedPolicyRuleTriggerBean(@NotNull @NotNull PolicyRuleExternalizationOptions options, @Nullable @Nullable EvaluatedAssignment newOwner)
- Overrides:
toEvaluatedPolicyRuleTriggerBean
in classEvaluatedPolicyRuleTrigger<ExclusionPolicyConstraintType>
-
getTargetObjects
public Collection<? extends PrismObject<?>> getTargetObjects()
- Overrides:
getTargetObjects
in classEvaluatedPolicyRuleTrigger<ExclusionPolicyConstraintType>
- 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)
Description copied from class:EvaluatedPolicyRuleTrigger
Use in connection to foreign policy rules - see the documentation inAssociatedPolicyRule
. 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.- Overrides:
isRelevantForNewOwner
in classEvaluatedPolicyRuleTrigger<ExclusionPolicyConstraintType>
-
-