Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.comment.impl
Class CommentManagerImpl

java.lang.Object
  extended by org.nuxeo.ecm.platform.comment.impl.CommentManagerImpl
All Implemented Interfaces:
CommentManager

public class CommentManagerImpl
extends java.lang.Object
implements CommentManager

Author:
George Lefter

Field Summary
static java.lang.String COMMENTS_DIRECTORY
           
 
Constructor Summary
CommentManagerImpl(CommentServiceConfig config)
           
 
Method Summary
 DocumentModel createComment(DocumentModel docModel, DocumentModel comment)
           
 DocumentModel createComment(DocumentModel docModel, DocumentModel parent, DocumentModel child)
           
 DocumentModel createComment(DocumentModel docModel, java.lang.String comment)
           
 DocumentModel createComment(DocumentModel docModel, java.lang.String comment, java.lang.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, java.lang.String path)
          Creates a comment document model.
 void deleteComment(DocumentModel docModel, DocumentModel comment)
           
 java.util.List<DocumentModel> getComments(DocumentModel docModel)
           
 java.util.List<DocumentModel> getComments(DocumentModel docModel, DocumentModel parent)
           
 java.util.List<DocumentModel> getDocumentsForComment(DocumentModel comment)
          Gets documents in relation with a particular comment.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMENTS_DIRECTORY

public static final java.lang.String COMMENTS_DIRECTORY
See Also:
Constant Field Values
Constructor Detail

CommentManagerImpl

public CommentManagerImpl(CommentServiceConfig config)
Method Detail

getComments

public java.util.List<DocumentModel> getComments(DocumentModel docModel)
                                          throws ClientException
Specified by:
getComments in interface CommentManager
Throws:
ClientException

createComment

public DocumentModel createComment(DocumentModel docModel,
                                   java.lang.String comment,
                                   java.lang.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 comment
comment - the comment content
author - the comment author
Returns:
the comment document model.
Throws:
ClientException

createComment

public DocumentModel createComment(DocumentModel docModel,
                                   java.lang.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 java.util.List<DocumentModel> getComments(DocumentModel docModel,
                                                 DocumentModel parent)
                                          throws ClientException
Specified by:
getComments in interface CommentManager
Throws:
ClientException

getDocumentsForComment

public java.util.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,
                                          java.lang.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 comment
comment - the comment content
path - the location path
Returns:
the comment document model.
Throws:
ClientException

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.