Class ForeignPolicyRuleImpl
java.lang.Object
com.evolveum.midpoint.model.impl.lens.assignments.ForeignPolicyRuleImpl
- All Implemented Interfaces:
AssociatedPolicyRule,DebugDumpable,Serializable,Cloneable
A rule that has been "transplanted" onto new owner (
EvaluatedAssignment) - currently, the other side
of "one-sided" exclusion constraint.- See Also:
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToEvaluatedPolicyRuleBeans(@NotNull Collection<EvaluatedPolicyRuleType> ruleBeans, @NotNull PolicyRuleExternalizationOptions options, @Nullable Predicate<EvaluatedPolicyRuleTrigger<?>> triggerSelector, @Nullable EvaluatedAssignment newOwner) Serializes the policy rule into bean form (EvaluatedPolicyRuleType).voidaddTrigger(@NotNull EvaluatedPolicyRuleTrigger<?> trigger) Adds a trigger to the policy rule.booleancontainsEnabledAction(Class<? extends PolicyActionType> type) Are there any enabled actions of given type?debugDump(int indent) <T extends PolicyActionType>
PolicyActionConfigItem<T>getEnabledAction(Class<T> type) Returns enabled action of given type, if there's any.<T extends PolicyActionType>
@NotNull List<? extends PolicyActionConfigItem<T>>getEnabledActions(Class<T> type) Returns all enabled actions of given type.@NotNull EvaluatedPolicyRuleImplReturns the original policy rule.@NotNull EvaluatedAssignmentImpl<?>Returns new owner (for foreign rules) or `null` (for original ones).@NotNull StringAutomatically generated identifier that - we hope - uniquely identifies the policy rule.@Nullable StringReturns the policy situation connected to this rule.@NotNull Collection<EvaluatedExclusionTrigger>Returns exclusion triggers without ones that are not relevant for given "new owner" (see class javadoc).booleanTODObooleanWas this rule triggered, i.e.static ForeignPolicyRuleImplof(@NotNull EvaluatedPolicyRuleImpl rule, @NotNull EvaluatedAssignmentImpl<?> newOwner) Returns short, (more or less) user-level characterization of this object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.model.api.context.AssociatedPolicyRule
getNewOwnerShortStringMethods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
Method Details
-
of
public static ForeignPolicyRuleImpl of(@NotNull @NotNull EvaluatedPolicyRuleImpl rule, @NotNull @NotNull EvaluatedAssignmentImpl<?> newOwner) -
debugDump
- Specified by:
debugDumpin interfaceDebugDumpable
-
toShortString
Description copied from interface:AssociatedPolicyRuleReturns short, (more or less) user-level characterization of this object.- Specified by:
toShortStringin interfaceAssociatedPolicyRule
-
getPolicyRuleIdentifier
Description copied from interface:AssociatedPolicyRuleAutomatically generated identifier that - we hope - uniquely identifies the policy rule.- Specified by:
getPolicyRuleIdentifierin interfaceAssociatedPolicyRule
-
isTriggered
public boolean isTriggered()Description copied from interface:AssociatedPolicyRuleWas 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:
isTriggeredin interfaceAssociatedPolicyRule
-
isEvaluated
public boolean isEvaluated()Description copied from interface:AssociatedPolicyRuleTODO- Specified by:
isEvaluatedin interfaceAssociatedPolicyRule
-
containsEnabledAction
Description copied from interface:AssociatedPolicyRuleAre there any enabled actions of given type?- Specified by:
containsEnabledActionin interfaceAssociatedPolicyRule
-
getEnabledAction
Description copied from interface:AssociatedPolicyRuleReturns enabled action of given type, if there's any. Throws an exception if there are more of them.- Specified by:
getEnabledActionin interfaceAssociatedPolicyRule
-
getEnabledActions
@NotNull public <T extends PolicyActionType> @NotNull List<? extends PolicyActionConfigItem<T>> getEnabledActions(Class<T> type) Description copied from interface:AssociatedPolicyRuleReturns all enabled actions of given type.- Specified by:
getEnabledActionsin interfaceAssociatedPolicyRule
-
getRelevantExclusionTriggers
Description copied from interface:AssociatedPolicyRuleReturns exclusion triggers without ones that are not relevant for given "new owner" (see class javadoc).- Specified by:
getRelevantExclusionTriggersin interfaceAssociatedPolicyRule
-
getNewOwner
Description copied from interface:AssociatedPolicyRuleReturns new owner (for foreign rules) or `null` (for original ones).- Specified by:
getNewOwnerin interfaceAssociatedPolicyRule
-
getEvaluatedPolicyRule
Description copied from interface:AssociatedPolicyRuleReturns the original policy rule.- Specified by:
getEvaluatedPolicyRulein interfaceAssociatedPolicyRule
-
getPolicySituation
Description copied from interface:AssociatedPolicyRuleReturns the policy situation connected to this rule. Will be replaced by object marks.- Specified by:
getPolicySituationin interfaceAssociatedPolicyRule
-
addToEvaluatedPolicyRuleBeans
public void addToEvaluatedPolicyRuleBeans(@NotNull @NotNull Collection<EvaluatedPolicyRuleType> ruleBeans, @NotNull @NotNull PolicyRuleExternalizationOptions options, @Nullable @Nullable Predicate<EvaluatedPolicyRuleTrigger<?>> triggerSelector, @Nullable @Nullable EvaluatedAssignment newOwner) Description copied from interface:AssociatedPolicyRuleSerializes the policy rule into bean form (EvaluatedPolicyRuleType). Currently not very nice contract, should be improved later.- Specified by:
addToEvaluatedPolicyRuleBeansin interfaceAssociatedPolicyRule- Parameters:
ruleBeans- Collection of beans into which to put the result.options- Options - how the serialization should take place.triggerSelector- Which triggers should be processed?newOwner- If set, we should ignore triggers not relevant for this evaluated assignment.
-
addTrigger
Description copied from interface:AssociatedPolicyRuleAdds a trigger to the policy rule. For internal use only.- Specified by:
addTriggerin interfaceAssociatedPolicyRule
-