Class TaskService


  • public class TaskService
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      TaskDto createTask​(TaskDto taskDto, RequestAuthor author, java.lang.String clientCode)
      Create task
      void deleteTask​(Task task)
      Delete task
      TaskDto getTask​(java.lang.String strTaskCode)
      Get a task
      java.util.List<TaskDto> getTasks​(java.lang.String strResourceId, java.lang.String strResourceType)
      get the list of tasks for a given resource
      java.util.List<TaskDto> getTasksListByIds​(java.util.List<java.lang.Integer> listId)
      get a list of tasks from a list of Ids
      static TaskService instance()
      get instance of taskService
      java.util.List<TaskDto> search​(java.lang.String _strTaskCode, java.lang.String _strResourceId, java.lang.String _strResourceType, java.lang.String _strTaskType, java.util.Date creationDate, java.util.Date lastUpdatedate, java.lang.String strLastUpdateClientCode, java.util.List<TaskStatusType> _enumTaskStatus, java.lang.Integer _nNbDaysSinceCreated, CreationDateOrdering creationDateOrdering, java.util.Map<java.lang.String,​java.lang.String> metadata, int max)
      Search tasks with criterias
      java.util.List<java.lang.Integer> searchId​(java.lang.String _strTaskCode, java.lang.String _strResourceId, java.lang.String _strResourceType, java.lang.String _strTaskType, java.util.Date creationDate, java.util.Date lastUpdatedate, java.lang.String strLastUpdateClientCode, java.util.List<TaskStatusType> _enumTaskStatus, java.lang.Integer _nNbDaysSinceCreated, CreationDateOrdering creationDateOrdering, java.util.Map<java.lang.String,​java.lang.String> metadata, int max)
      Search a list of Task Ids
      void updateTaskStatus​(java.lang.String strTaskCode, TaskStatusType newStatus, RequestAuthor author, java.lang.String clientCode)
      Update status
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • instance

        public static TaskService instance()
        get instance of taskService
        Returns:
        the instance
      • getTasks

        public java.util.List<TaskDto> getTasks​(java.lang.String strResourceId,
                                                java.lang.String strResourceType)
                                         throws TaskStackException
        get the list of tasks for a given resource
        Parameters:
        strResourceId -
        strResourceType -
        Returns:
        the task list
        Throws:
        TaskStackException
      • search

        public java.util.List<TaskDto> search​(java.lang.String _strTaskCode,
                                              java.lang.String _strResourceId,
                                              java.lang.String _strResourceType,
                                              java.lang.String _strTaskType,
                                              java.util.Date creationDate,
                                              java.util.Date lastUpdatedate,
                                              java.lang.String strLastUpdateClientCode,
                                              java.util.List<TaskStatusType> _enumTaskStatus,
                                              java.lang.Integer _nNbDaysSinceCreated,
                                              CreationDateOrdering creationDateOrdering,
                                              java.util.Map<java.lang.String,​java.lang.String> metadata,
                                              int max)
                                       throws TaskStackException
        Search tasks with criterias
        Parameters:
        _strTaskCode -
        _strResourceId -
        _strResourceType -
        _strTaskType -
        creationDate -
        lastUpdatedate -
        strLastUpdateClientCode -
        _enumTaskStatus -
        _nNbDaysSinceCreated -
        creationDateOrdering -
        metadata -
        max -
        Returns:
        the task list
        Throws:
        TaskStackException
      • searchId

        public java.util.List<java.lang.Integer> searchId​(java.lang.String _strTaskCode,
                                                          java.lang.String _strResourceId,
                                                          java.lang.String _strResourceType,
                                                          java.lang.String _strTaskType,
                                                          java.util.Date creationDate,
                                                          java.util.Date lastUpdatedate,
                                                          java.lang.String strLastUpdateClientCode,
                                                          java.util.List<TaskStatusType> _enumTaskStatus,
                                                          java.lang.Integer _nNbDaysSinceCreated,
                                                          CreationDateOrdering creationDateOrdering,
                                                          java.util.Map<java.lang.String,​java.lang.String> metadata,
                                                          int max)
                                                   throws TaskStackException
        Search a list of Task Ids
        Parameters:
        _strTaskCode -
        _strResourceId -
        _strResourceType -
        _strTaskType -
        creationDate -
        lastUpdatedate -
        strLastUpdateClientCode -
        _enumTaskStatus -
        _nNbDaysSinceCreated -
        creationDateOrdering -
        metadata -
        max -
        Returns:
        the list of Ids of the tasks
        Throws:
        TaskStackException
      • getTasksListByIds

        public java.util.List<TaskDto> getTasksListByIds​(java.util.List<java.lang.Integer> listId)
                                                  throws TaskStackException
        get a list of tasks from a list of Ids
        Parameters:
        listId -
        Returns:
        the task list
        Throws:
        TaskStackException