Class AssignmentIdStore
java.lang.Object
com.evolveum.midpoint.model.impl.lens.AssignmentIdStore
- All Implemented Interfaces:
ShortDumpable
When new assignments are being created (either as part of focus "add" or "modify" operation), we need to know their PCV IDs
beforehand. Otherwise, we are not able to create final `roleMembershipRef` value metadata for them (as they contain complete
assignment paths), resulting in multiple execution-stage audit events: first one with no-ID assignment paths in metadata,
and second one with correct assignment paths (having IDs). See MID-8659.
The solution lies in acquiring assignment PCV IDs in earlier stages of the processing (from the repository).
However, we _do not_ store the IDs in the assignments themselves, as their are sometimes re-generated (e.g. by mappings),
and the IDs could be easily lost. Hence, we store these IDs in
generatedIdsMap
here instead. They are stored
in EvaluatedAssignmentImpl.externalAssignmentId
(and at other similar places), and provided to appropriate places
during the computations; and, of course, implanted into deltas before the execution, so they are persistently stored
in the repository.
NOTE: TemporaryContainerIdStore
addresses a similar problem. However, in that case, IDs are not really important,
and they can be safely discarded when the delta is executed. (Unlike this case, where we need to keep them.)-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetKnownExternalId
(AssignmentType assignment) boolean
isEmpty()
void
put
(AssignmentType assignment, Long newId) void
Show the content of the object intended for diagnostics.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.ShortDumpable
shortDump, shortDumpLazily
-
Constructor Details
-
AssignmentIdStore
public AssignmentIdStore()
-
-
Method Details
-
getKnownExternalId
-
put
-
isEmpty
public boolean isEmpty() -
shortDump
Description copied from interface:ShortDumpable
Show the content of the object intended for diagnostics. This method is supposed to append a compact, human-readable output in a single line. Unlike toString() method, there is no requirement to identify the actual class or type of the object. It is assumed that the class/type will be obvious from the context in which the output is used.- Specified by:
shortDump
in interfaceShortDumpable
- Parameters:
sb
- StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.
-