PropertyCommentManager
instead.@Deprecated public class CommentManagerImpl extends AbstractCommentManager
CommentManager.Feature
COMMENTS_DIRECTORY
Constructor and Description |
---|
CommentManagerImpl(CommentServiceConfig config)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Comment |
createComment(CoreSession session,
Comment comment)
Deprecated.
Creates a comment.
|
DocumentModel |
createComment(DocumentModel docModel,
DocumentModel comment)
Deprecated.
Creates a comment document model, filling its properties with given info and linking it to given document.
|
DocumentModel |
createComment(DocumentModel docModel,
DocumentModel parent,
DocumentModel child)
Deprecated.
Creates a comment document model, filling its properties with given info and linking it to given document.
|
DocumentModel |
createComment(DocumentModel docModel,
String comment)
Deprecated.
Creates a comment.
|
DocumentModel |
createComment(DocumentModel docModel,
String comment,
String author)
Deprecated.
Creates a comment document model, filling its properties with given info and linking it to given document.
|
DocumentModel |
createLocatedComment(DocumentModel docModel,
DocumentModel comment,
String path)
Deprecated.
Creates a comment document model.
|
void |
deleteComment(CoreSession session,
String commentId)
Deprecated.
Deletes a comment.
|
void |
deleteComment(DocumentModel docModel,
DocumentModel comment)
Deprecated.
Deletes a comment.
|
void |
deleteExternalComment(CoreSession session,
String entityId)
Deprecated.
Deletes an external comment.
|
Comment |
getComment(CoreSession session,
String commentId)
Deprecated.
Gets a comment.
|
List<DocumentModel> |
getComments(CoreSession session,
DocumentModel docModel)
Deprecated.
Gets comments of a document.
|
PartialList<Comment> |
getComments(CoreSession session,
String documentId,
Long pageSize,
Long currentPageIndex,
boolean sortAscending)
Deprecated.
Gets all comments for a document.
|
List<DocumentModel> |
getDocumentsForComment(DocumentModel comment)
Deprecated.
Gets documents in relation with a particular comment.
|
Comment |
getExternalComment(CoreSession session,
String entityId)
Deprecated.
Gets a comment generated by an external service.
|
DocumentModel |
getThreadForComment(DocumentModel comment)
Deprecated.
Gets thread in relation with a given comment (post or comment).
|
boolean |
hasFeature(CommentManager.Feature feature)
Deprecated.
Checks if a feature is available.
|
protected DocumentModel |
internalCreateComment(CoreSession session,
DocumentModel docModel,
DocumentModel comment,
String path)
Deprecated.
|
Comment |
updateComment(CoreSession session,
String commentId,
Comment comment)
Deprecated.
Updates a comment.
|
Comment |
updateExternalComment(CoreSession session,
String entityId,
Comment comment)
Deprecated.
Updates an external comment.
|
computeAncestorIds, getAuthor, getComments, getComments, getComments, getComments, getComments, notifyEvent, setCommentPermissions, setFolderPermissions
public CommentManagerImpl(CommentServiceConfig config)
public List<DocumentModel> getComments(CoreSession session, DocumentModel docModel) throws CommentSecurityException
CommentManager
session
- the core sessiondocModel
- the document modelCommentSecurityException
- if the current user does not have the right permissions on the commented
documentpublic DocumentModel createComment(DocumentModel docModel, String comment, String author)
CommentManager
docModel
- the document to commentcomment
- the comment contentauthor
- the comment authorpublic DocumentModel createComment(DocumentModel docModel, String comment)
CommentManager
docModel
- the document to commentcomment
- the comment contentpublic DocumentModel createComment(DocumentModel docModel, DocumentModel comment) throws CommentSecurityException
CommentManager
docModel
- the document to commentcomment
- the comment document modelCommentSecurityException
- if the current user does not have the right permissions on the document to
comment.protected DocumentModel internalCreateComment(CoreSession session, DocumentModel docModel, DocumentModel comment, String path)
public void deleteComment(DocumentModel docModel, DocumentModel comment)
CommentManager
docModel
- the comment document modelcomment
- the commentpublic DocumentModel createComment(DocumentModel docModel, DocumentModel parent, DocumentModel child)
CommentManager
docModel
- the document to commentparent
- the comment parent document modelchild
- the comment child document modelpublic List<DocumentModel> getDocumentsForComment(DocumentModel comment)
CommentManager
comment
- the commentpublic DocumentModel createLocatedComment(DocumentModel docModel, DocumentModel comment, String path) throws CommentSecurityException
CommentManager
docModel
- the document to commentcomment
- the comment contentpath
- the location pathCommentSecurityException
- if the current user does not have the right permissions on the document to
comment.public DocumentModel getThreadForComment(DocumentModel comment) throws CommentSecurityException
CommentManager
comment
- the commentCommentSecurityException
- if the current user does not have the right permissions on the commented
document.public Comment createComment(CoreSession session, Comment comment) throws CommentNotFoundException, CommentSecurityException
CommentManager
session
- the core sessionCommentNotFoundException
- if the document to comment, i.e. comment's parent, does not exist.CommentSecurityException
- if the current user does not have the right permissions on the document to
comment.public Comment getComment(CoreSession session, String commentId) throws CommentNotFoundException, CommentSecurityException
CommentManager
session
- the core sessioncommentId
- the comment idCommentNotFoundException
- if the comment does not existCommentSecurityException
- if the current user does not have the right permissions on the commented
document.public PartialList<Comment> getComments(CoreSession session, String documentId, Long pageSize, Long currentPageIndex, boolean sortAscending) throws CommentSecurityException
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 paginationsortAscending
- whether to sort ascending or descendingCommentSecurityException
- if the current user does not have the right permissions on the commented
document.public Comment updateComment(CoreSession session, String commentId, Comment comment) throws NuxeoException
CommentManager
session
- the core sessioncommentId
- the comment idcomment
- the updated commentCommentNotFoundException
- if no comment was found with the given id.CommentSecurityException
- if the current user does not have the right permissions on the commented
document.NuxeoException
public void deleteComment(CoreSession session, String commentId) throws CommentNotFoundException, CommentSecurityException
CommentManager
session
- the core sessioncommentId
- the comment idCommentNotFoundException
- if no comment was found with the given id.CommentSecurityException
- if the current user does not have the right permissions on the commented
document.public Comment getExternalComment(CoreSession session, String entityId) throws NuxeoException
CommentManager
session
- the core sessionentityId
- the external entity idCommentNotFoundException
- if no comment was found with the given external entity id.CommentSecurityException
- if the current user does not have the right permissions on the commented
document.NuxeoException
public Comment updateExternalComment(CoreSession session, String entityId, Comment comment) throws NuxeoException
CommentManager
session
- the core sessionentityId
- the external entity idcomment
- the comment containing the modificationsCommentNotFoundException
- if no comment was found with the given external entity id.CommentSecurityException
- if the current user does not have the right permissions on the commented
document.NuxeoException
public void deleteExternalComment(CoreSession session, String entityId) throws NuxeoException
CommentManager
session
- the core sessionentityId
- the external entity idCommentNotFoundException
- if no comment was found with the given external entity id.CommentSecurityException
- if the current user does not have the right permissions on the commented
document.NuxeoException
public boolean hasFeature(CommentManager.Feature feature)
CommentManager
Copyright © 2019 Nuxeo. All rights reserved.