Class LensElementContext<O extends ObjectType>
- java.lang.Object
- 
- com.evolveum.midpoint.model.impl.lens.LensElementContext<O>
 
- 
- All Implemented Interfaces:
- ModelElementContext<O>,- DebugDumpable,- Serializable,- Cloneable
 - Direct Known Subclasses:
- LensFocusContext,- LensProjectionContext
 
 public abstract class LensElementContext<O extends ObjectType> extends Object implements ModelElementContext<O>, Cloneable - Author:
- semancik
- See Also:
- Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpableINDENT_STRING
 
- 
 - 
Constructor SummaryConstructors Constructor Description LensElementContext(@NotNull Class<O> objectTypeClass, LensContext<? extends ObjectType> lensContext)
 - 
Method Summary- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpabledebugDump, debugDump, debugDumpLazily, debugDumpLazily
 - 
Methods inherited from interface com.evolveum.midpoint.model.api.context.ModelElementContextgetArchetype, getSecondaryDelta, isAdd, isDelete, setSecondaryDelta
 
- 
 
- 
- 
- 
Constructor Detail- 
LensElementContextpublic LensElementContext(@NotNull @NotNull Class<O> objectTypeClass, LensContext<? extends ObjectType> lensContext)
 
- 
 - 
Method Detail- 
getIterationpublic int getIteration() 
 - 
setIterationpublic void setIteration(int iteration) 
 - 
getIterationTokenpublic String getIterationToken() 
 - 
setIterationTokenpublic void setIterationToken(String iterationToken) 
 - 
getSynchronizationIntentpublic SynchronizationIntent getSynchronizationIntent() Description copied from interface:ModelElementContextInitial intent regarding the account. It indicated 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:
- getSynchronizationIntentin interface- ModelElementContext<O extends ObjectType>
 
 - 
setSynchronizationIntentpublic void setSynchronizationIntent(SynchronizationIntent synchronizationIntent) 
 - 
getLensContextpublic LensContext<? extends ObjectType> getLensContext() 
 - 
getNotNullPrismContextprotected PrismContext getNotNullPrismContext() 
 - 
getObjectTypeClasspublic Class<O> getObjectTypeClass() - Specified by:
- getObjectTypeClassin interface- ModelElementContext<O extends ObjectType>
 
 - 
representspublic boolean represents(Class<?> type) 
 - 
getPrismContextpublic PrismContext getPrismContext() 
 - 
getObjectOldpublic PrismObject<O> getObjectOld() - Specified by:
- getObjectOldin interface- ModelElementContext<O extends ObjectType>
 
 - 
setObjectOldpublic void setObjectOld(PrismObject<O> objectOld) - Specified by:
- setObjectOldin interface- ModelElementContext<O extends ObjectType>
 
 - 
getObjectCurrentpublic PrismObject<O> getObjectCurrent() - Specified by:
- getObjectCurrentin interface- ModelElementContext<O extends ObjectType>
 
 - 
setObjectCurrentpublic void setObjectCurrent(PrismObject<O> objectCurrent) 
 - 
getObjectAnypublic PrismObject<O> getObjectAny() - Specified by:
- getObjectAnyin interface- ModelElementContext<O extends ObjectType>
 
 - 
setLoadedObjectpublic void setLoadedObject(PrismObject<O> object) 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 was not initialized yet (and if it should be initialized) then the object is also set as old object.
 - 
getObjectNewpublic PrismObject<O> getObjectNew() - Specified by:
- getObjectNewin interface- ModelElementContext<O extends ObjectType>
 
 - 
setObjectNewpublic void setObjectNew(PrismObject<O> objectNew) - Specified by:
- setObjectNewin interface- ModelElementContext<O extends ObjectType>
 
 - 
getPrimaryDeltapublic ObjectDelta<O> getPrimaryDelta() - Specified by:
- getPrimaryDeltain interface- ModelElementContext<O extends ObjectType>
 
 - 
hasPrimaryDeltapublic boolean hasPrimaryDelta() 
 - 
