public interface

TaskService

com.atlassian.bitbucket.task.TaskService

Class Overview

Service to manage Tasks.

Summary

Public Methods
@Nonnull Task create(TaskCreateRequest request)
Create a task.
void delete(long taskId)
Delete a task.
@Nullable Task getById(long taskId)
Get a task by its ID.
@Nonnull Task update(TaskUpdateRequest request)
Update a task.

Public Methods

@Nonnull public Task create (TaskCreateRequest request)

Create a task.

Parameters
request request detailing the task's properties
Returns
  • an instance of the created task

public void delete (long taskId)

Delete a task.

Parameters
taskId the id of the task to delete

@Nullable public Task getById (long taskId)

Get a task by its ID.

Parameters
taskId the ID of the task to retrieve
Returns
  • the task matching the ID or null if none matches or the task is not visible to the current user

@Nonnull public Task update (TaskUpdateRequest request)

Update a task.

Parameters
request the properties to update
Returns
  • an instance of the updated task