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

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

public class LensProjectionContext<O extends ObjectType>
extends LensElementContext<O>
implements ModelProjectionContext<O>

Author:
semancik
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
 
Method Summary
 void addAccountSyncDelta(ObjectDelta<O> delta)
           
 void adopt(PrismContext prismContext)
           
 void checkConsistence()
           
 void checkConsistence(String contextDesc, boolean fresh, boolean force)
           
 void cleanup()
          Cleans up the contexts by removing secondary deltas and other working state.
 void clearIntermediateResults()
           
 LensProjectionContext<O> clone(LensContext lensContext)
           
protected  void copyValues(LensProjectionContext<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)
           
 void distributeResource()
          Distribute the resource that's in the context into all the prism objects (old, new) and deltas.
 String dump()
          Show the content of the object intended for diagnostics by developer.
 PrismValueDeltaSetTriple<PrismPropertyValue<AccountConstruction>> getAccountConstructionDeltaSetTriple()
           
 ValuePolicyType getAccountPasswordPolicy()
           
 AssignmentPolicyEnforcementType getAssignmentPolicyEnforcementType()
           
 Collection<ResourceShadowDiscriminatorType> getDependencies()
           
 ValuePolicyType getEffectivePasswordPolicy()
           
protected  String getElementDefaultDesc()
           
 ObjectDelta<O> getExecutableDelta()
          Returns delta suitable for execution.
 String getHumanReadableName()
           
 int getIteration()
           
 String getIterationToken()
           
 AccountOperation getOperation()
           
 AccountConstruction getOutboundAccountConstruction()
           
 RefinedAccountDefinition getRefinedAccountDefinition()
           
 RefinedResourceSchema getRefinedResourceSchema()
           
 ResourceType getResource()
           
 ResourceAccountTypeDefinitionType getResourceAccountTypeDefinitionType()
           
 ResourceShadowDiscriminator getResourceShadowDiscriminator()
           
 Map<QName,DeltaSetTriple<ItemValueWithOrigin<? extends PrismPropertyValue<?>>>> getSqueezedAttributes()
           
 ObjectDelta<O> getSyncDelta()
          Returns synchronization delta.
 SynchronizationIntent getSynchronizationIntent()
           
 SynchronizationPolicyDecision getSynchronizationPolicyDecision()
          Decision regarding the account.
 int getWave()
           
 boolean hasValueForAttribute(QName attributeName)
          Returns true if the projection has any value for specified attribute.
 boolean isActive()
           
 boolean isAdd()
           
 boolean isAssigned()
           
 boolean isDelete()
           
 boolean isDoReconciliation()
           
 boolean isFullShadow()
           
 boolean isModify()
           
protected  boolean isRequireSecondardyDeltaOid()
           
 boolean isShadow()
           
 void normalize()
           
 void recompute()
          Recomputes the new state of account (accountNew).
 void setAccountConstructionDeltaSetTriple(PrismValueDeltaSetTriple<PrismPropertyValue<AccountConstruction>> accountConstructionDeltaSetTriple)
           
 void setAccountPasswordPolicy(ValuePolicyType accountPasswordPolicy)
           
 void setActive(boolean isActive)
           
 void setAssigned(boolean isAssigned)
           
 void setDoReconciliation(boolean doReconciliation)
           
 void setFullShadow(boolean fullShadow)
           
 void setIteration(int iteration)
           
 void setIterationToken(String iterationToken)
           
 void setOutboundAccountConstruction(AccountConstruction outboundAccountConstruction)
           
 void setResource(ResourceType resource)
           
 void setResourceShadowDiscriminator(ResourceShadowDiscriminator resourceShadowDiscriminator)
           
 void setSqueezedAttributes(Map<QName,DeltaSetTriple<ItemValueWithOrigin<? extends PrismPropertyValue<?>>>> squeezedAttributes)
           
 void setSyncDelta(ObjectDelta<O> syncDelta)
           
 void setSynchronizationIntent(SynchronizationIntent synchronizationIntent)
           
 void setSynchronizationPolicyDecision(SynchronizationPolicyDecision policyDecision)
           
 void setWave(int wave)
           
 String toString()
           
 
