Package com.atlassian.bamboo.comment
Interface CommentManager
- All Known Implementing Classes:
CommentManagerImpl
public interface CommentManager
-
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(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 entityId) Deprecated.@NotNull IntegergetEntityCommentCountNoTx(long entityId) Returns the amount of comments filed against entityvoidonCommentForEntityChanged(long entityId) voidsaveComment(Comment comment) Saves or updates a comment to the database
-
Method Details
-
addComment
-
deleteComment
-
deleteAllCommentsForEntity
-
getCommentsForEntity
Get list of comments for a given entity- Parameters:
entityId- id of entity- Returns:
- not null list of comments
-
getEntityCommentCount
Deprecated.since 6.6 usegetEntityCommentCountNoTx(long)insteadReturns the amount of comments filed against entity -
getEntityCommentCountNoTx
Returns the amount of comments filed against entity -
getCommentById
-
saveComment
Saves or updates a comment to the database- Parameters:
comment- to save
-
getCommentsForBuildResults
Get all comments associated with Plan's build results- Parameters:
planKey- Plan's key- Returns:
- list of comments
-
getCommentsForJobResults
@NotNull @NotNull Map<Long,List<Comment>> getCommentsForJobResults(@NotNull @NotNull ChainResultsSummary chainResultSummary) Get all comments on job results within the given chain result. -
onCommentForEntityChanged
void onCommentForEntityChanged(long entityId) -
anonymizeUserComments
Anonymizes all comments related to the specified username.This method will remove any user reference from the comments associated with the given username.
- Parameters:
username- the username whose comments are to be anonymized
-
getEntityCommentCountNoTx(long)instead