org.apache.sling.sample.slingshot.comments

## Interface CommentsService

All Known Implementing Classes:
  CommentsServiceImpl

    public interface CommentsService

Service for handling the comments

### Method Summary

All Methods Instance Methods Abstract Methods
`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.

### Method Detail

#### getCommentsResourcePath

    String getCommentsResourcePath(org.apache.sling.api.resource.Resource resource)

Return the path to the comments resource for a resource.

Parameters:
  `resource` - The content resource, this is usually an entry.
Returns:
  The path to the comments resource or `null` if the passed in content resource is not part of Slingshot.

#### addComment

    void addComment(org.apache.sling.api.resource.Resource resource,
                    Comment c)
             throws org.apache.sling.api.resource.PersistenceException

Add a comment to the resource

Parameters:
  `resource` - The resource
  `c` - The commoent
Throws:
  `org.apache.sling.api.resource.PersistenceException` - If the comment can't be added