Class TaskManagerImpl

java.lang.Object
pw.chew.clickup4j.internal.entities.managers.GenericManagerImpl<Task>
pw.chew.clickup4j.internal.entities.managers.TaskManagerImpl
All Implemented Interfaces:
GenericManager<Task>, TaskManager

public class TaskManagerImpl extends GenericManagerImpl<Task> implements TaskManager
  • Constructor Details

    • TaskManagerImpl

      public TaskManagerImpl(@NotNull @NotNull ClickUp4j clickUp4j, @NotNull @NotNull String id)
  • Method Details

    • setName

      public TaskManager setName(@NotNull @NotNull String name)
      Description copied from interface: TaskManager
      Changes the name of this task.
      Specified by:
      setName in interface TaskManager
      Parameters:
      name - The new name of this task.
      Returns:
      This task manager.
    • setDescription

      public TaskManager setDescription(@Nullable @Nullable String description)
      Description copied from interface: TaskManager
      Changes the description of this task.
      Pass null or "" to remove the description.
      Specified by:
      setDescription in interface TaskManager
      Parameters:
      description - The new description of this task.
      Returns:
      This task manager.
    • setStatus

      public TaskManager setStatus(@NotNull Task.Status status)
      Description copied from interface: TaskManager
      Sets the status of this task.
      Specified by:
      setStatus in interface TaskManager
      Parameters:
      status - The new status of this task.
      Returns:
      This task manager.
    • setPriority

      public TaskManager setPriority(@NotNull Task.Priority priority)
      Description copied from interface: TaskManager
      Sets the priority of this task.
      Specified by:
      setPriority in interface TaskManager
      Parameters:
      priority - The new priority of this task.
      Returns:
      This task manager.
    • setParent

      public TaskManager setParent(@NotNull @NotNull Task task)
      Description copied from interface: TaskManager
      Sets the parent task of this task.
      This converts the task to a subtask. This process is not reversible.
      Specified by:
      setParent in interface TaskManager
      Parameters:
      task - The parent task.
      Returns:
      This task manager.
    • setTimeEstimate

      public TaskManager setTimeEstimate(@NotNull @NotNull Duration duration)
      Description copied from interface: TaskManager
      Sets the time estimate of this task.
      Specified by:
      setTimeEstimate in interface TaskManager
      Parameters:
      duration - The time estimate of this task.
      Returns:
      This task manager.
    • addAssignee

      public TaskManager addAssignee(@NotNull @NotNull User user)
      Description copied from interface: TaskManager
      Adds an assignee to this task.
      Specified by:
      addAssignee in interface TaskManager
      Parameters:
      user - The assignee to add.
      Returns:
      This task manager.
    • addAssignees

      public TaskManager addAssignees(@NotNull @NotNull User... users)
      Description copied from interface: TaskManager
      Adds multiple assignees to this task.
      Specified by:
      addAssignees in interface TaskManager
      Parameters:
      users - The assignees to add.
      Returns:
      This task manager.
    • removeAssignee

      public TaskManager removeAssignee(@NotNull @NotNull User user)
      Description copied from interface: TaskManager
      Removes an assignee from this task.
      Specified by:
      removeAssignee in interface TaskManager
      Parameters:
      user - The assignee to remove.
      Returns:
      This task manager.
    • removeAssignees

      public TaskManager removeAssignees(@NotNull @NotNull User... users)
      Description copied from interface: TaskManager
      Removes multiple assignees from this task.
      Specified by:
      removeAssignees in interface TaskManager
      Parameters:
      users - The assignees to remove.
      Returns:
      This task manager.
    • save

      public 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>
      Specified by:
      save in interface TaskManager
      Overrides:
      save in class GenericManagerImpl<Task>
      Parameters:
      callback - The consumer to be called when the request is complete.
    • complete

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