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, RendererManager rendererManager, FieldLayoutManager fieldLayoutManager, DateTimeFormatter dateTimeFormatter)
           
 
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
 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
protected  void populateVelocityParams(Map params)
          This will populate the passed in map witht this object referenced as "action" and the rendered comment body as "renderedContent".
 
Methods inherited from class com.atlassian.jira.plugin.issuetabpanel.AbstractIssueAction
getHtml, 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,
                     RendererManager rendererManager,
                     FieldLayoutManager fieldLayoutManager,
                     DateTimeFormatter dateTimeFormatter)
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 witht 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

getComment

public Comment getComment()
Returns the comment

Returns:
the comment

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

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-2012 Atlassian. All Rights Reserved.