Interface TaskStorage

All Known Implementing Classes:
TaskStorageImpl

public interface TaskStorage
  • Method Details

    • getTaskById

      TaskDto getTaskById(long id)
      Find task by its id
      Parameters:
      id - the given id.
      Returns:
      TaskDto
    • createTask

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

      TaskDto update(TaskDto task)
      Update the provided task.
      Parameters:
      task - the given task.
      Returns:
      TaskDto
    • delete

      void delete(TaskDto task)
      Delete the provided task.
      Parameters:
      task - the provided task.
    • 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
    • findByUser

      List<TaskDto> findByUser(String user)
    • findTasks

      List<TaskDto> findTasks(TaskQuery query, int offset, int limit) throws Exception
      Throws:
      Exception
    • countTasks

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

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

      TaskDto findTaskByActivityId(String activityId)
    • updateStatus

      void updateStatus(Status stOld, Status stNew)
    • updateTaskOrder

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

      Set<String> getCoworker(long taskid)
    • getTaskWithCoworkers

      TaskDto getTaskWithCoworkers(long id)
    • getUncompletedTasks

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

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

      Long countAssignedTasks(String user)
    • getWatchedTasks

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

      Long countUncompletedTasks(String user)
    • countWatchedTasks

      Long countWatchedTasks(String user)
    • getCollaboratedTasks

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

      Long countCollaboratedTasks(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)
    • addWatcherToTask

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

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

      Set<String> getWatchersOfTask(TaskDto task)
    • findTasks

      List<TaskDto> findTasks(String user, List<String> memberships, String query, int limit)
      Find tasks assigned to a user using a term to find in title or description of the task
      Parameters:
      user - username
      memberships - memberships
      query - term to search in title or description
      limit - term to limit results.
      Returns:
      List of TaskDto
    • countTasks

      long countTasks(String user, String query, List<String> memberships)
      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
    • addTaskLog

      ChangeLogEntry addTaskLog(ChangeLogEntry changeLogEntry) throws EntityNotFoundException
      Create a log associated with a task with given changeLogEntry.
      Parameters:
      changeLogEntry - changeLogEntry
      Returns:
      Create a log associated
      Throws:
      EntityNotFoundException - when user is not authorized to add taskLog.
    • getTaskLogs

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

      List<Object[]> countTaskStatusByProject(long projectId)
    • 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
    • findTasks

      List<TaskDto> findTasks(TaskSearchFilter filter)
      Find tasks assigned to a user using a term to find in title or description of the task
      Parameters:
      filter - to search tasks.
      Returns:
      List of TaskDto