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 policyRuleType, @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
isTriggered
-
-
-
-
Constructor Detail
-
EvaluatedPolicyRuleImpl
public EvaluatedPolicyRuleImpl(@NotNull @NotNull PolicyRuleType policyRuleType, @Nullable @Nullable AssignmentPath assignmentPath, @Nullable @Nullable EvaluatedAssignmentImpl<?> evaluatedAssignment)
-
-
Method Detail
-
clone
public EvaluatedPolicyRuleImpl clone()
-
getName
public String getName()
- Specified by:
getName
in interfaceEvaluatedPolicyRule
-
getPolicyRule
public 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
-
addToEvaluatedPolicyRuleTypes
public void addToEvaluatedPolicyRuleTypes(Collection<EvaluatedPolicyRuleType> rules, PolicyRuleExternalizationOptions options, Predicate<EvaluatedPolicyRuleTrigger<?>> triggerSelector, PrismContext prismContext)
Honors "final" but not "hidden" flag.- Specified by:
addToEvaluatedPolicyRuleTypes
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
-
-