public class

CommentAction

extends AbstractIssueAction
java.lang.Object
   ↳ com.atlassian.jira.plugin.issuetabpanel.AbstractIssueAction
     ↳ com.atlassian.jira.issue.tabpanels.CommentAction

Class Overview

This class is the wrapper around the comment object and is used when displaying comments in the View Issue page, on the 'Comment' issue tab panel.

Summary

[Expand]
Inherited Fields
From class com.atlassian.jira.plugin.issuetabpanel.AbstractIssueAction
Public Constructors
CommentAction(IssueTabPanelModuleDescriptor descriptor, Comment comment, boolean canEditComment, boolean canDeleteComment, boolean isCollapsed, RendererManager rendererManager, FieldLayoutManager fieldLayoutManager, DateTimeFormatter dateTimeFormatter, CommentFieldRenderer commentFieldRenderer, CommentPropertyService commentPropertyService, JiraAuthenticationContext jiraAuthenticationContext)
Public Methods
String formatDisplayHtml(Date date)
String formatIso8601Html(Date date)
Comment getComment()
Returns the comment
List<EntityProperty> getCommentProperties()
String getHtml()
Get the HTML to present for this issueAction on the tab panel.
Issue getIssue()
Returns issue related to this comment
Date getTimePerformed()
Returns the comment created date
boolean isCanDeleteComment()
Returns true is comment can be deleted, false otherwise
boolean isCanEditComment()
Returns true is comment is editable, false otherwise
boolean isCollapsed()
Protected Methods
DateTimeFormatter dateTimeFormatter()
Returns a DateTimeFormatter for the logged in user.
void populateVelocityParams(Map params)
This will populate the passed in map with this object referenced as "action" and the rendered comment body as "renderedContent".
[Expand]
Inherited Methods
From class com.atlassian.jira.plugin.issuetabpanel.AbstractIssueAction
From class java.lang.Object
From interface com.atlassian.jira.plugin.issuetabpanel.IssueAction

Public Constructors

public CommentAction (IssueTabPanelModuleDescriptor descriptor, Comment comment, boolean canEditComment, boolean canDeleteComment, boolean isCollapsed, RendererManager rendererManager, FieldLayoutManager fieldLayoutManager, DateTimeFormatter dateTimeFormatter, CommentFieldRenderer commentFieldRenderer, CommentPropertyService commentPropertyService, JiraAuthenticationContext jiraAuthenticationContext)

Public Methods

public String formatDisplayHtml (Date date)

public String formatIso8601Html (Date date)

public Comment getComment ()

Returns the comment

Returns
  • the comment

public List<EntityProperty> getCommentProperties ()

public String getHtml ()

Get the HTML to present for this issueAction on the tab panel. IssueAction represents one entry of the tab panel

public Issue getIssue ()

Returns issue related to this comment

Returns
  • issue related to this comment

public Date getTimePerformed ()

Returns the comment created date

Returns
  • the comment created date

public boolean isCanDeleteComment ()

Returns true is comment can be deleted, false otherwise

Returns
  • true is comment can be deleted, false otherwise

public boolean isCanEditComment ()

Returns true is comment is editable, false otherwise

Returns
  • true is comment is editable, false otherwise

public boolean isCollapsed ()

Returns
  • true if comment should be rendered already collapsed

Protected Methods

protected DateTimeFormatter dateTimeFormatter ()

Returns a DateTimeFormatter for the logged in user.

Returns
  • a DateTimeFormatter

protected void populateVelocityParams (Map params)

This will populate the passed in map with this object referenced as "action" and the rendered comment body as "renderedContent".

Parameters
params map of params to populate