com.atlassian.jira.rest.v2.issue
Class CommentResource

java.lang.Object
  extended by com.atlassian.jira.rest.v2.issue.CommentResource

public class CommentResource
extends Object

Since:
4.2

Constructor Summary
CommentResource(CommentService commentService, JiraAuthenticationContext authContext, I18nHelper i18n, ProjectRoleManager projectRoleManager, JiraBaseUrls jiraBaseUrls, IssueFinder issueFinder, DateTimeFormatterFactory dateTimeFormatterFactory, RendererManager rendererManager, FieldLayoutManager fieldLayoutManager)
           
 
Method Summary
 javax.ws.rs.core.Response addComment(String issueIdOrKey, String expand, CommentJsonBean request)
          Adds a new comment to an issue.
 javax.ws.rs.core.Response deleteComment(String issueIdOrKey, String commentId)
          Deletes an existing comment .
 javax.ws.rs.core.Response getComment(String issueIdOrKey, String commentId, String expand)
          Returns a single issue comment.
 javax.ws.rs.core.Response getComments(String issueIdOrKey, String expand)
          Returns all comments for an issue.
 javax.ws.rs.core.Response updateComment(String issueIdOrKey, String commentId, String expand, CommentJsonBean request)
          Updates an existing comment using its JSON representation.
 
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,
                       JiraAuthenticationContext authContext,
                       I18nHelper i18n,
                       ProjectRoleManager projectRoleManager,
                       JiraBaseUrls jiraBaseUrls,
                       IssueFinder issueFinder,
                       DateTimeFormatterFactory dateTimeFormatterFactory,
                       RendererManager rendererManager,
                       FieldLayoutManager fieldLayoutManager)
Method Detail

getComments

public javax.ws.rs.core.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)
Returns:
all comments for the issue

getComment

public javax.ws.rs.core.Response getComment(String issueIdOrKey,
                                            String commentId,
                                            String expand)
Returns a single issue comment.

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

updateComment

public javax.ws.rs.core.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)
request - json body of request converted to a CommentJsonBean
Returns:
updated Comment

deleteComment

public javax.ws.rs.core.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

addComment

public javax.ws.rs.core.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)
request - json body of request converted to a CommentJsonBean
Returns:
the added comment


Copyright © 2002-2014 Atlassian. All Rights Reserved.