Class CommentAction

java.lang.Object
com.atlassian.jira.plugin.issuetabpanel.AbstractIssueAction
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.
  • Constructor Details

  • Method Details

    • 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:
    • getPinnedAt

      public Date getPinnedAt()
    • 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
    • isCanReact

      public boolean isCanReact()
      Returns:
      true if a user can react on comments
    • isCommentReactionsEnabled

      public boolean isCommentReactionsEnabled()
      Returns:
      true comment reactions are enabled
    • isCollapsed

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

      public boolean isHeader()
    • isPinned

      public boolean isPinned()
    • isCanPin

      public boolean isCanPin()
    • getPinnedBy

      public String getPinnedBy()
    • 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