Class EvaluatedPolicyRuleImpl
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.lens.EvaluatedPolicyRuleImpl
-
- All Implemented Interfaces:
EvaluatedPolicyRule
,DebugDumpable
,Serializable
,Cloneable
public class EvaluatedPolicyRuleImpl extends Object implements EvaluatedPolicyRule
- Author:
- semancik
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description EvaluatedPolicyRuleImpl(@NotNull PolicyRuleType policyRuleBean, @NotNull String ruleId, @Nullable AssignmentPath assignmentPath, @Nullable EvaluatedAssignmentImpl<?> evaluatedAssignment)
-
Method Summary
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.model.api.context.EvaluatedPolicyRule
hasThreshold, isTriggered
-
-
-
-
Constructor Detail
-
EvaluatedPolicyRuleImpl
public EvaluatedPolicyRuleImpl(@NotNull @NotNull PolicyRuleType policyRuleBean, @NotNull @NotNull String ruleId, @Nullable @Nullable AssignmentPath assignmentPath, @Nullable @Nullable EvaluatedAssignmentImpl<?> evaluatedAssignment)
-
-
Method Detail
-
clone
public EvaluatedPolicyRuleImpl clone()
-
getName
public String getName()
- Specified by:
getName
in interfaceEvaluatedPolicyRule
-
getPolicyRule
@NotNull public @NotNull PolicyRuleType getPolicyRule()
- Specified by:
getPolicyRule
in interfaceEvaluatedPolicyRule
-
getAssignmentPath
@Nullable public @Nullable AssignmentPath getAssignmentPath()
- Specified by:
getAssignmentPath
in interfaceEvaluatedPolicyRule
-
getEvaluatedAssignment
public EvaluatedAssignmentImpl<?> getEvaluatedAssignment()
-
getDirectOwner
@Nullable public @Nullable ObjectType getDirectOwner()
Description copied from interface:EvaluatedPolicyRule
Object that "directly owns" the rule. TODO. [consider if really needed]- Specified by:
getDirectOwner
in interfaceEvaluatedPolicyRule
-
getPolicyConstraints
public PolicyConstraintsType getPolicyConstraints()
- Specified by:
getPolicyConstraints
in interfaceEvaluatedPolicyRule
-
getPolicyThreshold
public PolicyThresholdType getPolicyThreshold()
- Specified by:
getPolicyThreshold
in interfaceEvaluatedPolicyRule
-
getTriggers
@NotNull public @NotNull Collection<EvaluatedPolicyRuleTrigger<?>> getTriggers()
- Specified by:
getTriggers
in interfaceEvaluatedPolicyRule
-
getAllTriggers
@NotNull public @NotNull Collection<EvaluatedPolicyRuleTrigger<?>> getAllTriggers()
Description copied from interface:EvaluatedPolicyRule
Returns all triggers, even those that were indirectly collected via situation policy rules.- Specified by:
getAllTriggers
in interfaceEvaluatedPolicyRule
-
getAllTriggers
public <T extends EvaluatedPolicyRuleTrigger<?>> Collection<T> getAllTriggers(Class<T> type)
Description copied from interface:EvaluatedPolicyRule
Returns 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:
getAllTriggers
in interfaceEvaluatedPolicyRule
-
addTrigger
public void addTrigger(@NotNull @NotNull EvaluatedPolicyRuleTrigger<?> trigger)
- Specified by:
addTrigger
in interfaceEvaluatedPolicyRule
-
getPolicyExceptions
@NotNull public @NotNull Collection<PolicyExceptionType> getPolicyExceptions()
- Specified by:
getPolicyExceptions
in interfaceEvaluatedPolicyRule
-
getActions
public PolicyActionsType getActions()
- Specified by:
getActions
in interfaceEvaluatedPolicyRule
-
getPolicySituation
public String getPolicySituation()
- Specified by:
getPolicySituation
in interfaceEvaluatedPolicyRule
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
isGlobal
public boolean isGlobal()
- Specified by:
isGlobal
in interfaceEvaluatedPolicyRule
-
toShortString
public String toShortString()
- Specified by:
toShortString
in interfaceEvaluatedPolicyRule
-
extractMessages
public List<TreeNode<LocalizableMessage>> extractMessages()
- Specified by:
extractMessages
in interfaceEvaluatedPolicyRule
-
extractShortMessages
public List<TreeNode<LocalizableMessage>> extractShortMessages()
- Specified by:
extractShortMessages
in interfaceEvaluatedPolicyRule
-
addToEvaluatedPolicyRuleBeans
public void addToEvaluatedPolicyRuleBeans(Collection<EvaluatedPolicyRuleType> ruleBeans, PolicyRuleExternalizationOptions options, Predicate<EvaluatedPolicyRuleTrigger<?>> triggerSelector, PrismContext prismContext)
Honors "final" but not "hidden" flag.- Specified by:
addToEvaluatedPolicyRuleBeans
in interfaceEvaluatedPolicyRule
-
getEnabledActions
@NotNull public @NotNull List<PolicyActionType> getEnabledActions()
- Specified by:
getEnabledActions
in interfaceEvaluatedPolicyRule
-
containsEnabledAction
public boolean containsEnabledAction()
- Specified by:
containsEnabledAction
in interfaceEvaluatedPolicyRule
-
containsEnabledAction
public boolean containsEnabledAction(Class<? extends PolicyActionType> clazz)
- Specified by:
containsEnabledAction
in interfaceEvaluatedPolicyRule
-
getEnabledActions
public <T extends PolicyActionType> List<T> getEnabledActions(Class<T> clazz)
- Specified by:
getEnabledActions
in interfaceEvaluatedPolicyRule
-
getEnabledAction
public <T extends PolicyActionType> T getEnabledAction(Class<T> clazz)
- Specified by:
getEnabledAction
in interfaceEvaluatedPolicyRule
-
computeEnabledActions
public <AH extends AssignmentHolderType> void computeEnabledActions(@Nullable @Nullable PolicyRuleEvaluationContext<AH> rctx, PrismObject<AH> object, ExpressionFactory expressionFactory, PrismContext prismContext, Task task, OperationResult result) throws ExpressionEvaluationException, ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException
-
getPolicyRuleIdentifier
public String getPolicyRuleIdentifier()
- Specified by:
getPolicyRuleIdentifier
in interfaceEvaluatedPolicyRule
-
getCount
public int getCount()
- Specified by:
getCount
in interfaceEvaluatedPolicyRule
-
setCount
public void setCount(int value)
- Specified by:
setCount
in interfaceEvaluatedPolicyRule
-
-