Class DocumentTaskProvider
java.lang.Object
org.nuxeo.ecm.platform.task.core.service.DocumentTaskProvider
- All Implemented Interfaces:
Serializable
,TaskProvider
- Since:
- 5.5
- Author:
- Laurent Doguin, Antoine Taillefer
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionendTask
(CoreSession coreSession, NuxeoPrincipal principal, Task task, String comment, String eventName, boolean isValidated) Ends the taskgetAllCurrentTaskInstances
(CoreSession session, List<SortInfo> sortInfos) Returns the list of task instances associated assigned to the current user.getAllTaskInstances
(String processId, String nodeId, CoreSession session) Returns all the tasks instances for the givenprocessId
originating from the givennodeId
.getAllTaskInstances
(String processId, List<String> actors, CoreSession session) Returns all the tasks instances for the givenprocessId
which assigned to one of the actor in the list or its pool.getAllTaskInstances
(String processId, CoreSession session) Returns all the tasks instances for the givenprocessId
.getAllTaskInstances
(String processId, NuxeoPrincipal user, CoreSession session) Returns all the tasks instances for the givenprocessId
and where the user is the actor or belongs to the pooled actor list.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.getCurrentTaskInstances
(List<String> actors, CoreSession coreSession, List<SortInfo> sortInfos) Provide @param sortInfo to handle sort page-provider contributions (seegetCurrentTaskInstances(org.nuxeo.ecm.core.api.CoreSession)
)getCurrentTaskInstances
(CoreSession coreSession) getCurrentTaskInstances
(CoreSession coreSession, List<SortInfo> sortInfos) Provide @param sortInfo to handle sort page-provider contributions (seegetCurrentTaskInstances(org.nuxeo.ecm.core.api.CoreSession)
)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.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.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.getTasks
(String pageProviderName, CoreSession session, boolean unrestricted, List<SortInfo> sortInfos, Object... params) wrapDocModelInTask
(List<DocumentModel> taskDocuments) Converts aDocumentModelList
to a list ofTask
s.
-
Constructor Details
-
DocumentTaskProvider
public DocumentTaskProvider()
-
-
Method Details
-
getCurrentTaskInstances
- Specified by:
getCurrentTaskInstances
in interfaceTaskProvider
- Returns:
- A list of task instances where the current user is an actor. Doesn't take into account tasks that were delegated to this user.
-
getCurrentTaskInstances
Provide @param sortInfo to handle sort page-provider contributions (seegetCurrentTaskInstances(org.nuxeo.ecm.core.api.CoreSession)
)- Specified by:
getCurrentTaskInstances
in interfaceTaskProvider
- Since:
- 5.9.3
-
getCurrentTaskInstances
Returns a list of task instances assigned to one of the actors in the list or to its pool.- Specified by:
getCurrentTaskInstances
in interfaceTaskProvider
- Parameters:
actors
- a list used as actorId to retrieve the tasks.
-
getCurrentTaskInstances
public List<Task> getCurrentTaskInstances(List<String> actors, CoreSession coreSession, List<SortInfo> sortInfos) Provide @param sortInfo to handle sort page-provider contributions (seegetCurrentTaskInstances(org.nuxeo.ecm.core.api.CoreSession)
)- Specified by:
getCurrentTaskInstances
in interfaceTaskProvider
- Since:
- 5.9.3
-
getTaskInstances
Description copied from interface:TaskProvider
Returns the list of task instances associated with this document for which the user is the actor or belongs to the pooled actor list. Doesn't take into account tasks that were delegated to this user.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.
- Specified by:
getTaskInstances
in interfaceTaskProvider
- Parameters:
dm
- the document.
-
getTaskInstances
Description copied from interface:TaskProvider
Returns the list of task instances associated with this document 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.- Specified by:
getTaskInstances
in interfaceTaskProvider
-
getAllTaskInstances
Description copied from interface:TaskProvider
Returns all the tasks instances for the givenprocessId
.The query is done in unrestricted mode and so the documents linked to the tasks are detached.
- Specified by:
getAllTaskInstances
in interfaceTaskProvider
-
getAllTaskInstances
Description copied from interface:TaskProvider
Returns all the tasks instances for the givenprocessId
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.
- Specified by:
getAllTaskInstances
in interfaceTaskProvider
-
getAllTaskInstances
Description copied from interface:TaskProvider
Returns all the tasks instances for the givenprocessId
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.
- Specified by:
getAllTaskInstances
in interfaceTaskProvider
-
wrapDocModelInTask
Converts aDocumentModelList
to a list ofTask
s.- Since:
- 6.0
-
endTask
public String endTask(CoreSession coreSession, NuxeoPrincipal principal, Task task, String comment, String eventName, boolean isValidated) Description copied from interface:TaskProvider
Ends the task- Specified by:
endTask
in interfaceTaskProvider
- Parameters:
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 rejected- Returns:
- the name of the Seam event to raise
-
getAllTaskInstances
Description copied from interface:TaskProvider
Returns all the tasks instances for the givenprocessId
originating from the givennodeId
.The query is done in unrestricted mode and so the documents linked to the tasks are detached.
- Specified by:
getAllTaskInstances
in interfaceTaskProvider
-
getTaskInstances
public List<Task> getTaskInstances(DocumentModel dm, List<String> actors, boolean includeDelegatedTasks, CoreSession session) Description copied from interface:TaskProvider
Returns the list of task instances associated with this document assigned to one of the actor in the list or its pool. If the parameterincludeDelegatedTasks
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.- Specified by:
getTaskInstances
in interfaceTaskProvider
-
getAllCurrentTaskInstances
Description copied from interface:TaskProvider
Returns the list of task instances associated assigned to the current user. Takes 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.- Specified by:
getAllCurrentTaskInstances
in interfaceTaskProvider
-
getTasks
public static List<Task> getTasks(String pageProviderName, CoreSession session, boolean unrestricted, List<SortInfo> sortInfos, Object... params) - Since:
- 6.0
-