public class CommentManagerImpl extends Object implements CommentManager
Constructor and Description |
---|
CommentManagerImpl(CommentDao commentDao) |
Modifier and Type | Method and Description |
---|---|
Comment |
addComment(String content,
com.atlassian.user.User user,
long entityId) |
void |
deleteAllCommentsForEntity(BambooIdProvider entity) |
void |
deleteComment(Comment comment) |
Comment |
getCommentById(long commentId) |
List<Comment> |
getCommentsForBuildResults(PlanKey planKey)
Get all comments associated with Plan's build results
|
List<Comment> |
getCommentsForEntity(long entityId)
Get list of comments for a given entity
|
Map<Long,List<Comment>> |
getCommentsForJobResults(ChainResultsSummary chainResultSummary)
Get all comments on job results within the given chain result.
|
Integer |
getEntityCommentCount(long id)
Returns the amount of comments filed against entity
|
Integer |
getEntityCommentCountNoTx(long id)
Returns the amount of comments filed against entity
|
void |
onCommentForEntityChanged(long entityId) |
void |
saveComment(Comment comment)
Saves or updates a comment to the database
|
public CommentManagerImpl(CommentDao commentDao)
@NotNull public Comment addComment(String content, com.atlassian.user.User user, long entityId)
addComment
in interface CommentManager
public void deleteComment(@NotNull Comment comment)
deleteComment
in interface CommentManager
public void deleteAllCommentsForEntity(@NotNull BambooIdProvider entity)
deleteAllCommentsForEntity
in interface CommentManager
@Nullable public Comment getCommentById(long commentId)
getCommentById
in interface CommentManager
@NotNull public List<Comment> getCommentsForEntity(long entityId)
CommentManager
getCommentsForEntity
in interface CommentManager
entityId
- id of entity@NotNull public Integer getEntityCommentCount(long id)
CommentManager
getEntityCommentCount
in interface CommentManager
@NotNull public Integer getEntityCommentCountNoTx(long id)
CommentManager
getEntityCommentCountNoTx
in interface CommentManager
public void saveComment(Comment comment)
CommentManager
saveComment
in interface CommentManager
comment
- to save@NotNull public List<Comment> getCommentsForBuildResults(@NotNull PlanKey planKey)
CommentManager
getCommentsForBuildResults
in interface CommentManager
planKey
- Plan's key@NotNull public Map<Long,List<Comment>> getCommentsForJobResults(@NotNull ChainResultsSummary chainResultSummary)
CommentManager
getCommentsForJobResults
in interface CommentManager
public void onCommentForEntityChanged(long entityId)
onCommentForEntityChanged
in interface CommentManager
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.