Interface CommentManager

All Known Implementing Classes:
CommentManagerImpl

public interface CommentManager
  • Method Details

    • addComment

      @NotNull @NotNull Comment addComment(String content, com.atlassian.user.User user, long entityId)
    • deleteComment

      void deleteComment(Comment comment)
    • deleteAllCommentsForEntity

      void deleteAllCommentsForEntity(@NotNull @NotNull BambooIdProvider entity)
    • getCommentsForEntity

      @NotNull @NotNull List<Comment> getCommentsForEntity(long entityId)
      Get list of comments for a given entity
      Parameters:
      entityId - id of entity
      Returns:
      not null list of comments
    • getEntityCommentCount

      @Deprecated @NotNull @NotNull Integer getEntityCommentCount(long entityId)
      Deprecated.
      since 6.6 use getEntityCommentCountNoTx(long) instead
      Returns the amount of comments filed against entity
    • getEntityCommentCountNoTx

      @NotNull @NotNull Integer getEntityCommentCountNoTx(long entityId)
      Returns the amount of comments filed against entity
    • getCommentById

      @Nullable @Nullable Comment getCommentById(long commentId)
    • saveComment

      void saveComment(Comment comment)
      Saves or updates a comment to the database
      Parameters:
      comment - to save
    • getCommentsForBuildResults

      @NotNull @NotNull List<Comment> getCommentsForBuildResults(@NotNull @NotNull PlanKey planKey)
      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

      void anonymizeUserComments(@Nullable @Nullable String username)
      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