Class ModelOperationTaskHandler
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.controller.ModelOperationTaskHandler
-
- All Implemented Interfaces:
TaskHandler
@Component public class ModelOperationTaskHandler extends Object implements TaskHandler
Handles a "ModelOperation task" - executes a given model operation in a context of the task (i.e., in most cases, asynchronously). The context of the model operation (i.e., model context) is stored in task property called "modelContext". When this handler is executed, the context is retrieved, unwrapped from its XML representation, and the model operation is (re)started. This was to be used for workflow execution. Currently this responsibility is moved to CaseOperationExecutionTaskHandler and this class is unused.- Author:
- mederly
-
-
Field Summary
Fields Modifier and Type Field Description static String
MODEL_OPERATION_TASK_URI
-
Constructor Summary
Constructors Constructor Description ModelOperationTaskHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCategoryName(Task task)
Returns a category name for a given task.Long
heartbeat(Task task)
void
refreshStatus(Task task)
TaskRunResult
run(RunningTask task, TaskPartitionDefinitionType partition)
-
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
getCategoryNames, getStatisticsCollectionStrategy, run
-
-
-
-
Field Detail
-
MODEL_OPERATION_TASK_URI
public static final String MODEL_OPERATION_TASK_URI
- See Also:
- Constant Field Values
-
-
Method Detail
-
run
public TaskRunResult run(RunningTask task, TaskPartitionDefinitionType partition)
- Specified by:
run
in interfaceTaskHandler
-
heartbeat
public Long heartbeat(Task task)
- Specified by:
heartbeat
in interfaceTaskHandler
-
refreshStatus
public void refreshStatus(Task task)
- Specified by:
refreshStatus
in interfaceTaskHandler
-
getCategoryName
public String getCategoryName(Task task)
Description copied from interface:TaskHandler
Returns a category name for a given task. In most cases, the name would be independent of concrete task.- Specified by:
getCategoryName
in interfaceTaskHandler
- Parameters:
task
- a task, whose category is to be determined; if getCategoryNames() returns null, this method has to accept null value as this parameter, and return the (one) category name that it gives to all tasks- Returns:
- a user-understandable name, like "LiveSync" or "Workflow"
-
-