Package com.atlassian.confluence.pages
Interface CommentManager
-
- All Superinterfaces:
ContentEntityManager
- All Known Subinterfaces:
CommentManagerInternal
- All Known Implementing Classes:
DefaultCommentManager
@ParametersAreNonnullByDefault public interface CommentManager extends ContentEntityManager
Manager for page comments.
-
-
Field Summary
-
Fields inherited from interface com.atlassian.confluence.core.ContentEntityManager
ITERATE_ALL
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description @NonNull Comment
addCommentToObject(ContentEntityObject ceo, @Nullable Comment parent, String content)
@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.@NonNull Comment
addCommentToPage(AbstractPage page, @Nullable Comment parent, String content)
Deprecated.int
countAllCommentVersions()
Count the total number of comments of all types, including previous versionsint
countComments(Searchable searchable)
@NonNull Map<Searchable,Integer>
countComments(Collection<? extends Searchable> searchables)
@NonNull Map<Long,Integer>
countUnresolvedComments(Collection<Long> containerIds)
Count unresolved comments of comment containers.Comment
getComment(long id)
@NonNull List<Comment>
getPageComments(long pageId, Date since)
Deprecated.since 7.3.0, useContentService.find(Expansion...)
in plugins orCommentManagerInternal
in core where applicable@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.@NonNull List<Comment>
getPageLevelComments(long pageId, Date since)
Deprecated.since 7.3.0, useContentService.find(Expansion...)
in plugins orCommentManagerInternal
in core where applicable@NonNull Iterator
getRecentlyUpdatedComments(Space space, int maxResults)
void
removeCommentFromObject(long id)
void
removeCommentFromPage(long id)
Deprecated.void
updateCommentContent(Comment comment, String content)
-
Methods inherited from interface com.atlassian.confluence.core.ContentEntityManager
getById, getContributionStatusByUser, getNextVersion, getOtherVersion, getPageAndBlogPostsVersionsLastEditedByUser, getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts, getPreviousVersion, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getVersionHistorySummaries, getVersionsLastEditedByUser, refreshContentEntity, removeContentEntity, removeHistoricalVersion, revertContentEntityBackToVersion, saveContentEntity, saveContentEntity, saveNewVersion, saveNewVersion
-
-
-
-
Method Detail
-
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
-
removeCommentFromPage
@Deprecated void removeCommentFromPage(long id)
Deprecated.
-
removeCommentFromObject
void removeCommentFromObject(long id)
-
getRecentlyUpdatedComments
@NonNull Iterator getRecentlyUpdatedComments(Space space, int maxResults)
-
getPageComments
@Deprecated @NonNull List<Comment> getPageComments(long pageId, Date since)
Deprecated.since 7.3.0, useContentService.find(Expansion...)
in plugins orCommentManagerInternal
in core where applicableThe service get all page comments (page level comments and inline comments)- Parameters:
pageId
- page id of commentsince
- comment time- Returns:
- all comment
-
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 commentsince
- comment timeignoreUsername
- username excepted- Returns:
- all comment
-
getPageLevelComments
@Deprecated @NonNull List<Comment> getPageLevelComments(long pageId, Date since)
Deprecated.since 7.3.0, useContentService.find(Expansion...)
in plugins orCommentManagerInternal
in core where applicableThe service get all page level comments- Parameters:
pageId
- page id of commentsince
- 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
-
-