Package com.atlassian.bamboo.comment
Interface CommentManager
- All Known Implementing Classes:
CommentManagerImpl
public interface CommentManager
-
Method Summary
Modifier and TypeMethodDescription@NotNull Comment
addComment
(String content, com.atlassian.user.User user, long entityId) void
anonymizeUserComments
(@Nullable String username) Anonymizes all comments related to the specified username.void
deleteAllCommentsForEntity
(@NotNull BambooIdProvider entity) void
deleteComment
(Comment comment) @Nullable Comment
getCommentById
(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 Integer
getEntityCommentCount
(long entityId) Deprecated.@NotNull Integer
getEntityCommentCountNoTx
(long entityId) Returns the amount of comments filed against entityvoid
onCommentForEntityChanged
(long entityId) void
saveComment
(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