Interface TaskService

All Known Implementing Classes:
TaskServiceImpl

public interface TaskService
  • Method Details

    • createTask

      TaskDto createTask(TaskDto task)
      Create a new task.
      Parameters:
      task - the given task.
      Returns:
      the created task.
    • updateTask

      TaskDto updateTask(TaskDto task)
      Update the task.
      Parameters:
      task - the given task.
      Returns:
      TaskDto the updated task.
    • updateTaskOrder

      void updateTaskOrder(long currentTaskId, Status newStatus, long[] orders)
    • removeTask

      void removeTask(long taskId) throws EntityNotFoundException
      Remove the task with given taskId
      Parameters:
      taskId - the given task id.
      Throws:
      EntityNotFoundException - when task is not found.
    • cloneTask

      TaskDto cloneTask(long taskId) throws EntityNotFoundException
      Clone the task from a task with given taskId.
      Parameters:
      taskId - the task Id
      Returns:
      the cloned task.
      Throws:
      EntityNotFoundException - when task is not found.
    • getTask

      TaskDto getTask(long taskId) throws EntityNotFoundException
      Return the task with given taskId.
      Parameters:
      taskId - the task Id
      Returns:
      the given task.
      Throws:
      EntityNotFoundException - when task is not found.
    • getWatchedTasks

      List<TaskDto> getWatchedTasks(String user, int limit)
    • countWatchedTasks

      Long countWatchedTasks(String user)
    • getAssignedTasks

      List<TaskDto> getAssignedTasks(String user, int limit)
    • countAssignedTasks

      Long countAssignedTasks(String user)
    • getCollaboratedTasks

      List<TaskDto> getCollaboratedTasks(String user, int limit)
    • countCollaboratedTasks

      Long countCollaboratedTasks(String user)
    • findTasksByMemberShips

      List<TaskDto> findTasksByMemberShips(String user, List<String> memberships, String query, int limit)
    • findTasks

      List<TaskDto> findTasks(String user, String query, int limit)
    • countTasks

      int countTasks(TaskQuery query) throws Exception
      Throws:
      Exception
    • selectTaskField

      <T> List<T> selectTaskField(TaskQuery query, String fieldName)
    • findTasksByLabel

      List<TaskDto> findTasksByLabel(LabelDto label, List<Long> projectIds, String username, OrderBy orderBy, int offset, int limit) throws Exception
      Throws:
      Exception
    • countTasksByLabel

      int countTasksByLabel(LabelDto label, List<Long> projectIds, String username, OrderBy orderBy) throws Exception
      Throws:
      Exception
    • addTaskLog

      ChangeLogEntry addTaskLog(long taskId, String username, String actionName, String target) throws EntityNotFoundException
      Create a log associated with a task with given taskId.
      Parameters:
      taskId - the given task id.
      username - the given username.
      actionName - the given action name.
      target - the given target.
      Returns:
      add task log.
      Throws:
      EntityNotFoundException - when task is not found.
    • getTaskLogs

      List<ChangeLogEntry> getTaskLogs(long taskId, int offset, int limit) throws Exception
      Throws:
      Exception
    • findTaskByActivityId

      TaskDto findTaskByActivityId(String activityId)
    • getCoworker

      Set<String> getCoworker(long taskId)
    • getMentionedUsers

      Set<String> getMentionedUsers(long taskId)
    • getUncompletedTasks

      List<TaskDto> getUncompletedTasks(String user, int limit)
    • countUncompletedTasks

      Long countUncompletedTasks(String user)
    • getIncomingTasks

      List<TaskDto> getIncomingTasks(String user, int offset, int limit) throws Exception
      Throws:
      Exception
    • countIncomingTasks

      int countIncomingTasks(String user) throws Exception
      Throws:
      Exception
    • getOverdueTasks

      List<TaskDto> getOverdueTasks(String user, int limit)
    • countOverdueTasks

      Long countOverdueTasks(String user)
    • getWatchersOfTask

      Set<String> getWatchersOfTask(TaskDto task)
    • addWatcherToTask

      void addWatcherToTask(String username, TaskDto task) throws Exception
      Throws:
      Exception
    • deleteWatcherOfTask

      void deleteWatcherOfTask(String username, TaskDto task) throws Exception
      Throws:
      Exception
    • findTasks

      List<TaskDto> findTasks(TaskQuery query, int offset, int limit) throws Exception
      Find tasks assigned to a user using a term to find in title or description of the task
      Parameters:
      query - term to search in title or description
      offset - term to offset results.
      limit - term to limit results.
      Returns:
      List of TaskDto
      Throws:
      Exception - when therer is an exception on get tasks.
    • countTasks

      long countTasks(String user, String query)
      Count tasks assigned to a user using a search term to find in title or description of the task
      Parameters:
      user - username
      query - term to search in title or description
      Returns:
      tasks count
    • countTaskStatusByProject

      List<Object[]> countTaskStatusByProject(long projectId)
    • filterTasks

      TasksList filterTasks(String query, long projectId, String keyword, List<Long> labels, TaskUtil.DUE dueDate, Priority priority, List<String> assignees, List<String> coworkers, List<String> watchers, Long labelId, Long statusId, org.exoplatform.services.security.Identity currIdentity, String dueCategory, String space_group_id, TimeZone userTimezone, boolean isShowCompleted, boolean advanceSearch, boolean noProjPermission, boolean noLblPermission, String orderBy, String groupBy, int offset, int limit) throws Exception
      Throws:
      Exception
    • isExternal

      boolean isExternal(String userId)
    • getAllIds

      List<Long> getAllIds(int offset, int limit)
      Retrieves a paginated list of all task IDs.
      Parameters:
      offset - the starting position of the first result
      limit - the maximum number of results to retrieve
      Returns:
      a list of task IDs