public class CommentConnector extends BaseConnector implements org.exoplatform.services.rest.resource.ResourceContainer
fileHandler, fileUploadHandler, folderHandler, IF_MODIFIED_SINCE_DATE_FORMAT, LAST_MODIFIED_PROPERTY, linkManager, livePortalManagerService, repositoryService, votingService, webSchemaConfigService| Constructor and Description |
|---|
CommentConnector(CommentsService commentsService)
Instantiates a new tag connector.
|
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
addComment(String jcrPath,
String comment)
Adds a new comment to the content.
|
javax.ws.rs.core.Response |
deleteComment(String jcrPath,
String commentId)
Delete a comment of a content.
|
javax.ws.rs.core.Response |
getComments(String jcrPath)
Gets all comments for a specific content.
|
protected String |
getContentStorageType()
Gets the content storage type.
|
protected javax.jcr.Node |
getNode(String jcrPath)
Get the jcr node of the given jcr path
|
protected javax.jcr.Node |
getRootContentStorage(javax.jcr.Node parentNode)
Gets the root content storage.
|
buildXMLResponseCommon, buildXMLResponseForContentStorage, buildXMLResponseForPortal, buildXMLResponseForRoot, buildXMLResponseOnExpand, getContent, getContent, getCorrectContentStorage, getCurrentPortalNode, getResponse, getWebContentpublic CommentConnector(CommentsService commentsService)
commentsService - Service instantiation.public javax.ws.rs.core.Response addComment(String jcrPath, String comment) throws Exception
jcrPath - The JCR path of the content.comment - The comment to add.Exception - The exceptionpublic javax.ws.rs.core.Response getComments(String jcrPath) throws Exception
jcrPath - The JCR path of the content.Exception - The exceptionpublic javax.ws.rs.core.Response deleteComment(String jcrPath, String commentId) throws Exception
jcrPath - The JCR path of the content.commentId - The id of the comment to delete.Exception - The exceptionprotected javax.jcr.Node getNode(String jcrPath) throws Exception
jcrPath - Exceptionprotected javax.jcr.Node getRootContentStorage(javax.jcr.Node parentNode)
throws Exception
BaseConnectorgetRootContentStorage in class BaseConnectorparentNode - the nodeException - the exceptionprotected String getContentStorageType() throws Exception
BaseConnectorgetContentStorageType in class BaseConnectorException - the exceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.