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 TypeMethodDescriptionbooleanReturns the key for the user that created the commentReturns theuserthat created the commentReturns the key for the user that created the commentReturns theUserthat 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 updateinthashCode()voidsetAuthor(ApplicationUser author) voidvoidvoidsetCreated(Date created) voidsetGroupLevel(String groupLevel) voidsetRoleLevelId(Long roleLevelId) voidsetUpdateAuthor(ApplicationUser updateAuthor) voidsetUpdateAuthor(String updateAuthor) voidsetUpdated(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:CommentReturns the key for the user that created the comment -
getAuthorKey
Description copied from interface:CommentReturns the key for the user that created the comment- Specified by:
getAuthorKeyin interfaceComment- Returns:
- the key for the user that created the comment
-
getAuthorUser
Description copied from interface:CommentReturns theUserthat created the comment- Specified by:
getAuthorUserin interfaceComment- Returns:
- the
Userthat created the comment.
-
getAuthorFullName
- Specified by:
getAuthorFullNamein interfaceComment
-
getBody
-
getCreated
Returns a date when this comment was created. This is never null- Specified by:
getCreatedin interfaceComment- Returns:
- creation date
-
getGroupLevel
Description copied from interface:CommentReturns the name of the group to which comment visibility will be restricted- Specified by:
getGroupLevelin interfaceComment- Returns:
- the name of the group to which comment visibility will be restricted.
-
getId
-
getAuthorApplicationUser
Description copied from interface:CommentReturns theuserthat created the comment- Specified by:
getAuthorApplicationUserin interfaceComment- Returns:
- the
userthat created the comment
-
getUpdateAuthorUser
- Specified by:
getUpdateAuthorUserin interfaceComment- Returns:
- a
Userobject
-
getUpdateAuthorFullName
- Specified by:
getUpdateAuthorFullNamein interfaceComment
-
getUpdated
- Specified by:
getUpdatedin interfaceComment
-
setAuthor
- Specified by:
setAuthorin interfaceMutableComment- Parameters:
author-ApplicationUserto be set as author.
-
setAuthor
- Specified by:
setAuthorin interfaceMutableComment- Parameters:
author- userkey of the user to be set as author.
-
setBody
- Specified by:
setBodyin interfaceMutableComment
-
setGroupLevel
- Specified by:
setGroupLevelin interfaceMutableComment
-
setRoleLevelId
- Specified by:
setRoleLevelIdin interfaceMutableComment
-
setUpdateAuthor
- Specified by:
setUpdateAuthorin interfaceMutableComment- Parameters:
updateAuthor-ApplicationUserto be set as update author (i.e. the comment editor).
-
setCreated
- Specified by:
setCreatedin interfaceMutableComment
-
setUpdateAuthor
- Specified by:
setUpdateAuthorin interfaceMutableComment- Parameters:
updateAuthor- userkey of the user to be set as update author (i.e. the comment editor).
-
setUpdated
- Specified by:
setUpdatedin interfaceMutableComment
-
getRoleLevelId
- Specified by:
getRoleLevelIdin interfaceComment
-
getRoleLevel
- Specified by:
getRoleLevelin interfaceComment
-
getIssue
-
getUpdateAuthor
- Specified by:
getUpdateAuthorin interfaceComment- Returns:
- userkey of the update author
-
getUpdateAuthorApplicationUser
Description copied from interface:CommentGet the user that performed the update- Specified by:
getUpdateAuthorApplicationUserin interfaceComment- Returns:
- an
object
-
equals
-
hashCode
public int hashCode()
-