public class BoardServiceImpl extends Object implements BoardService
Constructor and Description |
---|
BoardServiceImpl(BoardManager boardManager,
GlobalPermissionManager globalPermissionManager,
I18nHelper.BeanFactory i18nFactory,
SearchService searchService,
ProjectService projectService,
PermissionManager permissionManager) |
Modifier and Type | Method and Description |
---|---|
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 BoardServiceImpl(BoardManager boardManager, GlobalPermissionManager globalPermissionManager, I18nHelper.BeanFactory i18nFactory, SearchService searchService, ProjectService projectService, PermissionManager permissionManager)
public ServiceOutcome<Board> createDefaultBoardForProject(ApplicationUser user, long projectId)
BoardService
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.createDefaultBoardForProject
in interface BoardService
user
- the user creating the boardprojectId
- the project idpublic ServiceOutcome<Board> createBoard(ApplicationUser user, @Nonnull BoardCreationData boardCreationData)
BoardService
GlobalPermissionKey
can perform this operation.
Otherwise, this method will return a no permission error.createBoard
in interface BoardService
user
- the user creating the boardboardCreationData
- board creation datapublic ServiceOutcome<List<Board>> getBoardsForProject(ApplicationUser user, long projectId)
BoardService
ProjectAction
permission can perform this operation.
Otherwise, this method will return a no permission error.getBoardsForProject
in interface BoardService
user
- the user to get the boardsprojectId
- the id of the project to link this board topublic ServiceOutcome<Boolean> hasBoardInProject(ApplicationUser user, long projectId)
BoardService
hasBoardInProject
in interface BoardService
user
- the logged in userprojectId
- the project idpublic ServiceOutcome<Board> getBoard(ApplicationUser user, @Nonnull BoardId boardId)
BoardService
getBoard
in interface BoardService
user
- the user to get the boardboardId
- the board idpublic ServiceOutcome<Boolean> deleteBoard(ApplicationUser user, @Nonnull BoardId boardId)
BoardService
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.deleteBoard
in interface BoardService
user
- the user to delete the boardboardId
- board idCopyright © 2002-2022 Atlassian. All Rights Reserved.