Class EvaluatedAssignmentImpl<AH extends AssignmentHolderType>
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.lens.EvaluatedAssignmentImpl<AH>
-
- All Implemented Interfaces:
EvaluatedAssignment<AH>
,DebugDumpable
,ShortDumpable
public class EvaluatedAssignmentImpl<AH extends AssignmentHolderType> extends Object implements EvaluatedAssignment<AH>, ShortDumpable
Evaluated assignment that contains all constructions and authorizations from the assignment itself and all the applicable inducements from all the roles referenced from the assignment.- Author:
- Radovan Semancik
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description EvaluatedAssignmentImpl(ItemDeltaItem<PrismContainerValue<AssignmentType>,PrismContainerDefinition<AssignmentType>> assignmentIdi, boolean evaluatedOld, PrismContext prismContext)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, 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.EvaluatedAssignment
isBeingAdded, isBeingDeleted
-
Methods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDumpLazily
-
-
-
-
Constructor Detail
-
EvaluatedAssignmentImpl
public EvaluatedAssignmentImpl(@NotNull ItemDeltaItem<PrismContainerValue<AssignmentType>,PrismContainerDefinition<AssignmentType>> assignmentIdi, boolean evaluatedOld, PrismContext prismContext)
-
-
Method Detail
-
getAssignmentIdi
@NotNull public ItemDeltaItem<PrismContainerValue<AssignmentType>,PrismContainerDefinition<AssignmentType>> getAssignmentIdi()
-
getAssignmentType
public AssignmentType getAssignmentType()
- Specified by:
getAssignmentType
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
getAssignmentId
public Long getAssignmentId()
- Specified by:
getAssignmentId
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
getAssignmentType
public AssignmentType getAssignmentType(boolean old)
- Specified by:
getAssignmentType
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
getRelation
public QName getRelation()
- Specified by:
getRelation
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
getNormalizedRelation
public QName getNormalizedRelation(RelationRegistry relationRegistry)
- Specified by:
getNormalizedRelation
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
getConstructionTriple
@NotNull public DeltaSetTriple<Construction<AH>> getConstructionTriple()
-
getEvaluatedConstructions
public DeltaSetTriple<EvaluatedConstruction> getEvaluatedConstructions(Task task, OperationResult result) throws SchemaException, ObjectNotFoundException
Construction is not a part of model-api. To avoid heavy refactoring at present time, there is not a classical Construction-ConstructionImpl separation, but we use artificial (simplified) EvaluatedConstruction API class instead.- Specified by:
getEvaluatedConstructions
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
- Returns:
- Throws:
SchemaException
ObjectNotFoundException
-
getConstructionSet
public Collection<Construction<AH>> getConstructionSet(PlusMinusZero whichSet)
-
addConstruction
public void addConstruction(Construction<AH> contruction, PlusMinusZero whichSet)
-
getPersonaConstructionTriple
@NotNull public DeltaSetTriple<PersonaConstruction<AH>> getPersonaConstructionTriple()
-
addPersonaConstruction
public void addPersonaConstruction(PersonaConstruction<AH> personaContruction, PlusMinusZero whichSet)
-
getRoles
@NotNull public DeltaSetTriple<EvaluatedAssignmentTargetImpl> getRoles()
- Specified by:
getRoles
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
addRole
public void addRole(EvaluatedAssignmentTargetImpl role, PlusMinusZero mode)
-
getOrgRefVals
@NotNull public Collection<PrismReferenceValue> getOrgRefVals()
-
addOrgRefVal
public void addOrgRefVal(PrismReferenceValue org)
-
getArchetypeRefVals
@NotNull public Collection<PrismReferenceValue> getArchetypeRefVals()
-
addArchetypeRefVal
public void addArchetypeRefVal(PrismReferenceValue archetypeRefVal)
-
getMembershipRefVals
@NotNull public Collection<PrismReferenceValue> getMembershipRefVals()
-
addMembershipRefVal
public void addMembershipRefVal(PrismReferenceValue org)
-
getDelegationRefVals
@NotNull public Collection<PrismReferenceValue> getDelegationRefVals()
-
addDelegationRefVal
public void addDelegationRefVal(PrismReferenceValue org)
-
getTenantOid
public String getTenantOid()
-
setTenantOid
public void setTenantOid(String tenantOid)
-
getAuthorizations
@NotNull public Collection<Authorization> getAuthorizations()
- Specified by:
getAuthorizations
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
addAuthorization
public void addAuthorization(Authorization authorization)
-
getAdminGuiConfigurations
@NotNull public Collection<AdminGuiConfigurationType> getAdminGuiConfigurations()
- Specified by:
getAdminGuiConfigurations
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
addAdminGuiConfiguration
public void addAdminGuiConfiguration(AdminGuiConfigurationType adminGuiConfiguration)
-
getFocusMappings
@NotNull public Collection<MappingImpl<?,?>> getFocusMappings()
-
getFocusMappingEvaluationRequests
@NotNull public Collection<AssignedFocusMappingEvaluationRequest> getFocusMappingEvaluationRequests()
-
addFocusMapping
public void addFocusMapping(MappingImpl<?,?> focusMapping)
-
getTarget
public PrismObject<?> getTarget()
- Specified by:
getTarget
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
setTarget
public void setTarget(PrismObject<?> target)
-
isVirtual
public boolean isVirtual()
-
setVirtual
public void setVirtual(boolean virtual)
-
isValid
public boolean isValid()
- Specified by:
isValid
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
setValid
public void setValid(boolean isValid)
-
getWasValid
public boolean getWasValid()
-
setWasValid
public void setWasValid(boolean wasValid)
-
isForceRecon
public boolean isForceRecon()
-
setForceRecon
public void setForceRecon(boolean forceRecon)
-
getResources
public Collection<ResourceType> getResources(Task task, OperationResult result) throws ObjectNotFoundException, SchemaException
-
evaluateConstructions
public void evaluateConstructions(ObjectDeltaObject<AH> focusOdo, PrismObject<SystemConfigurationType> systemConfiguration, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException, ObjectNotFoundException, SecurityViolationException, ConfigurationException, CommunicationException
-
evaluateConstructions
public void evaluateConstructions(ObjectDeltaObject<AH> focusOdo, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException, ObjectNotFoundException, SecurityViolationException, ConfigurationException, CommunicationException
-
setPresentInCurrentObject
public void setPresentInCurrentObject(boolean presentInCurrentObject)
-
setPresentInOldObject
public void setPresentInOldObject(boolean presentInOldObject)
-
setPresentInNewObject
public void setPresentInNewObject(boolean presentInNewObject)
-
isPresentInCurrentObject
public boolean isPresentInCurrentObject()
- Specified by:
isPresentInCurrentObject
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
isPresentInOldObject
public boolean isPresentInOldObject()
- Specified by:
isPresentInOldObject
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
isPresentInNewObject
public boolean isPresentInNewObject()
- Specified by:
isPresentInNewObject
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
getFocusPolicyRules
@NotNull public Collection<EvaluatedPolicyRule> getFocusPolicyRules()
Description copied from interface:EvaluatedAssignment
Returns all policy rules that apply to the focal object and are derived from this assignment - even those that were not triggered. The policy rules are compiled from all the applicable sources (target, meta-roles, etc.)- Specified by:
getFocusPolicyRules
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
addFocusPolicyRule
public void addFocusPolicyRule(EvaluatedPolicyRule policyRule)
-
getThisTargetPolicyRules
@NotNull public Collection<EvaluatedPolicyRule> getThisTargetPolicyRules()
Description copied from interface:EvaluatedAssignment
Returns all policy rules that directly apply to the target object of this assignment (and are derived from this assignment) - even those that were not triggered. The policy rules are compiled from all the applicable sources (target, meta-roles, etc.)- Specified by:
getThisTargetPolicyRules
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
addThisTargetPolicyRule
public void addThisTargetPolicyRule(EvaluatedPolicyRule policyRule)
-
getOtherTargetsPolicyRules
@NotNull public Collection<EvaluatedPolicyRule> getOtherTargetsPolicyRules()
Description copied from interface:EvaluatedAssignment
Returns all policy rules that apply to some other target object of this assignment (and are derived from this assignment) - even those that were not triggered. The policy rules are compiled from all the applicable sources (target, meta-roles, etc.)- Specified by:
getOtherTargetsPolicyRules
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
addOtherTargetPolicyRule
public void addOtherTargetPolicyRule(EvaluatedPolicyRule policyRule)
-
getAllTargetsPolicyRules
@NotNull public Collection<EvaluatedPolicyRule> getAllTargetsPolicyRules()
Description copied from interface:EvaluatedAssignment
Returns all policy rules that apply to any of the target objects provided by this assignment (and are derived from this assignment) - even those that were not triggered. The policy rules are compiled from all the applicable sources (target, meta-roles, etc.) The difference to getThisTargetPolicyRules is that if e.g. jack is a Pirate, and Pirate induces Sailor, then - getThisTargetPolicyRules will show rules that are attached to Pirate - getAllTargetsPolicyRules will show rules that are attached to Pirate and Sailor - getOtherTargetsPolicyRules will show rules that are attached to Sailor- Specified by:
getAllTargetsPolicyRules
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
getPolicySituations
public Collection<String> getPolicySituations()
- Specified by:
getPolicySituations
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
triggerRule
public void triggerRule(@NotNull EvaluatedPolicyRule rule, Collection<EvaluatedPolicyRuleTrigger<?>> triggers)
- Specified by:
triggerRule
in interfaceEvaluatedAssignment<AH extends AssignmentHolderType>
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
toHumanReadableString
public String toHumanReadableString()
-
shortDump
public void shortDump(StringBuilder sb)
Description copied from interface:ShortDumpable
Show the content of the object intended for diagnostics. This method is supposed to append a compact, human-readable output in a single line. Unlike toString() method, there is no requirement to identify the actual class or type of the object. It is assumed that the class/type will be obvious from the context in which the output is used.- Specified by:
shortDump
in interfaceShortDumpable
- Parameters:
sb
- StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.
-
getNonNegativeTargets
public List<EvaluatedAssignmentTargetImpl> getNonNegativeTargets()
-
getMode
@NotNull public PlusMinusZero getMode()
- Returns:
- mode (adding, deleting, keeping) with respect to the *current* object (not the old one)
-
-