com.evolveum.midpoint.model.lens
Class LensElementContext<O extends ObjectType>

java.lang.Object
  extended by com.evolveum.midpoint.model.lens.LensElementContext<O>
All Implemented Interfaces:
ModelElementContext<O>, DebugDumpable, Dumpable, Serializable
Direct Known Subclasses:
LensFocusContext, LensProjectionContext

public abstract class LensElementContext<O extends ObjectType>
extends Object
implements ModelElementContext<O>

Author:
semancik
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
 
Constructor Summary
LensElementContext(Class<O> objectTypeClass, LensContext<? extends ObjectType,? extends ObjectType> lensContext)
           
 
Method Summary
 void addPrimaryDelta(ObjectDelta<O> delta)
           
 void addSecondaryDelta(ObjectDelta<O> delta)
           
 void addToExecutedDeltas(ObjectDeltaOperation<O> executedDelta)
           
 void addToSecondaryDelta(PropertyDelta accountPasswordDelta)
           
 void adopt(PrismContext prismContext)
           
 void checkConsistence()
           
protected  void checkConsistence(PrismObject<O> object, String elementDesc, String contextDesc)
           
 void checkConsistence(String contextDesc)
           
 void cleanup()
          Cleans up the contexts by removing secondary deltas and other working state.
 void clearExecutedDeltas()
           
abstract  LensElementContext<O> clone(LensContext lensContext)
           
protected  void copyValues(LensElementContext<O> clone, LensContext lensContext)
           
 String determineOid()
           
protected  String getDebugDumpTitle()
           
protected  String getDebugDumpTitle(String suffix)
           
 ObjectDelta<O> getDelta()
          Returns user delta, both primary and secondary (merged together).
protected abstract  String getElementDefaultDesc()
           
protected  String getElementDesc()
           
 List<ObjectDeltaOperation<O>> getExecutedDeltas()
           
 LensContext<? extends ObjectType,? extends ObjectType> getLensContext()
           
protected  PrismContext getNotNullPrismContext()
           
protected  PrismObjectDefinition<O> getObjectDefinition()
           
 ObjectDeltaObject<O> getObjectDeltaObject()
           
 PrismObject<O> getObjectNew()
           
 PrismObject<O> getObjectOld()
           
 Class<O> getObjectTypeClass()
           
 String getOid()
           
 ObjectDelta<O> getPrimaryDelta()
           
 PrismContext getPrismContext()
           
 ObjectDelta<O> getSecondaryDelta()
           
 boolean isFresh()
           
protected  boolean isRequireSecondardyDeltaOid()
           
 void normalize()
           
 void recompute()
           
 void setFresh(boolean isFresh)
           
 void setObjectNew(PrismObject<O> objectNew)
           
 void setObjectOld(PrismObject<O> objectOld)
           
 void setOid(String oid)
          Sets oid to the field but also to the deltas (if applicable).
 void setPrimaryDelta(ObjectDelta<O> primaryDelta)
           
 void setSecondaryDelta(ObjectDelta<O> secondaryDelta)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.evolveum.midpoint.util.Dumpable
dump
 
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump
 

Constructor Detail

LensElementContext

public LensElementContext(Class<O> objectTypeClass,
                          LensContext<? extends ObjectType,? extends ObjectType> lensContext)
Method Detail

getLensContext

public LensContext<? extends ObjectType,? extends ObjectType> getLensContext()

getNotNullPrismContext

protected PrismContext getNotNullPrismContext()

getObjectTypeClass

public Class<O> getObjectTypeClass()

getPrismContext

public PrismContext getPrismContext()

getObjectOld

public PrismObject<O> getObjectOld()
Specified by:
getObjectOld in interface ModelElementContext<O extends ObjectType>

setObjectOld

public void setObjectOld(PrismObject<O> objectOld)
Specified by:
setObjectOld in interface ModelElementContext<O extends ObjectType>

getObjectNew

public PrismObject<O> getObjectNew()
Specified by:
getObjectNew in interface ModelElementContext<O extends ObjectType>

setObjectNew

public void setObjectNew(PrismObject<O> objectNew)
Specified by:
setObjectNew in interface ModelElementContext<O extends ObjectType>

getPrimaryDelta

public ObjectDelta<O> getPrimaryDelta()
Specified by:
getPrimaryDelta in interface ModelElementContext<O extends ObjectType>

setPrimaryDelta

public void setPrimaryDelta(ObjectDelta<O> primaryDelta)
Specified by:
setPrimaryDelta in interface ModelElementContext<O extends ObjectType>

addPrimaryDelta

public void addPrimaryDelta(ObjectDelta<O> delta)
                     throws SchemaException
Throws:
SchemaException

getSecondaryDelta

public ObjectDelta<O> getSecondaryDelta()
Specified by:
getSecondaryDelta in interface ModelElementContext<O extends ObjectType>

setSecondaryDelta

public void setSecondaryDelta(ObjectDelta<O> secondaryDelta)
Specified by:
setSecondaryDelta in interface ModelElementContext<O extends ObjectType>

addSecondaryDelta

public void addSecondaryDelta(ObjectDelta<O> delta)
                       throws SchemaException
Throws:
SchemaException

addToSecondaryDelta

public void addToSecondaryDelta(PropertyDelta accountPasswordDelta)
                         throws SchemaException
Throws:
SchemaException

getExecutedDeltas

public List<ObjectDeltaOperation<O>> getExecutedDeltas()

clearExecutedDeltas

public void clearExecutedDeltas()

addToExecutedDeltas

public void addToExecutedDeltas(ObjectDeltaOperation<O> executedDelta)

getDelta

public 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).

Throws:
SchemaException

getObjectDeltaObject

public ObjectDeltaObject<O> getObjectDeltaObject()
                                                             throws SchemaException
Throws:
SchemaException

getOid

public String getOid()

determineOid

public String determineOid()

setOid

public void setOid(String oid)
Sets oid to the field but also to the deltas (if applicable).


getObjectDefinition

protected PrismObjectDefinition<O> getObjectDefinition()

isFresh

public boolean isFresh()

setFresh

public void setFresh(boolean isFresh)

recompute

public void recompute()
               throws SchemaException
Throws:
SchemaException

checkConsistence

public void checkConsistence()

checkConsistence

public void checkConsistence(String contextDesc)

isRequireSecondardyDeltaOid

protected boolean isRequireSecondardyDeltaOid()

checkConsistence

protected void checkConsistence(PrismObject<O> object,
                                String elementDesc,
                                String contextDesc)

cleanup

public void cleanup()
Cleans up the contexts by removing secondary deltas and other working state. The context after cleanup should be the same as originally requested.


normalize

public void normalize()

adopt

public void adopt(PrismContext prismContext)
           throws SchemaException
Throws:
SchemaException

clone

public abstract LensElementContext<O> clone(LensContext lensContext)

copyValues

protected void copyValues(LensElementContext<O> clone,
                          LensContext lensContext)

getElementDefaultDesc

protected abstract String getElementDefaultDesc()

getElementDesc

protected String getElementDesc()

getDebugDumpTitle

protected String getDebugDumpTitle()

getDebugDumpTitle

protected String getDebugDumpTitle(String suffix)


Copyright © 2013 evolveum. All Rights Reserved.