com.evolveum.midpoint.model.controller
Class ModelOperationTaskHandler

java.lang.Object
  extended by com.evolveum.midpoint.model.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 operation and its state is described in ModelOperationState element. When sent to this handler, the current state of operation is unwrapped and processed by the ModelController. ModelOperationState consists of: - ModelOperationKindType: add, modify, delete, - ModelOperationStageType: primary, secondary, execute, - OperationData (base64-encoded serialized data structure, specific to MOKT/MOST) CURRENTLY NOT WORKING (will be revived in midpoint 2.2)

Author:
mederly

Field Summary
static String MODEL_OPERATION_TASK_URI
           
 
Constructor Summary
ModelOperationTaskHandler()
           
 
Method Summary
 String getCategoryName(Task task)
          Returns a category name for a given task.
 List<String> getCategoryNames()
          Returns names of task categories provided by this handler.
 Long heartbeat(Task task)
           
 void refreshStatus(Task task)
           
 TaskRunResult run(Task task)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODEL_OPERATION_TASK_URI

public static final String MODEL_OPERATION_TASK_URI
See Also:
Constant Field Values
Constructor Detail

ModelOperationTaskHandler

public ModelOperationTaskHandler()
Method Detail

run

public TaskRunResult run(Task task)
Specified by:
run in interface TaskHandler

heartbeat

public Long heartbeat(Task task)
Specified by:
heartbeat in interface TaskHandler

refreshStatus

public void refreshStatus(Task task)
Specified by:
refreshStatus in interface TaskHandler

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 interface TaskHandler
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"

getCategoryNames

public List<String> getCategoryNames()
Description copied from interface: TaskHandler
Returns names of task categories provided by this handler. Usually it will be one-item list.

Specified by:
getCategoryNames in interface TaskHandler
Returns:
a list of category names; may be null - in that case the category info is given by getCategoryName(null)


Copyright © 2013 evolveum. All Rights Reserved.