public class

DeleteComment

extends AbstractIssueSelectAction
java.lang.Object
   ↳ webwork.action.ActionSupport
     ↳ com.atlassian.jira.action.JiraActionSupport
       ↳ com.atlassian.jira.web.action.JiraWebActionSupport
         ↳ com.atlassian.jira.web.action.ProjectActionSupport
           ↳ com.atlassian.jira.web.action.IssueActionSupport
             ↳ com.atlassian.jira.web.action.issue.AbstractIssueSelectAction
               ↳ com.atlassian.jira.web.action.issue.DeleteComment

Summary

[Expand]
Inherited Constants
From class com.atlassian.jira.web.action.issue.AbstractIssueSelectAction
From class com.atlassian.jira.web.action.JiraWebActionSupport
From interface webwork.action.Action
[Expand]
Inherited Fields
From class com.atlassian.jira.web.action.issue.AbstractIssueSelectAction
From class com.atlassian.jira.web.action.IssueActionSupport
From class com.atlassian.jira.web.action.ProjectActionSupport
From class com.atlassian.jira.web.action.JiraWebActionSupport
From class com.atlassian.jira.action.JiraActionSupport
From class webwork.action.ActionSupport
Public Constructors
DeleteComment(FieldScreenRendererFactory fieldScreenRendererFactory, CommentService commentService)
Public Methods
String doDefault()
Handles the initial request to delete a comment coming from the user.
String getCommentAuthorKey()
Long getCommentId()
Gets the id of the comment to be deleted.
Comment getCommentObject()
String getCommentUpdateAuthorKey()
FieldScreenRenderLayoutItem getFieldScreenRendererLayoutItemForField(OrderableField field)
String getIssuePath()
Gets the relative path to the current issue.
String getRenderedContent()
void setCommentId(Long id)
Sets the id of the comment to be deleted.
Protected Methods
String doExecute()
Handles a request to delete a comment.
FieldScreenRenderer getFieldScreenRendererWithAllFields()
[Expand]
Inherited Methods
From class com.atlassian.jira.web.action.issue.AbstractIssueSelectAction
From class com.atlassian.jira.web.action.IssueActionSupport
From class com.atlassian.jira.web.action.ProjectActionSupport
From class com.atlassian.jira.web.action.JiraWebActionSupport
From class com.atlassian.jira.action.JiraActionSupport
From class webwork.action.ActionSupport
From class java.lang.Object
From interface com.atlassian.jira.util.ErrorCollection
From interface com.atlassian.jira.util.I18nHelper
From interface com.atlassian.jira.web.HttpServletVariables
From interface com.atlassian.jira.web.action.issue.IssueSummaryAware
From interface com.atlassian.jira.web.util.AuthorizationSupport
From interface webwork.action.Action
From interface webwork.action.CommandDriven
From interface webwork.action.IllegalArgumentAware

Public Constructors

public DeleteComment (FieldScreenRendererFactory fieldScreenRendererFactory, CommentService commentService)

Public Methods

public String doDefault ()

Handles the initial request to delete a comment coming from the user.

It will return the view to render the confirm delete comment form, if the user is authorised to delete the comment.

Returns
  • The name of the view to render the confirm delete comment form (INPUT), if the user has authorisation to delete the comment.

    Otherwise, #ERROR_NO_PERMISSION will be returned so that a screen with an error message can be rendered.

public String getCommentAuthorKey ()

public Long getCommentId ()

Gets the id of the comment to be deleted.

Returns
  • The id of the comment to be deleted.

public Comment getCommentObject ()

public String getCommentUpdateAuthorKey ()

public FieldScreenRenderLayoutItem getFieldScreenRendererLayoutItemForField (OrderableField field)

public String getIssuePath ()

Gets the relative path to the current issue. It does not include the context path.

Returns
  • The relative path to the current issue.

public String getRenderedContent ()

public void setCommentId (Long id)

Sets the id of the comment to be deleted.

Parameters
id The id of the comment to be deleted.

Protected Methods

protected String doExecute ()

Handles a request to delete a comment.

It will delete the comment and redirect the user to the current issue if the user is authorised to the delete the comment and there are no input errors.

Returns
  • The user will be redirected to the current issue if he/she is authorised to the delete the comment and there are no input errors.

    #ERROR_NO_PERMISSION will be returned if the user is not authorised to delete the comment, so that a screen with an error message can be rendered.

Throws
Exception

protected FieldScreenRenderer getFieldScreenRendererWithAllFields ()