Class AssignmentIdStore

java.lang.Object
com.evolveum.midpoint.model.impl.lens.AssignmentIdStore
All Implemented Interfaces:
ShortDumpable

public class AssignmentIdStore extends Object implements 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 Details

    • AssignmentIdStore

      public AssignmentIdStore()
  • Method Details

    • getKnownExternalId

      public Long getKnownExternalId(AssignmentType assignment)
    • put

      public void put(AssignmentType assignment, Long newId)
    • isEmpty

      public boolean isEmpty()
    • shortDump

      public void shortDump(StringBuilder sb)
      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 interface ShortDumpable
      Parameters:
      sb - StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.