Class CommentAction
java.lang.Object
com.atlassian.jira.plugin.issuetabpanel.AbstractIssueAction
com.atlassian.jira.issue.tabpanels.CommentAction
- All Implemented Interfaces:
IssueAction
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
ConstructorsConstructorDescriptionCommentAction(IssueTabPanelModuleDescriptor descriptor, Comment comment, boolean canEditComment, boolean canDeleteComment, boolean canReact, boolean commentReactionsEnabled, boolean isHeader, boolean isCollapsed, boolean isPinned, boolean canPin, String pinnedBy, Date pinnedAt, RendererManager rendererManager, FieldLayoutManager fieldLayoutManager, DateTimeFormatter dateTimeFormatter, CommentFieldRenderer commentFieldRenderer, CommentPropertyService commentPropertyService, JiraAuthenticationContext jiraAuthenticationContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected DateTimeFormatterReturns a DateTimeFormatter for the logged in user.formatDisplayHtml(Date date) formatIso8601Html(Date date) Returns the commentgetHtml()Get the HTML to present for this issueAction on the tab panel.getIssue()Returns issue related to this commentReturns the comment created datebooleanReturns true is comment can be deleted, false otherwisebooleanReturns true is comment is editable, false otherwisebooleanisCanPin()booleanbooleanbooleanbooleanisHeader()booleanisPinned()protected voidpopulateVelocityParams(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
-
Constructor Details
-
CommentAction
public CommentAction(IssueTabPanelModuleDescriptor descriptor, Comment comment, boolean canEditComment, boolean canDeleteComment, boolean canReact, boolean commentReactionsEnabled, boolean isHeader, boolean isCollapsed, boolean isPinned, boolean canPin, String pinnedBy, Date pinnedAt, RendererManager rendererManager, FieldLayoutManager fieldLayoutManager, DateTimeFormatter dateTimeFormatter, CommentFieldRenderer commentFieldRenderer, CommentPropertyService commentPropertyService, JiraAuthenticationContext jiraAuthenticationContext)
-
-
Method Details
-
getTimePerformed
Returns the comment created date- Specified by:
getTimePerformedin interfaceIssueAction- Specified by:
getTimePerformedin classAbstractIssueAction- Returns:
- the comment created date
- See Also:
-
getPinnedAt
-
populateVelocityParams
This will populate the passed in map with this object referenced as "action" and the rendered comment body as "renderedContent".- Specified by:
populateVelocityParamsin classAbstractIssueAction- Parameters:
params- map of params to populate
-
getHtml
Description copied from interface:IssueActionGet the HTML to present for this issueAction on the tab panel. IssueAction represents one entry of the tab panel- Specified by:
getHtmlin interfaceIssueAction- Overrides:
getHtmlin classAbstractIssueAction
-
getComment
Returns the comment- Returns:
- the comment
-
getCommentProperties
-
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
-
formatDisplayHtml
-
formatIso8601Html
-
dateTimeFormatter
Returns a DateTimeFormatter for the logged in user.- Returns:
- a DateTimeFormatter
-