@ParametersAreNonnullByDefault public class DefaultCommentManager extends DefaultContentEntityManager implements CommentManagerInternal
collaborativeEditingHelper
ITERATE_ALL
Constructor and Description |
---|
DefaultCommentManager(ContentEntityObjectDao<ContentEntityObject> contentEntityObjectDao,
HibernateSessionManager hibernateSessionManager,
com.google.common.base.Supplier<? extends WikiToStorageConverter> wikiToStorageConverterRef,
com.atlassian.event.api.EventPublisher eventPublisher,
CommentDaoInternal commentDao,
RelationManager relationManager,
CollaborativeEditingHelper collaborativeEditingHelper,
AuditingContext auditingContext) |
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,
CommentDaoInternal commentDao,
RelationManager relationManager,
com.google.common.base.Supplier<UserAccessor> userAccessor,
com.google.common.base.Supplier<DarkFeaturesManager> darkFeaturesManager,
CollaborativeEditingHelper collaborativeEditingHelper,
AuditingContext auditingContext)
Deprecated.
since 7.5
|
Modifier and Type | Method and Description |
---|---|
@NonNull Comment |
addCommentToObject(ContentEntityObject ceo,
Comment parent,
String content) |
@NonNull Comment |
addCommentToObject(ContentEntityObject ceo,
Comment parent,
String content,
@Nullable 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,
Comment parent,
String content) |
int |
countAllCommentVersions()
Count the total number of comments of all types, including previous versions
|
@NonNull Map<com.atlassian.bonnie.Searchable,Integer> |
countComments(Collection<? extends com.atlassian.bonnie.Searchable> searchables) |
int |
countComments(com.atlassian.bonnie.Searchable searchable) |
@NonNull Map<Long,Integer> |
countUnresolvedComments(Collection<Long> containerIds)
Count unresolved comments of comment containers.
|
@NonNull PageResponse<Comment> |
getChildren(Comment comment,
LimitedRequest pageRequest,
Depth depth,
com.google.common.base.Predicate<? super Comment>... predicates)
|
@Nullable Comment |
getComment(long id) |
@NonNull PageResponse<Comment> |
getContainerComments(long containerId,
LimitedRequest pageRequest,
Depth depth,
com.google.common.base.Predicate<? super Comment>... predicates)
Deprecated.
|
@NonNull List<Comment> |
getPageComments(long pageId,
Date since)
The service get all page comments (page level comments and inline comments)
|
@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)
The service get all page level comments
|
@NonNull Iterator |
getRecentlyUpdatedComments(Space space,
int maxResults) |
protected void |
publishCreateEvent(ContentEntityObject obj)
This method publishes
*CreateEvents s. |
protected void |
publishCreateEvent(ContentEntityObject obj,
@Nullable SaveContext saveContext) |
protected void |
publishRemoveEvent(ContentEntityObject obj)
This method publishes
*RemoveEvent s. |
protected void |
publishUpdateEvent(ContentEntityObject obj,
@Nullable ContentEntityObject origObj,
@Nullable SaveContext saveContext)
This method publishes
*UpdateEvent s. |
void |
removeCommentFromObject(long id) |
void |
removeCommentFromPage(long id) |
void |
updateCommentContent(Comment comment,
String content) |
createDraft, findAllDraftsFor, findAllDraftsWithUnpublishedChangesForUser, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFilteredChildren, getFilteredContainerComments
getById, getContributionStatusByUser, getNextVersion, getOtherVersion, getPageAndBlogPostsVersionsLastEditedByUser, getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts, getPreviousVersion, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getVersionHistorySummaries, getVersionsLastEditedByUser, refreshContentEntity, removeContentEntity, removeHistoricalVersion, revertContentEntityBackToVersion, saveContentEntity, saveContentEntity, saveNewVersion, saveNewVersion
getByIdsAndFilters
public DefaultCommentManager(ContentEntityObjectDao<ContentEntityObject> contentEntityObjectDao, HibernateSessionManager hibernateSessionManager, com.google.common.base.Supplier<? extends WikiToStorageConverter> wikiToStorageConverterRef, com.atlassian.event.api.EventPublisher eventPublisher, CommentDaoInternal commentDao, RelationManager relationManager, CollaborativeEditingHelper collaborativeEditingHelper, AuditingContext auditingContext)
@Deprecated public 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, CommentDaoInternal commentDao, RelationManager relationManager, com.google.common.base.Supplier<UserAccessor> userAccessor, com.google.common.base.Supplier<DarkFeaturesManager> darkFeaturesManager, CollaborativeEditingHelper collaborativeEditingHelper, AuditingContext auditingContext)
public @Nullable Comment getComment(long id)
getComment
in interface CommentManager
public @NonNull Comment addCommentToPage(AbstractPage page, Comment parent, String content)
addCommentToPage
in interface CommentManager
public @NonNull Comment addCommentToObject(ContentEntityObject ceo, Comment parent, String content)
addCommentToObject
in interface CommentManager
public @NonNull Comment addCommentToObject(ContentEntityObject ceo, Comment parent, String content, @Nullable NewCommentDeduplicator commentDeduplicator)
CommentManager
addCommentToObject
in interface CommentManager
public void updateCommentContent(Comment comment, String content)
updateCommentContent
in interface CommentManager
public void removeCommentFromPage(long id)
removeCommentFromPage
in interface CommentManager
public void removeCommentFromObject(long id)
removeCommentFromObject
in interface CommentManager
public @NonNull Iterator getRecentlyUpdatedComments(Space space, int maxResults)
getRecentlyUpdatedComments
in interface CommentManager
public @NonNull List<Comment> getPageComments(long pageId, Date since)
CommentManager
getPageComments
in interface CommentManager
pageId
- page id of commentsince
- comment timepublic @NonNull List<Comment> getPageComments(long pageId, Date since, String ignoreUsername)
CommentManager
getPageComments
in interface CommentManager
pageId
- page id of commentsince
- comment timeignoreUsername
- username excepted@Deprecated public @NonNull PageResponse<Comment> getContainerComments(long containerId, LimitedRequest pageRequest, Depth depth, com.google.common.base.Predicate<? super Comment>... predicates)
CommentManagerInternal.getFilteredContainerComments(long, LimitedRequest, Depth, java.util.function.Predicate[])
}CommentManagerInternal
getContainerComments
in interface CommentManagerInternal
containerId
- the id of the container to find children forpageRequest
- the pagination requesteddepth
- the depth to return children topredicates
- optional predicates used to filter the commentspublic @NonNull Map<com.atlassian.bonnie.Searchable,Integer> countComments(Collection<? extends com.atlassian.bonnie.Searchable> searchables)
countComments
in interface CommentManager
public int countComments(com.atlassian.bonnie.Searchable searchable)
countComments
in interface CommentManager
public int countAllCommentVersions()
CommentManager
countAllCommentVersions
in interface CommentManager
public @NonNull Map<Long,Integer> countUnresolvedComments(Collection<Long> containerIds)
CommentManager
countUnresolvedComments
in interface CommentManager
containerIds
- the list of comment containers ids@Deprecated public @NonNull PageResponse<Comment> getChildren(Comment comment, LimitedRequest pageRequest, Depth depth, com.google.common.base.Predicate<? super Comment>... predicates)
CommentManagerInternal.getFilteredChildren(Comment, LimitedRequest, Depth, java.util.function.Predicate[])
CommentManagerInternal
getChildren
in interface CommentManagerInternal
comment
- 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
*CreateEvents
s.
Specific content entity object manager that need to publish those events should override this method.publishCreateEvent
in class DefaultContentEntityManager
obj
- the created content entity objectprotected void publishCreateEvent(ContentEntityObject obj, @Nullable SaveContext saveContext)
publishCreateEvent
in class DefaultContentEntityManager
protected void publishRemoveEvent(ContentEntityObject obj)
DefaultContentEntityManager
*RemoveEvent
s.
Specific content entity object manager that need to publish those events should override this method.publishRemoveEvent
in class DefaultContentEntityManager
obj
- the removed content entity objectprotected void publishUpdateEvent(ContentEntityObject obj, @Nullable ContentEntityObject origObj, @Nullable SaveContext saveContext)
DefaultContentEntityManager
*UpdateEvent
s.
Specific content entity object manager that need to publish those events should override this method.publishUpdateEvent
in class DefaultContentEntityManager
obj
- the updated content entity objectorigObj
- the old version of the content entity object, for history purposesaveContext
- the associated SaveContext
public @NonNull List<Comment> getPageLevelComments(long pageId, Date since)
CommentManager
getPageLevelComments
in interface CommentManager
pageId
- page id of commentsince
- comment timeCopyright © 2003–2020 Atlassian. All rights reserved.