Methods inherited from class com.evolveum.midpoint.model.lens.LensElementContext
addPrimaryDelta, addSecondaryDelta, addToExecutedDeltas, addToSecondaryDelta, checkConsistence, checkConsistence, clearExecutedDeltas, copyValues, determineOid, getDebugDumpTitle, getDebugDumpTitle, getDelta, getElementDesc, getExecutedDeltas, getLensContext, getNotNullPrismContext, getObjectDefinition, getObjectDeltaObject, getObjectNew, getObjectOld, getObjectTypeClass, getOid, getPrimaryDelta, getPrismContext, getSecondaryDelta, isFresh, setFresh, setObjectNew, setObjectOld, setOid, setPrimaryDelta, setSecondaryDelta
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.evolveum.midpoint.model.api.context.ModelElementContext
getObjectNew, getObjectOld, getPrimaryDelta, getSecondaryDelta, setObjectNew, setObjectOld, setPrimaryDelta, setSecondaryDelta
 

Method Detail

getSyncDelta

public ObjectDelta<O> getSyncDelta()
Description copied from interface: ModelProjectionContext
Returns synchronization delta. Synchronization delta describes changes that have recently happened. MidPoint reacts to these changes by "pulling them in" (e.g. using them in inbound mappings).

Specified by:
getSyncDelta in interface ModelProjectionContext<O extends ObjectType>

setSyncDelta

public void setSyncDelta(ObjectDelta<O> syncDelta)
Specified by:
setSyncDelta in interface ModelProjectionContext<O extends ObjectType>

getWave

public int getWave()

setWave

public void setWave(int wave)

isDoReconciliation

public boolean isDoReconciliation()

setDoReconciliation

public void setDoReconciliation(boolean doReconciliation)

getResourceShadowDiscriminator

public ResourceShadowDiscriminator getResourceShadowDiscriminator()

setResourceShadowDiscriminator

public void setResourceShadowDiscriminator(ResourceShadowDiscriminator resourceShadowDiscriminator)

addAccountSyncDelta

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

isAdd

public boolean isAdd()

isModify

public boolean isModify()

isDelete

public boolean isDelete()

getResource

public ResourceType getResource()

setResource

public void setResource(ResourceType resource)

isAssigned

public boolean isAssigned()

setAssigned

public void setAssigned(boolean isAssigned)

isActive

public boolean isActive()

setActive

public void setActive(boolean isActive)

getSynchronizationIntent

public SynchronizationIntent getSynchronizationIntent()

setSynchronizationIntent

public void setSynchronizationIntent(SynchronizationIntent synchronizationIntent)

getSynchronizationPolicyDecision

public SynchronizationPolicyDecision getSynchronizationPolicyDecision()
Description copied from interface: ModelProjectionContext
Decision regarding the account. It describes the overall situation of the account e.g. whether account is added, is to be deleted, unliked, etc. If set to null no decision was made yet. Null is also a typical value when the context is created.

Specified by:
getSynchronizationPolicyDecision in interface ModelProjectionContext<O extends ObjectType>
See Also:
SynchronizationPolicyDecision

setSynchronizationPolicyDecision

public void setSynchronizationPolicyDecision(SynchronizationPolicyDecision policyDecision)

getIteration

public int getIteration()

setIteration

public void setIteration(int iteration)

getIterationToken

public String getIterationToken()

setIterationToken

public void setIterationToken(String iterationToken)

isFullShadow

public boolean isFullShadow()

setFullShadow

public void setFullShadow(boolean fullShadow)

isShadow

public boolean isShadow()

getAccountConstructionDeltaSetTriple

public PrismValueDeltaSetTriple<PrismPropertyValue<AccountConstruction>> getAccountConstructionDeltaSetTriple()

setAccountConstructionDeltaSetTriple

