Class CommentableDocumentAdapter
- java.lang.Object
-
- org.nuxeo.ecm.platform.comment.impl.CommentableDocumentAdapter
-
- All Implemented Interfaces:
Serializable,CommentableDocument
public class CommentableDocumentAdapter extends Object implements CommentableDocument
- Author:
- George Lefter
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected CommentManagercommentManagerprotected DocumentModeldocModel
-
Constructor Summary
Constructors Constructor Description CommentableDocumentAdapter(DocumentModel docModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentModeladdComment(DocumentModel comment)Creates a new comment.DocumentModeladdComment(DocumentModel comment, String path)Creates a new comment in a specific location.DocumentModeladdComment(DocumentModel parent, DocumentModel comment)Creates a new comment as a reply to an existing comment.List<DocumentModel>getComments()Returns all comments for this document.List<DocumentModel>getComments(DocumentModel parent)Returns the comments for this document that are replied to a parent comment.voidremoveComment(DocumentModel comment)Removes a comment from the document comment list.
-
-
-
Field Detail
-
docModel
protected final DocumentModel docModel
-
commentManager
protected final CommentManager commentManager
-
-
Constructor Detail
-
CommentableDocumentAdapter
public CommentableDocumentAdapter(DocumentModel docModel)
-
-
Method Detail
-
addComment
public DocumentModel addComment(DocumentModel comment)
Description copied from interface:CommentableDocumentCreates a new comment.- Specified by:
addCommentin interfaceCommentableDocument
-
addComment
public DocumentModel addComment(DocumentModel comment, String path)
Description copied from interface:CommentableDocumentCreates a new comment in a specific location.- Specified by:
addCommentin interfaceCommentableDocument- Parameters:
comment- the comment to be addedpath- the given location
-
addComment
public DocumentModel addComment(DocumentModel parent, DocumentModel comment)
Description copied from interface:CommentableDocumentCreates a new comment as a reply to an existing comment.- Specified by:
addCommentin interfaceCommentableDocument- Parameters:
parent- the parent comment, which must existcomment- the comment to be added
-
removeComment
public void removeComment(DocumentModel comment)
Description copied from interface:CommentableDocumentRemoves a comment from the document comment list.- Specified by:
removeCommentin interfaceCommentableDocument
-
getComments
public List<DocumentModel> getComments()
Description copied from interface:CommentableDocumentReturns all comments for this document.- Specified by:
getCommentsin interfaceCommentableDocument- Returns:
- the list of comments
-
getComments
public List<DocumentModel> getComments(DocumentModel parent)
Description copied from interface:CommentableDocumentReturns the comments for this document that are replied to a parent comment.- Specified by:
getCommentsin interfaceCommentableDocument- Parameters:
parent- the parent comment- Returns:
- the comments for the parent comment
-
-