Class CorrelationContext

All Implemented Interfaces:
DebugDumpable, Cloneable
Direct Known Subclasses:
CorrelationContext.Focus, CorrelationContext.Shadow

public abstract class CorrelationContext extends Object implements DebugDumpable, Cloneable
The context of the correlation and correlator state update operations. (Both work on an object being synchronized. The use in the latter case is experimental, though.) Created by _the caller_ of Correlator.correlate(CorrelationContext, OperationResult) method, but then updated by the method implementation(s) themselves. Not to be confused with CorrelatorContext which describes the context of the whole Correlator lifespan.
  • Constructor Details

    • CorrelationContext

      public CorrelationContext(@NotNull @NotNull FocusType preFocus, @Nullable @Nullable SystemConfigurationType systemConfiguration, @NotNull @NotNull com.evolveum.midpoint.task.api.Task task)
  • Method Details

    • getPreFocus

      @NotNull public @NotNull FocusType getPreFocus()
    • getFocusType

      @NotNull public @NotNull Class<? extends ObjectType> getFocusType()
    • getArchetypeOid

      @Nullable public abstract @Nullable String getArchetypeOid()
      Returns the archetype for focus objects that the candidate(s) must possess. Null means "no restrictions".
    • getCandidateOids

      @NotNull public abstract @NotNull Set<String> getCandidateOids()
      Returns candidate owners provided by previous correlator(s), if any. Background: If more child correlators are defined to be used, they will run separately (at least under the default implementation of the composite correlator), one after another. The original implementation executed each of the correlators independently, so that (typically) each of them issued its own query over all population of focus objects. The results were then combined by the composite correlator. However, there might be situations where subsequent correlators should just _refine_ the results returned by previous one(s). For that, we want to retain the relevant candidate owner(s) OID(s) in the context, and use that to limit search within those correlators. Empty set means "no previous candidates available", i.e. no restrictions will be applied. LIMITED USE. Currently used only "identification recovery" feature - for CorrelationContext.Focus context and `items` correlator.
    • getSystemConfiguration

      @Nullable public @Nullable SystemConfigurationType getSystemConfiguration()
    • getCorrelatorState

      public AbstractCorrelatorStateType getCorrelatorState()
    • setCorrelatorState

      public void setCorrelatorState(AbstractCorrelatorStateType correlatorState)
    • getTask

      @NotNull public @NotNull com.evolveum.midpoint.task.api.Task getTask()
    • debugDump

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

      @NotNull public abstract @NotNull CorrelationContext.Shadow asShadowCtx()
    • clone

      public CorrelationContext clone()
      A simple shallow clone. Use with care.
      clone in class Object
    • getPrimaryCorrelatedObject

      @NotNull public abstract @NotNull ObjectType getPrimaryCorrelatedObject()
      Returns the object (e.g. shadow or focus) that is being correlated. Currently for logging purposes.