public class CommentsServiceImpl extends Object implements CommentsService
Modifier and Type | Field and Description |
---|---|
static String |
RESOURCETYPE_COMMENTS
The resource type for the comments holder.
|
Constructor and Description |
---|
CommentsServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addComment(org.apache.sling.api.resource.Resource resource,
Comment c)
Add a comment to the resource
|
String |
getCommentsResourcePath(org.apache.sling.api.resource.Resource resource)
Return the path to the comments resource for a resource.
|
public static final String RESOURCETYPE_COMMENTS
public String getCommentsResourcePath(org.apache.sling.api.resource.Resource resource)
CommentsService
getCommentsResourcePath
in interface CommentsService
resource
- The content resource, this is usually an entry.null
if
the passed in content resource is not part of
Slingshot.CommentsService.getCommentsResourcePath(org.apache.sling.api.resource.Resource)
public void addComment(org.apache.sling.api.resource.Resource resource, Comment c) throws org.apache.sling.api.resource.PersistenceException
CommentsService
addComment
in interface CommentsService
resource
- The resourcec
- The commoentorg.apache.sling.api.resource.PersistenceException
- If the comment can't be addedCommentsService.addComment(org.apache.sling.api.resource.Resource, org.apache.sling.sample.slingshot.comments.Comment)
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.