@ParametersAreNonnullByDefault public class DefaultCommentManager extends DefaultContentEntityManager implements CommentManagerInternal
collaborativeEditingHelperITERATE_ALL| Constructor and Description |
|---|
DefaultCommentManager(ContentEntityObjectDao contentEntityObjectDao,
LinkManager linkManager,
ConfluenceIndexer indexer,
LabelManager labelManager,
AttachmentManager attachmentManager,
HibernateSessionManager hibernateSessionManager,
com.google.common.base.Supplier<XhtmlContent> xhtmlContent,
com.atlassian.event.api.EventPublisher eventPublisher,
NotificationManager notificationManager,
CommentDao commentDao,
RelationManager relationManager,
com.google.common.base.Supplier<UserAccessor> userAccessor,
com.google.common.base.Supplier<DarkFeaturesManager> darkFeaturesManager,
CollaborativeEditingHelper collaborativeEditingHelper) |
| Modifier and Type | Method and Description |
|---|---|
Comment |
addCommentToObject(ContentEntityObject ceo,
Comment parent,
String content) |
Comment |
addCommentToObject(ContentEntityObject ceo,
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.
|
Comment |
addCommentToPage(AbstractPage page,
Comment parent,
String content) |
Map<com.atlassian.bonnie.Searchable,Integer> |
countComments(Collection<? extends com.atlassian.bonnie.Searchable> searchables) |
int |
countComments(com.atlassian.bonnie.Searchable searchable) |
Map<Long,Integer> |
countUnresolvedComments(Collection<Long> containerIds)
Count unresolved comments of comment containers.
|
PageResponse<Comment> |
getChildren(Comment comment,
LimitedRequest pageRequest,
Depth depth,
com.google.common.base.Predicate<? super Comment>... predicates)
Returns the children of a comment, limited to the pagination requested.
|
Comment |
getComment(long id) |
PageResponse<Comment> |
getContainerComments(long containerId,
LimitedRequest pageRequest,
Depth depth,
com.google.common.base.Predicate<? super Comment>... predicates)
Returns the children comments of a ContentEntityObject, limited to the pagination requested.
|
List<Comment> |
getPageComments(long pageId,
Date since)
The service get all page comments (page level comments and inline comments)
|
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.
|
List<Comment> |
getPageLevelComments(long pageId,
Date since)
The service get all page level comments
|
Iterator |
getRecentlyUpdatedComments(Space space,
int maxResults) |
protected void |
publishCreateEvent(ContentEntityObject obj)
This method publishes
*CreateEventss. |
protected void |
publishCreateEvent(ContentEntityObject obj,
SaveContext saveContext) |
protected void |
publishRemoveEvent(ContentEntityObject obj)
This method publishes
*RemoveEvents. |
protected void |
publishUpdateEvent(ContentEntityObject obj,
ContentEntityObject origObj,
SaveContext saveContext)
This method publishes
*UpdateEvents. |
void |
removeCommentFromObject(long id) |
void |
removeCommentFromPage(long id) |
void |
updateCommentContent(Comment comment,
String content) |
createDraft, findAllDraftsFor, findDraftFor, findDraftFor, findUnpublishedContentWithUserContributions, getAttachmentManager, getBodyContentForRevert, getById, getById, getById, getByIds, getContentEntityObjectDao, getContributionStatusByUser, getEventPublisher, getHibernateSessionManager, getIndexer, getLabelManager, getLinkManager, getNextVersion, getNotificationManager, getOtherVersion, getPageAndBlogPostsVersionsLastEditedByUser, getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts, getPreviousVersion, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getVersionHistorySummaries, getVersionHistorySummaries, getVersionsLastEditedByUser, refreshContentEntity, removeContentEntities, removeContentEntity, removeHistoricalVersion, revertContentEntityBackToVersion, saveContentEntity, saveContentEntity, saveNewVersion, saveNewVersion, setAttachmentManager, suppressNotificationsOnEventIfRequired, updateContentLinkingTo, updateContentLinkingTo, updateOutgoingLinksInContent, updateOutgoingLinksInContent, updateSingleContentLinkinTo, updateSingleContentLinkinTo, updateSingleContentLinkinToclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetById, getContributionStatusByUser, getNextVersion, getOtherVersion, getPageAndBlogPostsVersionsLastEditedByUser, getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts, getPreviousVersion, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getVersionHistorySummaries, getVersionsLastEditedByUser, refreshContentEntity, removeContentEntity, removeHistoricalVersion, revertContentEntityBackToVersion, saveContentEntity, saveContentEntity, saveNewVersion, saveNewVersion, updateContentLinkingTo, updateOutgoingLinksInContent, updateSingleContentLinkinTo, updateSingleContentLinkinTopublic DefaultCommentManager(ContentEntityObjectDao contentEntityObjectDao, LinkManager linkManager, ConfluenceIndexer indexer, LabelManager labelManager, AttachmentManager attachmentManager, HibernateSessionManager hibernateSessionManager, com.google.common.base.Supplier<XhtmlContent> xhtmlContent, com.atlassian.event.api.EventPublisher eventPublisher, NotificationManager notificationManager, CommentDao commentDao, RelationManager relationManager, com.google.common.base.Supplier<UserAccessor> userAccessor, com.google.common.base.Supplier<DarkFeaturesManager> darkFeaturesManager, CollaborativeEditingHelper collaborativeEditingHelper)
@Nullable public Comment getComment(long id)
getComment in interface CommentManager@Nonnull public Comment addCommentToPage(AbstractPage page, Comment parent, String content)
addCommentToPage in interface CommentManager@Nonnull public Comment addCommentToObject(ContentEntityObject ceo, Comment parent, String content)
addCommentToObject in interface CommentManager@Nonnull public Comment addCommentToObject(ContentEntityObject ceo, Comment parent, String content, @Nullable NewCommentDeduplicator commentDeduplicator)
CommentManageraddCommentToObject in interface CommentManagerpublic void updateCommentContent(Comment comment, String content)
updateCommentContent in interface CommentManagerpublic void removeCommentFromPage(long id)
removeCommentFromPage in interface CommentManagerpublic void removeCommentFromObject(long id)
removeCommentFromObject in interface CommentManager@Nonnull public Iterator getRecentlyUpdatedComments(Space space, int maxResults)
getRecentlyUpdatedComments in interface CommentManager@Nonnull public List<Comment> getPageComments(long pageId, Date since)
CommentManagergetPageComments in interface CommentManagerpageId - page id of commentsince - comment time@Nonnull public List<Comment> getPageComments(long pageId, Date since, String ignoreUsername)
CommentManagergetPageComments in interface CommentManagerpageId - page id of commentsince - comment timeignoreUsername - username excepted@Nonnull public PageResponse<Comment> getContainerComments(long containerId, LimitedRequest pageRequest, Depth depth, com.google.common.base.Predicate<? super Comment>... predicates)
CommentManagerInternalgetContainerComments in interface CommentManagerInternalcontainerId - the id of the container to find children forpageRequest - the pagination requesteddepth - the depth to return children topredicates - optional predicates used to filter the comments@Nonnull public Map<com.atlassian.bonnie.Searchable,Integer> countComments(Collection<? extends com.atlassian.bonnie.Searchable> searchables)
countComments in interface CommentManagerpublic int countComments(com.atlassian.bonnie.Searchable searchable)
countComments in interface CommentManager@Nonnull public Map<Long,Integer> countUnresolvedComments(Collection<Long> containerIds)
CommentManagercountUnresolvedComments in interface CommentManagercontainerIds - the list of comment containers ids@Nonnull public PageResponse<Comment> getChildren(Comment comment, LimitedRequest pageRequest, Depth depth, com.google.common.base.Predicate<? super Comment>... predicates)
CommentManagerInternalgetChildren in interface CommentManagerInternalcomment - the comment to find children forpageRequest - the pagination requesteddepth - the depth to return children topredicates - optional predicates used to filter the commentsprotected void publishCreateEvent(ContentEntityObject obj)
DefaultContentEntityManager*CreateEventss.
Specific content entity object manager that need to publish those events should override this method.publishCreateEvent in class DefaultContentEntityManagerobj - the created content entity objectprotected void publishCreateEvent(ContentEntityObject obj, @Nullable SaveContext saveContext)
publishCreateEvent in class DefaultContentEntityManagerprotected void publishRemoveEvent(ContentEntityObject obj)
DefaultContentEntityManager*RemoveEvents.
Specific content entity object manager that need to publish those events should override this method.publishRemoveEvent in class DefaultContentEntityManagerobj - the removed content entity objectprotected void publishUpdateEvent(ContentEntityObject obj, @Nullable ContentEntityObject origObj, @Nullable SaveContext saveContext)
DefaultContentEntityManager*UpdateEvents.
Specific content entity object manager that need to publish those events should override this method.publishUpdateEvent in class DefaultContentEntityManagerobj - the updated content entity objectorigObj - the old version of the content entity object, for history purposesaveContext - the associated SaveContext@Nonnull public List<Comment> getPageLevelComments(long pageId, Date since)
CommentManagergetPageLevelComments in interface CommentManagerpageId - page id of commentsince - comment timeCopyright © 2003–2019 Atlassian. All rights reserved.