Class PageResource
java.lang.Object
com.atlassian.confluence.tinymceplugin.rest.PageResource
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 com.atlassian.confluence.plugins.restapi.resources.ContentResource
or com.atlassian.confluence.plugins.mobile.rest.ContentResource.
-
Constructor Summary
ConstructorsConstructorDescriptionPageResource(CommentService commentService, NotificationManager notificationManager, CommentRenderService commentRenderService, CaptchaManager captchaManager, FormatConverter converter, PageManager pageManager, PermissionManager permissionManager, com.atlassian.struts.xsrf.XsrfTokenGenerator tokenGenerator, DraftsTransitionHelper draftsTransitionHelper, HeartbeatManager heartbeatManager, Differ differ, UserChecker userChecker, CollaborativeEditingHelper collaborativeEditingHelper, com.atlassian.event.api.EventPublisher eventPublisher, StorageFormatCleaner storageFormatCleaner, LicenseService licenseService) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Responseadd(Long contentId, Long parentCommentId, String html, boolean watch, boolean actions, String uuid, jakarta.servlet.http.HttpServletRequest req) Create a reply to to the identified comment.jakarta.ws.rs.core.Responseadd(Long contentId, String html, boolean watch, boolean actions, String uuid, jakarta.servlet.http.HttpServletRequest req) Create a top level comment on the identified content using the HTML supplied from the Editor.jakarta.ws.rs.core.Responseedit(Long commentId, String html, boolean watch, boolean actions, jakarta.servlet.http.HttpServletRequest req) jakarta.ws.rs.core.ResponsegetDraftDiff(Long contentId) jakarta.ws.rs.core.ResponsegetEditorContent(Long contentId)
-
Constructor Details
-
PageResource
@Inject public PageResource(CommentService commentService, NotificationManager notificationManager, CommentRenderService commentRenderService, CaptchaManager captchaManager, FormatConverter converter, PageManager pageManager, PermissionManager permissionManager, com.atlassian.struts.xsrf.XsrfTokenGenerator tokenGenerator, DraftsTransitionHelper draftsTransitionHelper, HeartbeatManager heartbeatManager, Differ differ, UserChecker userChecker, CollaborativeEditingHelper collaborativeEditingHelper, com.atlassian.event.api.EventPublisher eventPublisher, StorageFormatCleaner storageFormatCleaner, LicenseService licenseService)
-
-
Method Details
-
getDraftDiff
@GET @Path("/draft/diff") public jakarta.ws.rs.core.Response getDraftDiff(@PathParam("id") Long contentId) -
getEditorContent
-
add
@POST @Path("/comment") public jakarta.ws.rs.core.Response add(@PathParam("id") Long contentId, @FormParam("html") String html, @FormParam("watch") boolean watch, @QueryParam("actions") @DefaultValue("false") boolean actions, @FormParam("uuid") @DefaultValue("") String uuid, @Context jakarta.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 onhtml- 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
@POST @Path("/comments/{parentCommentId}/comment") public jakarta.ws.rs.core.Response add(@PathParam("id") Long contentId, @PathParam("parentCommentId") Long parentCommentId, @FormParam("html") String html, @FormParam("watch") boolean watch, @QueryParam("actions") @DefaultValue("false") boolean actions, @FormParam("uuid") @DefaultValue("") String uuid, @Context jakarta.servlet.http.HttpServletRequest req) Create a reply to to the identified comment.- Parameters:
contentId- the id of the content to comment onparentCommentId- the id of the comment to be replied tohtml- 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
@POST @Path("/comments/{commentId}") public jakarta.ws.rs.core.Response edit(@PathParam("commentId") Long commentId, @FormParam("html") String html, @FormParam("watch") boolean watch, @QueryParam("actions") @DefaultValue("false") boolean actions, @Context jakarta.servlet.http.HttpServletRequest req)
-