Class CompleteCorrelationResult

java.lang.Object
com.evolveum.midpoint.model.api.correlation.AbstractCorrelationResult<ObjectType>
com.evolveum.midpoint.model.api.correlation.CompleteCorrelationResult
All Implemented Interfaces:
DebugDumpable, Serializable

public class CompleteCorrelationResult extends AbstractCorrelationResult<ObjectType>
Result of a correlation operation.
See Also:
  • Method Details

    • builderForNoOwner

      public static CompleteCorrelationResult.WithNoOwner builderForNoOwner(XMLGregorianCalendar correlationStart, XMLGregorianCalendar correlationEnd)
    • builderForExistingOwner

      public static CompleteCorrelationResult.WithExistingOwnerBuilder builderForExistingOwner(XMLGregorianCalendar correlationStart, XMLGregorianCalendar correlationEnd)
    • builderForUncertainOwner

      public static CompleteCorrelationResult.WithUncertainOwnerBuilder builderForUncertainOwner(XMLGregorianCalendar correlationStart, XMLGregorianCalendar correlationEnd)
    • builderForError

      public static CompleteCorrelationResult.WithErrorBuilder builderForError(XMLGregorianCalendar correlationStart, XMLGregorianCalendar correlationEnd)
    • getCandidateOwnersMap

      @Nullable public @Nullable CandidateOwners getCandidateOwnersMap()
    • getOwnerOptions

      @Nullable public @Nullable ResourceObjectOwnerOptionsType getOwnerOptions()
    • isUncertain

      public boolean isUncertain()
      Check if the result is uncertain. Correlation is uncertain, when there are some owner candidates, but confidence is not high enough for any of them. NOTE: If you want to know if the result is *certain*, use the isCertain() method, not the negation of this one, because negation of this one would include also the case where correlation ended with error.
    • isError

      public boolean isError()
    • isExistingOwner

      public boolean isExistingOwner()
    • isNoOwner

      public boolean isNoOwner()
    • isCertain

      public boolean isCertain()
      Check if the result is certain. Correlation is certain, when there either isn't any owner candidate, or there is one such candidate, for which the confidence is high enough. NOTE: If you want to know if the result is *uncertain*, use the isUncertain() method, not the negation of this one, because negation of this one would include also the case where correlation ended with error.
    • debugDump

      public String debugDump(int indent)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • throwCommonOrRuntimeExceptionIfPresent

      public void throwCommonOrRuntimeExceptionIfPresent() throws CommonException
      Throws a CommonException or a RuntimeException, if the state is "error". Normally returns otherwise.
      Throws:
      CommonException
    • getErrorMessage

      @Nullable public @Nullable String getErrorMessage()
    • getAllCandidates

      @Experimental @NotNull public <F extends ObjectType> @NotNull List<F> getAllCandidates(@NotNull @NotNull Class<F> focusType)
      Returns all candidates of given type. Not supported if the result is taken from the shadow.
    • toDeltaItems

      public Collection<ItemDelta<?,?>> toDeltaItems(PrismContext prismContext, ShadowType shadow) throws SchemaException
      Creates a collection of item deltas from this correlation result for a given shadow. This method creates item deltas for a given shadow, which can be used to store current correlation results. However, it does not simply add all data from this result to deltas. It handles the data in this result with respect to the potentially existing correlation result already present in the shadow. Especially with respect to already existing start/end timestamps, presence of which can have special meaning as described below: |=== | start | end | meaning | missing (null) | missing (null) | No correlation has been started for this shadow yet. | present | present | Some correlation process had been started, and it has come to *certain* result (e.g. existing owner or no owner) | present | missing | Some correlation process has started, but it has not yet come to *certain* conclusion, it may e.g. have opened correlation case waiting to resolve manually (or by new automated correlation process e.g. by sync task). | missing | present | This should be invalid combination and should never happen. |=== This method will for example never fill in the correlation end timestamp, if the correlation is not *certain* about its result (e.g. existing owner or no owner). In case when this result contains a correlation error, it is added to the delta *only* if the shadow does not already contain the correlation result (state), or its ShadowCorrelationStateType.getSituation() returns null (situation does not exist yet).
      Parameters:
      prismContext - The prism context used for creating deltas
      shadow - The shadow for which the deltas are being created
      Returns:
      A collection of item deltas representing the changes to the shadow's correlation state
      Throws:
      SchemaException - If there is a schema-related error during delta creation