public class CommentImpl extends Object implements MutableComment
ID_COMPARATOR
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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()
Returns the name of the group to which comment visibility will be restricted
|
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) |
public CommentImpl(ProjectRoleManager projectRoleManager, ApplicationUser author, ApplicationUser updateAuthor, String body, String groupLevel, Long roleLevelId, Date created, Date updated, Issue issue) throws IllegalArgumentException
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 issueIllegalArgumentException
- if invalid data was passedpublic String getAuthor()
Comment
public String getAuthorKey()
Comment
getAuthorKey
in interface Comment
public ApplicationUser getAuthorUser()
Comment
User
that created the commentgetAuthorUser
in interface Comment
User
that created the comment.public String getAuthorFullName()
getAuthorFullName
in interface Comment
public Date getCreated()
getCreated
in interface Comment
public String getGroupLevel()
Comment
getGroupLevel
in interface Comment
public Long getId()
public ApplicationUser getAuthorApplicationUser()
Comment
user
that created the commentgetAuthorApplicationUser
in interface Comment
user
that created the commentpublic ApplicationUser getUpdateAuthorUser()
getUpdateAuthorUser
in interface Comment
User
objectpublic String getUpdateAuthorFullName()
getUpdateAuthorFullName
in interface Comment
public Date getUpdated()
getUpdated
in interface Comment
public void setAuthor(ApplicationUser author)
setAuthor
in interface MutableComment
author
- ApplicationUser
to be set as author.public void setAuthor(String author)
setAuthor
in interface MutableComment
author
- userkey of the user to be set as author.public void setBody(String body)
setBody
in interface MutableComment
public void setGroupLevel(String groupLevel)
setGroupLevel
in interface MutableComment
public void setRoleLevelId(Long roleLevelId)
setRoleLevelId
in interface MutableComment
public void setUpdateAuthor(ApplicationUser updateAuthor)
setUpdateAuthor
in interface MutableComment
updateAuthor
- ApplicationUser
to be set as update author (i.e. the comment editor).public void setCreated(Date created)
setCreated
in interface MutableComment
public void setUpdateAuthor(String updateAuthor)
setUpdateAuthor
in interface MutableComment
updateAuthor
- userkey of the user to be set as update author (i.e. the comment editor).public void setUpdated(Date updated)
setUpdated
in interface MutableComment
public Long getRoleLevelId()
getRoleLevelId
in interface Comment
public ProjectRole getRoleLevel()
getRoleLevel
in interface Comment
public String getUpdateAuthor()
getUpdateAuthor
in interface Comment
public ApplicationUser getUpdateAuthorApplicationUser()
Comment
getUpdateAuthorApplicationUser
in interface Comment
object
Copyright © 2002-2018 Atlassian. All Rights Reserved.