com.atlassian.confluence.tinymceplugin.rest
Class PageResource

java.lang.Object
  extended by com.atlassian.confluence.tinymceplugin.rest.PageResource

public class PageResource
extends java.lang.Object

REST resource to allowing the creation of a comment against Confluence content. This resource lives in the TinyMCE plugin because it operates on Editor formatted comment content.

For retrieval of Comments see the resource ContentResource or com.atlassian.confluence.plugins.mobile.rest.ContentResource.


Constructor Summary
PageResource(CommentService commentService, NotificationManager notificationManager, CommentRenderService commentRenderService, CaptchaManager captchaManager, FormatConverter converter, PageManager pageManager, PermissionManager permissionManager, com.atlassian.xwork.XsrfTokenGenerator tokenGenerator)
           
 
Method Summary
 javax.ws.rs.core.Response add(java.lang.Long contentId, java.lang.Long parentCommentId, java.lang.String html, boolean watch, boolean actions, java.lang.String uuid, javax.servlet.http.HttpServletRequest req)
          Create a reply to to the identified comment.
 javax.ws.rs.core.Response add(java.lang.Long contentId, java.lang.String html, boolean watch, boolean actions, java.lang.String uuid, 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 edit(java.lang.Long commentId, java.lang.String html, boolean watch, boolean actions, javax.servlet.http.HttpServletRequest req)
           
 javax.ws.rs.core.Response getEditorContent(java.lang.Long contentId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageResource

public PageResource(CommentService commentService,
                    NotificationManager notificationManager,
                    CommentRenderService commentRenderService,
                    CaptchaManager captchaManager,
                    FormatConverter converter,
                    PageManager pageManager,
                    PermissionManager permissionManager,
                    com.atlassian.xwork.XsrfTokenGenerator tokenGenerator)
Method Detail

getEditorContent

public javax.ws.rs.core.Response getEditorContent(java.lang.Long contentId)

add

public javax.ws.rs.core.Response add(java.lang.Long contentId,
                                     java.lang.String html,
                                     boolean watch,
                                     boolean actions,
                                     java.lang.String uuid,
                                     @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(java.lang.Long contentId,
                                     java.lang.Long parentCommentId,
                                     java.lang.String html,
                                     boolean watch,
                                     boolean actions,
                                     java.lang.String uuid,
                                     @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.

edit

public javax.ws.rs.core.Response edit(java.lang.Long commentId,
                                      java.lang.String html,
                                      boolean watch,
                                      boolean actions,
                                      @Context
                                      javax.servlet.http.HttpServletRequest req)


Copyright © 2003-2014 Atlassian. All Rights Reserved.