Class LensProjectionContext
java.lang.Object
com.evolveum.midpoint.model.impl.lens.LensElementContext<ShadowType>
com.evolveum.midpoint.model.impl.lens.LensProjectionContext
- All Implemented Interfaces:
ModelElementContext<ShadowType>
,ModelProjectionContext
,DebugDumpable
,Serializable
,Cloneable
public class LensProjectionContext
extends LensElementContext<ShadowType>
implements ModelProjectionContext
- Author:
- semancik
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.evolveum.midpoint.model.impl.lens.LensElementContext
LensElementContext.DeltaModifier<O extends Objectable>
-
Field Summary
Fields inherited from class com.evolveum.midpoint.model.impl.lens.LensElementContext
lensContext
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAccountSyncDelta
(ObjectDelta<ShadowType> delta) void
adopt
(PrismContext prismContext) boolean
void
checkConsistence
(String contextDesc) void
checkConsistence
(String contextDesc, boolean fresh, boolean force) void
void
void
cleanup()
Cleans up the contexts by removing some of the working state.void
clone
(LensContext<? extends ObjectType> lensContext) debugDump
(int indent) debugDump
(int indent, boolean showTriples) void
determineFullShadowFlag
(ShadowType loadedShadow) Sets the full shadow flag, based on the situation (including the fetch result).ShadowAttributeDefinition<?,
?, ?, ?> findAttributeDefinition
(QName attrName) void
forEachDelta
(Consumer<ObjectDelta<ShadowType>> consumer) TODO is this method ever used?TODO is this method ever used?@NotNull AssignmentPolicyEnforcementType
@NotNull CachedShadowsUseType
@Nullable String
Returns configured focus archetype OID corresponding to resource object type of this projection (if there is one).Dependencies returned are "almost complete": resource OID and kind are non-null.protected String
protected String
<AH extends AssignmentHolderType>
DeltaSetTriple<EvaluatedAssignedResourceObjectConstructionImpl<AH>><AH extends AssignmentHolderType>
PlainResourceObjectConstruction<AH>Returns delta suitable for execution.@NotNull FocusIdentitySourceType
Returns focus identity source information for data created from this projection.@NotNull String
@NotNull ProjectionContextKey
getKey()
getKind()
Returns the projection contexts bound to this one via data dependency that are known (or supposed) to be modified.ReturnsObjectDeltaObject
to be used e.g. expression evaluation regarding this projection.int
getOrder()
@NotNull String
@NotNull ResourceType
@NotNull CompleteResourceSchema
Map<QName,
DeltaSetTriple<ItemValueWithOrigin<PrismPropertyValue<QName>, PrismPropertyDefinition<QName>>>> Returns the (estimated) state before the simulated operation began.@Nullable ResourceObjectDefinition
Returns immutable definition.@NotNull ResourceObjectDefinition
Returns all secondary deltas, merged together.Returns synchronization delta.Initial intent regarding the account.Decision regarding the account.getTag()
int
getWave()
boolean
Returns true if there is any context that depends on us.boolean
Returns true if full shadow is available, either loaded or in a create delta.boolean
boolean
boolean
boolean
boolean
boolean
isActive()
boolean
isAdd()
Be cautious when using this method forLensProjectionContext
.boolean
boolean
isAssociationLoaded
(QName assocName) boolean
isAttributeLoaded
(@NotNull QName attrName) Returnstrue
if the attribute is available for processing.boolean
isAttributeLoaded
(@NotNull QName attrName, @Nullable ShadowAttributeDefinition<?, ?, ?, ?> attrDefOverride) boolean
boolean
isBroken()
boolean
boolean
boolean
boolean
boolean
Returns true if the projection is "current" i.e. it was not completed and its wave is either not yet determined or equal to the current projection wave.boolean
Assumes the wave is computed.boolean
isDefaultForKind
(@NotNull ShadowKindType kind) Use with care!boolean
isDelete()
See also limitations forLensElementContext.isAdd()
.boolean
isDependencyTarget
(ResourceObjectTypeDependencyType dependency) Returns true if the `target` is a target of `dependency` configuration.boolean
boolean
isExists()
boolean
boolean
isGone()
boolean
boolean
boolean
boolean
isLegal()
boolean
boolean
isLowerOrderOf
(@NotNull LensProjectionContext other) Returns true if this context is a "lower order brother" of the specified one.boolean
isMarkedReadOnly
(OperationResult result) boolean
isModify()
TODO description See also limitations forLensElementContext.isAdd()
.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
Is the resource or object class/type visible for the current task execution mode?boolean
void
markGone()
boolean
matches
(@NotNull ConstructionTargetKey targetKey) boolean
matches
(@NotNull ConstructionType construction, @NotNull String resourceOid) Note that we do not consider the project as matching if it's not classified.boolean
matches
(ProjectionContextKey otherKey, boolean compareOrder) TODO clarify this!!!void
void
void
replaceOldAndCurrentObject
(String oid, PrismObject<ShadowType> objectOld, PrismObject<ShadowType> objectCurrent) Replaces OID, old, and current object state.void
rot()
void
TODOvoid
setActive
(boolean isActive) void
setAssigned
(boolean isAssigned) void
setAssignedOldIfUnknown
(Boolean value) We want to set "assigned in old state" only once - in projection wave 0 where real "old" values are known.void
void
setCachedValueMetadata
(ValueMetadataType cachedValueMetadata) void
setCanProject
(boolean canProject) void
setCompleted
(boolean completed) void
setCurrentObject
(@Nullable PrismObject<ShadowType> object) Updates the current object.void
setCurrentObjectAndOid
(@NotNull PrismObject<ShadowType> object) Used to update current object and also the OID.void
setDoReconciliation
(boolean doReconciliation) void
We set reconciliation:=TRUE for volatile accounts.<AH extends AssignmentHolderType>
voidsetEvaluatedAssignedConstructionDeltaSetTriple
(DeltaSetTriple<EvaluatedAssignedResourceObjectConstructionImpl<AH>> evaluatedAssignedConstructionDeltaSetTriple) void
setEvaluatedPlainConstruction
(PlainResourceObjectConstruction<?> evaluatedPlainConstruction) void
setExists
(boolean exists) void
setFullShadow
(boolean fullShadow) void
setInitialObject
(@NotNull PrismObject<ShadowType> object) Sets the value of an object that should be present on the clockwork start: both objectCurrent and objectOld.void
setKey
(@NotNull ProjectionContextKey key) void
void
setLegalOld
(Boolean isLegalOld) void
setLegalOldIfUnknown
(Boolean value) We want to set "legal in old state" only once - in projection wave 0 where real "old" values are known.void
setLoadedObject
(@NotNull PrismObject<ShadowType> object) Sets current and possibly also old object.void
setProjectionSecurityPolicy
(SecurityPolicyType projectionSecurityPolicy) void
void
setResource
(ResourceType resource) void
setShadowExistsInRepo
(boolean shadowExistsInRepo) void
setSqueezedAssociations
(Map<QName, DeltaSetTriple<ItemValueWithOrigin<ShadowAssociationValue, ShadowAssociationDefinition>>> squeezedAssociations) void
setSqueezedAttributes
(Map<QName, DeltaSetTriple<ItemValueWithOrigin<?, ?>>> squeezedAttributes) void
setSqueezedAuxiliaryObjectClasses
(Map<QName, DeltaSetTriple<ItemValueWithOrigin<PrismPropertyValue<QName>, PrismPropertyDefinition<QName>>>> squeezedAuxiliaryObjectClasses) void
setSyncAbsoluteTrigger
(boolean syncAbsoluteTrigger) void
setSyncDelta
(ObjectDelta<ShadowType> syncDelta) void
setSynchronizationIntent
(SynchronizationIntent synchronizationIntent) void
setSynchronizationPolicyDecision
(SynchronizationPolicyDecision policyDecision) void
setSynchronizationSituationDetected
(SynchronizationSituationType synchronizationSituationDetected) void
setSynchronizationSituationResolved
(SynchronizationSituationType synchronizationSituationResolved) void
setSynchronizationSource
(boolean synchronizationSource) void
setWave
(int wave) void
setWaveIncomplete
(boolean waveIncomplete) void
simulateDeltaExecution
(@NotNull ObjectDelta<ShadowType> delta) Updates the state to reflect that a delta was "executed" in simulation mode.Return a human readable name of the projection object suitable for logs.toString()
Methods inherited from class com.evolveum.midpoint.model.impl.lens.LensElementContext
addEvaluatedPolicyStatements, addToExecutedDeltas, addToPendingAssignmentPolicyStateModifications, addToPendingObjectPolicyStateModifications, addToPrimaryDelta, checkConsistence, clearCurrentObject, clearPendingPolicyStateModifications, deleteNonTransientComputationResults, forEachObject, getAllConsideredEventMarksOids, getCredentialsPolicy, getCurrentDelta, getEvaluatedPolicyStatements, getExecutedDeltas, getExecutedDeltas, getItemChangeApplicationModeConfiguration, getIteration, getIterationToken, getLensContext, getMatchingEventMarksOids, getModelContext, getObjectCurrent, getObjectCurrentOrNew, getObjectCurrentOrOld, getObjectCurrentRequired, getObjectDefinition, getObjectNew, getObjectNewOrCurrentOrOld, getObjectNewOrCurrentRequired, getObjectNewRequired, getObjectOld, getObjectPolicyRules, getObjectReadVersion, getObjectTypeClass, getOid, getOperation, getPendingAssignmentPolicyStateModifications, getPendingObjectPolicyStateModifications, getPolicyRuleCounter, getPrimaryDelta, getSecondaryDelta, getSecurityPolicy, getSummaryDelta, getSummaryExecutedDelta, getTemporaryContainerId, hasEffectiveMark, initializeElementState, isFresh, isModifiedInCurrentDelta, isOfType, modifyPrimaryDelta, modifySecondaryDelta, operationMatches, rememberElementState, represents, resolveTemporaryContainerIds, restoreElementState, setEstimatedOldValuesInPrimaryDelta, setFresh, setIteration, setIterationToken, setObjectPolicyRules, setOid, setPolicyRuleCounter, setPrimaryDelta, setPrimaryDeltaAfterStart, setSecurityPolicy, setupLastChangeExecutionResult, swallowToPrimaryDelta, swallowToSecondaryDelta, swallowToSecondaryDelta, swallowToSecondaryDeltaUnchecked, wasAddExecuted
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.ModelElementContext
addToPrimaryDelta, getCurrentDelta, getExecutedDeltas, getMatchingEventMarksOids, getModelContext, getObjectAny, getObjectAnyRequired, getObjectCurrent, getObjectNew, getObjectNewOrCurrentOrOld, getObjectOld, getObjectOldOrCurrent, getObjectPolicyRules, getObjectTypeClass, getOid, getPrimaryDelta, getSecondaryDelta, getSummaryDelta, hasEffectiveMark, isOfType, setPrimaryDelta
Methods inherited from interface com.evolveum.midpoint.model.api.context.ModelProjectionContext
getCompositeObjectDefinitionRequired, isTombstone
-
Method Details
-
isDependencyTarget
Returns true if the `target` is a target of `dependency` configuration. (Meaning that the source that contains `dependency` among its configured dependencies depends on `target`, i.e. the `dependency` configuration points to `target`.) Precondition: dependency is fully specified (resource, kind, intent are not null), seegetDependencies()
. -
getSyncDelta
Description copied from interface:ModelProjectionContext
Returns synchronization delta. Synchronization delta describes changes that have recently happened. MidPoint reacts to these changes by "pulling them in" (e.g. using them in inbound mappings).- Specified by:
getSyncDelta
in interfaceModelProjectionContext
-
setSyncDelta
- Specified by:
setSyncDelta
in interfaceModelProjectionContext
-
setLoadedObject
Description copied from class:LensElementContext
Sets current and possibly also old object. This method is used with freshly loaded object. The object is set as current object. If the old object should be initialized, then the object is also set as old object. Should be used only from the context loader!- Specified by:
setLoadedObject
in classLensElementContext<ShadowType>
-
setInitialObject
Description copied from class:LensElementContext
Sets the value of an object that should be present on the clockwork start: both objectCurrent and objectOld. Assumes that clockwork has not started yet.- Overrides:
setInitialObject
in classLensElementContext<ShadowType>
-
setCurrentObject
Description copied from class:LensElementContext
Updates the current object. Should be called only from the context loader.- Overrides:
setCurrentObject
in classLensElementContext<ShadowType>
-
setCurrentObjectAndOid
Description copied from class:LensElementContext
Used to update current object and also the OID. (In cases when the OID might have changed as well.) Should be called only from the context loader.- Overrides:
setCurrentObjectAndOid
in classLensElementContext<ShadowType>
-
replaceOldAndCurrentObject
public void replaceOldAndCurrentObject(String oid, PrismObject<ShadowType> objectOld, PrismObject<ShadowType> objectCurrent) Description copied from class:LensElementContext
Replaces OID, old, and current object state. Deltas (primary, secondary) are kept untouched. Currently used when doing some magic with resolving conflicts while iterating during the projection of projections. Very dangerous! Use at your own risk!- Overrides:
replaceOldAndCurrentObject
in classLensElementContext<ShadowType>
-
getObjectDeltaObject
public ObjectDeltaObject<ShadowType> getObjectDeltaObject() throws SchemaException, ConfigurationExceptionReturnsObjectDeltaObject
to be used e.g. expression evaluation regarding this projection. We useElementState.getRelativeObjectDeltaObject()
, although the "absolute" version should provide more or less the same results. Projections are not updated iteratively, unlike the focus. -
getSummarySecondaryDelta
Description copied from interface:ModelElementContext
Returns all secondary deltas, merged together. (Can take some time to compute. So use with care.) The returned object is (kind of) immutable. Changing it may do strange things, but most likely the changes will be lost.- Specified by:
getSummarySecondaryDelta
in interfaceModelElementContext<ShadowType>
-
setSyncAbsoluteTrigger
public void setSyncAbsoluteTrigger(boolean syncAbsoluteTrigger) -
getWave
public int getWave() -
setWave
public void setWave(int wave) -
isWaveIncomplete
public boolean isWaveIncomplete() -
setWaveIncomplete
public void setWaveIncomplete(boolean waveIncomplete) -
isDoReconciliation
public boolean isDoReconciliation() -
setDoReconciliation
public void setDoReconciliation(boolean doReconciliation) -
getKey
- Specified by:
getKey
in interfaceModelProjectionContext
-
markGone
public void markGone() -
setKey
-
matches
-
matches
public boolean matches(@NotNull @NotNull ConstructionType construction, @NotNull @NotNull String resourceOid) Note that we do not consider the project as matching if it's not classified. The reason is that constructions are targeted to specific kind/intent. There is a chance that this particular context points to a shadow that (if properly classified) would match this, but let's ignore this. -
isLowerOrderOf
Returns true if this context is a "lower order brother" of the specified one. -
matches
TODO clarify this!!! -
isGone
public boolean isGone()- Specified by:
isGone
in interfaceModelProjectionContext
-
isGoneOrReaping
public boolean isGoneOrReaping() -
isReaping
public boolean isReaping() -
addAccountSyncDelta
- Throws:
SchemaException
-
isAdd
public boolean isAdd()Description copied from class:LensElementContext
Be cautious when using this method forLensProjectionContext
. The projection may be called into existence because a construction is assigned - i.e., no primary delta exists in this case. But the policy decision can also be null: untilActivationProcessor.processProjectionsActivation(LensContext, String, XMLGregorianCalendar, Task, OperationResult)
is started - e.g. during the whole focus projection! See also MID-8569. Other problems: If there's no focus, then we don't compute thesynchronizationPolicyDecision
at all. See MID-8608 and its fix. It is very unclear and should be clarified.- Specified by:
isAdd
in interfaceModelElementContext<ShadowType>
- Specified by:
isAdd
in classLensElementContext<ShadowType>
-
isModify
public boolean isModify()Description copied from class:LensElementContext
TODO description See also limitations forLensElementContext.isAdd()
.- Overrides:
isModify
in classLensElementContext<ShadowType>
-
isDelete
public boolean isDelete()Description copied from class:LensElementContext
See also limitations forLensElementContext.isAdd()
.- Specified by:
isDelete
in interfaceModelElementContext<ShadowType>
- Specified by:
isDelete
in classLensElementContext<ShadowType>
-
getArchetype
Description copied from interface:ModelElementContext
TODO is this method ever used?- Specified by:
getArchetype
in interfaceModelElementContext<ShadowType>
- Returns:
- Determined archetype of the object. Currently not supported for projections. Since 4.4 structural archetype is returned
-
getArchetypes
Description copied from interface:ModelElementContext
TODO is this method ever used?- Specified by:
getArchetypes
in interfaceModelElementContext<ShadowType>
- Returns:
- All archetypes (structural and auxiliary)
-
getResource
- Specified by:
getResource
in interfaceModelProjectionContext
-
getResourceRequired
-
setResource
-
getEntitlementMap
-
isAssigned
-
setAssigned
public void setAssigned(boolean isAssigned) -
isAssignedOld
-
setAssignedOldIfUnknown
We want to set "assigned in old state" only once - in projection wave 0 where real "old" values are known. TODO: what should we do with projections that appear later? -
isActive
public boolean isActive() -
setActive
public void setActive(boolean isActive) -
isLegal
- Specified by:
isLegal
in interfaceModelProjectionContext
-
setLegal
-
isLegalOld
-
setLegalOld
-
setLegalOldIfUnknown
We want to set "legal in old state" only once - in projection wave 0 where real "old" values are known. TODO: what should we do with projections that appear later? -
isExists
public boolean isExists()- Specified by:
isExists
in interfaceModelProjectionContext
-
setExists
public void setExists(boolean exists) -
isShadowExistsInRepo
public boolean isShadowExistsInRepo() -
setShadowExistsInRepo
public void setShadowExistsInRepo(boolean shadowExistsInRepo) -
getSynchronizationIntent
Description copied from interface:ModelProjectionContext
Initial intent regarding the account. It indicates what the initiator of the operation _wants to do_ with the context. If set to null then the decision is left to "the engine". Null is also a typical value when the context is created. It may be pre-set under some circumstances, e.g. if an account is being unlinked.- Specified by:
getSynchronizationIntent
in interfaceModelProjectionContext
-
setSynchronizationIntent
-
getSynchronizationPolicyDecision
Description copied from interface:ModelProjectionContext
Decision regarding the account. It describes the overall situation of the account e.g. whether account is added, is to be deleted, unliked, etc. If set to null no decision was made yet. Null is also a typical value when the context is created.- Specified by:
getSynchronizationPolicyDecision
in interfaceModelProjectionContext
- See Also:
-
setSynchronizationPolicyDecision
-
isSynchronizationDecisionAdd
public boolean isSynchronizationDecisionAdd() -
setBroken
public void setBroken() -
getSynchronizationSituationDetected
-
setSynchronizationSituationDetected
public void setSynchronizationSituationDetected(SynchronizationSituationType synchronizationSituationDetected) -
getSynchronizationSituationResolved
-
setSynchronizationSituationResolved
public void setSynchronizationSituationResolved(SynchronizationSituationType synchronizationSituationResolved) -
isFullShadow
public boolean isFullShadow()- Specified by:
isFullShadow
in interfaceModelProjectionContext
-
hasFullShadow
public boolean hasFullShadow()Returns true if full shadow is available, either loaded or in a create delta. NOTE: The distinction betweenisFullShadow()
and this method is subtle but sometimes important. TheisFullShadow()
method is used to determine whether the shadow is fully loaded from the resource. This method can returntrue
also if we know how the shadow would need to be created. But resource-provided attributes may be missing in such cases! Likeuid
in case of LDAP. Inbound mappings could fail in such cases. -
setFullShadow
public void setFullShadow(boolean fullShadow) -
isActivationLoaded
- Throws:
SchemaException
ConfigurationException
- See Also:
-
isPasswordValueLoaded
- Throws:
SchemaException
ConfigurationException
- See Also:
-
isAuxiliaryObjectClassPropertyLoaded
public boolean isAuxiliaryObjectClassPropertyLoaded() throws SchemaException, ConfigurationException- Throws:
SchemaException
ConfigurationException
- See Also:
-
isAttributeLoaded
public boolean isAttributeLoaded(@NotNull @NotNull QName attrName) throws SchemaException, ConfigurationException Returnstrue
if the attribute is available for processing. It must either be freshly loaded (in theisFullShadow()
sense) or it must be cached *and* the use of cache for computations must be allowed. -
isAttributeLoaded
public boolean isAttributeLoaded(@NotNull @NotNull QName attrName, @Nullable @Nullable ShadowAttributeDefinition<?, ?, throws SchemaException, ConfigurationException?, ?> attrDefOverride) -
isAssociationLoaded
- Throws:
SchemaException
ConfigurationException
- See Also:
-
getCachedAttributesNames
-
getKind
-
getEvaluatedAssignedConstructionDeltaSetTriple
public <AH extends AssignmentHolderType> DeltaSetTriple<EvaluatedAssignedResourceObjectConstructionImpl<AH>> getEvaluatedAssignedConstructionDeltaSetTriple() -
setEvaluatedAssignedConstructionDeltaSetTriple
public <AH extends AssignmentHolderType> void setEvaluatedAssignedConstructionDeltaSetTriple(DeltaSetTriple<EvaluatedAssignedResourceObjectConstructionImpl<AH>> evaluatedAssignedConstructionDeltaSetTriple) -
getEvaluatedPlainConstruction
public <AH extends AssignmentHolderType> PlainResourceObjectConstruction<AH> getEvaluatedPlainConstruction() -
setEvaluatedPlainConstruction
public void setEvaluatedPlainConstruction(PlainResourceObjectConstruction<?> evaluatedPlainConstruction) -
getSqueezedAttributes
-
setSqueezedAttributes
public void setSqueezedAttributes(Map<QName, DeltaSetTriple<ItemValueWithOrigin<?, ?>>> squeezedAttributes) -
getSqueezedAssociations
public Map<QName,DeltaSetTriple<ItemValueWithOrigin<ShadowAssociationValue, getSqueezedAssociations()ShadowAssociationDefinition>>> -
setSqueezedAssociations
public void setSqueezedAssociations(Map<QName, DeltaSetTriple<ItemValueWithOrigin<ShadowAssociationValue, ShadowAssociationDefinition>>> squeezedAssociations) -
getSqueezedAuxiliaryObjectClasses
public Map<QName,DeltaSetTriple<ItemValueWithOrigin<PrismPropertyValue<QName>, getSqueezedAuxiliaryObjectClasses()PrismPropertyDefinition<QName>>>> -
setSqueezedAuxiliaryObjectClasses
public void setSqueezedAuxiliaryObjectClasses(Map<QName, DeltaSetTriple<ItemValueWithOrigin<PrismPropertyValue<QName>, PrismPropertyDefinition<QName>>>> squeezedAuxiliaryObjectClasses) -
getStructuralDefinitionIfNotBroken
public ResourceObjectDefinition getStructuralDefinitionIfNotBroken() throws SchemaException, ConfigurationException -
getResourceSchema
-
getResourceSchemaRequired
@NotNull public @NotNull CompleteResourceSchema getResourceSchemaRequired() throws SchemaException, ConfigurationException -
getStructuralObjectDefinition
@Nullable public @Nullable ResourceObjectDefinition getStructuralObjectDefinition() throws SchemaException, ConfigurationExceptionReturns immutable definition. -
getStructuralObjectDefinitionRequired
@NotNull public @NotNull ResourceObjectDefinition getStructuralObjectDefinitionRequired() throws SchemaException, ConfigurationException -
getAuxiliaryObjectClassDefinitions
public Collection<ResourceObjectDefinition> getAuxiliaryObjectClassDefinitions() throws SchemaException, ConfigurationException -
refreshAuxiliaryObjectClassDefinitions
-
getCompositeObjectDefinition
public CompositeObjectDefinition getCompositeObjectDefinition() throws SchemaException, ConfigurationException- Specified by:
getCompositeObjectDefinition
in interfaceModelProjectionContext
- Throws:
SchemaException
ConfigurationException
-
findAttributeDefinition
public ShadowAttributeDefinition<?,?, findAttributeDefinition?, ?> (QName attrName) throws SchemaException, ConfigurationException -
getDependencies
public Collection<ResourceObjectTypeDependencyType> getDependencies() throws SchemaException, ConfigurationExceptionDescription copied from interface:ModelProjectionContext
Dependencies returned are "almost complete": resource OID and kind are non-null. Intent may be null; in that case, the default value has to be used. TODO decide what to return if the dependency configuration cannot be obtained; currently it's an empty list- Specified by:
getDependencies
in interfaceModelProjectionContext
- Throws:
SchemaException
ConfigurationException
-
getProjectionSecurityPolicy
-
setProjectionSecurityPolicy
-
setCanProject
public void setCanProject(boolean canProject) -
isCanProject
public boolean isCanProject() -
getAssignmentPolicyEnforcementMode
@NotNull public @NotNull AssignmentPolicyEnforcementType getAssignmentPolicyEnforcementMode() throws SchemaException, ConfigurationException -
isLegalize
-
clearIntermediateResults
public void clearIntermediateResults() -
getExecutableDelta
Description copied from interface:ModelProjectionContext
Returns delta suitable for execution. The primary and secondary deltas may not make complete sense all by themselves. E.g. they may both be MODIFY deltas even in case that the account should be created. The deltas begin to make sense only if combined with sync decision. This method provides the deltas all combined and ready for execution.- Specified by:
getExecutableDelta
in interfaceModelProjectionContext
- Throws:
SchemaException
ConfigurationException
-
checkConsistenceIfNeeded
public void checkConsistenceIfNeeded() -
checkConsistence
- Specified by:
checkConsistence
in classLensElementContext<ShadowType>
-
checkConsistence
-
cleanup
public void cleanup()Description copied from class:LensElementContext
Cleans up the contexts by removing some of the working state. TODO describe more precisely, see alsoLensElementContext.rot()
,LensFocusContext.updateDeltasAfterExecution()
, andLensContext.updateAfterExecution()
- Specified by:
cleanup
in classLensElementContext<ShadowType>
-
normalize
public void normalize()- Overrides:
normalize
in classLensElementContext<ShadowType>
-
adopt
- Overrides:
adopt
in classLensElementContext<ShadowType>
- Throws:
SchemaException
-
clone
-
checkEncrypted
public void checkEncrypted()- Overrides:
checkEncrypted
in classLensElementContext<ShadowType>
-
getHumanReadableName
- Specified by:
getHumanReadableName
in classLensElementContext<ShadowType>
-
debugDump
- Specified by:
debugDump
in interfaceDebugDumpable
-
debugDump
-
getCurrentShadowState
-
getElementDefaultDesc
- Specified by:
getElementDefaultDesc
in classLensElementContext<ShadowType>
-
toString
-
toHumanReadableString
Return a human readable name of the projection object suitable for logs. -
getHumanReadableKind
-
getElementDesc
- Overrides:
getElementDesc
in classLensElementContext<ShadowType>
-
determineFullShadowFlag
Sets the full shadow flag, based on the situation (including the fetch result). -
isToBeArchived
public boolean isToBeArchived() -
getResourceOid
-
getResourceOidRequired
-
forEachDelta
- Overrides:
forEachDelta
in classLensElementContext<ShadowType>
-
getResourceName
-
setSynchronizationSource
public void setSynchronizationSource(boolean synchronizationSource) -
isSynchronizationSource
public boolean isSynchronizationSource() -
getDescription
-
isCurrentForProjection
Returns true if the projection is "current" i.e. it was not completed and its wave is either not yet determined or equal to the current projection wave. -
hasProjectionWave
public boolean hasProjectionWave() -
isCurrentProjectionWave
public boolean isCurrentProjectionWave()Assumes the wave is computed. -
isCompleted
public boolean isCompleted() -
setCompleted
public void setCompleted(boolean completed) -
rot
public void rot()- Overrides:
rot
in classLensElementContext<ShadowType>
-
setReloadNotNeeded
public void setReloadNotNeeded() -
isReloadNeeded
public boolean isReloadNeeded() -
getCachedValueMetadata
-
setCachedValueMetadata
-
isHigherOrder
public boolean isHigherOrder() -
isBroken
public boolean isBroken() -
isIgnored
public boolean isIgnored() -
setDoReconciliationFlagIfVolatile
We set reconciliation:=TRUE for volatile accounts. This is to ensure that the changes on such resources will be read back to midPoint. (It is a bit of hack but it looks OK.) See also MID-2436 - volatile objects. -
rotWithDeltaDeletion
public void rotWithDeltaDeletion()TODO -
hasDependentContext
Returns true if there is any context that depends on us. (Note that "dependency source" means the context that depends on the "dependency target". We are the target here.) -
isClassified
public boolean isClassified() -
getOrder
public int getOrder() -
getTag
-
isDefaultForKind
Use with care! -
getConfiguredFocusArchetypeOid
@Nullable public @Nullable String getConfiguredFocusArchetypeOid() throws SchemaException, ConfigurationExceptionReturns configured focus archetype OID corresponding to resource object type of this projection (if there is one). -
getFocusIdentitySource
Returns focus identity source information for data created from this projection. -
isInMaintenance
public boolean isInMaintenance() -
isVisible
Is the resource or object class/type visible for the current task execution mode? -
hasResourceAndIsVisible
-
hasResource
public boolean hasResource() -
isAdministrativeStatusSupported
-
getStateBeforeSimulatedOperation
Returns the (estimated) state before the simulated operation began. Ideally, we would like to return "old object", just as we do inLensFocusContext.getStateBeforeSimulatedOperation()
. Unfortunately, the "old object" usually contains only the repo shadow, not the state from the resource (called full shadow). The reason is that when the full shadow is is loaded during processing, it is put into "current", not into "old" object. Hence it's best to take "current object" for projections. Unfortunately, this object is changed when the simulated operation is executed. Therefore, we store its copy before we apply the operation. TODO: Maybe we should get rid of all this hackery, and explicitly remember the first full shadow loaded. But it is not trivial to do so: there are many places where full shadow is (tried to be) loaded. And it is not always clear if we get the full shadow or not. So it is doable, but definitely not simple.- Specified by:
getStateBeforeSimulatedOperation
in classLensElementContext<ShadowType>
-
simulateDeltaExecution
public void simulateDeltaExecution(@NotNull @NotNull ObjectDelta<ShadowType> delta) throws SchemaException Description copied from class:LensElementContext
Updates the state to reflect that a delta was "executed" in simulation mode.- Overrides:
simulateDeltaExecution
in classLensElementContext<ShadowType>
- Throws:
SchemaException
-
isMarkedReadOnly
- Throws:
ConfigurationException
-
areInboundSyncMappingsDisabled
- Throws:
ConfigurationException
-
isOutboundSyncDisabled
- Throws:
ConfigurationException
-
isOutboundSyncDisabledNullable
- Throws:
ConfigurationException
-
getModifiedDataBoundDependees
public List<LensProjectionContext> getModifiedDataBoundDependees() throws SchemaException, ConfigurationExceptionReturns the projection contexts bound to this one via data dependency that are known (or supposed) to be modified. -
isCachedShadowsUseAllowed
-
getCachedShadowsUse
@NotNull public @NotNull CachedShadowsUseType getCachedShadowsUse() throws SchemaException, ConfigurationException -
hasLowerOrderContext
public boolean hasLowerOrderContext()
-