|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.cnes.sitools.tasks.business.TaskManager
public final class TaskManager
Singleton class for managing Tasks
Method Summary | |
---|---|
Task |
createTask(org.restlet.Context context,
org.restlet.Request request,
org.restlet.Response response,
ResourceModel model,
org.restlet.security.User user,
java.util.logging.Level loggerLvl,
boolean persist)
Create a new Task |
boolean |
deleteTask(java.lang.String taskId,
boolean deleteModel)
Delete A Task and its model if deleteModel = true |
Task |
getById(java.lang.String taskId)
Get a Task for the specified taskId |
java.util.List<Task> |
getByResourceModel(java.lang.String resourceModelId)
Gets all the tasks with the same resourceModel specified by the given resourceModelId |
static TaskManager |
getInstance()
Gets the instance value |
TaskStoreXML |
getStore()
getStore |
java.util.List<TaskModel> |
getTaskModelsPage(ResourceCollectionFilter filter,
java.util.List<TaskModel> result)
Get the list of TaskModel according to filter and full list Used by the TaskCollectionResource, only an helpfull method |
java.util.List<Task> |
getTasks()
Return the list of persisted tasks |
void |
init(org.restlet.Context context)
Initialize the Manager |
void |
runAsynchrone(Task task,
org.restlet.Context context)
Run the given Task synchronously |
void |
runSynchrone(Task task)
Run the given Task synchronously |
void |
updateTask(Task task)
Persist the Task |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static TaskManager getInstance()
public void init(org.restlet.Context context)
context
- the Contextpublic Task createTask(org.restlet.Context context, org.restlet.Request request, org.restlet.Response response, ResourceModel model, org.restlet.security.User user, java.util.logging.Level loggerLvl, boolean persist)
context
- the Restlet Context of the Taskrequest
- the request objectresponse
- the response objectmodel
- the Resource modeluser
- the UserloggerLvl
- the level of the loggerpersist
- if the task needs to be persisted or not
public void runSynchrone(Task task)
task
- the Taskpublic void runAsynchrone(Task task, org.restlet.Context context)
task
- the Taskcontext
- the contextpublic java.util.List<Task> getByResourceModel(java.lang.String resourceModelId)
resourceModelId
- The id of the resourceModel
public Task getById(java.lang.String taskId)
taskId
- The id
taskId
public void updateTask(Task task)
task
- The Task to persistpublic boolean deleteTask(java.lang.String taskId, boolean deleteModel)
taskId
- the id of the taskdeleteModel
- if it has to delete the model as well
public java.util.List<Task> getTasks()
public java.util.List<TaskModel> getTaskModelsPage(ResourceCollectionFilter filter, java.util.List<TaskModel> result)
filter
- query filtersresult
- global results
public TaskStoreXML getStore()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |