Class LensFocusContext<O extends ObjectType>
java.lang.Object
com.evolveum.midpoint.model.impl.lens.LensElementContext<O>
com.evolveum.midpoint.model.impl.lens.LensFocusContext<O>
- All Implemented Interfaces:
ModelElementContext<O>
,DebugDumpable
,Serializable
,Cloneable
- 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
Modifier and TypeFieldDescriptionprotected boolean
True if the focus object was deleted by our processing.Fields inherited from class com.evolveum.midpoint.model.impl.lens.LensElementContext
lensContext
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkConsistence
(String desc) void
cleanup()
Cleans up the contexts by removing some of the working state.clone
(LensContext<O> lensContext) debugDump
(int indent) void
TODO is this method ever used?TODO is this method ever used?@NotNull AssignmentIdStore
protected String
@NotNull String
@NotNull IdentityManagementConfiguration
@NotNull IndexingConfiguration
@NotNull PathKeyedMap<ObjectTemplateItemDefinitionType>
@NotNull LensContext<O>
@NotNull ObjectDeltaObject<O>
@NotNull ObjectDeltaObject<O>
Returns object-delta-object structure based on the current state.getSourceLinkTypeDefinition
(@NotNull String linkTypeName, LinkManager linkManager, OperationResult result) The "object old" represents the state "before operation" for focus objects precisely.Precondition: context is "complete" i.e.Returns all secondary deltas, merged together.getTargetLinkTypeDefinition
(@NotNull String linkTypeName, LinkManager linkManager, OperationResult result) boolean
Returns true if there is any change in organization membership.boolean
isAdd()
Be cautious when using this method forLensProjectionContext
.boolean
isDelete()
See also limitations forLensElementContext.isAdd()
.boolean
boolean
boolean
Different fromisAdd()
just to have a clear meaning.void
void
setArchetypes
(List<ArchetypeType> archetypes) void
void
setExpandedFocusTemplate
(ObjectTemplateType expandedFocusTemplate) void
setFocusTemplate
(ObjectTemplateType focusTemplate) void
setItemDefinitionsMap
(@NotNull PathKeyedMap<ObjectTemplateItemDefinitionType> itemDefinitionsMap) void
setLoadedObject
(@NotNull PrismObject<O> object) Sets current and possibly also old object.void
Only for internal use!void
swallowToWave0SecondaryDelta
(ItemDelta<?, ?> itemDelta) Deprecated.toString()
Methods inherited from class com.evolveum.midpoint.model.impl.lens.LensElementContext
addEvaluatedPolicyStatements, addToExecutedDeltas, addToPendingAssignmentPolicyStateModifications, addToPendingObjectPolicyStateModifications, addToPrimaryDelta, adopt, checkConsistence, checkEncrypted, clearCurrentObject, clearPendingPolicyStateModifications, deleteNonTransientComputationResults, forEachDelta, forEachObject, getAllConsideredEventMarksOids, getCredentialsPolicy, getCurrentDelta, getElementDesc, getEvaluatedPolicyStatements, getExecutedDeltas, getExecutedDeltas, getItemChangeApplicationModeConfiguration, getIteration, getIterationToken, 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, isModify, isOfType, modifyPrimaryDelta, modifySecondaryDelta, normalize, operationMatches, rememberElementState, replaceOldAndCurrentObject, represents, resolveTemporaryContainerIds, restoreElementState, rot, setCurrentObject, setCurrentObjectAndOid, setEstimatedOldValuesInPrimaryDelta, setFresh, setInitialObject, setIteration, setIterationToken, setObjectPolicyRules, setOid, setPolicyRuleCounter, setPrimaryDelta, setPrimaryDeltaAfterStart, setSecurityPolicy, setupLastChangeExecutionResult, simulateDeltaExecution, 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
getObjectAny, getObjectAnyRequired, getObjectOldOrCurrent
-
Field Details
-
deleted
protected boolean deletedTrue if the focus object was deleted by our processing. (Note we do not currently provide this kind of flag on the projection contexts, because of not being sure if deleted projection cannot be somehow "resurrected" during the processing. For focal objects nothing like this should happen.) Used to clarify context (re)loading for deleted focus situations. See MID-4856.
-
-
Constructor Details
-
LensFocusContext
-
-
Method Details
-
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<O extends ObjectType>
-
setRewriteOldObject
public void setRewriteOldObject()Only for internal use! -
getArchetypePolicy
-
setArchetypePolicy
-
getArchetype
Description copied from interface:ModelElementContext
TODO is this method ever used?- 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?- Returns:
- All archetypes (structural and auxiliary)
-
setArchetypes
-
getStructuralArchetypeRef
Precondition: context is "complete" i.e.archetypes
are filled in.- Throws:
SchemaException
-
getFocusTemplate
-
setFocusTemplate
-
setExpandedFocusTemplate
-
isFocusTemplateSetExplicitly
public boolean isFocusTemplateSetExplicitly() -
getIdentityManagementConfiguration
@NotNull public @NotNull IdentityManagementConfiguration getIdentityManagementConfiguration() throws ConfigurationException- Throws:
ConfigurationException
-
getIndexingConfiguration
@NotNull public @NotNull IndexingConfiguration getIndexingConfiguration() throws ConfigurationException- Throws:
ConfigurationException
-
getLifecycleModel
-
isDelete
public boolean isDelete()Description copied from class:LensElementContext
See also limitations forLensElementContext.isAdd()
.- Specified by:
isDelete
in interfaceModelElementContext<O extends ObjectType>
- Specified by:
isDelete
in classLensElementContext<O extends ObjectType>
-
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. -
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 theLensProjectionContext.synchronizationPolicyDecision
at all. See MID-8608 and its fix. It is very unclear and should be clarified.- Specified by:
isAdd
in interfaceModelElementContext<O extends ObjectType>
- Specified by:
isAdd
in classLensElementContext<O extends ObjectType>
-
isPrimaryAdd
public boolean isPrimaryAdd()Different fromisAdd()
just to have a clear meaning. -
isDeleted
public boolean isDeleted() -
setDeleted
public void setDeleted() -
getObjectDeltaObjectRelative
Returns object-delta-object structure based on the current state. I.e. objectCurrent - currentDelta - objectNew. -
getObjectDeltaObjectAbsolute
-
swallowToWave0SecondaryDelta
@Deprecated public void swallowToWave0SecondaryDelta(ItemDelta<?, ?> itemDelta) throws SchemaExceptionDeprecated.- Throws:
SchemaException
-
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()
,updateDeltasAfterExecution()
, andLensContext.updateAfterExecution()
- Specified by:
cleanup
in classLensElementContext<O extends ObjectType>
-
hasOrganizationalChange
public boolean hasOrganizationalChange()Returns true if there is any change in organization membership. I.e. in case that there is a change in parentOrgRef. -
clone
-
debugDump
-
getElementDefaultDesc
- Specified by:
getElementDefaultDesc
in classLensElementContext<O extends ObjectType>
-
toString
-
getHumanReadableName
- Specified by:
getHumanReadableName
in classLensElementContext<O extends ObjectType>
-
checkConsistence
- Specified by:
checkConsistence
in classLensElementContext<O extends ObjectType>
-
setItemDefinitionsMap
public void setItemDefinitionsMap(@NotNull @NotNull PathKeyedMap<ObjectTemplateItemDefinitionType> itemDefinitionsMap) -
getItemDefinitionsMap
-
getSourceLinkTypeDefinition
public LinkTypeDefinitionType getSourceLinkTypeDefinition(@NotNull @NotNull String linkTypeName, LinkManager linkManager, OperationResult result) throws SchemaException, ConfigurationException -
getTargetLinkTypeDefinition
public LinkTypeDefinitionType getTargetLinkTypeDefinition(@NotNull @NotNull String linkTypeName, LinkManager linkManager, OperationResult result) throws SchemaException, ConfigurationException -
deleteEmptyPrimaryDelta
public void deleteEmptyPrimaryDelta() -
getLensContext
- Overrides:
getLensContext
in classLensElementContext<O extends ObjectType>
-
getStateBeforeSimulatedOperation
The "object old" represents the state "before operation" for focus objects precisely.- Specified by:
getStateBeforeSimulatedOperation
in classLensElementContext<O extends ObjectType>
-
getAssignmentIdStore
-