Interface Correlator
public interface Correlator
Finds a focus object for given resource object.
TODO Plus other responsibilities
-
Method Summary
Modifier and TypeMethodDescription@NotNull Confidence
checkCandidateOwner
(@NotNull CorrelationContext correlationContext, @NotNull FocusType candidateOwner, @NotNull OperationResult result) Checks whether the provided candidate focus object is the owner for given resource object.@NotNull CorrelationResult
correlate
(@NotNull CorrelationContext correlationContext, @NotNull OperationResult result) Finds matching focus object (or potentially matching objects) for given resource object or for the pre-focus object.@NotNull CorrelationExplanation
explain
(@NotNull CorrelationContext correlationContext, @NotNull FocusType candidate, @NotNull OperationResult result) Explains how the correlator came to a given candidate owner (and the specific confidence value of it).@NotNull Collection<CorrelationPropertyDefinition>
getCorrelationPropertiesDefinitions
(@Nullable PrismObjectDefinition<? extends FocusType> focusDefinition, @NotNull com.evolveum.midpoint.task.api.Task task, @NotNull OperationResult result) Returns the correlation properties this correlator uses to do the correlation.default void
resolve
(@NotNull CaseType aCase, @NotNull String outcomeUri, @NotNull com.evolveum.midpoint.task.api.Task task, @NotNull OperationResult result) Resolves a correlation case using provided work item output.default void
update
(@NotNull CorrelationContext correlationContext, @NotNull OperationResult result) Updates the internal state of the correlator with the "fresh" data from the resource.
-
Method Details
-
correlate
@NotNull @NotNull CorrelationResult correlate(@NotNull @NotNull CorrelationContext correlationContext, @NotNull @NotNull OperationResult result) throws SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ConfigurationException, ObjectNotFoundException Finds matching focus object (or potentially matching objects) for given resource object or for the pre-focus object. We assume that the correlator is already configured. SeeCorrelatorFactory
.- Parameters:
correlationContext
- Additional information about the overall context for correlation (e.g. type of focal object`s)result
- Operation result where the method should record its operation- Throws:
SchemaException
ExpressionEvaluationException
CommunicationException
SecurityViolationException
ConfigurationException
ObjectNotFoundException
-
explain
@NotNull @NotNull CorrelationExplanation explain(@NotNull @NotNull CorrelationContext correlationContext, @NotNull @NotNull FocusType candidate, @NotNull @NotNull OperationResult result) throws SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ConfigurationException, ObjectNotFoundException Explains how the correlator came to a given candidate owner (and the specific confidence value of it). May not be supported by all correlators. Current support: TODO The `candidateOwner` should be fetched in full, e.g., to be able to access multi-provenance identity and indexed data. -
checkCandidateOwner
@NotNull @NotNull Confidence checkCandidateOwner(@NotNull @NotNull CorrelationContext correlationContext, @NotNull @NotNull FocusType candidateOwner, @NotNull @NotNull OperationResult result) throws SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ConfigurationException, ObjectNotFoundException Checks whether the provided candidate focus object is the owner for given resource object. We assume that the correlator is already configured. SeeCorrelatorFactory
.- Parameters:
correlationContext
- Additional information about the overall context for correlation.result
- Operation result where the method should record its operation- Returns:
- The confidence value of the match.
- Throws:
SchemaException
ExpressionEvaluationException
CommunicationException
SecurityViolationException
ConfigurationException
ObjectNotFoundException
-
update
@Experimental default void update(@NotNull @NotNull CorrelationContext correlationContext, @NotNull @NotNull OperationResult result) throws SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ConfigurationException, ObjectNotFoundException Updates the internal state of the correlator with the "fresh" data from the resource. -
resolve
default void resolve(@NotNull @NotNull CaseType aCase, @NotNull @NotNull String outcomeUri, @NotNull @NotNull com.evolveum.midpoint.task.api.Task task, @NotNull @NotNull OperationResult result) throws SchemaException, CommunicationException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, ConfigurationException Resolves a correlation case using provided work item output. This includes the processing that needs to be done in the correlator. For the majority of correlators, there's nothing to be done here. Correlators with external and/or internal state (like ID Match) can update that state here.- Parameters:
outcomeUri
- It is the same value as in the case. It is mentioned explicitly just to show it's not null.- Throws:
SchemaException
CommunicationException
SecurityViolationException
ObjectNotFoundException
ExpressionEvaluationException
ConfigurationException
-
getCorrelationPropertiesDefinitions
@NotNull @NotNull Collection<CorrelationPropertyDefinition> getCorrelationPropertiesDefinitions(@Nullable @Nullable PrismObjectDefinition<? extends FocusType> focusDefinition, @NotNull @NotNull com.evolveum.midpoint.task.api.Task task, @NotNull @NotNull OperationResult result) throws ConfigurationException, SchemaException Returns the correlation properties this correlator uses to do the correlation. These are then e.g. displayed in the correlation case resolution window. May not be completely supported by all correlators. If the optional focus definition is present, theCorrelationPropertyDefinition
objects returned are more precise: the paths are qualified (if possible), and the respective item definitions are set (again, if possible).
-