com.atlassian.confluence.content.service
Interface CommentService

All Known Implementing Classes:
DefaultCommentService

public interface CommentService

Service interface for manipulating Comments.

See Also:
Confluence Service Layer Documentation

Method Summary
 CreateCommentCommand newCreateCommentCommand(long pageId, long parentCommentId, java.lang.String content)
          Retrieve a command to add a new command to some content, threaded below some other comment.
 CreateCommentCommand newCreateCommentCommand(long pageId, java.lang.String content)
          Retrieve a command to create a new comment and add it to some content.
 DeleteCommentCommand newDeleteCommentCommand(long commentId)
          Retrieve a command to delete an existing comment
 EditCommentCommand newEditCommentCommand(long commentId, java.lang.String newContent)
          Retrieve a command to edit the contents of a comment.
 

Method Detail

newDeleteCommentCommand

DeleteCommentCommand newDeleteCommentCommand(long commentId)
Retrieve a command to delete an existing comment

Parameters:
commentId - the ID of the comment to delete
Returns:
an appropriate command instance

newCreateCommentCommand

CreateCommentCommand newCreateCommentCommand(long pageId,
                                             java.lang.String content)
Retrieve a command to create a new comment and add it to some content. The content must be an instance of AbstractPage (i.e. a page or blog post.)

Parameters:
pageId - the ID of the AbstractPage to attach the comment to
content - the content of the comment
Returns:
an appropriate command instance

newCreateCommentCommand

CreateCommentCommand newCreateCommentCommand(long pageId,
                                             long parentCommentId,
                                             java.lang.String content)
Retrieve a command to add a new command to some content, threaded below some other comment. The parent comment must (obviously) be attached to the page provided

Parameters:
pageId - the ID of the AbstractPage to attach the comment to
parentCommentId - the ID of the comment that is the parent of this comment in a thread
content - the content of the comment
Returns:
an appropriate command instance

newEditCommentCommand

EditCommentCommand newEditCommentCommand(long commentId,
                                         java.lang.String newContent)
Retrieve a command to edit the contents of a comment.

Parameters:
commentId - the id of the comment to edit
newContent - the new body of the content
Returns:
an appropriate command instance


Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.