public void setAccountConstructionDeltaSetTriple(PrismValueDeltaSetTriple<PrismPropertyValue<AccountConstruction>> accountConstructionDeltaSetTriple)

getOutboundAccountConstruction

public AccountConstruction getOutboundAccountConstruction()

setOutboundAccountConstruction

public void setOutboundAccountConstruction(AccountConstruction outboundAccountConstruction)

getSqueezedAttributes

public Map<QName,DeltaSetTriple<ItemValueWithOrigin<? extends PrismPropertyValue<?>>>> getSqueezedAttributes()

setSqueezedAttributes

public void setSqueezedAttributes(Map<QName,DeltaSetTriple<ItemValueWithOrigin<? extends PrismPropertyValue<?>>>> squeezedAttributes)

getResourceAccountTypeDefinitionType

public ResourceAccountTypeDefinitionType getResourceAccountTypeDefinitionType()

getRefinedResourceSchema

public RefinedResourceSchema getRefinedResourceSchema()
                                               throws SchemaException
Throws:
SchemaException

getRefinedAccountDefinition

public RefinedAccountDefinition getRefinedAccountDefinition()
                                                     throws SchemaException
Throws:
SchemaException

getDependencies

public Collection<ResourceShadowDiscriminatorType> getDependencies()

getAccountPasswordPolicy

public ValuePolicyType getAccountPasswordPolicy()

setAccountPasswordPolicy

public void setAccountPasswordPolicy(ValuePolicyType accountPasswordPolicy)

getEffectivePasswordPolicy

public ValuePolicyType getEffectivePasswordPolicy()

getAssignmentPolicyEnforcementType

public AssignmentPolicyEnforcementType getAssignmentPolicyEnforcementType()

recompute

public void recompute()
               throws SchemaException
Recomputes the new state of account (accountNew). It is computed by applying deltas to the old state (accountOld). Assuming that oldAccount is already set (or is null if it does not exist)

Overrides:
recompute in class LensElementContext<O extends ObjectType>
Throws:
SchemaException

clearIntermediateResults

public void clearIntermediateResults()

distributeResource

public void distributeResource()
Distribute the resource that's in the context into all the prism objects (old, new) and deltas. The resourceRef will not just contain the OID but also full resource object. This may optimize handling of the objects in upper layers (e.g. GUI).


getExecutableDelta

public ObjectDelta<O> getExecutableDelta()
                                                     throws SchemaException
Returns delta suitable for execution. The primary and secondary deltas may not make complete sense all by themselves. E.g. they may both be MODIFY deltas even in case that the account should be created. The deltas begin to make sense only if combined with sync decision. This method provides the deltas all combined and ready for execution.

Throws:
SchemaException

checkConsistence

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

checkConsistence

public void checkConsistence(String contextDesc,
                             boolean fresh,
                             boolean force)

isRequireSecondardyDeltaOid

protected boolean isRequireSecondardyDeltaOid()
Overrides:
isRequireSecondardyDeltaOid in class LensElementContext<O extends ObjectType>

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 LensProjectionContext<O> clone(LensContext lensContext)
Specified by:
clone in class LensElementContext<O extends ObjectType>

copyValues

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

hasValueForAttribute

public boolean hasValueForAttribute(QName attributeName)
                             throws SchemaException
Returns true if the projection has any value for specified attribute.

Throws:
SchemaException

getHumanReadableName

public String getHumanReadableName()

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.

Specified by:
debugDump in interface DebugDumpable
Returns:
content of the object intended for diagnostics by system administrator.

debugDump

public String debugDump(int indent)
Specified by:
debugDump in interface DebugDumpable

debugDump

public String debugDump(int indent,
                        boolean showTriples)

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.

Specified by:
dump in interface Dumpable
Returns:
content of the object intended for diagnostics.

getElementDefaultDesc

protected String getElementDefaultDesc()
Specified by:
getElementDefaultDesc in class LensElementContext<O extends ObjectType>

toString

public String toString()
Overrides:
toString in class Object

getOperation

public AccountOperation getOperation()


Copyright © 2013 evolveum. All Rights Reserved.