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(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, clearObjectPolicyRules, clearPendingPolicyStateModifications, deleteNonTransientComputationResults, forEachDelta, forEachObject, getArchivedSecondaryDeltas, getCredentialsPolicy, getCurrentDelta, getDebugDumpTitle, getDebugDumpTitle, getElementDesc, getExecutedDeltas, getIteration, getIterationToken, getLensContext, getObjectAny, getObjectCurrent, getObjectCurrentOrNew, getObjectDefinition, getObjectNew, getObjectNewOrCurrentRequired, getObjectOld, getObjectPolicyRules, getObjectReadVersion, getObjectTypeClass, getOid, getOperation, getPendingAssignmentPolicyStateModifications, getPendingObjectPolicyStateModifications, getPolicyRuleCounter, getPrimaryDelta, getSecondaryDelta, getSecurityPolicy, getSummaryDelta, initializeElementState, isFresh, isModify, isOfType, modifyPrimaryDelta, normalize, operationMatches, recompute, rememberElementState, replaceOldAndCurrentObject, represents, restoreElementState, rot, setAnyDeltasExecutedFlag, setCurrentObject, setCurrentObjectAndOid, setEstimatedOldValuesInPrimaryDelta, setFresh, setInitialObject, setInitialObject, setIteration, setIterationToken, setOid, setPolicyRuleCounter, setPrimaryDelta, setPrimaryDeltaAfterStart, setSecurityPolicy, swallowToPrimaryDelta, swallowToSecondaryDelta, swallowToSecondaryDelta, swallowToSecondaryDeltaUnchecked, triggerRule, 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
-
-
-
-
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.)
-
-
Constructor Detail
-
LensFocusContext
public LensFocusContext(Class<O> objectTypeClass, LensContext<O> lensContext)
-
LensFocusContext
public LensFocusContext(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()
- Returns:
- Determined archetype of the object. Currently not supported for projections. Since 4.4 structural archetype is returned
-
getArchetypes
public List<ArchetypeType> getArchetypes()
- Returns:
- All archetypes (structural and auxiliary)
-
setArchetypes
public void setArchetypes(List<ArchetypeType> archetypes)
-
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.- 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.- 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)
-
dump
public String dump(boolean showTriples)
-
debugDump
public String debugDump(int indent)
-
debugDump
public String debugDump(int indent, boolean showTriples)
-
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
-
isPrimaryDeltaConsolidated
public boolean isPrimaryDeltaConsolidated()
-
setPrimaryDeltaConsolidated
public void setPrimaryDeltaConsolidated(boolean primaryDeltaConsolidated)
-
deleteEmptyPrimaryDelta
public void deleteEmptyPrimaryDelta()
-
-