com.atlassian.jira.issue.tabpanels
Class CommentAction

java.lang.Object
  extended by com.atlassian.jira.plugin.issuetabpanel.AbstractIssueAction
      extended by com.atlassian.jira.issue.tabpanels.CommentAction
All Implemented Interfaces:
IssueAction

public class CommentAction
extends AbstractIssueAction

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.


Field Summary
 
Fields inherited from class com.atlassian.jira.plugin.issuetabpanel.AbstractIssueAction
descriptor
 
Constructor Summary
CommentAction(IssueTabPanelModuleDescriptor descriptor, Comment comment, boolean canEditComment, boolean canDeleteComment, boolean isCollapsed, RendererManager rendererManager, FieldLayoutManager fieldLayoutManager, DateTimeFormatter dateTimeFormatter, CommentFieldRenderer commentFieldRenderer, CommentPropertyService commentPropertyService, JiraAuthenticationContext jiraAuthenticationContext)
           
 
Method Summary
protected  DateTimeFormatter dateTimeFormatter()
          Returns a DateTimeFormatter for the logged in user.
 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  void populateVelocityParams(Map params)
          This will populate the passed in map with this object referenced as "action" and the rendered comment body as "renderedContent".
 
Methods inherited from class com.atlassian.jira.plugin.issuetabpanel.AbstractIssueAction
isDisplayActionAllTab
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommentAction

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

getTimePerformed

public Date getTimePerformed()
Returns the comment created date

Specified by:
getTimePerformed in interface IssueAction
Specified by:
getTimePerformed in class AbstractIssueAction
Returns:
the comment created date
See Also:
IssueActionComparator

populateVelocityParams

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".

Specified by:
populateVelocityParams in class AbstractIssueAction
Parameters:
params - map of params to populate

getHtml

public String getHtml()
Description copied from interface: IssueAction
Get the HTML to present for this issueAction on the tab panel. IssueAction represents one entry of the tab panel

Specified by:
getHtml in interface IssueAction
Overrides:
getHtml in class AbstractIssueAction

getComment

public Comment getComment()
Returns the comment

Returns:
the comment

getCommentProperties

public List<EntityProperty> getCommentProperties()

getIssue

public Issue getIssue()
Returns issue related to this comment

Returns:
issue related to this comment

isCanEditComment

public boolean isCanEditComment()
Returns true is comment is editable, false otherwise

Returns:
true is comment is editable, false otherwise

isCanDeleteComment

public boolean isCanDeleteComment()
Returns true is comment can be deleted, false otherwise

Returns:
true is comment can be deleted, false otherwise

isCollapsed

public boolean isCollapsed()
Returns:
true if comment should be rendered already collapsed

formatDisplayHtml

public String formatDisplayHtml(Date date)

formatIso8601Html

public String formatIso8601Html(Date date)

dateTimeFormatter

protected DateTimeFormatter dateTimeFormatter()
Returns a DateTimeFormatter for the logged in user.

Returns:
a DateTimeFormatter


Copyright © 2002-2014 Atlassian. All Rights Reserved.