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
- 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 singleResourceObjectConstructionin the presence of multiaccounts. The evaluation itself is delegated toConstructionEvaluationclass that, in turn, delegates toAttributeEvaluationandAssociationEvaluation. However, these classes shouldn't be publicly visible.
-
-
Field Summary
Fields Modifier and Type Field Description protected @NotNull Collection<MappingImpl<PrismContainerValue<ShadowAssociationType>,PrismContainerDefinition<ShadowAssociationType>>>associationMappingsMappings for the resource object associations.protected @NotNull Collection<MappingImpl<? extends PrismPropertyValue<?>,? extends PrismPropertyDefinition<?>>>attributeMappingsMappings for the resource object attributes.protected ROCconstructionParent construction to which this EvaluatedConstruction belongs.protected com.evolveum.midpoint.model.impl.lens.construction.ConstructionEvaluation<AH,ROC>evaluationConstruction evaluation state.protected @NotNull ResourceShadowDiscriminatorrsdSpecification 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 voidaddAssociationMapping(MappingImpl<PrismContainerValue<ShadowAssociationType>,PrismContainerDefinition<ShadowAssociationType>> mapping)protected voidaddAttributeMapping(MappingImpl<PrismPropertyValue<?>,PrismPropertyDefinition<?>> mapping)StringdebugDump(int indent)NextRecomputeevaluate(Task task, OperationResult parentResult)AssignmentPathgetAssignmentPath()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.ROCgetConstruction()protected StringgetHumanReadableConstructionDescription()StringgetIntent()Intent of the resource object.@NotNull ShadowKindTypegetKind()Kind of the resource object.protected @Nullable LensProjectionContextgetProjectionContext()@NotNull PrismObject<ResourceType>getResource()Resource on which the object is to be constructed.ResourceShadowDiscriminatorgetResourceShadowDiscriminator()StringgetTag()Tag of the resource object (for multiaccounts).protected abstract voidinitializeProjectionContext()Sets up the projection context.booleanisDirectlyAssigned()Is the resource object directly assigned to the focus object? (False means there is an inducement in the assignment path.) TODO What about delegations?booleanisWeak()Is the construction weak (i.e.protected voidsetProjectionContext(LensProjectionContext projectionContext)StringtoString()-
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 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:
getConstructionin interfaceEvaluatedAbstractConstruction<AH extends AssignmentHolderType>
-
getResourceShadowDiscriminator
public ResourceShadowDiscriminator getResourceShadowDiscriminator()
-
getResource
@NotNull public @NotNull PrismObject<ResourceType> getResource()
Description copied from interface:EvaluatedResourceObjectConstructionResource on which the object is to be constructed.- Specified by:
getResourcein interfaceEvaluatedResourceObjectConstruction
-
getKind
@NotNull public @NotNull ShadowKindType getKind()
Description copied from interface:EvaluatedResourceObjectConstructionKind of the resource object.- Specified by:
getKindin interfaceEvaluatedResourceObjectConstruction
-
getIntent
public String getIntent()
Description copied from interface:EvaluatedResourceObjectConstructionIntent of the resource object.- Specified by:
getIntentin interfaceEvaluatedResourceObjectConstruction
-
getTag
public String getTag()
Description copied from interface:EvaluatedResourceObjectConstructionTag of the resource object (for multiaccounts).- Specified by:
getTagin interfaceEvaluatedResourceObjectConstruction
-
isDirectlyAssigned
public boolean isDirectlyAssigned()
Description copied from interface:EvaluatedResourceObjectConstructionIs 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:
isDirectlyAssignedin interfaceEvaluatedResourceObjectConstruction
-
getAssignmentPath
public AssignmentPath getAssignmentPath()
Description copied from interface:EvaluatedResourceObjectConstructionFull path from the focus object to the respective construction.- Specified by:
getAssignmentPathin interfaceEvaluatedResourceObjectConstruction
-
isWeak
public boolean isWeak()
Description copied from interface:EvaluatedResourceObjectConstructionIs the construction weak (i.e. conditional)? https://wiki.evolveum.com/display/midPoint/Assignment+Configuration#AssignmentConfiguration-StrongandWeakConstructions- Specified by:
isWeakin 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:
debugDumpin 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
-
-