public class CommentManagerImpl extends Object implements CommentManager
| Modifier and Type | Field and Description |
|---|---|
static String |
COMMENTS_DIRECTORY |
| Constructor and Description |
|---|
CommentManagerImpl(CommentServiceConfig config) |
| Modifier and Type | Method and Description |
|---|---|
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)
|
public static final String COMMENTS_DIRECTORY
public CommentManagerImpl(CommentServiceConfig config)
public List<DocumentModel> getComments(DocumentModel docModel) throws ClientException
getComments in interface CommentManagerClientExceptionpublic DocumentModel createComment(DocumentModel docModel, String comment, String author) throws ClientException
CommentManagercreateComment in interface CommentManagerdocModel - the document to commentcomment - the comment contentauthor - the comment authorClientExceptionpublic DocumentModel createComment(DocumentModel docModel, String comment) throws ClientException
createComment in interface CommentManagerClientExceptionpublic DocumentModel createComment(DocumentModel docModel, DocumentModel comment) throws ClientException
createComment in interface CommentManagerClientExceptionpublic void deleteComment(DocumentModel docModel, DocumentModel comment) throws ClientException
deleteComment in interface CommentManagerClientExceptionpublic DocumentModel createComment(DocumentModel docModel, DocumentModel parent, DocumentModel child) throws ClientException
createComment in interface CommentManagerClientExceptionpublic List<DocumentModel> getComments(DocumentModel docModel, DocumentModel parent) throws ClientException
getComments in interface CommentManagerClientExceptionpublic List<DocumentModel> getDocumentsForComment(DocumentModel comment) throws ClientException
CommentManagergetDocumentsForComment in interface CommentManagercomment - the commentClientExceptionpublic DocumentModel createLocatedComment(DocumentModel docModel, DocumentModel comment, String path) throws ClientException
CommentManagercreateLocatedComment in interface CommentManagerdocModel - the document to commentcomment - the comment contentpath - the location pathClientExceptionpublic DocumentModel getThreadForComment(DocumentModel comment) throws ClientException
CommentManagergetThreadForComment in interface CommentManagerClientExceptionCopyright © 2015 Nuxeo SA. All rights reserved.