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

java.lang.Object
  extended by com.evolveum.midpoint.model.lens.LensElementContext<O>
      extended by com.evolveum.midpoint.model.lens.LensFocusContext<O>
All Implemented Interfaces:
ModelElementContext<O>, DebugDumpable, Dumpable, 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
LensFocusContext(Class<O> objectTypeClass, LensContext<O,? extends ObjectType> lensContext)
           
 
Method Summary
 void adopt(PrismContext prismContext)
           
 void cleanup()
          Cleans up the contexts by removing secondary deltas and other working state.
 LensFocusContext<O> clone(LensContext lensContext)
           
protected  void copyValues(LensFocusContext<O> clone, LensContext lensContext)
           
 String debugDump()
          Show the content of the object intended for diagnostics by system administrator.
 String debugDump(int indent)
           
 String debugDump(int indent, boolean showTriples)
           
 String dump()
          Show the content of the object intended for diagnostics by developer.
 String dump(boolean showTriples)
           
protected  String getElementDefaultDesc()
           
 ContainerDelta<AssignmentType> getExecutionWaveAssignmentDelta()
          Returns delta of user assignments, both primary and secondary (merged together).
 Collection<? extends ItemDelta<?>> getExecutionWaveAssignmentItemDeltas(String id)
           
 ObjectDelta<O> getProjectionWaveDelta()
          Returns user delta, both primary and secondary (merged together) for a current wave.
 ObjectDelta<O> getProjectionWavePrimaryDelta()
           
 ObjectDelta<O> getProjectionWaveSecondaryDelta()
           
 ObjectDelta<O> getSecondaryDelta()
           
 ObjectDelta<O> getSecondaryDelta(int wave)
           
 ObjectDelta<O> getWaveDelta(int wave)
           
 ObjectDelta<O> getWaveSecondaryDelta(int wave)
           
 void normalize()
           
 void setOid(String oid)
          Sets oid to the field but also to the deltas (if applicable).
 void setProjectionWaveSecondaryDelta(ObjectDelta<O> secondaryDelta)
           
 void setSecondaryDelta(ObjectDelta<O> secondaryDelta)
           
 void setSecondaryDelta(ObjectDelta<O> secondaryDelta, int wave)
           
 void swallowToProjectionWaveSecondaryDelta(ItemDelta<?> propDelta)
           
 String toString()
           
 
Methods inherited from class com.evolveum.midpoint.model.lens.LensElementContext
addPrimaryDelta, addSecondaryDelta, addToExecutedDeltas, addToSecondaryDelta, checkConsistence, checkConsistence, checkConsistence, clearExecutedDeltas, copyValues, determineOid, getDebugDumpTitle, getDebugDumpTitle, getDelta, getElementDesc, getExecutedDeltas, getLensContext, getNotNullPrismContext, getObjectDefinition, getObjectDeltaObject, getObjectNew, getObjectOld, getObjectTypeClass, getOid, getPrimaryDelta, getPrismContext, isFresh, isRequireSecondardyDeltaOid, recompute, setFresh, setObjectNew, setObjectOld, setPrimaryDelta
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LensFocusContext

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

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 class LensElementContext<O extends ObjectType>

getProjectionWavePrimaryDelta

public ObjectDelta<O> getProjectionWavePrimaryDelta()
                                                                throws SchemaException
Throws:
SchemaException

getSecondaryDelta

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

getSecondaryDelta

public ObjectDelta<O> getSecondaryDelta(int wave)

getProjectionWaveSecondaryDelta

public ObjectDelta<O> getProjectionWaveSecondaryDelta()
                                                                  throws SchemaException
Throws:
SchemaException

getWaveSecondaryDelta

public ObjectDelta<O> getWaveSecondaryDelta(int wave)
                                                        throws SchemaException
Throws:
SchemaException

setSecondaryDelta

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

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

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

getExecutionWaveAssignmentDelta

public ContainerDelta<AssignmentType> getExecutionWaveAssignmentDelta()
                                                               throws SchemaException
Returns delta of user assignments, 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). Only works for UserType now. This is relative to execution wave to avoid re-processing of already executed assignments.

Throws:
SchemaException

getExecutionWaveAssignmentItemDeltas

public Collection<? extends ItemDelta<?>> getExecutionWaveAssignmentItemDeltas(String id)
                                                                        throws SchemaException
Throws:
SchemaException

cleanup

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

Overrides:
cleanup in class LensElementContext<O extends ObjectType>

normalize

public void normalize()
Overrides:
normalize in class LensElementContext<O extends ObjectType>

adopt

public void adopt(PrismContext prismContext)
           throws SchemaException
Overrides:
adopt in class LensElementContext<O extends ObjectType>
Throws:
SchemaException

clone

public LensFocusContext<O> clone(LensContext lensContext)
Specified by:
clone in class LensElementContext<O extends ObjectType>

copyValues

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

debugDump

public String debugDump()
Description copied from interface: DebugDumpable
Show the content of the object intended for diagnostics by system administrator. The out put should be suitable to use in system logs at "debug" level. It may be multi-line, but in that case it should be well indented and quite terse. As it is intended to be used by system administrator, it should not use any developer terms such as class names, exceptions or stack traces.

Returns:
content of the object intended for diagnostics by system administrator.

dump

public String dump()
Description copied from interface: Dumpable
Show the content of the object intended for diagnostics by developer. The content may be multi-line, in case of hierarchical objects it may be intended. The use of this method may not be efficient. It is not supposed to be used in normal operation. However, it is very useful in tests or in case of dumping objects in severe error situations.

Returns:
content of the object intended for diagnostics.

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 class LensElementContext<O extends ObjectType>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 evolveum. All Rights Reserved.