Nuxeo ECM Projects 5.4.3-SNAPSHOT

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

java.lang.Object
  extended by org.nuxeo.ecm.platform.comment.impl.CommentableDocumentAdapter
All Implemented Interfaces:
Serializable, CommentableDocument

public class CommentableDocumentAdapter
extends Object
implements CommentableDocument

Author:
George Lefter
See Also:
Serialized Form

Constructor Summary
CommentableDocumentAdapter(DocumentModel docModel)
           
 
Method Summary
 DocumentModel addComment(DocumentModel comment)
          Creates a new comment.
 DocumentModel addComment(DocumentModel parent, DocumentModel comment)
          Creates a new comment as a reply to an existing comment.
 DocumentModel addComment(String comment)
          Deprecated. 
 List<DocumentModel> getComments()
          Returns all comments for this document.
 List<DocumentModel> getComments(DocumentModel parent)
          Returns the comments for this document that are replied to a parent comment.
 void removeComment(DocumentModel comment)
          Removes a comment from the document comment list.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommentableDocumentAdapter

public CommentableDocumentAdapter(DocumentModel docModel)
Method Detail

addComment

public DocumentModel addComment(DocumentModel comment)
                         throws ClientException
Description copied from interface: CommentableDocument
Creates a new comment.

Specified by:
addComment in interface CommentableDocument
Throws:
ClientException

addComment

@Deprecated
public DocumentModel addComment(String comment)
                         throws ClientException
Deprecated. 

Throws:
ClientException

addComment

public DocumentModel addComment(DocumentModel parent,
                                DocumentModel comment)
                         throws ClientException
Description copied from interface: CommentableDocument
Creates a new comment as a reply to an existing comment.

Specified by:
addComment in interface CommentableDocument
Parameters:
parent - the parent comment, which must exist
comment - the comment to be added
Throws:
ClientException

removeComment

public void removeComment(DocumentModel comment)
                   throws ClientException
Description copied from interface: CommentableDocument
Removes a comment from the document comment list.

Specified by:
removeComment in interface CommentableDocument
Throws:
ClientException

getComments

public List<DocumentModel> getComments()
                                throws ClientException
Description copied from interface: CommentableDocument
Returns all comments for this document.

Specified by:
getComments in interface CommentableDocument
Returns:
the list of comments
Throws:
ClientException

getComments

public List<DocumentModel> getComments(DocumentModel parent)
                                throws ClientException
Description copied from interface: CommentableDocument
Returns the comments for this document that are replied to a parent comment.

Specified by:
getComments in interface CommentableDocument
Parameters:
parent - the parent comment
Returns:
the comments for the parent comment
Throws:
ClientException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.