org.nuxeo.ecm.platform.comment.impl
Class CommentManagerImpl
java.lang.Object
org.nuxeo.ecm.platform.comment.impl.CommentManagerImpl
- All Implemented Interfaces:
- CommentManager
public class CommentManagerImpl
- extends Object
- implements CommentManager
- Author:
- George Lefter
Method Summary |
DocumentModel |
createComment(DocumentModel docModel,
DocumentModel comment)
|
DocumentModel |
createComment(DocumentModel docModel,
DocumentModel parent,
DocumentModel child)
|
DocumentModel |
createComment(DocumentModel docModel,
String comment)
|
DocumentModel |
createComment(DocumentModel docModel,
String comment,
String author)
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)
Creates a comment document model. |
void |
deleteComment(DocumentModel docModel,
DocumentModel comment)
|
List<DocumentModel> |
getComments(DocumentModel docModel)
|
List<DocumentModel> |
getComments(DocumentModel docModel,
DocumentModel parent)
|
List<DocumentModel> |
getDocumentsForComment(DocumentModel comment)
Gets documents in relation with a particular comment. |
DocumentModel |
getThreadForComment(DocumentModel comment)
Gets thread in relation with a given comment (post or comment) |
COMMENTS_DIRECTORY
public static final String COMMENTS_DIRECTORY
- See Also:
- Constant Field Values
CommentManagerImpl
public CommentManagerImpl(CommentServiceConfig config)
getComments
public List<DocumentModel> getComments(DocumentModel docModel)
throws ClientException
- Specified by:
getComments
in interface CommentManager
- Throws:
ClientException
createComment
public DocumentModel createComment(DocumentModel docModel,
String comment,
String author)
throws ClientException
- Description copied from interface:
CommentManager
- Creates a comment document model, filling its properties with given info
and linking it to given document.
- Specified by:
createComment
in interface CommentManager
- Parameters:
docModel
- the document to commentcomment
- the comment contentauthor
- the comment author
- Returns:
- the comment document model.
- Throws:
ClientException
createComment
public DocumentModel createComment(DocumentModel docModel,
String comment)
throws ClientException
- Specified by:
createComment
in interface CommentManager
- Throws:
ClientException
createComment
public DocumentModel createComment(DocumentModel docModel,
DocumentModel comment)
throws ClientException
- Specified by:
createComment
in interface CommentManager
- Throws:
ClientException
deleteComment
public void deleteComment(DocumentModel docModel,
DocumentModel comment)
throws ClientException
- Specified by:
deleteComment
in interface CommentManager
- Throws:
ClientException
createComment
public DocumentModel createComment(DocumentModel docModel,
DocumentModel parent,
DocumentModel child)
throws ClientException
- Specified by:
createComment
in interface CommentManager
- Throws:
ClientException
getComments
public List<DocumentModel> getComments(DocumentModel docModel,
DocumentModel parent)
throws ClientException
- Specified by:
getComments
in interface CommentManager
- Throws:
ClientException
getDocumentsForComment
public List<DocumentModel> getDocumentsForComment(DocumentModel comment)
throws ClientException
- Description copied from interface:
CommentManager
- Gets documents in relation with a particular comment.
- Specified by:
getDocumentsForComment
in interface CommentManager
- Parameters:
comment
- the comment
- Returns:
- the list of documents
- Throws:
ClientException
createLocatedComment
public DocumentModel createLocatedComment(DocumentModel docModel,
DocumentModel comment,
String path)
throws ClientException
- Description copied from interface:
CommentManager
- Creates a comment document model. It gives opportunity to save the comments in a
specified location.
- Specified by:
createLocatedComment
in interface CommentManager
- Parameters:
docModel
- the document to commentcomment
- the comment contentpath
- the location path
- Returns:
- the comment document model.
- Throws:
ClientException
getThreadForComment
public DocumentModel getThreadForComment(DocumentModel comment)
throws ClientException
- Description copied from interface:
CommentManager
- Gets thread in relation with a given comment (post or comment)
- Specified by:
getThreadForComment
in interface CommentManager
- Returns:
-
- Throws:
ClientException
Copyright © 2011 Nuxeo SAS. All Rights Reserved.