Class PropertyCommentManager
- java.lang.Object
-
- org.nuxeo.ecm.platform.comment.impl.AbstractCommentManager
-
- org.nuxeo.ecm.platform.comment.impl.PropertyCommentManager
-
- All Implemented Interfaces:
CommentManager
@Deprecated(since="11.1") public class PropertyCommentManager extends AbstractCommentManager
Deprecated.since 11.1, useTreeCommentManagerinsteadComment service implementation. The comments are linked together thanks to a parent document id property.- Since:
- 10.3
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.nuxeo.ecm.platform.comment.api.CommentManager
CommentManager.Feature
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringCOMMENT_NAMEDeprecated.protected static StringGET_COMMENT_PAGEPROVIDER_NAMEDeprecated.since 11.1, useGET_EXTERNAL_COMMENT_PAGEPROVIDER_NAMEinsteadprotected static StringGET_COMMENTS_FOR_DOC_PAGEPROVIDER_NAMEDeprecated.protected static StringGET_COMMENTS_FOR_DOCS_PAGEPROVIDER_NAMEDeprecated.protected static StringGET_EXTERNAL_COMMENT_PAGEPROVIDER_NAMEDeprecated.protected static StringHIDDEN_FOLDER_TYPEDeprecated.-
Fields inherited from class org.nuxeo.ecm.platform.comment.impl.AbstractCommentManager
COMMENTS_DIRECTORY
-
-
Constructor Summary
Constructors Constructor Description PropertyCommentManager()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CommentcreateComment(CoreSession session, Comment comment)Deprecated.Creates a comment.DocumentModelcreateComment(DocumentModel docModel, String comment)Deprecated.Creates a comment.DocumentModelcreateComment(DocumentModel docModel, String text, String author)Deprecated.Creates a comment document model, filling its properties with given info and linking it to given document.DocumentModelcreateComment(DocumentModel docModel, DocumentModel commentModel)Deprecated.Creates a comment document model, filling its properties with given info and linking it to given document.DocumentModelcreateComment(DocumentModel docModel, DocumentModel parent, DocumentModel child)Deprecated.Creates a comment document model, filling its properties with given info and linking it to given document.DocumentModelcreateLocatedComment(DocumentModel docModel, DocumentModel comment, String path)Deprecated.Creates a comment document model.voiddeleteComment(CoreSession session, String commentId)Deprecated.Deletes a comment.voiddeleteComment(DocumentModel docModel, DocumentModel comment)Deprecated.Deletes a comment.voiddeleteExternalComment(CoreSession session, String documentId, String entityId)Deprecated.Deletes an external comment by its {code entityId} under the document withdocumentId.protected DocumentRefgetAncestorRef(CoreSession session, DocumentModel documentModel)Deprecated.CommentgetComment(CoreSession session, String commentId)Deprecated.Gets a comment.protected StringgetCommentContainerPath(CoreSession session, String commentedDocumentId)Deprecated.protected DocumentModelgetCommentedDocument(CoreSession session, DocumentModel commentDoc)Deprecated.PartialList<Comment>getComments(CoreSession session, String documentId, Long pageSize, Long currentPageIndex, boolean sortAscending)Deprecated.Gets all comments for a document.List<Comment>getComments(CoreSession session, Collection<String> documentIds)Deprecated.Gets all comments for a collection of documents.List<DocumentModel>getComments(CoreSession session, DocumentModel docModel)Deprecated.Gets comments of a document.List<DocumentModel>getComments(DocumentModel docModel, DocumentModel parent)Deprecated.Get comments of a document.List<DocumentModel>getDocumentsForComment(DocumentModel comment)Deprecated.Gets documents in relation with a particular comment.CommentgetExternalComment(CoreSession session, String documentId, String entityId)Deprecated.Gets an external comment by itsentityIdunder the document withdocumentId.protected DocumentModelgetExternalCommentModel(CoreSession session, String documentId, String entityId)Deprecated.protected DocumentModelgetThreadForComment(CoreSession s, DocumentModel comment)Deprecated.DocumentModelgetThreadForComment(DocumentModel comment)Deprecated.Gets thread in relation with a given comment (post or comment).protected DocumentModelgetTopLevelDocument(CoreSession s, DocumentModel commentDoc)Deprecated.booleanhasFeature(CommentManager.Feature feature)Deprecated.Checks if a feature is available.CommentupdateComment(CoreSession session, String commentId, Comment comment)Deprecated.Updates a comment.CommentupdateExternalComment(CoreSession session, String documentId, String entityId, Comment comment)Deprecated.Updates an external comment by itsentityIdunder the document withdocumentId.-
Methods inherited from class org.nuxeo.ecm.platform.comment.impl.AbstractCommentManager
computeAncestorIds, fillCommentForCreation, getAuthor, getComments, getComments, getComments, getComments, getTopLevelDocumentRef, notifyEvent, notifyEvent, notifyEvent, setCommentPermissions, setFolderPermissions
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.platform.comment.api.CommentManager
deleteExternalComment, getExternalComment, updateExternalComment
-
-
-
-
Field Detail
-
GET_COMMENT_PAGEPROVIDER_NAME
@Deprecated(since="11.1") protected static final String GET_COMMENT_PAGEPROVIDER_NAME
Deprecated.since 11.1, useGET_EXTERNAL_COMMENT_PAGEPROVIDER_NAMEinstead- See Also:
- Constant Field Values
-
GET_EXTERNAL_COMMENT_PAGEPROVIDER_NAME
protected static final String GET_EXTERNAL_COMMENT_PAGEPROVIDER_NAME
Deprecated.- Since:
- 11.1
- See Also:
- Constant Field Values
-
GET_COMMENTS_FOR_DOC_PAGEPROVIDER_NAME
protected static final String GET_COMMENTS_FOR_DOC_PAGEPROVIDER_NAME
Deprecated.- See Also:
- Constant Field Values
-
GET_COMMENTS_FOR_DOCS_PAGEPROVIDER_NAME
protected static final String GET_COMMENTS_FOR_DOCS_PAGEPROVIDER_NAME
Deprecated.- See Also:
- Constant Field Values
-
HIDDEN_FOLDER_TYPE
protected static final String HIDDEN_FOLDER_TYPE
Deprecated.- See Also:
- Constant Field Values
-
COMMENT_NAME
protected static final String COMMENT_NAME
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
getComments
public List<DocumentModel> getComments(CoreSession session, DocumentModel docModel) throws CommentSecurityException
Deprecated.Description copied from interface:CommentManagerGets comments of a document.- Parameters:
session- the core sessiondocModel- the document model- Returns:
- the list of comments
- Throws:
CommentSecurityException- if the current user does not have the right permissions on the commented document
-
getComments
public List<DocumentModel> getComments(DocumentModel docModel, DocumentModel parent)
Deprecated.Description copied from interface:CommentManagerGet comments of a document.- Specified by:
getCommentsin interfaceCommentManager- Overrides:
getCommentsin classAbstractCommentManager- Parameters:
docModel- the document modelparent- the parent document model- Returns:
- the list of comments
-
createComment
public DocumentModel createComment(DocumentModel docModel, String comment)
Deprecated.Description copied from interface:CommentManagerCreates a comment.- Parameters:
docModel- the document to commentcomment- the comment content
-
createComment
public DocumentModel createComment(DocumentModel docModel, String text, String author)
Deprecated.Description copied from interface:CommentManagerCreates a comment document model, filling its properties with given info and linking it to given document.- Parameters:
docModel- the document to commenttext- the comment contentauthor- the comment author- Returns:
- the comment document model.
-
createComment
public DocumentModel createComment(DocumentModel docModel, DocumentModel commentModel) throws CommentSecurityException
Deprecated.Description copied from interface:CommentManagerCreates a comment document model, filling its properties with given info and linking it to given document.- Parameters:
docModel- the document to commentcommentModel- the comment document model- Returns:
- the created comment document model.
- Throws:
CommentSecurityException- if the current user does not have the right permissions on the document to comment.
-
createComment
public DocumentModel createComment(DocumentModel docModel, DocumentModel parent, DocumentModel child)
Deprecated.Description copied from interface:CommentManagerCreates a comment document model, filling its properties with given info and linking it to given document.- Parameters:
docModel- the document to commentparent- the comment parent document modelchild- the comment child document model- Returns:
- the created comment document model.
-
deleteComment
public void deleteComment(DocumentModel docModel, DocumentModel comment)
Deprecated.Description copied from interface:CommentManagerDeletes a comment.- Parameters:
docModel- the comment document modelcomment- the comment
-
getDocumentsForComment
public List<DocumentModel> getDocumentsForComment(DocumentModel comment)
Deprecated.Description copied from interface:CommentManagerGets documents in relation with a particular comment.- Parameters:
comment- the comment- Returns:
- the list of documents
-
getThreadForComment
public DocumentModel getThreadForComment(DocumentModel comment) throws CommentSecurityException
Deprecated.Description copied from interface:CommentManagerGets thread in relation with a given comment (post or comment).- Parameters:
comment- the comment- Returns:
- the thread
- Throws:
CommentSecurityException- if the current user does not have the right permissions on the commented document.
-
createLocatedComment
public DocumentModel createLocatedComment(DocumentModel docModel, DocumentModel comment, String path)
Deprecated.Description copied from interface:CommentManagerCreates a comment document model. It gives opportunity to save the comments in a specified location.- Parameters:
docModel- the document to commentcomment- the comment contentpath- the location path- Returns:
- the comment document model.
-
createComment
public Comment createComment(CoreSession session, Comment comment) throws CommentNotFoundException, CommentSecurityException
Deprecated.Description copied from interface:CommentManagerCreates a comment.- Parameters:
session- the core session- Returns:
- the created comment
- Throws:
CommentNotFoundException- 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.
-
getComment
public Comment getComment(CoreSession session, String commentId) throws CommentNotFoundException, CommentSecurityException
Deprecated.Description copied from interface:CommentManagerGets a comment.- Parameters:
session- the core sessioncommentId- the comment id- Returns:
- the comment
- Throws:
CommentNotFoundException- if the comment does not existCommentSecurityException- if the current user does not have the right permissions on the commented document.
-
getComments
public PartialList<Comment> getComments(CoreSession session, String documentId, Long pageSize, Long currentPageIndex, boolean sortAscending) throws CommentSecurityException
Deprecated.Description copied from interface:CommentManagerGets all comments for a document.- Parameters:
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 descending- Returns:
- the list of comments, ordered by comment's creation date and according to sortAscending parameter, or an empty list if no comment is found.
- Throws:
CommentSecurityException- if the current user does not have the right permissions on the commented document.
-
getComments
public List<Comment> getComments(CoreSession session, Collection<String> documentIds)
Deprecated.Description copied from interface:CommentManagerGets all comments for a collection of documents.- Parameters:
session- the core sessiondocumentIds- the document ids- Returns:
- the list of comments
-
updateComment
public Comment updateComment(CoreSession session, String commentId, Comment comment) throws CommentNotFoundException
Deprecated.Description copied from interface:CommentManagerUpdates a comment.- Parameters:
session- the core sessioncommentId- the comment idcomment- the updated comment- Returns:
- the updated comment
- Throws:
CommentNotFoundException- if no comment was found with the given id.
-
deleteComment
public void deleteComment(CoreSession session, String commentId) throws CommentNotFoundException, CommentSecurityException
Deprecated.Description copied from interface:CommentManagerDeletes a comment.- Parameters:
session- the core sessioncommentId- the comment id- Throws:
CommentNotFoundException- if no comment was found with the given id.CommentSecurityException- if the current user does not have the right permissions on the commented document.
-
getExternalComment
public Comment getExternalComment(CoreSession session, String documentId, String entityId) throws CommentNotFoundException
Deprecated.Description copied from interface:CommentManagerGets an external comment by itsentityIdunder the document withdocumentId.- Returns:
- the comment with given
entityIdunder the document with givendocumentId - Throws:
CommentNotFoundException- if no comment was found with the given external entity id
-
updateExternalComment
public Comment updateExternalComment(CoreSession session, String documentId, String entityId, Comment comment) throws CommentNotFoundException
Deprecated.Description copied from interface:CommentManagerUpdates an external comment by itsentityIdunder the document withdocumentId.- Returns:
- the updated comment with given
entityIdunder the document with givendocumentId - Throws:
CommentNotFoundException- if no comment was found with the given external entity id
-
deleteExternalComment
public void deleteExternalComment(CoreSession session, String documentId, String entityId) throws CommentNotFoundException
Deprecated.Description copied from interface:CommentManagerDeletes an external comment by its {code entityId} under the document withdocumentId.- Throws:
CommentNotFoundException- if no comment was found with the given external entity id
-
hasFeature
public boolean hasFeature(CommentManager.Feature feature)
Deprecated.Description copied from interface:CommentManagerChecks if a feature is available.
-
getTopLevelDocument
protected DocumentModel getTopLevelDocument(CoreSession s, DocumentModel commentDoc)
Deprecated.- Specified by:
getTopLevelDocumentin classAbstractCommentManager
-
getExternalCommentModel
protected DocumentModel getExternalCommentModel(CoreSession session, String documentId, String entityId)
Deprecated.
-
getCommentContainerPath
protected String getCommentContainerPath(CoreSession session, String commentedDocumentId)
Deprecated.
-
getAncestorRef
protected DocumentRef getAncestorRef(CoreSession session, DocumentModel documentModel)
Deprecated.
-
getThreadForComment
protected DocumentModel getThreadForComment(CoreSession s, DocumentModel comment) throws CommentSecurityException
Deprecated.- Throws:
CommentSecurityException
-
getCommentedDocument
protected DocumentModel getCommentedDocument(CoreSession session, DocumentModel commentDoc)
Deprecated.- Specified by:
getCommentedDocumentin classAbstractCommentManager
-
-