@ExperimentalApi public interface

BoardService

com.atlassian.jira.board.BoardService
Known Indirect Subclasses

@ExperimentalApi

This interface is considered usable by external developers but its contracts have not stabilized.

Experimental APIs may be changed at any time before being marked @Internal or @PublicApi.

Class Overview

Provide services for storing and retrieving a board's configuration.

Summary

Public Methods
ServiceOutcome<Board> createBoard(ApplicationUser user, BoardCreationData boardCreationData)
Create a board according to the data provided.
ServiceOutcome<Board> createDefaultBoardForProject(ApplicationUser user, long projectId)
Create a default board for the specified project.
ServiceOutcome<Boolean> deleteBoard(ApplicationUser user, BoardId boardId)
Delete the board.
ServiceOutcome<Board> getBoard(ApplicationUser user, BoardId boardId)
get the board for board id Get the board for specified board id.
ServiceOutcome<List<Board>> getBoardsForProject(ApplicationUser user, long projectId)
Get a list of boards related to the project.
ServiceOutcome<Boolean> hasBoardInProject(ApplicationUser user, long projectId)
Returns whether there is at least one visible board for the user in the project.

Public Methods

public ServiceOutcome<Board> createBoard (ApplicationUser user, BoardCreationData boardCreationData)

Create a board according to the data provided. Only user with CREATE_SHARED_OBJECTS GlobalPermissionKey can perform this operation. Otherwise, this method will return a no permission error.

Parameters
user the user creating the board
boardCreationData board creation data
Returns
  • the newly created board if it's created successfully, otherwise get an ErrorCollection.

public ServiceOutcome<Board> createDefaultBoardForProject (ApplicationUser user, long projectId)

Create a default board for the specified project. Call this instead of createBoard when a board should be created as part of project creation. Only a user with EDIT_PROJECT_CONFIG ProjectAction permission can perform this operation. We don't validate jql here in order to allow admin without view project permission still can create the board. Otherwise, this method will return a no permission error. It returns the newly created board if it's created successfully.

Parameters
user the user creating the board
projectId the project id
Returns
  • the newly created board if it's created successfully, an ErrorCollection otherwise.

public ServiceOutcome<Boolean> deleteBoard (ApplicationUser user, BoardId boardId)

Delete the board. Only user with CREATE_SHARED_OBJECTS GlobalPermissionKey can perform this operation. Otherwise, it'll get no permission error. It'll return true when the specified board is deleted successfully. It'll return false if the specified board is not found.

Parameters
user the user to delete the board
boardId board id
Returns
  • return true if the board is deleted.

public ServiceOutcome<Board> getBoard (ApplicationUser user, BoardId boardId)

get the board for board id Get the board for specified board id. Use has to be able to view at least one project in the JIRA instance to perform this operation. Otherwise, this method will return a no permission error.

Parameters
user the user to get the board
boardId the board id
Returns
  • the board

public ServiceOutcome<List<Board>> getBoardsForProject (ApplicationUser user, long projectId)

Get a list of boards related to the project. Only user with VIEW_PROJECT ProjectAction permission can perform this operation. Otherwise, this method will return a no permission error.

Parameters
user the user to get the boards
projectId the id of the project to link this board to
Returns
  • a list of boards related to the project.

public ServiceOutcome<Boolean> hasBoardInProject (ApplicationUser user, long projectId)

Returns whether there is at least one visible board for the user in the project.

Parameters
user the logged in user
projectId the project id
Returns
  • true if there is at least one board, false otherwise