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 in conflictingAssignment
, 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, use getRealConflictingAssignment(EvaluatedAssignment)
.
====- See Also:
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Constructor Summary
ConstructorDescriptionEvaluatedExclusionTrigger
(@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
Modifier and TypeMethodDescriptionprotected void
debugDumpSpecific
(StringBuilder sb, int indent) boolean
@NotNull EvaluatedAssignment
@NotNull AssignmentPath
@NotNull ObjectType
@NotNull EvaluatedAssignment
getRealConflictingAssignment
(@NotNull EvaluatedAssignment owner) Collection<? extends PrismObject<?>>
@NotNull EvaluatedAssignment
@NotNull AssignmentPath
@NotNull ObjectType
int
hashCode()
boolean
isRelevantForNewOwner
(@Nullable EvaluatedAssignment newOwner) Use in connection to foreign policy rules - see the documentation inAssociatedPolicyRule
.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 Details
-
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 Details
-
getConflictingAssignment
-
getRealConflictingAssignment
@NotNull public @NotNull EvaluatedAssignment getRealConflictingAssignment(@NotNull @NotNull EvaluatedAssignment owner) -
getConflictingTarget
-
getConflictingPath
-
getThisAssignment
-
getThisTarget
-
getThisPath
-
equals
- Overrides:
equals
in classEvaluatedPolicyRuleTrigger<ExclusionPolicyConstraintType>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classEvaluatedPolicyRuleTrigger<ExclusionPolicyConstraintType>
-
debugDumpSpecific
- Overrides:
debugDumpSpecific
in classEvaluatedPolicyRuleTrigger<ExclusionPolicyConstraintType>
-
toEvaluatedPolicyRuleTriggerBean
public EvaluatedExclusionTriggerType toEvaluatedPolicyRuleTriggerBean(@NotNull @NotNull PolicyRuleExternalizationOptions options, @Nullable @Nullable EvaluatedAssignment newOwner) - Overrides:
toEvaluatedPolicyRuleTriggerBean
in classEvaluatedPolicyRuleTrigger<ExclusionPolicyConstraintType>
-
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
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>
-