com.atlassian.confluence.plugins.quickcomment.rest
Class CommentResource

java.lang.Object
  extended by com.atlassian.confluence.plugins.quickcomment.rest.CommentResource

public class CommentResource
extends Object

REST resource to allowing the creation of a comment against Confluence content.


Constructor Summary
CommentResource(CommentService commentService, NotificationManager notificationManager, XhtmlContent xhtmlContent, com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager, UserAccessor userAccessor, CaptchaManager captchaManager)
           
 
Method Summary
 javax.ws.rs.core.Response add(Long contentId, Long parentCommentId, String html, boolean watch, boolean actions, javax.servlet.http.HttpServletRequest req)
          Create a reply to to the identified comment.
 javax.ws.rs.core.Response add(Long contentId, String html, boolean watch, boolean actions, javax.servlet.http.HttpServletRequest req)
          Create a top level comment on the identified content using the HTML supplied from the Editor.
 javax.ws.rs.core.Response createAndRender(CreateCommentCommand command, boolean watch, boolean actions, javax.servlet.http.HttpServletRequest req)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommentResource

public CommentResource(CommentService commentService,
                       NotificationManager notificationManager,
                       XhtmlContent xhtmlContent,
                       com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager,
                       UserAccessor userAccessor,
                       CaptchaManager captchaManager)
Method Detail

add

public javax.ws.rs.core.Response add(Long contentId,
                                     String html,
                                     boolean watch,
                                     boolean actions,
                                     @Context
                                     javax.servlet.http.HttpServletRequest req)
Create a top level comment on the identified content using the HTML supplied from the Editor.

Parameters:
contentId - the id of the content to comment on
html - the editor formatted html.
actions - if true then include the comment actions in the returned comment
Returns:
a CommentResult (or subclass depending on actions parameter) in the response.

add

public javax.ws.rs.core.Response add(Long contentId,
                                     Long parentCommentId,
                                     String html,
                                     boolean watch,
                                     boolean actions,
                                     @Context
                                     javax.servlet.http.HttpServletRequest req)
Create a reply to to the identified comment.

Parameters:
contentId - the id of the content to comment on
parentCommentId - the id of the comment to be replied to
html - the editor formatted html.
actions - if true then include the comment actions in the returned comment
Returns:
a CommentResult (or subclass depending on actions parameter) in the response.

createAndRender

public javax.ws.rs.core.Response createAndRender(CreateCommentCommand command,
                                                 boolean watch,
                                                 boolean actions,
                                                 @Context
                                                 javax.servlet.http.HttpServletRequest req)


Copyright © 2003-2012 Atlassian. All Rights Reserved.