public class DocumentTaskProvider extends Object implements TaskProvider
Constructor and Description |
---|
DocumentTaskProvider() |
Modifier and Type | Method and Description |
---|---|
String |
endTask(CoreSession coreSession,
NuxeoPrincipal principal,
Task task,
String comment,
String eventName,
boolean isValidated)
Ends the task
|
List<Task> |
getAllCurrentTaskInstances(CoreSession session,
List<SortInfo> sortInfos)
Returns the list of task instances associated assigned to the current user.
|
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> |
getAllTaskInstances(String processId,
String nodeId,
CoreSession session)
Returns all the tasks instances for the given
processId originating from the given nodeId . |
List<Task> |
getCurrentTaskInstances(CoreSession coreSession) |
List<Task> |
getCurrentTaskInstances(CoreSession coreSession,
List<SortInfo> sortInfos)
Provide @param sortInfo to handle sort page-provider contributions (see
getCurrentTaskInstances(org.nuxeo.ecm.core.api.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> |
getCurrentTaskInstances(List<String> actors,
CoreSession coreSession,
List<SortInfo> sortInfos)
Provide @param sortInfo to handle sort page-provider contributions (see
getCurrentTaskInstances(org.nuxeo.ecm.core.api.CoreSession) ) |
List<Task> |
getTaskInstances(DocumentModel dm,
List<String> actors,
boolean includeDelegatedTasks,
CoreSession session)
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,
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 coreSession)
Returns the list of task instances associated with this document for which the user is the actor or belongs to
the pooled actor list.
|
static List<Task> |
getTasks(String pageProviderName,
CoreSession session,
boolean unrestricted,
List<SortInfo> sortInfos,
Object... params) |
static List<Task> |
wrapDocModelInTask(DocumentModelList taskDocuments)
Deprecated.
since 6.0, use
wrapDocModelInTask(List) instead. |
static List<Task> |
wrapDocModelInTask(DocumentModelList taskDocuments,
boolean detach)
Deprecated.
since 6.0, use
wrapDocModelInTask(List) instead. |
static List<Task> |
wrapDocModelInTask(List<DocumentModel> taskDocuments)
Converts a
DocumentModelList to a list of Task s. |
public DocumentTaskProvider()
public List<Task> getCurrentTaskInstances(CoreSession coreSession)
getCurrentTaskInstances
in interface TaskProvider
public List<Task> getCurrentTaskInstances(CoreSession coreSession, List<SortInfo> sortInfos)
getCurrentTaskInstances(org.nuxeo.ecm.core.api.CoreSession)
)getCurrentTaskInstances
in interface TaskProvider
public List<Task> getCurrentTaskInstances(List<String> actors, CoreSession coreSession)
getCurrentTaskInstances
in interface TaskProvider
actors
- a list used as actorId to retrieve the tasks.filter
- public List<Task> getCurrentTaskInstances(List<String> actors, CoreSession coreSession, List<SortInfo> sortInfos)
getCurrentTaskInstances(org.nuxeo.ecm.core.api.CoreSession)
)getCurrentTaskInstances
in interface TaskProvider
public List<Task> getTaskInstances(DocumentModel dm, NuxeoPrincipal user, CoreSession coreSession)
TaskProvider
If the user is null, then it returns all task instances for the document. The query is done in unrestricted mode and so the documents linked to the tasks are detached.
getTaskInstances
in interface TaskProvider
dm
- the document.public List<Task> getTaskInstances(DocumentModel dm, List<String> actors, CoreSession coreSession)
TaskProvider
getTaskInstances
in interface TaskProvider
public List<Task> getAllTaskInstances(String processId, CoreSession session)
TaskProvider
processId
.
The query is done in unrestricted mode and so the documents linked to the tasks are detached.
getAllTaskInstances
in interface TaskProvider
public List<Task> getAllTaskInstances(String processId, NuxeoPrincipal user, CoreSession session)
TaskProvider
processId
and where the user is the actor or belongs to the
pooled actor list. Doesn't take into account tasks that were delegated to this user.
The query is done in unrestricted mode and so the documents linked to the tasks are detached.
getAllTaskInstances
in interface TaskProvider
public List<Task> getAllTaskInstances(String processId, List<String> actors, CoreSession session)
TaskProvider
processId
which assigned to one of the actor in the list or
its pool. Doesn't take into account tasks that were delegated to these users.
The query is done in unrestricted mode and so the documents linked to the tasks are detached.
getAllTaskInstances
in interface TaskProvider
public static List<Task> wrapDocModelInTask(List<DocumentModel> taskDocuments)
DocumentModelList
to a list of Task
s.taskDocuments
- @Deprecated public static List<Task> wrapDocModelInTask(DocumentModelList taskDocuments)
wrapDocModelInTask(List)
instead.@Deprecated public static List<Task> wrapDocModelInTask(DocumentModelList taskDocuments, boolean detach)
wrapDocModelInTask(List)
instead.DocumentModelList
to a list of Task
s.detach
- if true
, detach each document before converting it to a Task
.public String endTask(CoreSession coreSession, NuxeoPrincipal principal, Task task, String comment, String eventName, boolean isValidated)
TaskProvider
endTask
in interface TaskProvider
coreSession
- the session to use when notifying and resolving of referenced document for notification.principal
- principal used when notifyingtask
- the instance to endcomment
- string added to the task comments and used as a notification commenteventName
- the core event name to use when notifyingisValidated
- boolean marker to state if the task was validated or rejectedpublic List<Task> getAllTaskInstances(String processId, String nodeId, CoreSession session)
TaskProvider
processId
originating from the given nodeId
.
The query is done in unrestricted mode and so the documents linked to the tasks are detached.
getAllTaskInstances
in interface TaskProvider
public List<Task> getTaskInstances(DocumentModel dm, List<String> actors, boolean includeDelegatedTasks, CoreSession session)
TaskProvider
includeDelegatedTasks
is true, takes into account tasks that were delegated to
these users. The query is done in unrestricted mode and so the documents linked to the tasks are detached.getTaskInstances
in interface TaskProvider
public List<Task> getAllCurrentTaskInstances(CoreSession session, List<SortInfo> sortInfos)
TaskProvider
getAllCurrentTaskInstances
in interface TaskProvider
Copyright © 2017 Nuxeo. All rights reserved.