getFixedPrimaryDeltapublic ObjectDelta<O> getFixedPrimaryDelta() As getPrimaryDelta() but caters for the possibility that an object already exists. So, if the primary delta is ADD and object already exists, it should be changed somehow, e.g. to MODIFY delta or to null. Actually, the question is what to do with the attribute values if changed to MODIFY. (a) Should they become REPLACE item deltas? (b) ADD ones? (c) Or should we compute a difference from objectCurrent to objectToAdd, hoping that secondary deltas will re-add everything that might be unknowingly removed by this step? (d) Or should we simply ignore ADD delta altogether, hoping that it was executed so it need not be repeated? And, should not we report AlreadyExistingException instead? It seems that (c) i.e. reverting back to objectToAdd is not a good idea at all. For example, this may erase linkRefs for good. For the time being let us proceed with (d), i.e. ignoring such a delta. TODO is this OK???? [med]- Returns:
 
 - 
setPrimaryDeltapublic void setPrimaryDelta(ObjectDelta<O> primaryDelta) - Specified by:
- setPrimaryDeltain interface- ModelElementContext<O extends ObjectType>
 
 - 
addPrimaryDeltapublic void addPrimaryDelta(ObjectDelta<O> delta) throws SchemaException - Specified by:
- addPrimaryDeltain interface- ModelElementContext<O extends ObjectType>
- Throws:
- SchemaException
 
 - 
swallowToPrimaryDeltapublic void swallowToPrimaryDelta(ItemDelta<?,?> itemDelta) throws SchemaException - Throws:
- SchemaException
 
 - 
swallowToSecondaryDeltapublic abstract void swallowToSecondaryDelta(ItemDelta<?,?> itemDelta) throws SchemaException - Throws:
- SchemaException
 
 - 
swallowToDeltapublic ObjectDelta<O> swallowToDelta(ObjectDelta<O> originalDelta, ItemDelta<?,?> propDelta) throws SchemaException - Throws:
- SchemaException
 
 - 
getAllDeltaspublic abstract Collection<ObjectDelta<O>> getAllDeltas() 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.
 - 
getPendingObjectPolicyStateModifications@NotNull public @NotNull List<ItemDelta<?,?>> getPendingObjectPolicyStateModifications() 
 - 
clearPendingObjectPolicyStateModificationspublic void clearPendingObjectPolicyStateModifications() 
 - 
addToPendingObjectPolicyStateModificationspublic void addToPendingObjectPolicyStateModifications(ItemDelta<?,?> modification) 
 - 
getPendingAssignmentPolicyStateModifications@NotNull public @NotNull Map<AssignmentSpec,List<ItemDelta<?,?>>> getPendingAssignmentPolicyStateModifications() 
 - 
clearPendingAssignmentPolicyStateModificationspublic void clearPendingAssignmentPolicyStateModifications() 
 - 
addToPendingAssignmentPolicyStateModificationspublic void addToPendingAssignmentPolicyStateModifications(@NotNull @NotNull AssignmentType assignment, @NotNull @NotNull PlusMinusZero mode, @NotNull @NotNull ItemDelta<?,?> modification)
 - 
isModifypublic boolean isModify() 
 - 
getOperation@NotNull public @NotNull SimpleOperationName getOperation() 
 - 
getExecutedDeltas@NotNull public @NotNull List<LensObjectDeltaOperation<O>> getExecutedDeltas() - Specified by:
- getExecutedDeltasin interface- ModelElementContext<O extends ObjectType>
 
 - 
markExecutedDeltasAuditedpublic void markExecutedDeltasAudited() 
 - 
addToExecutedDeltaspublic void addToExecutedDeltas(LensObjectDeltaOperation<O> executedDelta) 
 - 
getDeltapublic ObjectDelta<O> getDelta() throws SchemaException Returns user delta, both primary and secondary (merged together). The returned object is (kind of) immutable. Changing it may do strange things (but most likely the changes will be lost).- Specified by:
- getDeltain interface- ModelElementContext<O extends ObjectType>
- Throws:
- SchemaException
 
 - 
getFixedDeltapublic ObjectDelta<O> getFixedDelta() throws SchemaException - Throws:
- SchemaException
 
 - 
wasAddExecutedpublic <F extends FocusType> boolean wasAddExecuted() 
 - 
getObjectDeltaObjectpublic abstract ObjectDeltaObject<O> getObjectDeltaObject() throws SchemaException - Throws:
- SchemaException
 
 - 
getOidpublic String getOid() - Specified by:
- getOidin interface- ModelElementContext<O extends ObjectType>
 
 - 
determineOidpublic String determineOid() 
 - 
