Class SimpleIterativeTaskHandler<O extends ObjectType,EC extends ExecutionContext,P extends Processing<O,EC>>
- java.lang.Object
-
- com.evolveum.midpoint.repo.common.task.AbstractTaskHandler<TH,TE>
-
- com.evolveum.midpoint.model.impl.tasks.AbstractModelTaskHandler<SimpleIterativeTaskHandler<O,EC,P>,SimpleIterativeTaskHandler.TaskExecution>
-
- com.evolveum.midpoint.model.impl.tasks.simple.SimpleIterativeTaskHandler<O,EC,P>
-
- All Implemented Interfaces:
TaskHandler
,WorkBucketAwareTaskHandler
- Direct Known Subclasses:
DeleteNotUpdatedShadowTaskHandler
,ExecuteChangesTaskHandler
,IterativeScriptExecutionTaskHandler
,RecomputeTaskHandler
,ReindexTaskHandler
public abstract class SimpleIterativeTaskHandler<O extends ObjectType,EC extends ExecutionContext,P extends Processing<O,EC>> extends AbstractModelTaskHandler<SimpleIterativeTaskHandler<O,EC,P>,SimpleIterativeTaskHandler.TaskExecution>
Enables writing simple search-iterative task handlers without having to deal with the complexity of task executions, task part executions, and result handlers.
This micro-framework requires only two classes to be provided by the client:
- An implementation of
ExecutionContext
: holds the data needed for the task execution - An implementation of
Processing
: contains specification of the object type, query, search options, and processing logic
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
SimpleIterativeTaskHandler.ItemProcessor
protected class
SimpleIterativeTaskHandler.PartExecution
protected class
SimpleIterativeTaskHandler.TaskExecution
-
Field Summary
-
Fields inherited from class com.evolveum.midpoint.model.impl.tasks.AbstractModelTaskHandler
clock, clockwork, contextFactory, eventDispatcher, expressionFactory, model, modelObjectResolver, provisioningService, securityEnforcer, synchronizationService, syncTaskHelper, systemObjectCache, taskManager
-
Fields inherited from class com.evolveum.midpoint.repo.common.task.AbstractTaskHandler
globalReportingOptions, lightweightIdentifierGenerator, matchingRuleRegistry, operationExecutionRecorder, prismContext, repositoryService, schemaService, taskTypeName
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SimpleIterativeTaskHandler(Trace logger, String taskName, String taskOperationPrefix)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract EC
createExecutionContext()
protected abstract P
createProcessing(EC ctx)
protected SimpleIterativeTaskHandler.TaskExecution
createTaskExecution(RunningTask localCoordinatorTask, WorkBucketType workBucket, TaskPartitionDefinitionType partition, TaskWorkBucketProcessingResult previousRunResult)
Method to create the task execution.-
Methods inherited from class com.evolveum.midpoint.model.impl.tasks.AbstractModelTaskHandler
getClock, getExpressionFactory, getProvisioningService, getSynchronizationService, getSyncTaskHelper, getSystemObjectsCache
-
Methods inherited from class com.evolveum.midpoint.repo.common.task.AbstractTaskHandler
getCacheConfigurationManager, getGlobalReportingOptions, getLogger, getMatchingRuleRegistry, getOperationExecutionRecorder, getPrismContext, getRepositoryService, getStatisticsCollectionStrategy, getTaskManager, getTaskTypeName, getTracer, heartbeat, refreshStatus, run
-
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.task.api.TaskHandler
getArchetypeOid, getCategoryName, getCategoryNames, getDefaultChannel, run
-
Methods inherited from interface com.evolveum.midpoint.task.api.WorkBucketAwareTaskHandler
onNoMoreBuckets, run
-
-
-
-
Method Detail
-
createTaskExecution
@NotNull protected SimpleIterativeTaskHandler.TaskExecution createTaskExecution(RunningTask localCoordinatorTask, WorkBucketType workBucket, TaskPartitionDefinitionType partition, TaskWorkBucketProcessingResult previousRunResult)
Description copied from class:AbstractTaskHandler
Method to create the task execution. Can be overridden.- Overrides:
createTaskExecution
in classAbstractTaskHandler<SimpleIterativeTaskHandler<O extends ObjectType,EC extends ExecutionContext,P extends Processing<O,EC>>,SimpleIterativeTaskHandler.TaskExecution>
-
createExecutionContext
protected abstract EC createExecutionContext()
-
-