Class BoxTasksManager


  • public class BoxTasksManager
    extends Object
    Provides operations to manage Box tasks.
    • Constructor Detail

      • BoxTasksManager

        public BoxTasksManager​(com.box.sdk.BoxAPIConnection boxConnection)
        Create tasks manager to manage the tasks of Box connection's authenticated user.
        Parameters:
        boxConnection - - Box connection to authenticated user account.
    • Method Detail

      • getFileTasks

        public List<com.box.sdk.BoxTask.Info> getFileTasks​(String fileId)
        Get a list of any tasks on file.
        Parameters:
        fileId - - the id of file.
        Returns:
        The list of tasks on file.
      • addFileTask

        public com.box.sdk.BoxTask addFileTask​(String fileId,
                                               com.box.sdk.BoxTask.Action action,
                                               Date dueAt,
                                               String message)
        Add task to file.
        Parameters:
        fileId - - the id of file to add task to.
        action - - the action the task assignee will be prompted to do.
        dueAt - - - the day at which this task is due.
        message - - an optional message to include with the task.
        Returns:
        The new task.
      • deleteTask

        public void deleteTask​(String taskId)
        Delete task.
        Parameters:
        taskId - - the id of task to delete.
      • getTaskInfo

        public com.box.sdk.BoxTask.Info getTaskInfo​(String taskId)
        Get task information.
        Parameters:
        taskId - - the id of task.
        Returns:
        The task information.
      • updateTaskInfo

        public com.box.sdk.BoxTask updateTaskInfo​(String taskId,
                                                  com.box.sdk.BoxTask.Info info)
        Update task information.
        Parameters:
        taskId - - the id of task.
        info - - the updated information
        Returns:
        The updated task.
      • getTaskAssignments

        public List<com.box.sdk.BoxTaskAssignment.Info> getTaskAssignments​(String taskId)
        Get a list of any assignments for task.
        Parameters:
        taskId - - the id of task.
        Returns:
        The list of assignments for task.
      • addAssignmentToTask

        public com.box.sdk.BoxTask addAssignmentToTask​(String taskId,
                                                       com.box.sdk.BoxUser assignTo)
        Add assignment for task.
        Parameters:
        taskId - - the id of task to add assignment for.
        assignTo - - the user to assign to task.
        Returns:
        The assigned task.
      • getTaskAssignmentInfo

        public com.box.sdk.BoxTaskAssignment.Info getTaskAssignmentInfo​(String taskAssignmentId)
        Get task assignment information.
        Parameters:
        taskAssignmentId - - the id of task assignment.
        Returns:
        The task assignment information.
      • deleteTaskAssignment

        public void deleteTaskAssignment​(String taskAssignmentId)
        Delete task assignment.
        Parameters:
        taskAssignmentId - - the id of task assignment to delete.