public class CommentsServiceImpl extends Object implements CommentsService
| Constructor and Description |
|---|
CommentsServiceImpl(org.exoplatform.services.cache.CacheService cacheService,
MultiLanguageService multiLangService)
Constructor Method
|
| Modifier and Type | Method and Description |
|---|---|
void |
addComment(javax.jcr.Node node,
String commentor,
String email,
String site,
String comment,
String language)
Adds comment to a document.
|
void |
deleteComment(javax.jcr.Node commentNode)
Deletes comment of a document by a given comment node.
|
List<javax.jcr.Node> |
getComments(javax.jcr.Node document,
String language)
Gets all comments of a specified document node.
|
void |
updateComment(javax.jcr.Node commentNode,
String newComment)
Updates comment for a document.
|
public CommentsServiceImpl(org.exoplatform.services.cache.CacheService cacheService,
MultiLanguageService multiLangService)
throws Exception
cacheService - CacheService ObjectmultiLangService - MultiLanguageService ObjectExceptionpublic void addComment(javax.jcr.Node node,
String commentor,
String email,
String site,
String comment,
String language)
throws Exception
addComment in interface CommentsServicenode - The document node that is commented.commentor - Name of the current user.
If null, the commentor is considered as "anonymous".email - Email of the current user.
This param can be null.site - Site of the current user.
This param can be null.comment - Content of the comment.language - Language of the document that is commented.ExceptionNodepublic void updateComment(javax.jcr.Node commentNode,
String newComment)
throws Exception
updateComment in interface CommentsServicecommentNode - Node of the comment that will be updated.newComment - The new comment that is set for the node.Exceptionpublic void deleteComment(javax.jcr.Node commentNode)
throws Exception
deleteComment in interface CommentsServicecommentNode - The given comment node.Exceptionpublic List<javax.jcr.Node> getComments(javax.jcr.Node document, String language) throws Exception
getComments in interface CommentsServicedocument - The document node that is commented.language - Language of the document that is commented.ExceptionNodeCopyright © 2003–2019 eXo Platform SAS. All rights reserved.