public class CommentService extends DefaultAdapter
Accepts the following methods:
Constructor and Description |
---|
CommentService() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
approve() |
protected void |
approveComent(CoreSession session,
DocumentModel target,
DocumentModel comment)
Can be overwritten to allow workflow.
|
protected DocumentModel |
createCommentDocument(CoreSession session,
DocumentModel target,
DocumentModel comment)
Can be overwritten to allow creation of localized comment.
|
javax.ws.rs.core.Response |
deleteComment() |
protected void |
deleteComment(DocumentModel target,
DocumentModel comment)
Can be overwritten to allow workflow.
|
javax.ws.rs.core.Response |
doPost(String cText) |
static CommentManager |
getCommentManager() |
static CommentsModerationService |
getCommentsModerationService() |
protected void |
publishComment(CoreSession session,
DocumentModel target,
DocumentModel comment)
Can be overwritten to allow workflow.
|
javax.ws.rs.core.Response |
reject() |
protected void |
rejectComment(CoreSession session,
DocumentModel target,
DocumentModel comment)
Can be overwritten to allow workflow.
|
javax.ws.rs.core.Response |
remove() |
disptachAdapter, getTarget, isAdapter
checkGuard, dispose, getActiveAdapter, getAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, initialize, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
checkGuard, dispose, getActiveAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot
getAdapter
public CommentService()
public javax.ws.rs.core.Response reject()
public javax.ws.rs.core.Response approve()
public javax.ws.rs.core.Response remove()
public javax.ws.rs.core.Response deleteComment()
public static CommentManager getCommentManager()
public static CommentsModerationService getCommentsModerationService()
protected DocumentModel createCommentDocument(CoreSession session, DocumentModel target, DocumentModel comment)
session
- the core sessiontarget
- commented documentcomment
- comment itselfprotected void publishComment(CoreSession session, DocumentModel target, DocumentModel comment)
session
- the core sessiontarget
- commented documentcomment
- comment itselfprotected void deleteComment(DocumentModel target, DocumentModel comment)
target
- commented documentcomment
- comment itselfprotected void rejectComment(CoreSession session, DocumentModel target, DocumentModel comment)
target
- commented documentcomment
- comment itselfprotected void approveComent(CoreSession session, DocumentModel target, DocumentModel comment)
target
- commented documentcomment
- comment itselfCopyright © 2018 Nuxeo. All rights reserved.