Package com.atlassian.bamboo.comment
Class CommentManagerImpl
- java.lang.Object
-
- com.atlassian.bamboo.comment.CommentManagerImpl
-
- All Implemented Interfaces:
CommentManager
public class CommentManagerImpl extends Object implements CommentManager
-
-
Constructor Summary
Constructors Constructor Description CommentManagerImpl(CommentDao commentDao)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @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)@NotNull List<Comment>getCommentsForBuildResults(@NotNull PlanKey planKey)Get all comments associated with Plan's build results@NotNull List<Comment>getCommentsForEntity(long entityId)Get list of comments for a given entity@NotNull Map<Long,List<Comment>>getCommentsForJobResults(@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 Detail
-
CommentManagerImpl
public CommentManagerImpl(CommentDao commentDao)
-
-
Method Detail
-
addComment
@NotNull public @NotNull Comment addComment(String content, com.atlassian.user.User user, long entityId)
- Specified by:
addCommentin interfaceCommentManager
-
deleteComment
public void deleteComment(@NotNull @NotNull Comment comment)- Specified by:
deleteCommentin interfaceCommentManager
-
deleteAllCommentsForEntity
public void deleteAllCommentsForEntity(@NotNull @NotNull BambooIdProvider entity)- Specified by:
deleteAllCommentsForEntityin interfaceCommentManager
-
getCommentById
@Nullable public @Nullable Comment getCommentById(long commentId)
- Specified by:
getCommentByIdin interfaceCommentManager
-
getCommentsForEntity
@NotNull public @NotNull List<Comment> getCommentsForEntity(long entityId)
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
@NotNull public @NotNull Integer getEntityCommentCount(long id)
Description copied from interface:CommentManagerReturns the amount of comments filed against entity- Specified by:
getEntityCommentCountin interfaceCommentManager
-
getEntityCommentCountNoTx
@NotNull public @NotNull Integer getEntityCommentCountNoTx(long id)
Description copied from interface:CommentManagerReturns the amount of comments filed against entity- Specified by:
getEntityCommentCountNoTxin interfaceCommentManager
-
saveComment
public void saveComment(Comment comment)
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
public void anonymizeUserComments(@Nullable @Nullable String username)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
-
-