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 to ShadowType). 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 use ObjectSetUtil.assumeObjectType(ObjectSetType, QName) method when constructing the work definition.
  • Method Details

    • 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 the SearchBasedActivityRun. Note: freely add CommonException and ActivityRunException to the signature of this method if needed.
    • customizeQuery

      default void customizeQuery(SearchSpecification<C> searchSpecification, 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 void customizeSearchOptions(SearchSpecification<C> searchSpecification, 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