Class SmartAssignmentCollection<F extends AssignmentHolderType>
java.lang.Object
com.evolveum.midpoint.model.impl.lens.projector.SmartAssignmentCollection<F>
- All Implemented Interfaces:
DebugDumpable
,Iterable<SmartAssignmentElement>
public class SmartAssignmentCollection<F extends AssignmentHolderType>
extends Object
implements Iterable<SmartAssignmentElement>, DebugDumpable
Smart set of assignment values that keep track whether the assignment is new, old or changed.
This information is used for various reasons. We specifically distinguish between assignments in objectCurrent and objectOld
to be able to reliably detect phantom adds: a phantom add is an assignment that is both in OLD and CURRENT objects. This is
important in waves greater than 0, where objectCurrent is already updated with existing assignments. (See MID-2422.)
Each assignment is present here only once. For example, if it's present in old and current object,
and also referenced by a delta, it is still here represented only as a single entry.
- Author:
- Radovan Semancik
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
collectAndFreeze
(PrismObject<F> objectCurrent, PrismObject<F> objectOld, @NotNull OriginProvider<? super AssignmentType> deltaItemOriginProvider, ContainerDelta<AssignmentType> currentAssignmentDelta, Collection<AssignmentConfigItem> virtualAssignments) Fills-in this collection from given sources and freezes origins afterwards.debugDump
(int indent) void
generateExternalIds
(LensFocusContext<F> focusContext, OperationResult result) SeeAssignmentIdStore
for an explanation of how this works.@NotNull Iterator<SmartAssignmentElement>
iterator()
toString()
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
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
SmartAssignmentCollection
public SmartAssignmentCollection()
-
-
Method Details
-
collectAndFreeze
public void collectAndFreeze(PrismObject<F> objectCurrent, PrismObject<F> objectOld, @NotNull @NotNull OriginProvider<? super AssignmentType> deltaItemOriginProvider, ContainerDelta<AssignmentType> currentAssignmentDelta, Collection<AssignmentConfigItem> virtualAssignments) throws SchemaException Fills-in this collection from given sources and freezes origins afterwards. Origin freeze is needed if "replace" delta is present, because we have to set final values for "isNew" origin flags. `objectCurrent` and `objectOld` and `currentAssignmentDelta` must be EP-compliant, i.e. must come from trusted sources (e.g. objects must come from repo, and delta must be checked for authorizations). [EP:APSO] DONE: it is so (I believe)- Throws:
SchemaException
-
iterator
- Specified by:
iterator
in interfaceIterable<F extends AssignmentHolderType>
-
debugDump
- Specified by:
debugDump
in interfaceDebugDumpable
-
toString
-
generateExternalIds
public void generateExternalIds(LensFocusContext<F> focusContext, OperationResult result) throws ObjectNotFoundException SeeAssignmentIdStore
for an explanation of how this works.- Throws:
ObjectNotFoundException
-