Class CommentImpl
java.lang.Object
com.atlassian.jira.issue.comments.CommentImpl
- All Implemented Interfaces:
WithId
,Comment
,MutableComment
Represents a comment on an issue by a user.
Comment is essentially a GenericValue wrapper with getters
-
Field Summary
Fields inherited from interface com.atlassian.jira.entity.WithId
ID_COMPARATOR
-
Constructor Summary
ConstructorsConstructorDescriptionCommentImpl
(ProjectRoleManager projectRoleManager, ApplicationUser author, ApplicationUser updateAuthor, String body, String groupLevel, Long roleLevelId, Date created, Date updated, Issue issue) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the key for the user that created the commentReturns theuser
that created the commentReturns the key for the user that created the commentReturns theUser
that created the commentgetBody()
Returns a date when this comment was created.Returns the name of the group to which comment visibility will be restrictedgetId()
getIssue()
Get the user that performed the updateint
hashCode()
void
setAuthor
(ApplicationUser author) void
void
void
setCreated
(Date created) void
setGroupLevel
(String groupLevel) void
setRoleLevelId
(Long roleLevelId) void
setUpdateAuthor
(ApplicationUser updateAuthor) void
setUpdateAuthor
(String updateAuthor) void
setUpdated
(Date updated)
-
Constructor Details
-
CommentImpl
public CommentImpl(ProjectRoleManager projectRoleManager, ApplicationUser author, ApplicationUser updateAuthor, String body, String groupLevel, Long roleLevelId, Date created, Date updated, Issue issue) throws IllegalArgumentException - Parameters:
projectRoleManager
- project role managerauthor
- user name of the author, requiredupdateAuthor
- user name of the author that has last updatedbody
- body of the comment, requiredgroupLevel
- group visibility levelroleLevelId
- role ID visibility levelcreated
- created date, set to new Date if nullupdated
- updated date, set to created Date if nullissue
- related issue- Throws:
IllegalArgumentException
- if invalid data was passed
-
-
Method Details
-
getAuthor
Description copied from interface:Comment
Returns the key for the user that created the comment -
getAuthorKey
Description copied from interface:Comment
Returns the key for the user that created the comment- Specified by:
getAuthorKey
in interfaceComment
- Returns:
- the key for the user that created the comment
-
getAuthorUser
Description copied from interface:Comment
Returns theUser
that created the comment- Specified by:
getAuthorUser
in interfaceComment
- Returns:
- the
User
that created the comment.
-
getAuthorFullName
- Specified by:
getAuthorFullName
in interfaceComment
-
getBody
-
getCreated
Returns a date when this comment was created. This is never null- Specified by:
getCreated
in interfaceComment
- Returns:
- creation date
-
getGroupLevel
Description copied from interface:Comment
Returns the name of the group to which comment visibility will be restricted- Specified by:
getGroupLevel
in interfaceComment
- Returns:
- the name of the group to which comment visibility will be restricted.
-
getId
-
getAuthorApplicationUser
Description copied from interface:Comment
Returns theuser
that created the comment- Specified by:
getAuthorApplicationUser
in interfaceComment
- Returns:
- the
user
that created the comment
-
getUpdateAuthorUser
- Specified by:
getUpdateAuthorUser
in interfaceComment
- Returns:
- a
User
object
-
getUpdateAuthorFullName
- Specified by:
getUpdateAuthorFullName
in interfaceComment
-
getUpdated
- Specified by:
getUpdated
in interfaceComment
-
setAuthor
- Specified by:
setAuthor
in interfaceMutableComment
- Parameters:
author
-ApplicationUser
to be set as author.
-
setAuthor
- Specified by:
setAuthor
in interfaceMutableComment
- Parameters:
author
- userkey of the user to be set as author.
-
setBody
- Specified by:
setBody
in interfaceMutableComment
-
setGroupLevel
- Specified by:
setGroupLevel
in interfaceMutableComment
-
setRoleLevelId
- Specified by:
setRoleLevelId
in interfaceMutableComment
-
setUpdateAuthor
- Specified by:
setUpdateAuthor
in interfaceMutableComment
- Parameters:
updateAuthor
-ApplicationUser
to be set as update author (i.e. the comment editor).
-
setCreated
- Specified by:
setCreated
in interfaceMutableComment
-
setUpdateAuthor
- Specified by:
setUpdateAuthor
in interfaceMutableComment
- Parameters:
updateAuthor
- userkey of the user to be set as update author (i.e. the comment editor).
-
setUpdated
- Specified by:
setUpdated
in interfaceMutableComment
-
getRoleLevelId
- Specified by:
getRoleLevelId
in interfaceComment
-
getRoleLevel
- Specified by:
getRoleLevel
in interfaceComment
-
getIssue
-
getUpdateAuthor
- Specified by:
getUpdateAuthor
in interfaceComment
- Returns:
- userkey of the update author
-
getUpdateAuthorApplicationUser
Description copied from interface:Comment
Get the user that performed the update- Specified by:
getUpdateAuthorApplicationUser
in interfaceComment
- Returns:
- an
object
-
equals
-
hashCode
public int hashCode()
-