Interface TaskManager

All Superinterfaces:
GenericManager<Task>
All Known Implementing Classes:
TaskManagerImpl

public interface TaskManager extends GenericManager<Task>
This manager class is used to interact with tasks. Save the task by calling save(Consumer).
  • Method Details

    • setName

      TaskManager setName(@NotNull @NotNull String name)
      Changes the name of this task.
      Parameters:
      name - The new name of this task.
      Returns:
      This task manager.
    • setDescription

      TaskManager setDescription(@Nullable @Nullable String description)
      Changes the description of this task.
      Pass null or "" to remove the description.
      Parameters:
      description - The new description of this task.
      Returns:
      This task manager.
    • setStatus

      TaskManager setStatus(@NotNull Task.Status status)
      Sets the status of this task.
      Parameters:
      status - The new status of this task.
      Returns:
      This task manager.
    • setPriority

      TaskManager setPriority(@NotNull Task.Priority priority)
      Sets the priority of this task.
      Parameters:
      priority - The new priority of this task.
      Returns:
      This task manager.
    • setParent

      TaskManager setParent(@NotNull @NotNull Task task)
      Sets the parent task of this task.
      This converts the task to a subtask. This process is not reversible.
      Parameters:
      task - The parent task.
      Returns:
      This task manager.
    • setTimeEstimate

      TaskManager setTimeEstimate(@NotNull @NotNull Duration duration)
      Sets the time estimate of this task.
      Parameters:
      duration - The time estimate of this task.
      Returns:
      This task manager.
    • addAssignee

      TaskManager addAssignee(@NotNull @NotNull User user)
      Adds an assignee to this task.
      Parameters:
      user - The assignee to add.
      Returns:
      This task manager.
    • addAssignees

      TaskManager addAssignees(@NotNull @NotNull User... users)
      Adds multiple assignees to this task.
      Parameters:
      users - The assignees to add.
      Returns:
      This task manager.
    • removeAssignee

      TaskManager removeAssignee(@NotNull @NotNull User user)
      Removes an assignee from this task.
      Parameters:
      user - The assignee to remove.
      Returns:
      This task manager.
    • removeAssignees

      TaskManager removeAssignees(@NotNull @NotNull User... users)
      Removes multiple assignees from this task.
      Parameters:
      users - The assignees to remove.
      Returns:
      This task manager.
    • save

      void save(Consumer<Task> callback)
      Description copied from interface: GenericManager
      Saves the entity.
      Pass a consumer to be called when the request is complete.
      Specified by:
      save in interface GenericManager<Task>
      Parameters:
      callback - The consumer to be called when the request is complete.
    • complete

      Task complete()
      Description copied from interface: GenericManager
      Synchronously saves the entity.
      Specified by:
      complete in interface GenericManager<Task>
      Returns:
      The saved entity.