Package com.atlassian.jira.board
Class BoardServiceImpl
java.lang.Object
com.atlassian.jira.board.BoardServiceImpl
- All Implemented Interfaces:
BoardService
-
Constructor Summary
ConstructorsConstructorDescriptionBoardServiceImpl
(BoardManager boardManager, GlobalPermissionManager globalPermissionManager, I18nHelper.BeanFactory i18nFactory, SearchService searchService, ProjectService projectService, PermissionManager permissionManager) -
Method Summary
Modifier and TypeMethodDescriptioncreateBoard
(ApplicationUser user, BoardCreationData boardCreationData) Create a board according to the data provided.createDefaultBoardForProject
(ApplicationUser user, long projectId) Create a default board for the specified project.deleteBoard
(ApplicationUser user, BoardId boardId) Delete the board.getBoard
(ApplicationUser user, BoardId boardId) get the board for board id Get the board for specified board id.getBoardsForProject
(ApplicationUser user, long projectId) Get a list of boards related to the project.hasBoardInProject
(ApplicationUser user, long projectId) Returns whether there is at least one visible board for the user in the project.
-
Constructor Details
-
BoardServiceImpl
public BoardServiceImpl(BoardManager boardManager, GlobalPermissionManager globalPermissionManager, I18nHelper.BeanFactory i18nFactory, SearchService searchService, ProjectService projectService, PermissionManager permissionManager)
-
-
Method Details
-
createDefaultBoardForProject
Description copied from interface:BoardService
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_CONFIGProjectAction
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.- Specified by:
createDefaultBoardForProject
in interfaceBoardService
- Parameters:
user
- the user creating the boardprojectId
- the project id- Returns:
- the newly created board if it's created successfully, an ErrorCollection otherwise.
-
createBoard
public ServiceOutcome<Board> createBoard(ApplicationUser user, @Nonnull BoardCreationData boardCreationData) Description copied from interface:BoardService
Create a board according to the data provided. Only user with CREATE_SHARED_OBJECTSGlobalPermissionKey
can perform this operation. Otherwise, this method will return a no permission error.- Specified by:
createBoard
in interfaceBoardService
- Parameters:
user
- the user creating the boardboardCreationData
- board creation data- Returns:
- the newly created board if it's created successfully, otherwise get an ErrorCollection.
-
getBoardsForProject
Description copied from interface:BoardService
Get a list of boards related to the project. Only user with VIEW_PROJECTProjectAction
permission can perform this operation. Otherwise, this method will return a no permission error.- Specified by:
getBoardsForProject
in interfaceBoardService
- Parameters:
user
- the user to get the boardsprojectId
- the id of the project to link this board to- Returns:
- a list of boards related to the project.
-
hasBoardInProject
Description copied from interface:BoardService
Returns whether there is at least one visible board for the user in the project.- Specified by:
hasBoardInProject
in interfaceBoardService
- Parameters:
user
- the logged in userprojectId
- the project id- Returns:
- true if there is at least one board, false otherwise
-
getBoard
Description copied from interface:BoardService
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.- Specified by:
getBoard
in interfaceBoardService
- Parameters:
user
- the user to get the boardboardId
- the board id- Returns:
- the board
-
deleteBoard
Description copied from interface:BoardService
Delete the board. Only user with CREATE_SHARED_OBJECTSGlobalPermissionKey
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.- Specified by:
deleteBoard
in interfaceBoardService
- Parameters:
user
- the user to delete the boardboardId
- board id- Returns:
- return true if the board is deleted.
-