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 Comment
addComment(String content, com.atlassian.user.User user, long entityId)
void
deleteAllCommentsForEntity(@NotNull BambooIdProvider entity)
void
deleteComment(@NotNull Comment comment)
@Nullable Comment
getCommentById(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 Integer
getEntityCommentCount(long id)
Returns the amount of comments filed against entity@NotNull Integer
getEntityCommentCountNoTx(long id)
Returns the amount of comments filed against entityvoid
onCommentForEntityChanged(long entityId)
void
saveComment(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:
addComment
in interfaceCommentManager
-
deleteComment
public void deleteComment(@NotNull @NotNull Comment comment)
- Specified by:
deleteComment
in interfaceCommentManager
-
deleteAllCommentsForEntity
public void deleteAllCommentsForEntity(@NotNull @NotNull BambooIdProvider entity)
- Specified by:
deleteAllCommentsForEntity
in interfaceCommentManager
-
getCommentById
@Nullable public @Nullable Comment getCommentById(long commentId)
- Specified by:
getCommentById
in interfaceCommentManager
-
getCommentsForEntity
@NotNull public @NotNull List<Comment> getCommentsForEntity(long entityId)
Description copied from interface:CommentManager
Get list of comments for a given entity- Specified by:
getCommentsForEntity
in interfaceCommentManager
- Parameters:
entityId
- id of entity- Returns:
- not null list of comments
-
getEntityCommentCount
@NotNull public @NotNull Integer getEntityCommentCount(long id)
Description copied from interface:CommentManager
Returns the amount of comments filed against entity- Specified by:
getEntityCommentCount
in interfaceCommentManager
-
getEntityCommentCountNoTx
@NotNull public @NotNull Integer getEntityCommentCountNoTx(long id)
Description copied from interface:CommentManager
Returns the amount of comments filed against entity- Specified by:
getEntityCommentCountNoTx
in interfaceCommentManager
-
saveComment
public void saveComment(Comment comment)
Description copied from interface:CommentManager
Saves or updates a comment to the database- Specified by:
saveComment
in interfaceCommentManager
- Parameters:
comment
- to save
-
getCommentsForBuildResults
@NotNull public @NotNull List<Comment> getCommentsForBuildResults(@NotNull @NotNull PlanKey planKey)
Description copied from interface:CommentManager
Get all comments associated with Plan's build results- Specified by:
getCommentsForBuildResults
in 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:CommentManager
Get all comments on job results within the given chain result.- Specified by:
getCommentsForJobResults
in interfaceCommentManager
-
onCommentForEntityChanged
public void onCommentForEntityChanged(long entityId)
- Specified by:
onCommentForEntityChanged
in interfaceCommentManager
-
-