public abstract class AbstractCommentManager extends Object implements CommentManager
CommentManager.Feature
Modifier and Type | Field and Description |
---|---|
protected static String |
COMMENTS_DIRECTORY |
Constructor and Description |
---|
AbstractCommentManager() |
Modifier and Type | Method and Description |
---|---|
protected Collection<String> |
computeAncestorIds(CoreSession session,
String parentId) |
protected NuxeoPrincipal |
getAuthor(DocumentModel docModel) |
List<Comment> |
getComments(CoreSession session,
String documentId)
Gets all comments for a document.
|
List<Comment> |
getComments(CoreSession session,
String documentId,
boolean sortAscending)
Gets all comments for a document.
|
PartialList<Comment> |
getComments(CoreSession session,
String documentId,
Long pageSize,
Long currentPageIndex)
Gets all comments for a document.
|
List<DocumentModel> |
getComments(DocumentModel docModel)
Gets comments of a document.
|
List<DocumentModel> |
getComments(DocumentModel docModel,
DocumentModel parent)
Get comments of a document.
|
protected void |
notifyEvent(CoreSession session,
String eventType,
DocumentModel commentedDoc,
DocumentModel comment) |
protected void |
setCommentPermissions(CoreSession session,
DocumentModel documentModel) |
protected void |
setFolderPermissions(CoreSession session,
DocumentModel documentModel) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createComment, createComment, createComment, createComment, createComment, createLocatedComment, deleteComment, deleteComment, deleteExternalComment, getComment, getComments, getComments, getDocumentsForComment, getExternalComment, getThreadForComment, hasFeature, updateComment, updateExternalComment
protected static final String COMMENTS_DIRECTORY
public AbstractCommentManager()
public List<DocumentModel> getComments(DocumentModel docModel)
CommentManager
getComments
in interface CommentManager
docModel
- the document modelpublic List<DocumentModel> getComments(DocumentModel docModel, DocumentModel parent)
CommentManager
getComments
in interface CommentManager
docModel
- the document modelparent
- the parent document modelpublic List<Comment> getComments(CoreSession session, String documentId)
CommentManager
getComments
in interface CommentManager
session
- the core sessiondocumentId
- the document idpublic List<Comment> getComments(CoreSession session, String documentId, boolean sortAscending)
CommentManager
getComments
in interface CommentManager
session
- the core sessiondocumentId
- the document idsortAscending
- whether to sort ascending or descendingpublic PartialList<Comment> getComments(CoreSession session, String documentId, Long pageSize, Long currentPageIndex)
CommentManager
getComments
in interface CommentManager
session
- the core sessiondocumentId
- the document idpageSize
- the page size to query, give null or 0 to disable paginationcurrentPageIndex
- the page index to query, give null or 0 to disable paginationprotected void notifyEvent(CoreSession session, String eventType, DocumentModel commentedDoc, DocumentModel comment)
protected NuxeoPrincipal getAuthor(DocumentModel docModel)
protected void setFolderPermissions(CoreSession session, DocumentModel documentModel)
protected void setCommentPermissions(CoreSession session, DocumentModel documentModel)
protected Collection<String> computeAncestorIds(CoreSession session, String parentId)
Copyright © 2019 Nuxeo. All rights reserved.