setOidpublic void setOid(String oid) Sets oid to the field but also to the deltas (if applicable).
 - 
getObjectDefinitionpublic PrismObjectDefinition<O> getObjectDefinition() 
 - 
isFreshpublic boolean isFresh() 
 - 
setFreshpublic void setFresh(boolean isFresh) 
 - 
getPolicyRules@NotNull public @NotNull Collection<EvaluatedPolicyRule> getPolicyRules() Description copied from interface:ModelElementContextReturns all policy rules that apply to this object - even those that were not triggered. The policy rules are compiled from all the applicable sources (target, meta-roles, etc.)- Specified by:
- getPolicyRulesin interface- ModelElementContext<O extends ObjectType>
 
 - 
addPolicyRulepublic void addPolicyRule(EvaluatedPolicyRule policyRule) 
 - 
clearPolicyRulespublic void clearPolicyRules() 
 - 
triggerRulepublic void triggerRule(@NotNull @NotNull EvaluatedPolicyRule rule, Collection<EvaluatedPolicyRuleTrigger<?>> triggers)
 - 
getPolicySituations@NotNull public @NotNull Collection<String> getPolicySituations() 
 - 
getSecurityPolicypublic SecurityPolicyType getSecurityPolicy() Returns security policy applicable to the object. This means security policy applicable directory to focus or projection. It will NOT return global security policy.
 - 
setSecurityPolicypublic void setSecurityPolicy(SecurityPolicyType securityPolicy) 
 - 
getCredentialsPolicypublic CredentialsPolicyType getCredentialsPolicy() 
 - 
recomputepublic void recompute() throws SchemaException, ConfigurationException
 - 
checkConsistencepublic void checkConsistence() 
 - 
checkConsistencepublic void checkConsistence(String contextDesc) 
 - 
checkConsistenceprotected void checkConsistence(ObjectDelta<O> delta, boolean requireOid, String contextDesc) 
 - 
isRequireSecondaryDeltaOidprotected boolean isRequireSecondaryDeltaOid() 
 - 
checkConsistenceprotected void checkConsistence(PrismObject<O> object, String elementDesc, String contextDesc) 
 - 
cleanuppublic abstract void cleanup() Cleans up the contexts by removing some of the working state.
 - 
normalizepublic void normalize() 
 - 
adoptpublic void adopt(PrismContext prismContext) throws SchemaException - Throws:
- SchemaException
 
 - 
clonepublic abstract LensElementContext<O> clone(LensContext<? extends ObjectType> lensContext) 
 - 
cloneDeltaprotected ObjectDelta<O> cloneDelta(ObjectDelta<O> thisDelta) 
 - 
retrieveFromLensElementContextTypepublic void retrieveFromLensElementContextType(LensElementContextType lensElementContextType, Task task, OperationResult result) throws SchemaException, ConfigurationException, ObjectNotFoundException, CommunicationException, ExpressionEvaluationException 
 - 
fixProvisioningTypeInDeltaprotected void fixProvisioningTypeInDelta(ObjectDelta<O> delta, Objectable object, Task task, OperationResult result) 
 - 
checkEncryptedpublic void checkEncrypted() 
 - 
operationMatchespublic boolean operationMatches(ChangeTypeType operation) 
 - 
getElementDefaultDescprotected abstract String getElementDefaultDesc() 
 - 
getElementDescprotected String getElementDesc() 
 - 
getDebugDumpTitleprotected String getDebugDumpTitle() 
 - 
getHumanReadableNamepublic abstract String getHumanReadableName() 
 - 
getObjectReadVersionpublic String getObjectReadVersion() 
 - 
getObjectCurrentOrOldpublic PrismObject<O> getObjectCurrentOrOld() 
 - 
isOfTypepublic boolean isOfType(Class<?> aClass) - Specified by:
- isOfTypein interface- ModelElementContext<O extends ObjectType>
 
 - 
deleteSecondaryDeltaspublic abstract void deleteSecondaryDeltas() 
 - 
deltaBuilderpublic S_ItemEntry deltaBuilder() throws SchemaException - Throws:
- SchemaException
 
 - 
forEachObjectpublic void forEachObject(Consumer<PrismObject<O>> consumer) 
 - 
forEachDeltapublic void forEachDelta(Consumer<ObjectDelta<O>> consumer) 
 - 
finishBuildpublic void finishBuild() 
 
- 
 
-