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
Result of a correlation operation.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfacestatic interfacestatic interface -
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Method Summary
Modifier and TypeMethodDescriptionbuilderForError(XMLGregorianCalendar correlationStart, XMLGregorianCalendar correlationEnd) builderForExistingOwner(XMLGregorianCalendar correlationStart, XMLGregorianCalendar correlationEnd) builderForNoOwner(XMLGregorianCalendar correlationStart, XMLGregorianCalendar correlationEnd) builderForUncertainOwner(XMLGregorianCalendar correlationStart, XMLGregorianCalendar correlationEnd) debugDump(int indent) <F extends ObjectType>
@NotNull List<F>getAllCandidates(@NotNull Class<F> focusType) Returns all candidates of given type.@Nullable CandidateOwners@Nullable String@Nullable ResourceObjectOwnerOptionsTypebooleanCheck if the result is certain.booleanisError()booleanbooleanbooleanCheck if the result is uncertain.voidThrows aCommonExceptionor aRuntimeException, if the state is "error".Collection<ItemDelta<?,?>> toDeltaItems(PrismContext prismContext, ShadowType shadow) Creates a collection of item deltas from this correlation result for a given shadow.toString()Methods inherited from class com.evolveum.midpoint.model.api.correlation.AbstractCorrelationResult
getOwner, getSituationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
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
-
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 theisCertain()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 theisUncertain()method, not the negation of this one, because negation of this one would include also the case where correlation ended with error. -
debugDump
-
toString
-
throwCommonOrRuntimeExceptionIfPresent
Throws aCommonExceptionor aRuntimeException, if the state is "error". Normally returns otherwise.- Throws:
CommonException
-
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 itsShadowCorrelationStateType.getSituation()returns null (situation does not exist yet).- Parameters:
prismContext- The prism context used for creating deltasshadow- 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
-