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
Nested ClassesModifier and TypeClassDescriptionprotected static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final @NotNull ModelBeansUseful beans.protected final CCBConfiguration of the correlator.protected final @NotNull CorrelatorContext<CCB>Correlator [instantiation] context.protected static final intprotected final @NotNull StringCorrelator type name (like "filter", "expression", etc) - for diagnostics purposes. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseCorrelator(@NotNull Trace logger, @NotNull String typeName, @NotNull CorrelatorContext<CCB> correlatorContext, @NotNull ModelBeans beans) -
Method Summary
Modifier and TypeMethodDescription@NotNull ConfidencecheckCandidateOwner(@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 ConfidencecheckCandidateOwnerInternal(@NotNull CorrelationContext correlationContext, @NotNull FocusType candidateOwner, @NotNull OperationResult result) @NotNull CorrelationResultcorrelate(@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 CorrelationResultcorrelateInternal(@NotNull CorrelationContext correlationContext, @NotNull OperationResult result) protected CorrelationResultcreateResult(@NotNull Collection<? extends ObjectType> candidates, @Nullable BaseCorrelator.ConfidenceValueProvider confidenceValueProvider, @NotNull Task task, @NotNull OperationResult result) protected @NotNull ConfidencedetermineConfidence(@NotNull ObjectType candidate, @Nullable BaseCorrelator.ConfidenceValueProvider confidenceValueProvider, @NotNull Task task, @NotNull OperationResult result) @NotNull CorrelationExplanationexplain(@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 CorrelationExplanationexplainInternal(@NotNull CorrelationContext correlationContext, @NotNull FocusType candidateOwner, @NotNull OperationResult result) This the default implementation, to be overridden in subclasses.protected @NotNull StringgetDefaultContextDescription(@NotNull CorrelationContext correlationContext) protected @NotNull CorrelatorinstantiateChild(@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, waitMethods 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:CorrelatorFinds 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:
correlatein 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:
SchemaExceptionExpressionEvaluationExceptionCommunicationExceptionSecurityViolationExceptionConfigurationExceptionObjectNotFoundException
-
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:CorrelatorExplains 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:
explainin interfaceCorrelator- Throws:
SchemaExceptionExpressionEvaluationExceptionCommunicationExceptionSecurityViolationExceptionConfigurationExceptionObjectNotFoundException
-
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:CorrelatorChecks whether the provided candidate focus object is the owner for given resource object. We assume that the correlator is already configured. SeeCorrelatorFactory.- Specified by:
checkCandidateOwnerin 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:
SchemaExceptionExpressionEvaluationExceptionCommunicationExceptionSecurityViolationExceptionConfigurationExceptionObjectNotFoundException
-
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 ObjectType> 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 ObjectType candidate, @Nullable @Nullable BaseCorrelator.ConfidenceValueProvider confidenceValueProvider, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws ConfigurationException, SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ObjectNotFoundException
-