Interface CommentManager

All Superinterfaces:
ContentEntityManager
All Known Subinterfaces:
CommentManagerInternal
All Known Implementing Classes:
DefaultCommentManager

@ParametersAreNonnullByDefault public interface CommentManager extends ContentEntityManager
Manager for page comments.
  • Method Details

    • getComment

      Comment getComment(long id)
    • addCommentToPage

      @Deprecated @NonNull Comment addCommentToPage(AbstractPage page, @Nullable Comment parent, String content)
      Deprecated.
    • addCommentToObject

      @NonNull Comment addCommentToObject(ContentEntityObject ceo, @Nullable Comment parent, String content)
    • addCommentToObject

      @NonNull Comment addCommentToObject(ContentEntityObject ceo, @Nullable Comment parent, String content, NewCommentDeduplicator commentDeduplicator)
      Add a new comment if the given deduplicator determines that it's not a duplicate, or just return the existing duplicate otherwise.
      Since:
      5.6
    • updateCommentContent

      void updateCommentContent(Comment comment, String content)
    • removeCommentFromPage

      @Deprecated void removeCommentFromPage(long id)
      Deprecated.
    • removeCommentFromObject

      void removeCommentFromObject(long id)
    • getRecentlyUpdatedComments

      @NonNull Iterator<Comment> getRecentlyUpdatedComments(Space space, int maxResults)
    • getPageComments

      @Deprecated @NonNull List<Comment> getPageComments(long pageId, Date since)
      Deprecated.
      since 7.3.0, use ContentService.find(Expansion...) in plugins or CommentManagerInternal in core where applicable
      The service get all page comments (page level comments and inline comments)
      Parameters:
      pageId - page id of comment
      since - comment time
      Returns:
      all comment
    • getPageComments

      @NonNull List<Comment> getPageComments(long pageId, Date since, ConfluenceUser ignoreUser)
      The service get all page comments (page level comments and inline comments) from a particular date except for comments by the given user.
      Parameters:
      pageId - page id of comment
      since - comment time
      ignoreUser - user excepted
      Returns:
      all comment
    • getPageLevelComments

      @Deprecated @NonNull List<Comment> getPageLevelComments(long pageId, Date since)
      Deprecated.
      since 7.3.0, use ContentService.find(Expansion...) in plugins or CommentManagerInternal in core where applicable
      The service get all page level comments
      Parameters:
      pageId - page id of comment
      since - comment time
      Returns:
      page level comments
      Since:
      5.6
    • countComments

      @NonNull Map<Searchable,Integer> countComments(Collection<? extends Searchable> searchables)
    • countComments

      int countComments(Searchable searchable)
    • countAllCommentVersions

      int countAllCommentVersions()
      Count the total number of comments of all types, including previous versions
      Returns:
      the total number of comments
      Since:
      6.11.0
    • countUnresolvedComments

      @NonNull Map<Long,Integer> countUnresolvedComments(Collection<Long> containerIds)
      Count unresolved comments of comment containers.
      Parameters:
      containerIds - the list of comment containers ids
      Returns:
      The map of container id and its unresolved comment count
      Since:
      5.7