Nuxeo ECM Projects 5.6-RC1

org.nuxeo.ecm.platform.task
Interface TaskProvider

All Superinterfaces:
Serializable
All Known Subinterfaces:
TaskService
All Known Implementing Classes:
DocumentTaskProvider, JBPMDocTaskProvider, TaskServiceImpl

public interface TaskProvider
extends Serializable

Since:
5.5
Author:
Laurent Doguin

Method Summary
 String endTask(CoreSession coreSession, NuxeoPrincipal principal, Task task, String comment, String eventName, boolean isValidated)
          Ends the task
 List<Task> getAllTaskInstances(String processId, CoreSession session)
          Returns all the tasks instances for the given processId.
 List<Task> getAllTaskInstances(String processId, List<String> actors, CoreSession session)
          Returns all the tasks instances for the given processId which assigned to one of the actor in the list or its pool.
 List<Task> getAllTaskInstances(String processId, NuxeoPrincipal user, CoreSession session)
          Returns all the tasks instances for the given processId and where the user is the actor or belongs to the pooled actor list.
 List<Task> getCurrentTaskInstances(CoreSession coreSession)
           
 List<Task> getCurrentTaskInstances(List<String> actors, CoreSession coreSession)
          Returns a list of task instances assigned to one of the actors in the list or to its pool.
 List<Task> getTaskInstances(DocumentModel dm, List<String> actors, CoreSession coreSession)
          Returns the list of task instances associated with this document assigned to one of the actor in the list or its pool.
 List<Task> getTaskInstances(DocumentModel dm, NuxeoPrincipal user, CoreSession coreSssion)
          Returns the list of task instances associated with this document for which the user is the actor or belongs to the pooled actor list.
 

Method Detail

getCurrentTaskInstances

List<Task> getCurrentTaskInstances(CoreSession coreSession)
                                   throws ClientException
Parameters:
coreSession -
Returns:
A list of task instances visible by the coreSession's user.
Throws:
IllegalStateException - If the currentUser is null.
ClientException

getCurrentTaskInstances

List<Task> getCurrentTaskInstances(List<String> actors,
                                   CoreSession coreSession)
                                   throws ClientException
Returns a list of task instances assigned to one of the actors in the list or to its pool.

Parameters:
actors - a list used as actorId to retrieve the tasks.
coreSession -
Returns:
Throws:
ClientException

getTaskInstances

List<Task> getTaskInstances(DocumentModel dm,
                            NuxeoPrincipal user,
                            CoreSession coreSssion)
                            throws ClientException
Returns the list of task instances associated with this document for which the user is the actor or belongs to the pooled actor list.

If the user is null, then it returns all task instances for the document.

Parameters:
dm - the document.
user -
coreSession -
Returns:
Throws:
ClientException

getTaskInstances

List<Task> getTaskInstances(DocumentModel dm,
                            List<String> actors,
                            CoreSession coreSession)
                            throws ClientException
Returns the list of task instances associated with this document assigned to one of the actor in the list or its pool.

Parameters:
dm -
actors -
coreSession -
Returns:
Throws:
ClientException

getAllTaskInstances

List<Task> getAllTaskInstances(String processId,
                               CoreSession session)
                               throws ClientException
Returns all the tasks instances for the given processId.

The query is done in unrestricted mode and so the documents linked to the tasks are detached.

Throws:
ClientException
Since:
5.6

getAllTaskInstances

List<Task> getAllTaskInstances(String processId,
                               NuxeoPrincipal user,
                               CoreSession session)
                               throws ClientException
Returns all the tasks instances for the given processId and where the user is the actor or belongs to the pooled actor list.

The query is done in unrestricted mode and so the documents linked to the tasks are detached.

Throws:
ClientException
Since:
5.6

getAllTaskInstances

List<Task> getAllTaskInstances(String processId,
                               List<String> actors,
                               CoreSession session)
                               throws ClientException
Returns all the tasks instances for the given processId which assigned to one of the actor in the list or its pool.

The query is done in unrestricted mode and so the documents linked to the tasks are detached.

Throws:
ClientException
Since:
5.6

endTask

String endTask(CoreSession coreSession,
               NuxeoPrincipal principal,
               Task task,
               String comment,
               String eventName,
               boolean isValidated)
               throws ClientException
Ends the task

Parameters:
coreSession - the session to use when notifying and resolving of referenced document for notification.
principal - principal used when notifying
task - the instance to end
comment - string added to the task comments and used as a notification comment
eventName - the core event name to use when notifying
isValidated - boolean marker to state if the task was validated or rejected
Returns:
the name of the Seam event to raise
Throws:
ClientException - when trying to end a task without being granted the right to do so (see #canEndTask(NuxeoPrincipal, Task)), or when any other error occurs
Since:
5.6

Nuxeo ECM Projects 5.6-RC1

Copyright © 2012 Nuxeo SA. All Rights Reserved.