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
public class LensFocusContext<O extends ObjectType> extends LensElementContext<O>
- Author:
- semancik
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
deleted
True if the focus object was deleted by our processing.-
Fields inherited from class com.evolveum.midpoint.model.impl.lens.LensElementContext
lensContext, state
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description LensFocusContext(com.evolveum.midpoint.model.impl.lens.ElementState<O> elementState, LensContext<O> lensContext)
LensFocusContext(Class<O> objectTypeClass, LensContext<O> lensContext)
-
Method Summary
-
Methods inherited from class com.evolveum.midpoint.model.impl.lens.LensElementContext
addObjectPolicyRule, addToExecutedDeltas, addToPendingAssignmentPolicyStateModifications, addToPendingObjectPolicyStateModifications, addToPrimaryDelta, adopt, checkConsistence, checkEncrypted, clearCurrentObject, clearPendingPolicyStateModifications, deleteNonTransientComputationResults, forEachDelta, forEachObject, getAllConsideredEventMarks, getCredentialsPolicy, getCurrentDelta, getElementDesc, getExecutedDeltas, getItemChangeApplicationModeConfiguration, getIteration, getIterationToken, getMatchingEventMarks, getModelContext, getObjectCurrent, getObjectCurrentOrNew, getObjectCurrentOrOld, getObjectDefinition, getObjectNew, getObjectNewOrCurrentOrOld, getObjectNewOrCurrentRequired, getObjectOld, getObjectPolicyRules, getObjectReadVersion, getObjectTypeClass, getOid, getOperation, getPendingAssignmentPolicyStateModifications, getPendingObjectPolicyStateModifications, getPolicyRuleCounter, getPrimaryDelta, getSecondaryDelta, getSecurityPolicy, getSummaryDelta, getSummaryExecutedDelta, getTemporaryContainerId, initializeElementState, isFresh, isModify, isOfType, modifyPrimaryDelta, normalize, operationMatches, recompute, 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, getObjectOldOrCurrent
-
-
-
-
Field Detail
-
deleted
protected boolean deleted
True 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 Detail
-
LensFocusContext
public LensFocusContext(Class<O> objectTypeClass, LensContext<O> lensContext)
-
LensFocusContext
public LensFocusContext(com.evolveum.midpoint.model.impl.lens.ElementState<O> elementState, LensContext<O> lensContext)
-
-
Method Detail
-
setLoadedObject
public void setLoadedObject(@NotNull @NotNull PrismObject<O> object)
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>
-
getArchetypePolicy
public ArchetypePolicyType getArchetypePolicy()
-
setArchetypePolicy
public void setArchetypePolicy(ArchetypePolicyType value)
-
getArchetype
public ArchetypeType 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
public List<ArchetypeType> getArchetypes()
Description copied from interface:ModelElementContext
TODO is this method ever used?- Returns:
- All archetypes (structural and auxiliary)
-
setArchetypes
public void setArchetypes(List<ArchetypeType> archetypes)
-
getStructuralArchetypeRef
public ObjectReferenceType getStructuralArchetypeRef() throws SchemaException
Precondition: context is "complete" i.e.archetypes
are filled in.- Throws:
SchemaException
-
getFocusTemplate
public ObjectTemplateType getFocusTemplate()
-
setFocusTemplate
public void setFocusTemplate(ObjectTemplateType focusTemplate)
-
setExpandedFocusTemplate
public void setExpandedFocusTemplate(ObjectTemplateType expandedFocusTemplate)
-
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
public LifecycleStateModelType 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
public ObjectDelta<O> 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>
-
isDeleted
public boolean isDeleted()
-
setDeleted
public void setDeleted()
-
getObjectDeltaObjectRelative
@NotNull public @NotNull ObjectDeltaObject<O> getObjectDeltaObjectRelative()
Returns object-delta-object structure based on the current state. I.e. objectCurrent - currentDelta - objectNew.
-
getObjectDeltaObjectAbsolute
@NotNull public @NotNull ObjectDeltaObject<O> getObjectDeltaObjectAbsolute()
-
swallowToWave0SecondaryDelta
@Deprecated public void swallowToWave0SecondaryDelta(ItemDelta<?,?> itemDelta) throws SchemaException
Deprecated.- 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
public LensFocusContext<O> clone(LensContext<O> lensContext)
-
debugDump
public String debugDump(int indent)
-
getElementDefaultDesc
protected String getElementDefaultDesc()
- Specified by:
getElementDefaultDesc
in classLensElementContext<O extends ObjectType>
-
getHumanReadableName
public String getHumanReadableName()
- Specified by:
getHumanReadableName
in classLensElementContext<O extends ObjectType>
-
checkConsistence
public void checkConsistence(String desc)
- Specified by:
checkConsistence
in classLensElementContext<O extends ObjectType>
-
setItemDefinitionsMap
public void setItemDefinitionsMap(@NotNull @NotNull PathKeyedMap<ObjectTemplateItemDefinitionType> itemDefinitionsMap)
-
getItemDefinitionsMap
@NotNull public @NotNull PathKeyedMap<ObjectTemplateItemDefinitionType> 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
@NotNull public @NotNull LensContext<O> getLensContext()
- Overrides:
getLensContext
in classLensElementContext<O extends ObjectType>
-
getStateBeforeSimulatedOperation
public PrismObject<O> getStateBeforeSimulatedOperation()
The "object old" represents the state "before operation" for focus objects precisely.- Specified by:
getStateBeforeSimulatedOperation
in classLensElementContext<O extends ObjectType>
-
-