Package com.atlassian.bamboo.comment
Class CommentManagerImpl
java.lang.Object
com.atlassian.bamboo.comment.CommentManagerImpl
- All Implemented Interfaces:
CommentManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull CommentaddComment(String content, com.atlassian.user.User user, long entityId) voidanonymizeUserComments(@Nullable String username) Anonymizes all comments related to the specified username.voiddeleteAllCommentsForEntity(@NotNull BambooIdProvider entity) voiddeleteComment(@NotNull Comment comment) @Nullable CommentgetCommentById(long commentId) getCommentsForBuildResults(@NotNull PlanKey planKey) Get all comments associated with Plan's build resultsgetCommentsForEntity(long entityId) Get list of comments for a given entitygetCommentsForJobResults(@NotNull ChainResultsSummary chainResultSummary) Get all comments on job results within the given chain result.@NotNull IntegergetEntityCommentCount(long id) Returns the amount of comments filed against entity@NotNull IntegergetEntityCommentCountNoTx(long id) Returns the amount of comments filed against entityvoidonCommentForEntityChanged(long entityId) voidsaveComment(Comment comment) Saves or updates a comment to the database
-
Constructor Details
-
CommentManagerImpl
-
-
Method Details
-
addComment
@NotNull public @NotNull Comment addComment(String content, com.atlassian.user.User user, long entityId) - Specified by:
addCommentin interfaceCommentManager
-
deleteComment
- Specified by:
deleteCommentin interfaceCommentManager
-
deleteAllCommentsForEntity
- Specified by:
deleteAllCommentsForEntityin interfaceCommentManager
-
getCommentById
- Specified by:
getCommentByIdin interfaceCommentManager
-
getCommentsForEntity
Description copied from interface:CommentManagerGet list of comments for a given entity- Specified by:
getCommentsForEntityin interfaceCommentManager- Parameters:
entityId- id of entity- Returns:
- not null list of comments
-
getEntityCommentCount
Description copied from interface:CommentManagerReturns the amount of comments filed against entity- Specified by:
getEntityCommentCountin interfaceCommentManager
-
getEntityCommentCountNoTx
Description copied from interface:CommentManagerReturns the amount of comments filed against entity- Specified by:
getEntityCommentCountNoTxin interfaceCommentManager
-
saveComment
Description copied from interface:CommentManagerSaves or updates a comment to the database- Specified by:
saveCommentin interfaceCommentManager- Parameters:
comment- to save
-
getCommentsForBuildResults
@NotNull public @NotNull List<Comment> getCommentsForBuildResults(@NotNull @NotNull PlanKey planKey) Description copied from interface:CommentManagerGet all comments associated with Plan's build results- Specified by:
getCommentsForBuildResultsin interfaceCommentManager- Parameters:
planKey- Plan's key- Returns:
- list of comments
-
getCommentsForJobResults
@NotNull public @NotNull Map<Long,List<Comment>> getCommentsForJobResults(@NotNull @NotNull ChainResultsSummary chainResultSummary) Description copied from interface:CommentManagerGet all comments on job results within the given chain result.- Specified by:
getCommentsForJobResultsin interfaceCommentManager
-
onCommentForEntityChanged
public void onCommentForEntityChanged(long entityId) - Specified by:
onCommentForEntityChangedin interfaceCommentManager
-
anonymizeUserComments
Description copied from interface:CommentManagerAnonymizes all comments related to the specified username.This method will remove any user reference from the comments associated with the given username.
- Specified by:
anonymizeUserCommentsin interfaceCommentManager- Parameters:
username- the username whose comments are to be anonymized
-