Interface SearchBasedActivityRunSpecifics<C extends Containerable>
-
- Type Parameters:
C
- Type of objects processed by the activity
- All Superinterfaces:
ImplicitSegmentationResolver
,IterativeActivityRunSpecifics
- All Known Implementing Classes:
AutoScalingActivityRun
,FocusValidityScanPartialRun
,ImportActivityRun
,PartialReconciliationActivityRun
,ResourceObjectsReconciliationActivityRun
,ScanActivityRun
,SearchBasedActivityRun
,ShadowCleanupActivityHandler.MyRun
,ShadowIntegrityCheckActivityRun
,ShadowRefreshActivityHandler.MyActivityRun
public interface SearchBasedActivityRunSpecifics<C extends Containerable> extends IterativeActivityRunSpecifics
Provides execution logic and/or execution state related to a search-based activity run. Main responsibilities: 1. search specification formulation and customization, 2. object processing. Note that we *do not* allow customizing the type of objects being processed (e.g. by restricting them toShadowType
). The reason is that the type has to be known a little ahead e.g. to interpret the configured object query. The correct way how to prescribe object type is to useObjectSetUtil.assumeObjectType(ObjectSetType, QName)
method when constructing the work definition.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @Nullable SearchSpecification<C>
createCustomSearchSpecification(OperationResult result)
Creates a complete search specification.default ItemDefinitionProvider
createItemDefinitionProvider()
Returns a provider of definitions for runtime items (e.g.default ObjectQuery
customizeQuery(ObjectQuery configuredQuery, OperationResult result)
Customizes a query present in the original search specification (usually derived from the task configuration).default Collection<SelectorOptions<GetOperationOptions>>
customizeSearchOptions(Collection<SelectorOptions<GetOperationOptions>> configuredOptions, OperationResult result)
Customizes search options present in the original search specification (usually derived from the task configuration).default boolean
doesRequireDirectRepositoryAccess()
boolean
processItem(C item, @NotNull ItemProcessingRequest<C> request, RunningTask workerTask, OperationResult result)
Processes given item that came as part of a request.-
Methods inherited from interface com.evolveum.midpoint.repo.common.activity.run.IterativeActivityRunSpecifics
afterBucketProcessing, afterRun, beforeBucketProcessing, beforeRun, createReportingCharacteristics, resolveImplicitSegmentation, useOtherActivityStateForCounters
-
-
-
-
Method Detail
-
createCustomSearchSpecification
@Nullable default @Nullable SearchSpecification<C> createCustomSearchSpecification(OperationResult result)
Creates a complete search specification. If the activity is not interested in this kind of customization, it should return null, and the default search specification is then produced by theSearchBasedActivityRun
. Note: freely addCommonException
andActivityRunException
to the signature of this method if needed.
-
customizeQuery
default ObjectQuery customizeQuery(ObjectQuery configuredQuery, OperationResult result) throws CommonException
Customizes a query present in the original search specification (usually derived from the task configuration). The activity can either add specific clauses here, or rewrite the query altogether.- Throws:
CommonException
-
customizeSearchOptions
default Collection<SelectorOptions<GetOperationOptions>> customizeSearchOptions(Collection<SelectorOptions<GetOperationOptions>> configuredOptions, OperationResult result) throws CommonException
Customizes search options present in the original search specification (usually derived from the task configuration). The activity can either add or modify some options in the provided object - if it's not null - or replace the whole object by its own version.- Throws:
CommonException
-
doesRequireDirectRepositoryAccess
default boolean doesRequireDirectRepositoryAccess()
- Returns:
- True if the activity requires direct repository access. Note that the framework does not check the authorizations of the user running the activity in such cases. If an autz check is needed, the activity is responsible for that.
-
createItemDefinitionProvider
default ItemDefinitionProvider createItemDefinitionProvider()
Returns a provider of definitions for runtime items (e.g. attributes) that are needed in bucket filters. Usually needed for activities that work with resource objects.
-
processItem
boolean processItem(@NotNull C item, @NotNull @NotNull ItemProcessingRequest<C> request, RunningTask workerTask, OperationResult result) throws CommonException, ActivityRunException
Processes given item that came as part of a request. BEWARE: Item may have been preprocessed, and may be different from the item present in the request.- Throws:
CommonException
ActivityRunException
-
-