public class

CommentImpl

extends Object
implements MutableComment
java.lang.Object
   ↳ com.atlassian.jira.issue.comments.CommentImpl

Class Overview

Represents a comment on an issue by a user. Comment is essentially a GenericValue wrapper with getters

Summary

[Expand]
Inherited Fields
From interface com.atlassian.jira.entity.WithId
Public Constructors
CommentImpl(ProjectRoleManager projectRoleManager, ApplicationUser author, ApplicationUser updateAuthor, String body, String groupLevel, Long roleLevelId, Date created, Date updated, Issue issue)
Creates a new instance of this class.
Public Methods
boolean equals(Object obj)
String getAuthor()
Returns the key for the user that created the comment
ApplicationUser getAuthorApplicationUser()
Returns the user that created the comment
String getAuthorFullName()
String getAuthorKey()
Returns the key for the user that created the comment
ApplicationUser getAuthorUser()
Returns the User that created the comment
String getBody()
Date getCreated()
Returns a date when this comment was created.
String getGroupLevel()
Long getId()
Issue getIssue()
ProjectRole getRoleLevel()
Long getRoleLevelId()
String getUpdateAuthor()
ApplicationUser getUpdateAuthorApplicationUser()
Get the user that performed the update
String getUpdateAuthorFullName()
ApplicationUser getUpdateAuthorUser()
Date getUpdated()
int hashCode()
void setAuthor(ApplicationUser author)
void setAuthor(String author)
void setBody(String body)
void setCreated(Date created)
void setGroupLevel(String groupLevel)
void setRoleLevelId(Long roleLevelId)
void setUpdateAuthor(ApplicationUser updateAuthor)
void setUpdateAuthor(String updateAuthor)
void setUpdated(Date updated)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.entity.WithId
From interface com.atlassian.jira.issue.comments.Comment
From interface com.atlassian.jira.issue.comments.MutableComment

Public Constructors

public CommentImpl (ProjectRoleManager projectRoleManager, ApplicationUser author, ApplicationUser updateAuthor, String body, String groupLevel, Long roleLevelId, Date created, Date updated, Issue issue)

Creates a new instance of this class. The constructor id package protected in order to allow only the DefaultCommentManager to create new instances (a.k.a. comment factory)

Parameters
projectRoleManager project role manager
author user name of the author, required
updateAuthor user name of the author that has last updated
body body of the comment, required
groupLevel group visibility level
roleLevelId role ID visibility level
created created date, set to new Date if null
updated updated date, set to created Date if null
issue related issue
Throws
IllegalArgumentException if invalid data was passed

Public Methods

public boolean equals (Object obj)

public String getAuthor ()

Returns the key for the user that created the comment

Returns
  • the key for the user that created the comment

public ApplicationUser getAuthorApplicationUser ()

Returns the user that created the comment

Returns
  • the user that created the comment

public String getAuthorFullName ()

public String getAuthorKey ()

Returns the key for the user that created the comment

Returns
  • the key for the user that created the comment

public ApplicationUser getAuthorUser ()

Returns the User that created the comment

Returns
  • the User that created the comment.

public String getBody ()

public Date getCreated ()

Returns a date when this comment was created. This is never null

Returns
  • creation date

public String getGroupLevel ()

public Long getId ()

public Issue getIssue ()

public ProjectRole getRoleLevel ()

public Long getRoleLevelId ()

public String getUpdateAuthor ()

public ApplicationUser getUpdateAuthorApplicationUser ()

Get the user that performed the update

Returns

public String getUpdateAuthorFullName ()

public ApplicationUser getUpdateAuthorUser ()

public Date getUpdated ()

public int hashCode ()

public void setAuthor (ApplicationUser author)

public void setAuthor (String author)

public void setBody (String body)

public void setCreated (Date created)

public void setGroupLevel (String groupLevel)

public void setRoleLevelId (Long roleLevelId)

public void setUpdateAuthor (ApplicationUser updateAuthor)

public void setUpdateAuthor (String updateAuthor)

public void setUpdated (Date updated)