org.nuxeo.ecm.platform.comment.ejb
Class CommentManagerBean
java.lang.Object
org.nuxeo.ecm.platform.comment.ejb.CommentManagerBean
- All Implemented Interfaces:
- CommentManager, CommentManagerLocal
public class CommentManagerBean
- extends java.lang.Object
- implements CommentManagerLocal
- Author:
- George Lefter
Method Summary |
void |
cleanup()
|
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. |
void |
initialize()
|
void |
remove()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommentManagerBean
public CommentManagerBean()
initialize
@PostConstruct
public void initialize()
cleanup
public void cleanup()
remove
public void remove()
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,
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 commentcomment
- the comment contentauthor
- the comment author
- Returns:
- the comment document model.
- 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
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,
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 commentcomment
- the comment contentpath
- the location path
- Returns:
- the comment document model.
- Throws:
ClientException
Copyright © 2010 Nuxeo SAS. All Rights Reserved.