Class ForeignEvaluatedClockworkPolicyRuleImpl
java.lang.Object
com.evolveum.midpoint.model.impl.lens.assignments.ForeignEvaluatedClockworkPolicyRuleImpl
- All Implemented Interfaces:
EvaluatedClockworkPolicyRule,ForeignEvaluatedClockworkPolicyRule,EvaluatedPolicyRule,DebugDumpable,Serializable,Cloneable
public class ForeignEvaluatedClockworkPolicyRuleImpl
extends Object
implements ForeignEvaluatedClockworkPolicyRule
A direct implementation of
ForeignEvaluatedClockworkPolicyRule that simply delegates to the original policy rule.- See Also:
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Method Summary
Modifier and TypeMethodDescriptiondebugDump(int indent) @NotNull Collection<EvaluatedPolicyRuleTrigger<?>>Returns all triggers, even those that were indirectly collected via situation policy rules.<T extends EvaluatedPolicyRuleTrigger<?>>
Collection<T>getAllTriggers(Class<T> type) Returns all triggers of given type, stepping down to situation policy rules and composite triggers.@NotNull EvaluatedAssignmentImpl<?>TheEvaluatedAssignmentthis rule was "transplanted" to.getCount()Collection<? extends PolicyActionConfigItem<?>>Returns all enabled actions.@Nullable EvaluatedAssignmentThe assignment that brought this policy rule to the focus or to the assignment target object.@NotNull AbstractPolicyRuleConfigItem<?>@Nullable StringReturns the policy situation connected to this rule.@NotNull Collection<EvaluatedExclusionTrigger>Returns all exclusion triggers that are relevant for the assignment owning this direct/foreign rule.@NotNull TriggerFilterReturns a filter that keeps only triggers that are relevant for a policy rule after it was "transplanted" to a different assignment.@NotNull PolicyRuleIdentifierAutomatically generated identifier that - we hope - uniquely identifies the policy rule.@NotNull Collection<EvaluatedPolicyRuleTrigger<?>>Returns triggers for this policy rule, except for ones triggered by related situation policy rules.booleanWas the rule already evaluated?booleanisGlobal()Is this a global policy rule?booleanWas this rule triggered, i.e. are there any triggers?of(@NotNull DirectlyEvaluatedClockworkPolicyRuleImpl rule, @NotNull EvaluatedAssignmentImpl<?> newOwner) void@NotNull Collection<EvaluatedPolicyRuleType>toEvaluatedPolicyRuleBeans(@NotNull PolicyRuleExternalizationOptions options, @Nullable Predicate<EvaluatedPolicyRuleTrigger<?>> triggerSelector) Serializes the policy rule into bean form (EvaluatedPolicyRuleType)Returns short, (more or less) user-level characterization of this object.voidtrigger(Collection<EvaluatedPolicyRuleTrigger<?>> triggers) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.model.api.context.EvaluatedClockworkPolicyRule
getAssignmentOverrideShortDump, getEvaluatedAssignmentMethods inherited from interface com.evolveum.midpoint.repo.common.policy.EvaluatedPolicyRule
containsEnabledAction, containsEnabledAction, getActions, getAllEventMarksOids, getEnabledAction, getEnabledActions, getName, getOrder, getPolicyConstraints, getPolicyMarkRef, getPolicyRuleBean, getPolicyThreshold, getRawActions, getRuleOrigin, hasSituationConstraint, hasThreshold, isContainedIn, isOverThreshold, trigger
-
Method Details
-
of
public static ForeignEvaluatedClockworkPolicyRuleImpl of(@NotNull @NotNull DirectlyEvaluatedClockworkPolicyRuleImpl rule, @NotNull @NotNull EvaluatedAssignmentImpl<?> newOwner) -
getActivityPath
- Specified by:
getActivityPathin interfaceEvaluatedPolicyRule
-
getOriginatingAssignment
Description copied from interface:EvaluatedClockworkPolicyRuleThe 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.)- Specified by:
getOriginatingAssignmentin interfaceEvaluatedClockworkPolicyRule
-
getRuleIdentifier
Description copied from interface:EvaluatedPolicyRuleAutomatically generated identifier that - we hope - uniquely identifies the policy rule.- Specified by:
getRuleIdentifierin interfaceEvaluatedPolicyRule
-
isGlobal
public boolean isGlobal()Description copied from interface:EvaluatedClockworkPolicyRuleIs this a global policy rule?- Specified by:
isGlobalin interfaceEvaluatedClockworkPolicyRule
-
getEnabledActions
Description copied from interface:EvaluatedPolicyRuleReturns all enabled actions. Fails if they were not computed yet. TODO clockwork vs other policy rules- Specified by:
getEnabledActionsin interfaceEvaluatedPolicyRule
-
getCount
- Specified by:
getCountin interfaceEvaluatedPolicyRule
-
setCount
- Specified by:
setCountin interfaceEvaluatedPolicyRule
-
debugDump
- Specified by:
debugDumpin interfaceDebugDumpable
-
toShortString
Description copied from interface:EvaluatedClockworkPolicyRuleReturns short, (more or less) user-level characterization of this object.- Specified by:
toShortStringin interfaceEvaluatedClockworkPolicyRule
-
isTriggered
public boolean isTriggered()Description copied from interface:EvaluatedClockworkPolicyRuleWas 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 interfaceEvaluatedClockworkPolicyRule- Specified by:
isTriggeredin interfaceEvaluatedPolicyRule
-
isEvaluated
public boolean isEvaluated()Description copied from interface:EvaluatedClockworkPolicyRuleWas the rule already evaluated?- Specified by:
isEvaluatedin interfaceEvaluatedClockworkPolicyRule
-
getRelevantExclusionTriggers
Description copied from interface:EvaluatedClockworkPolicyRuleReturns all exclusion triggers that are relevant for the assignment owning this direct/foreign rule.- Specified by:
getRelevantExclusionTriggersin interfaceEvaluatedClockworkPolicyRule- See Also:
-
getTriggers
Description copied from interface:EvaluatedPolicyRuleReturns triggers for this policy rule, except for ones triggered by related situation policy rules.- Specified by:
getTriggersin interfaceEvaluatedPolicyRule
-
getAllTriggers
Description copied from interface:EvaluatedPolicyRuleReturns all triggers, even those that were indirectly collected via situation policy rules.- Specified by:
getAllTriggersin interfaceEvaluatedPolicyRule
-
getAllTriggers
Description copied from interface:EvaluatedPolicyRuleReturns all triggers of given type, stepping down to situation policy rules and composite triggers. An exception are composite "not" triggers: it is usually of no use to collect negated triggers.- Specified by:
getAllTriggersin interfaceEvaluatedPolicyRule
-
trigger
- Specified by:
triggerin interfaceEvaluatedPolicyRule
-
extractMessages
- Specified by:
extractMessagesin interfaceEvaluatedPolicyRule
-
extractShortMessages
- Specified by:
extractShortMessagesin interfaceEvaluatedPolicyRule
-
getAssignmentOverride
Description copied from interface:ForeignEvaluatedClockworkPolicyRuleTheEvaluatedAssignmentthis rule was "transplanted" to. Always present.- Specified by:
getAssignmentOverridein interfaceEvaluatedClockworkPolicyRule- Specified by:
getAssignmentOverridein interfaceForeignEvaluatedClockworkPolicyRule
-
getRelevantTriggersFilter
Description copied from interface:EvaluatedClockworkPolicyRuleReturns 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. -
getPolicySituation
Description copied from interface:EvaluatedPolicyRuleReturns the policy situation connected to this rule. Will be replaced by object marks.- Specified by:
getPolicySituationin interfaceEvaluatedPolicyRule
-
getPolicyRuleConfigItem
- Specified by:
getPolicyRuleConfigItemin interfaceEvaluatedPolicyRule
-
toEvaluatedPolicyRuleBeans
@NotNull public @NotNull Collection<EvaluatedPolicyRuleType> toEvaluatedPolicyRuleBeans(@NotNull @NotNull PolicyRuleExternalizationOptions options, @Nullable @Nullable Predicate<EvaluatedPolicyRuleTrigger<?>> triggerSelector) Description copied from interface:EvaluatedPolicyRuleSerializes the policy rule into bean form (EvaluatedPolicyRuleType). - Serializes only triggered rules. - For sitation rules with are both hidden and final, serializes the inner rules. (TODO why should that be?) TODO consider if we cannot merge trigger selector with the options- Specified by:
toEvaluatedPolicyRuleBeansin interfaceEvaluatedPolicyRule- Parameters:
options- Options - how the serialization should take place.triggerSelector- Which triggers should be processed?
-