Class BaseCorrelator<CCB extends AbstractCorrelatorType>
java.lang.Object
com.evolveum.midpoint.model.impl.correlator.BaseCorrelator<CCB>
- Type Parameters:
CCB
- correlator configuration bean
- All Implemented Interfaces:
Correlator
- Direct Known Subclasses:
CompositeCorrelator
,ExpressionCorrelator
,FilterCorrelator
,IdMatchCorrelator
,ItemsCorrelator
,NoOpCorrelator
public abstract class BaseCorrelator<CCB extends AbstractCorrelatorType>
extends Object
implements Correlator
Abstract superclass for built-in correlators.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static interface
-
Field Summary
Modifier and TypeFieldDescriptionprotected final @NotNull ModelBeans
Useful beans.protected final CCB
Configuration of the correlator.protected final @NotNull CorrelatorContext<CCB>
Correlator [instantiation] context.protected static final int
protected final @NotNull String
Correlator type name (like "filter", "expression", etc) - for diagnostics purposes. -
Constructor Summary
ModifierConstructorDescriptionprotected
BaseCorrelator
(@NotNull Trace logger, @NotNull String typeName, @NotNull CorrelatorContext<CCB> correlatorContext, @NotNull ModelBeans beans) -
Method Summary
Modifier and TypeMethodDescription@NotNull Confidence
checkCandidateOwner
(@NotNull CorrelationContext correlationContext, @NotNull FocusType candidateOwner, @NotNull OperationResult parentResult) Checks whether the provided candidate focus object is the owner for given resource object.protected abstract @NotNull Confidence
checkCandidateOwnerInternal
(@NotNull CorrelationContext correlationContext, @NotNull FocusType candidateOwner, @NotNull OperationResult result) @NotNull CorrelationResult
correlate
(@NotNull CorrelationContext correlationContext, @NotNull OperationResult parentResult) Finds matching focus object (or potentially matching objects) for given resource object or for the pre-focus object.protected abstract @NotNull CorrelationResult
correlateInternal
(@NotNull CorrelationContext correlationContext, @NotNull OperationResult result) protected CorrelationResult
createResult
(@NotNull Collection<? extends Containerable> candidates, @Nullable BaseCorrelator.ConfidenceValueProvider confidenceValueProvider, @NotNull Task task, @NotNull OperationResult result) protected @NotNull Confidence
determineConfidence
(@NotNull Containerable candidate, @Nullable BaseCorrelator.ConfidenceValueProvider confidenceValueProvider, @NotNull Task task, @NotNull OperationResult result) @NotNull CorrelationExplanation
explain
(@NotNull CorrelationContext correlationContext, @NotNull FocusType candidate, @NotNull OperationResult parentResult) Explains how the correlator came to a given candidate owner (and the specific confidence value of it).protected @NotNull CorrelationExplanation
explainInternal
(@NotNull CorrelationContext correlationContext, @NotNull FocusType candidateOwner, @NotNull OperationResult result) This the default implementation, to be overridden in subclasses.protected @NotNull String
getDefaultContextDescription
(@NotNull CorrelationContext correlationContext) protected @NotNull Correlator
instantiateChild
(@NotNull CorrelatorConfiguration childConfiguration, @NotNull Task task, @NotNull OperationResult result) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.model.api.correlator.Correlator
getCorrelationPropertiesDefinitions, resolve, update
-
Field Details
-
typeName
Correlator type name (like "filter", "expression", etc) - for diagnostics purposes. -
correlatorContext
@NotNull protected final @NotNull CorrelatorContext<CCB extends AbstractCorrelatorType> correlatorContextCorrelator [instantiation] context. -
configurationBean
Configuration of the correlator. -
beans
Useful beans. -
MAX_CANDIDATES
protected static final int MAX_CANDIDATES- See Also:
-
-
Constructor Details
-
BaseCorrelator
protected BaseCorrelator(@NotNull @NotNull Trace logger, @NotNull @NotNull String typeName, @NotNull @NotNull CorrelatorContext<CCB> correlatorContext, @NotNull @NotNull ModelBeans beans)
-
-
Method Details
-
correlate
@NotNull public @NotNull CorrelationResult correlate(@NotNull @NotNull CorrelationContext correlationContext, @NotNull @NotNull OperationResult parentResult) throws SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ConfigurationException, ObjectNotFoundException Description copied from interface:Correlator
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
.- Specified by:
correlate
in interfaceCorrelator
- Parameters:
correlationContext
- Additional information about the overall context for correlation (e.g. type of focal object`s)parentResult
- Operation result where the method should record its operation- Throws:
SchemaException
ExpressionEvaluationException
CommunicationException
SecurityViolationException
ConfigurationException
ObjectNotFoundException
-
correlateInternal
@NotNull protected abstract @NotNull CorrelationResult correlateInternal(@NotNull @NotNull CorrelationContext correlationContext, @NotNull @NotNull OperationResult result) throws ConfigurationException, SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ObjectNotFoundException -
explain
@NotNull public @NotNull CorrelationExplanation explain(@NotNull @NotNull CorrelationContext correlationContext, @NotNull @NotNull FocusType candidate, @NotNull @NotNull OperationResult parentResult) throws SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ConfigurationException, ObjectNotFoundException Description copied from interface:Correlator
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.- Specified by:
explain
in interfaceCorrelator
- Throws:
SchemaException
ExpressionEvaluationException
CommunicationException
SecurityViolationException
ConfigurationException
ObjectNotFoundException
-
explainInternal
@NotNull protected @NotNull CorrelationExplanation explainInternal(@NotNull @NotNull CorrelationContext correlationContext, @NotNull @NotNull FocusType candidateOwner, @NotNull @NotNull OperationResult result) throws ConfigurationException, SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ObjectNotFoundException This the default implementation, to be overridden in subclasses. -
checkCandidateOwner
@NotNull public @NotNull Confidence checkCandidateOwner(@NotNull @NotNull CorrelationContext correlationContext, @NotNull @NotNull FocusType candidateOwner, @NotNull @NotNull OperationResult parentResult) throws SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ConfigurationException, ObjectNotFoundException Description copied from interface:Correlator
Checks whether the provided candidate focus object is the owner for given resource object. We assume that the correlator is already configured. SeeCorrelatorFactory
.- Specified by:
checkCandidateOwner
in interfaceCorrelator
- Parameters:
correlationContext
- Additional information about the overall context for correlation.parentResult
- Operation result where the method should record its operation- Returns:
- The confidence value of the match.
- Throws:
SchemaException
ExpressionEvaluationException
CommunicationException
SecurityViolationException
ConfigurationException
ObjectNotFoundException
-
checkCandidateOwnerInternal
@NotNull protected abstract @NotNull Confidence checkCandidateOwnerInternal(@NotNull @NotNull CorrelationContext correlationContext, @NotNull @NotNull FocusType candidateOwner, @NotNull @NotNull OperationResult result) throws ConfigurationException, SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ObjectNotFoundException -
getDefaultContextDescription
@NotNull protected @NotNull String getDefaultContextDescription(@NotNull @NotNull CorrelationContext correlationContext) -
instantiateChild
@NotNull protected @NotNull Correlator instantiateChild(@NotNull @NotNull CorrelatorConfiguration childConfiguration, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws SchemaException, ConfigurationException -
createResult
protected CorrelationResult createResult(@NotNull @NotNull Collection<? extends Containerable> candidates, @Nullable @Nullable BaseCorrelator.ConfidenceValueProvider confidenceValueProvider, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ConfigurationException, ObjectNotFoundException -
determineConfidence
@NotNull protected @NotNull Confidence determineConfidence(@NotNull @NotNull Containerable candidate, @Nullable @Nullable BaseCorrelator.ConfidenceValueProvider confidenceValueProvider, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws ConfigurationException, SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ObjectNotFoundException
-