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)
BoardServiceProjectAction 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 BoardServiceuser - the user creating the boardprojectId - the project idpublic ServiceOutcome<Board> createBoard(ApplicationUser user, @Nonnull BoardCreationData boardCreationData)
BoardServiceGlobalPermissionKey can perform this operation.
Otherwise, this method will return a no permission error.createBoard in interface BoardServiceuser - the user creating the boardboardCreationData - board creation datapublic ServiceOutcome<List<Board>> getBoardsForProject(ApplicationUser user, long projectId)
BoardServiceProjectAction permission can perform this operation.
Otherwise, this method will return a no permission error.getBoardsForProject in interface BoardServiceuser - the user to get the boardsprojectId - the id of the project to link this board topublic ServiceOutcome<Boolean> hasBoardInProject(ApplicationUser user, long projectId)
BoardServicehasBoardInProject in interface BoardServiceuser - the logged in userprojectId - the project idpublic ServiceOutcome<Board> getBoard(ApplicationUser user, @Nonnull BoardId boardId)
BoardServicegetBoard in interface BoardServiceuser - the user to get the boardboardId - the board idpublic ServiceOutcome<Boolean> deleteBoard(ApplicationUser user, @Nonnull BoardId boardId)
BoardServiceGlobalPermissionKey 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 BoardServiceuser - the user to delete the boardboardId - board idCopyright © 2002-2017 Atlassian. All Rights Reserved.