Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.comment.api
Interface CommentManager

All Known Implementing Classes:
CommentManagerImpl

public interface 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)
          Deprecated. CommentManager cannot find the author if invoked remotely so one should use createComment(DocumentModel, String, String)
 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)
 

Method Detail

getComments

List<DocumentModel> getComments(DocumentModel docModel)
                                throws ClientException
Throws:
ClientException

getComments

List<DocumentModel> getComments(DocumentModel docModel,
                                DocumentModel parent)
                                throws ClientException
Throws:
ClientException

createComment

@Deprecated
DocumentModel createComment(DocumentModel docModel,
                                       String comment)
                            throws ClientException
Deprecated. CommentManager cannot find the author if invoked remotely so one should use createComment(DocumentModel, String, String)

Throws:
ClientException

createComment

DocumentModel createComment(DocumentModel docModel,
                            String comment,
                            String author)
                            throws ClientException
Creates a comment document model, filling its properties with given info and linking it to given document.

Parameters:
docModel - the document to comment
comment - the comment content
author - the comment author
Returns:
the comment document model.
Throws:
ClientException

createComment

DocumentModel createComment(DocumentModel docModel,
                            DocumentModel comment)
                            throws ClientException
Throws:
ClientException

createComment

DocumentModel createComment(DocumentModel docModel,
                            DocumentModel parent,
                            DocumentModel child)
                            throws ClientException
Throws:
ClientException

deleteComment

void deleteComment(DocumentModel docModel,
                   DocumentModel comment)
                   throws ClientException
Throws:
ClientException

getDocumentsForComment

List<DocumentModel> getDocumentsForComment(DocumentModel comment)
                                           throws ClientException
Gets documents in relation with a particular comment.

Parameters:
comment - the comment
Returns:
the list of documents
Throws:
ClientException

getThreadForComment

DocumentModel getThreadForComment(DocumentModel comment)
                                  throws ClientException
Gets thread in relation with a given comment (post or comment)

Parameters:
comment -
Returns:
Throws:
ClientException
Since:
5.4.3

createLocatedComment

DocumentModel createLocatedComment(DocumentModel docModel,
                                   DocumentModel comment,
                                   String path)
                                   throws ClientException
Creates a comment document model. It gives opportunity to save the comments in a specified location.

Parameters:
docModel - the document to comment
comment - the comment content
path - the location path
Returns:
the comment document model.
Throws:
ClientException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.