Class BaseEvaluatedPolicyRuleImpl
java.lang.Object
com.evolveum.midpoint.repo.common.policy.BaseEvaluatedPolicyRuleImpl
- All Implemented Interfaces:
EvaluatedPolicyRule,DebugDumpable,Serializable,Cloneable
- Direct Known Subclasses:
DirectlyEvaluatedClockworkPolicyRuleImpl,EvaluatedActivityPolicyRuleImpl
Implementation of the most generic features in
EvaluatedPolicyRule interface.- See Also:
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Constructor Summary
ConstructorsConstructorDescriptionBaseEvaluatedPolicyRuleImpl(@NotNull AbstractPolicyRuleConfigItem<?> policyRuleCI, @NotNull PolicyRuleIdentifier ruleIdentifier) -
Method Summary
Modifier and TypeMethodDescriptiondebugDump(int indent) boolean@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.getCount()Collection<? extends PolicyActionConfigItem<?>>Returns all enabled actions.@NotNull AbstractPolicyRuleConfigItem<?>@Nullable StringReturns the policy situation connected to this rule.@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.inthashCode()booleanWas this rule triggered, i.e. are there any triggers?voidvoidsetTriggers(List<EvaluatedPolicyRuleTrigger<?>> triggers) voidtrigger(Collection<EvaluatedPolicyRuleTrigger<?>> triggers) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, 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, getActions, getActivityPath, getAllEventMarksOids, getEnabledAction, getEnabledActions, getName, getOrder, getPolicyConstraints, getPolicyMarkRef, getPolicyRuleBean, getPolicyThreshold, getRawActions, getRuleOrigin, hasSituationConstraint, hasThreshold, isContainedIn, isOverThreshold, toEvaluatedPolicyRuleBeans, trigger
-
Constructor Details
-
BaseEvaluatedPolicyRuleImpl
public BaseEvaluatedPolicyRuleImpl(@NotNull @NotNull AbstractPolicyRuleConfigItem<?> policyRuleCI, @NotNull @NotNull PolicyRuleIdentifier ruleIdentifier)
-
-
Method Details
-
getPolicyRuleConfigItem
- Specified by:
getPolicyRuleConfigItemin interfaceEvaluatedPolicyRule
-
getRuleIdentifier
Description copied from interface:EvaluatedPolicyRuleAutomatically generated identifier that - we hope - uniquely identifies the policy rule.- Specified by:
getRuleIdentifierin 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
-
getCount
- Specified by:
getCountin interfaceEvaluatedPolicyRule
-
setCount
- Specified by:
setCountin interfaceEvaluatedPolicyRule
-
debugDump
- Specified by:
debugDumpin interfaceDebugDumpable
-
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
-
getTriggers
Description copied from interface:EvaluatedPolicyRuleReturns triggers for this policy rule, except for ones triggered by related situation policy rules.- Specified by:
getTriggersin interfaceEvaluatedPolicyRule
-
setTriggers
-
trigger
- Specified by:
triggerin 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
-
getAllTriggers
Description copied from interface:EvaluatedPolicyRuleReturns all triggers, even those that were indirectly collected via situation policy rules.- Specified by:
getAllTriggersin interfaceEvaluatedPolicyRule
-
extractMessages
- Specified by:
extractMessagesin interfaceEvaluatedPolicyRule
-
extractShortMessages
- Specified by:
extractShortMessagesin interfaceEvaluatedPolicyRule
-
getPolicySituation
Description copied from interface:EvaluatedPolicyRuleReturns the policy situation connected to this rule. Will be replaced by object marks.- Specified by:
getPolicySituationin interfaceEvaluatedPolicyRule
-
equals
-
hashCode
public int hashCode()
-