Interface CommentManager

    • Method Detail

      • getComment

        Comment getComment​(long id)
      • 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 getRecentlyUpdatedComments​(Space space,
                                                     int maxResults)
      • getPageComments

        @NonNull List<Comment> getPageComments​(long pageId,
                                               Date since,
                                               String ignoreUsername)
        The service get all page comments (page level comments and inline comments) from a particular date except for comments by the given username.
        Parameters:
        pageId - page id of comment
        since - comment time
        ignoreUsername - username excepted
        Returns:
        all comment
      • 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