Class Processing<O extends ObjectType,EC extends ExecutionContext>
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.tasks.simple.Processing<O,EC>
-
- Direct Known Subclasses:
DeleteNotUpdatedShadowTaskHandler.MyProcessing
,ExecuteChangesTaskHandler.MyProcessing
,IterativeScriptExecutionTaskHandler.MyProcessing
,RecomputeTaskHandler.MyProcessing
,ReindexTaskHandler.MyProcessing
public abstract class Processing<O extends ObjectType,EC extends ExecutionContext> extends Object
Specifies the processing of a simple task: - how object type, query, and search options are specified - how resulting objects are handled
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Processing(EC ctx)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected ObjectQuery
createQuery(ObjectQuery configuredQuery)
Creates search query.protected Collection<SelectorOptions<GetOperationOptions>>
createSearchOptions(Collection<SelectorOptions<GetOperationOptions>> configuredOptions)
Creates search options.protected @NotNull Class<? extends O>
determineObjectType(Class<? extends O> configuredType)
Creates object type.protected abstract void
handleObject(PrismObject<O> object, RunningTask workerTask, OperationResult result)
Handles an object found.
-
-
-
Field Detail
-
ctx
@NotNull protected final EC extends ExecutionContext ctx
-
-
Constructor Detail
-
Processing
protected Processing(@NotNull EC ctx)
-
-
Method Detail
-
determineObjectType
@NotNull protected @NotNull Class<? extends O> determineObjectType(Class<? extends O> configuredType)
Creates object type. The default is to use object type that was configured in the task, or ObjectType if there was none. For handlers that are limited to a specific type this method MUST be overridden.
-
createQuery
protected ObjectQuery createQuery(ObjectQuery configuredQuery) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException
Creates search query. The default is to use query that was configured in the task.- Parameters:
configuredQuery
- Query that was configured in the task object.- Throws:
CommunicationException
ObjectNotFoundException
SchemaException
SecurityViolationException
ConfigurationException
ExpressionEvaluationException
-
createSearchOptions
protected Collection<SelectorOptions<GetOperationOptions>> createSearchOptions(Collection<SelectorOptions<GetOperationOptions>> configuredOptions)
Creates search options. The default is to use options specified in the task.
-
handleObject
protected abstract void handleObject(PrismObject<O> object, RunningTask workerTask, OperationResult result) throws CommonException, PreconditionViolationException
Handles an object found. Must be overridden. For simplicity we avoid returning a boolean flag. We expect that stopping the processing for simple tasks is driven solely by the configuration (based e.g. on the exceptions thrown).
-
-