Class DocumentTaskProvider

    • Constructor Detail

      • DocumentTaskProvider

        public DocumentTaskProvider()
    • Method Detail

      • getCurrentTaskInstances

        public List<Task> getCurrentTaskInstances​(CoreSession coreSession)
        Specified by:
        getCurrentTaskInstances in interface TaskProvider
        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

        public 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.
        Specified by:
        getCurrentTaskInstances in interface TaskProvider
        Parameters:
        actors - a list used as actorId to retrieve the tasks.
      • getTaskInstances

        public List<Task> getTaskInstances​(DocumentModel dm,
                                           NuxeoPrincipal user,
                                           CoreSession coreSession)
        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 interface TaskProvider
        Parameters:
        dm - the document.
      • getTaskInstances

        public List<Task> getTaskInstances​(DocumentModel dm,
                                           List<String> actors,
                                           CoreSession coreSession)
        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 interface TaskProvider
      • getAllTaskInstances

        public List<Task> getAllTaskInstances​(String processId,
                                              CoreSession session)
        Description copied from interface: TaskProvider
        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.

        Specified by:
        getAllTaskInstances in interface TaskProvider
      • getAllTaskInstances

        public List<Task> getAllTaskInstances​(String processId,
                                              NuxeoPrincipal user,
                                              CoreSession session)
        Description copied from interface: TaskProvider
        Returns all the tasks instances for the given 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.

        Specified by:
        getAllTaskInstances in interface TaskProvider
      • getAllTaskInstances

        public List<Task> getAllTaskInstances​(String processId,
                                              List<String> actors,
                                              CoreSession session)
        Description copied from interface: TaskProvider
        Returns all the tasks instances for the given 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.

        Specified by:
        getAllTaskInstances in interface TaskProvider
      • 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 interface TaskProvider
        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
      • getAllTaskInstances

        public List<Task> getAllTaskInstances​(String processId,
                                              String nodeId,
                                              CoreSession session)
        Description copied from interface: TaskProvider
        Returns all the tasks instances for the given processId originating from the given nodeId.

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

        Specified by:
        getAllTaskInstances in interface TaskProvider
      • 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 parameter 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.
        Specified by:
        getTaskInstances in interface TaskProvider
      • getAllCurrentTaskInstances

        public List<Task> getAllCurrentTaskInstances​(CoreSession session,
                                                     List<SortInfo> sortInfos)
        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 interface TaskProvider