Class EvaluatedActivityPolicyRuleImpl
java.lang.Object
com.evolveum.midpoint.repo.common.policy.BaseEvaluatedPolicyRuleImpl
com.evolveum.midpoint.repo.common.activity.policy.EvaluatedActivityPolicyRuleImpl
- All Implemented Interfaces:
EvaluatedPolicyRule,DebugDumpable,Serializable,Cloneable
public class EvaluatedActivityPolicyRuleImpl
extends BaseEvaluatedPolicyRuleImpl
implements EvaluatedPolicyRule, DebugDumpable
An implementation of
EvaluatedPolicyRule specific for activity rules (dealing with execution time, restarts,
errors, etc).- See Also:
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Method Summary
Modifier and TypeMethodDescriptiondebugDump(int indent) @NotNull ActivityPathActivity for which this rule was defined.getCount()Collection<? extends PolicyActionConfigItem<?>>Returns all enabled actions.booleanWas this rule triggered, i.e. are there any triggers?voidvoidsetCurrentState(ActivityPolicyStateType currentState) @NotNull Collection<EvaluatedPolicyRuleType>toEvaluatedPolicyRuleBeans(@NotNull PolicyRuleExternalizationOptions options, @Nullable Predicate<EvaluatedPolicyRuleTrigger<?>> triggerSelector) Serializes the policy rule into bean form (EvaluatedPolicyRuleType)toString()Methods inherited from class com.evolveum.midpoint.repo.common.policy.BaseEvaluatedPolicyRuleImpl
equals, extractMessages, extractShortMessages, getAllTriggers, getAllTriggers, getPolicyRuleConfigItem, getPolicySituation, getRuleIdentifier, getTriggers, hashCode, setTriggers, triggerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.repo.common.policy.EvaluatedPolicyRule
containsEnabledAction, containsEnabledAction, extractMessages, extractShortMessages, getActions, getAllEventMarksOids, getAllTriggers, getAllTriggers, getEnabledAction, getEnabledActions, getName, getOrder, getPolicyConstraints, getPolicyMarkRef, getPolicyRuleBean, getPolicyRuleConfigItem, getPolicySituation, getPolicyThreshold, getRawActions, getRuleIdentifier, getRuleOrigin, getTriggers, hasSituationConstraint, hasThreshold, isContainedIn, isOverThreshold, trigger, trigger
-
Method Details
-
getCount
- Specified by:
getCountin interfaceEvaluatedPolicyRule- Overrides:
getCountin classBaseEvaluatedPolicyRuleImpl
-
getActivityPath
Activity for which this rule was defined.- Specified by:
getActivityPathin interfaceEvaluatedPolicyRule
-
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- Overrides:
getEnabledActionsin classBaseEvaluatedPolicyRuleImpl
-
setCount
- Specified by:
setCountin interfaceEvaluatedPolicyRule- Overrides:
setCountin classBaseEvaluatedPolicyRuleImpl
-
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?
-
setCurrentState
-
debugDump
- Specified by:
debugDumpin interfaceDebugDumpable- Overrides:
debugDumpin classBaseEvaluatedPolicyRuleImpl
-
isTriggered
public boolean isTriggered()Description copied from interface:EvaluatedPolicyRuleWas this rule triggered, i.e. are there any triggers? Note that for activity-based rules this may include triggers that occurred in previous activity runs (and so stored in the activity state).- Specified by:
isTriggeredin interfaceEvaluatedPolicyRule- Overrides:
isTriggeredin classBaseEvaluatedPolicyRuleImpl
-
toString
-