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
public class LensFocusContext<O extends ObjectType> extends LensElementContext<O>
- Author:
- semancik
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description LensFocusContext(Class<O> objectTypeClass, LensContext<O> lensContext)
-
Method Summary
-
Methods inherited from class com.evolveum.midpoint.model.impl.lens.LensElementContext
addPolicyRule, addPrimaryDelta, addToExecutedDeltas, addToPendingAssignmentPolicyStateModifications, addToPendingObjectPolicyStateModifications, canRepresent, checkConsistence, checkConsistence, checkConsistence, clearPendingAssignmentPolicyStateModifications, clearPendingObjectPolicyStateModifications, clearPolicyRules, cloneDelta, copyValues, deltaBuilder, determineOid, finishBuild, fixProvisioningTypeInDelta, forEachObject, getDebugDumpTitle, getDebugDumpTitle, getDelta, getElementDesc, getExecutedDeltas, getFixedDelta, getFixedPrimaryDelta, getIteration, getIterationToken, getLensContext, getNotNullPrismContext, getObjectAny, getObjectCurrent, getObjectCurrentOrOld, getObjectDefinition, getObjectNew, getObjectOld, getObjectReadVersion, getObjectTypeClass, getOid, getOperation, getPendingAssignmentPolicyStateModifications, getPendingObjectPolicyStateModifications, getPolicyRules, getPolicySituations, getPrimaryDelta, getPrismContext, getSecurityPolicy, getSynchronizationIntent, hasPrimaryDelta, isFresh, isModify, isOfType, isRequireSecondaryDeltaOid, markExecutedDeltasAudited, operationMatches, recompute, retrieveFromLensElementContextType, setFresh, setIteration, setIterationToken, setLoadedObject, setObjectCurrent, setObjectNew, setObjectOld, setPrimaryDelta, setSecurityPolicy, setSynchronizationIntent, swallowToDelta, swallowToPrimaryDelta, 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
-
-
-
-
Constructor Detail
-
LensFocusContext
public LensFocusContext(Class<O> objectTypeClass, LensContext<O> lensContext)
-
-
Method Detail
-
getArchetypePolicyType
public ArchetypePolicyType getArchetypePolicyType()
-
setArchetypePolicyType
public void setArchetypePolicyType(ArchetypePolicyType objectPolicyConfigurationType)
-
getArchetype
public ArchetypeType getArchetype()
-
setArchetype
public void setArchetype(ArchetypeType archetype)
-
getLifecycleModel
public LifecycleStateModelType getLifecycleModel()
-
setOid
public void setOid(String oid)
Description copied from class:LensElementContext
Sets oid to the field but also to the deltas (if applicable).- Overrides:
setOid
in classLensElementContext<O extends ObjectType>
-
getProjectionWavePrimaryDelta
public ObjectDelta<O> getProjectionWavePrimaryDelta() throws SchemaException
- Throws:
SchemaException
-
isDelete
public boolean isDelete()
- Overrides:
isDelete
in classLensElementContext<O extends ObjectType>
-
isAdd
public boolean isAdd()
- Overrides:
isAdd
in classLensElementContext<O extends ObjectType>
-
getSecondaryDelta
public ObjectDelta<O> getSecondaryDelta()
-
getSecondaryDelta
public ObjectDelta<O> getSecondaryDelta(int wave)
-
getSecondaryDeltas
public ObjectDeltaWaves<O> getSecondaryDeltas()
-
getAllDeltas
public Collection<ObjectDelta<O>> getAllDeltas()
Description copied from class:LensElementContext
Returns collection of all deltas that this element context contains. This is a nice method to use if we want to inspect all deltas (e.g. look for a changed item) but we want to avoid the overhead of merging all the deltas together.- Specified by:
getAllDeltas
in classLensElementContext<O extends ObjectType>
-
getProjectionWaveSecondaryDelta
public ObjectDelta<O> getProjectionWaveSecondaryDelta() throws SchemaException
- Throws:
SchemaException
-
getWaveSecondaryDelta
public ObjectDelta<O> getWaveSecondaryDelta(int wave) throws SchemaException
- Throws:
SchemaException
-
deleteSecondaryDeltas
public void deleteSecondaryDeltas()
- Specified by:
deleteSecondaryDeltas
in classLensElementContext<O extends ObjectType>
-
getObjectDeltaObject
public ObjectDeltaObject<O> getObjectDeltaObject() throws SchemaException
- Specified by:
getObjectDeltaObject
in classLensElementContext<O extends ObjectType>
- Throws:
SchemaException
-
setSecondaryDelta
public void setSecondaryDelta(ObjectDelta<O> secondaryDelta)
-
setSecondaryDelta
public void setSecondaryDelta(ObjectDelta<O> secondaryDelta, int wave)
-
setProjectionWaveSecondaryDelta
public void setProjectionWaveSecondaryDelta(ObjectDelta<O> secondaryDelta)
-
swallowToProjectionWaveSecondaryDelta
public void swallowToProjectionWaveSecondaryDelta(ItemDelta<?,?> propDelta) throws SchemaException
- Throws:
SchemaException
-
swallowToWave0SecondaryDelta
public void swallowToWave0SecondaryDelta(ItemDelta<?,?> propDelta) throws SchemaException
- Throws:
SchemaException
-
swallowToSecondaryDelta
public void swallowToSecondaryDelta(ItemDelta<?,?> itemDelta) throws SchemaException
- Specified by:
swallowToSecondaryDelta
in classLensElementContext<O extends ObjectType>
- Throws:
SchemaException
-
alreadyHasDelta
public boolean alreadyHasDelta(ItemDelta<?,?> itemDelta)
-
hasAnyDelta
public boolean hasAnyDelta()
-
getProjectionWaveDelta
public ObjectDelta<O> getProjectionWaveDelta() throws SchemaException
Returns user delta, both primary and secondary (merged together) for a current wave. The returned object is (kind of) immutable. Changing it may do strange things (but most likely the changes will be lost).- Throws:
SchemaException
-
getWaveDelta
public ObjectDelta<O> getWaveDelta(int wave) throws SchemaException
- Throws:
SchemaException
-
getAggregatedWaveDelta
public ObjectDelta<O> getAggregatedWaveDelta(int wave) throws SchemaException
- Throws:
SchemaException
-
getWaveExecutableDelta
public ObjectDelta<O> getWaveExecutableDelta(int wave) throws SchemaException
- 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>
-
normalize
public void normalize()
- Overrides:
normalize
in classLensElementContext<O extends ObjectType>
-
adopt
public void adopt(PrismContext prismContext) throws SchemaException
- Overrides:
adopt
in classLensElementContext<O extends ObjectType>
- Throws:
SchemaException
-
clearIntermediateResults
public void clearIntermediateResults()
-
applyProjectionWaveSecondaryDeltas
public void applyProjectionWaveSecondaryDeltas(Collection<ItemDelta<?,?>> itemDeltas) throws SchemaException
- Throws:
SchemaException
-
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.
-
hasChangeInItem
public boolean hasChangeInItem(ItemPath itemPath)
-
clone
public LensFocusContext<O> clone(LensContext lensContext)
- Specified by:
clone
in classLensElementContext<O extends ObjectType>
-
copyValues
protected void copyValues(LensFocusContext<O> clone, LensContext 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>
-
toLensFocusContextType
public LensFocusContextType toLensFocusContextType(PrismContext prismContext, LensContext.ExportType exportType) throws SchemaException
- Throws:
SchemaException
-
fromLensFocusContextType
public static LensFocusContext fromLensFocusContextType(LensFocusContextType focusContextType, LensContext lensContext, Task task, OperationResult result) throws SchemaException, ConfigurationException, ObjectNotFoundException, CommunicationException, ExpressionEvaluationException
-
checkEncrypted
public void checkEncrypted()
- Overrides:
checkEncrypted
in classLensElementContext<O extends ObjectType>
-
checkConsistence
public void checkConsistence(String desc)
- Overrides:
checkConsistence
in classLensElementContext<O extends ObjectType>
-
setItemDefinitionsMap
public void setItemDefinitionsMap(@NotNull Map<UniformItemPath,ObjectTemplateItemDefinitionType> itemDefinitionsMap)
-
getItemDefinitionsMap
@NotNull public Map<UniformItemPath,ObjectTemplateItemDefinitionType> getItemDefinitionsMap()
-
forEachDelta
public void forEachDelta(Consumer<ObjectDelta<O>> consumer)
- Overrides:
forEachDelta
in classLensElementContext<O extends ObjectType>
-
-