public class

CommentResource

extends Object
java.lang.Object
   ↳ com.atlassian.jira.rest.v2.issue.CommentResource

Summary

Public Constructors
CommentResource(CommentService commentService, JiraAuthenticationContext authContext, I18nHelper i18n, ProjectRoleManager projectRoleManager, JiraBaseUrls jiraBaseUrls, IssueFinder issueFinder, DateTimeFormatterFactory dateTimeFormatterFactory, RendererManager rendererManager, FieldLayoutManager fieldLayoutManager, EmailFormatter emailFormatter)
Public Methods
Response addComment(String issueIdOrKey, String expand, CommentJsonBean request)
Adds a new comment to an issue.
Response deleteComment(String issueIdOrKey, String commentId)
Deletes an existing comment .
Response getComment(String issueIdOrKey, String commentId, String expand)
Returns a single issue comment.
Response getComments(String issueIdOrKey, String expand)
Returns all comments for an issue.
Response updateComment(String issueIdOrKey, String commentId, String expand, CommentJsonBean request)
Updates an existing comment using its JSON representation.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CommentResource (CommentService commentService, JiraAuthenticationContext authContext, I18nHelper i18n, ProjectRoleManager projectRoleManager, JiraBaseUrls jiraBaseUrls, IssueFinder issueFinder, DateTimeFormatterFactory dateTimeFormatterFactory, RendererManager rendererManager, FieldLayoutManager fieldLayoutManager, EmailFormatter emailFormatter)

Public Methods

public Response addComment (String issueIdOrKey, String expand, CommentJsonBean request)

Adds a new comment to an issue.

Parameters
issueIdOrKey a string containing the issue id or key the comment will be added to
expand optional flags: renderedBody (provides body rendered in HTML), properties (provides comment properties).
request json body of request converted to a CommentJsonBean
Returns
  • the added comment

public Response deleteComment (String issueIdOrKey, String commentId)

Deletes an existing comment .

Parameters
issueIdOrKey a string containing the issue id or key the comment belongs to
commentId id of the comment to be deleted
Returns
  • No Content Response

public Response getComment (String issueIdOrKey, String commentId, String expand)

Returns a single issue comment.

Parameters
issueIdOrKey of the issue the comment belongs to
commentId the ID of the comment to request
expand optional flags: renderedBody (provides body rendered in HTML), properties (provides comment properties).
Returns
  • a Response containing a CommentJsonBean

public Response getComments (String issueIdOrKey, String expand)

Returns all comments for an issue.

Parameters
issueIdOrKey to get comments for
expand optional flags: renderedBody (provides body rendered in HTML), properties (provides comment properties).
Returns
  • all comments for the issue

public Response updateComment (String issueIdOrKey, String commentId, String expand, CommentJsonBean request)

Updates an existing comment using its JSON representation.

Parameters
issueIdOrKey a string containing the issue id or key the comment belongs to
commentId id of the comment to be updated
expand optional flags: renderedBody (provides body rendered in HTML), properties (provides comment properties).
request json body of request converted to a CommentJsonBean
Returns
  • updated Comment