Class EvaluatedResourceObjectConstructionImpl<AH extends AssignmentHolderType,ROC extends ResourceObjectConstruction<AH,?>>
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.lens.construction.EvaluatedResourceObjectConstructionImpl<AH,ROC>
-
- All Implemented Interfaces:
EvaluatedResourceObjectConstruction
,EvaluatedAbstractConstruction<AH>
,DebugDumpable
,Serializable
- Direct Known Subclasses:
EvaluatedAssignedResourceObjectConstructionImpl
,EvaluatedPlainResourceObjectConstructionImpl
public abstract class EvaluatedResourceObjectConstructionImpl<AH extends AssignmentHolderType,ROC extends ResourceObjectConstruction<AH,?>> extends Object implements EvaluatedAbstractConstruction<AH>, EvaluatedResourceObjectConstruction
Evaluated construction of a resource object. More such objects can stem from singleResourceObjectConstruction
in the presence of multiaccounts. The evaluation itself is delegated toConstructionEvaluation
class that, in turn, delegates toAttributeEvaluation
andAssociationEvaluation
. However, these classes shouldn't be publicly visible.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected @NotNull Collection<MappingImpl<PrismContainerValue<ShadowAssociationType>,PrismContainerDefinition<ShadowAssociationType>>>
associationMappings
Mappings for the resource object associations.protected @NotNull Collection<MappingImpl<? extends PrismPropertyValue<?>,? extends PrismPropertyDefinition<?>>>
attributeMappings
Mappings for the resource object attributes.protected ROC
construction
Parent construction to which this EvaluatedConstruction belongs.protected com.evolveum.midpoint.model.impl.lens.construction.ConstructionEvaluation<AH,ROC>
evaluation
Construction evaluation state.protected @NotNull ResourceShadowDiscriminator
rsd
Specification of the resource object.-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addAssociationMapping(MappingImpl<PrismContainerValue<ShadowAssociationType>,PrismContainerDefinition<ShadowAssociationType>> mapping)
protected void
addAttributeMapping(MappingImpl<PrismPropertyValue<?>,PrismPropertyDefinition<?>> mapping)
String
debugDump(int indent)
NextRecompute
evaluate(Task task, OperationResult parentResult)
AssignmentPath
getAssignmentPath()
Full path from the focus object to the respective construction.@NotNull Collection<MappingImpl<PrismContainerValue<ShadowAssociationType>,PrismContainerDefinition<ShadowAssociationType>>>
getAssociationMappings()
protected abstract List<com.evolveum.midpoint.model.impl.lens.construction.AssociationEvaluation<AH>>
getAssociationsToEvaluate(com.evolveum.midpoint.model.impl.lens.construction.ConstructionEvaluation<AH,?> constructionEvaluation)
Collects associations that are to be evaluated.MappingImpl<? extends PrismPropertyValue<?>,? extends PrismPropertyDefinition<?>>
getAttributeMapping(QName attrName)
@NotNull Collection<MappingImpl<? extends PrismPropertyValue<?>,? extends PrismPropertyDefinition<?>>>
getAttributeMappings()
protected abstract List<com.evolveum.midpoint.model.impl.lens.construction.AttributeEvaluation<AH>>
getAttributesToEvaluate(com.evolveum.midpoint.model.impl.lens.construction.ConstructionEvaluation<AH,?> constructionEvaluation)
Collects attributes that are to be evaluated.ROC
getConstruction()
protected String
getHumanReadableConstructionDescription()
String
getIntent()
Intent of the resource object.@NotNull ShadowKindType
getKind()
Kind of the resource object.protected @Nullable LensProjectionContext
getProjectionContext()
@NotNull PrismObject<ResourceType>
getResource()
Resource on which the object is to be constructed.ResourceShadowDiscriminator
getResourceShadowDiscriminator()
String
getTag()
Tag of the resource object (for multiaccounts).protected abstract void
initializeProjectionContext()
Sets up the projection context.boolean
isDirectlyAssigned()
Is the resource object directly assigned to the focus object? (False means there is an inducement in the assignment path.) TODO What about delegations?boolean
isWeak()
Is the construction weak (i.e.protected void
setProjectionContext(LensProjectionContext projectionContext)
String
toString()
-
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
-
-
-
-
Field Detail
-
construction
@NotNull protected final ROC extends ResourceObjectConstruction<AH,?> construction
Parent construction to which this EvaluatedConstruction belongs.
-
rsd
@NotNull protected final @NotNull ResourceShadowDiscriminator rsd
Specification of the resource object.
-
attributeMappings
@NotNull protected final @NotNull Collection<MappingImpl<? extends PrismPropertyValue<?>,? extends PrismPropertyDefinition<?>>> attributeMappings
Mappings for the resource object attributes.
-
associationMappings
@NotNull protected final @NotNull Collection<MappingImpl<PrismContainerValue<ShadowAssociationType>,PrismContainerDefinition<ShadowAssociationType>>> associationMappings
Mappings for the resource object associations.
-
evaluation
protected transient com.evolveum.midpoint.model.impl.lens.construction.ConstructionEvaluation<AH extends AssignmentHolderType,ROC extends ResourceObjectConstruction<AH,?>> evaluation
Construction evaluation state. It is factored out into separate class to allow many of its fields to be final. (It would not be possible if it was part of this class.)
-
-
Method Detail
-
getConstruction
@NotNull public ROC getConstruction()
- Specified by:
getConstruction
in interfaceEvaluatedAbstractConstruction<AH extends AssignmentHolderType>
-
getResourceShadowDiscriminator
public ResourceShadowDiscriminator getResourceShadowDiscriminator()
-
getResource
@NotNull public @NotNull PrismObject<ResourceType> getResource()
Description copied from interface:EvaluatedResourceObjectConstruction
Resource on which the object is to be constructed.- Specified by:
getResource
in interfaceEvaluatedResourceObjectConstruction
-
getKind
@NotNull public @NotNull ShadowKindType getKind()
Description copied from interface:EvaluatedResourceObjectConstruction
Kind of the resource object.- Specified by:
getKind
in interfaceEvaluatedResourceObjectConstruction
-
getIntent
public String getIntent()
Description copied from interface:EvaluatedResourceObjectConstruction
Intent of the resource object.- Specified by:
getIntent
in interfaceEvaluatedResourceObjectConstruction
-
getTag
public String getTag()
Description copied from interface:EvaluatedResourceObjectConstruction
Tag of the resource object (for multiaccounts).- Specified by:
getTag
in interfaceEvaluatedResourceObjectConstruction
-
isDirectlyAssigned
public boolean isDirectlyAssigned()
Description copied from interface:EvaluatedResourceObjectConstruction
Is the resource object directly assigned to the focus object? (False means there is an inducement in the assignment path.) TODO What about delegations?- Specified by:
isDirectlyAssigned
in interfaceEvaluatedResourceObjectConstruction
-
getAssignmentPath
public AssignmentPath getAssignmentPath()
Description copied from interface:EvaluatedResourceObjectConstruction
Full path from the focus object to the respective construction.- Specified by:
getAssignmentPath
in interfaceEvaluatedResourceObjectConstruction
-
isWeak
public boolean isWeak()
Description copied from interface:EvaluatedResourceObjectConstruction
Is the construction weak (i.e. conditional)? https://docs.evolveum.com/midpoint/reference/roles-policies/assignment/configuration/#strong-and-weak-constructions- Specified by:
isWeak
in interfaceEvaluatedResourceObjectConstruction
-
getProjectionContext
@Nullable protected @Nullable LensProjectionContext getProjectionContext()
-
setProjectionContext
protected void setProjectionContext(LensProjectionContext projectionContext)
-
getHumanReadableConstructionDescription
protected String getHumanReadableConstructionDescription()
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
getAttributeMappings
@NotNull public @NotNull Collection<MappingImpl<? extends PrismPropertyValue<?>,? extends PrismPropertyDefinition<?>>> getAttributeMappings()
-
getAttributeMapping
public MappingImpl<? extends PrismPropertyValue<?>,? extends PrismPropertyDefinition<?>> getAttributeMapping(QName attrName)
-
addAttributeMapping
protected void addAttributeMapping(MappingImpl<PrismPropertyValue<?>,PrismPropertyDefinition<?>> mapping)
-
getAssociationMappings
@NotNull public @NotNull Collection<MappingImpl<PrismContainerValue<ShadowAssociationType>,PrismContainerDefinition<ShadowAssociationType>>> getAssociationMappings()
-
addAssociationMapping
protected void addAssociationMapping(MappingImpl<PrismContainerValue<ShadowAssociationType>,PrismContainerDefinition<ShadowAssociationType>> mapping)
-
evaluate
public NextRecompute evaluate(Task task, OperationResult parentResult) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException
-
initializeProjectionContext
protected abstract void initializeProjectionContext()
Sets up the projection context. The implementation differs for assigned and plain constructions.
-
getAttributesToEvaluate
protected abstract List<com.evolveum.midpoint.model.impl.lens.construction.AttributeEvaluation<AH>> getAttributesToEvaluate(com.evolveum.midpoint.model.impl.lens.construction.ConstructionEvaluation<AH,?> constructionEvaluation) throws SchemaException
Collects attributes that are to be evaluated. Again, the exact mechanism is implementation-specific.- Throws:
SchemaException
-
getAssociationsToEvaluate
protected abstract List<com.evolveum.midpoint.model.impl.lens.construction.AssociationEvaluation<AH>> getAssociationsToEvaluate(com.evolveum.midpoint.model.impl.lens.construction.ConstructionEvaluation<AH,?> constructionEvaluation) throws SchemaException
Collects associations that are to be evaluated.- Throws:
SchemaException
-
-