com.atlassian.jira.issue.comments
Class CommentImpl
java.lang.Object
com.atlassian.jira.issue.comments.CommentImpl
- All Implemented Interfaces:
- Comment, MutableComment
public class CommentImpl
- extends Object
- implements MutableComment
Represents a comment on an issue by a user.
Comment is essentially a GenericValue wrapper with getters
- See Also:
CommentManager.getCommentsForUser(com.atlassian.jira.issue.Issue, com.opensymphony.user.User)
CommentImpl
public CommentImpl(CommentManager manager,
String author,
String updateAuthor,
String body,
String groupLevel,
Long roleLevelId,
Date created,
Date updated,
Issue issue)
throws IllegalArgumentException
- 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:
manager
- comment 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 ivalid data was passed
getAuthor
public String getAuthor()
- Specified by:
getAuthor
in interface Comment
getAuthorFullName
public String getAuthorFullName()
- Specified by:
getAuthorFullName
in interface Comment
getBody
public String getBody()
- Specified by:
getBody
in interface Comment
getCreated
public Date getCreated()
- Returns a date when this comment was created. This is never null
- Specified by:
getCreated
in interface Comment
- Returns:
- creation date
getGroupLevel
public String getGroupLevel()
- Specified by:
getGroupLevel
in interface Comment
getId
public Long getId()
- Specified by:
getId
in interface Comment
getUpdateAuthor
public String getUpdateAuthor()
- Specified by:
getUpdateAuthor
in interface Comment
getUpdateAuthorFullName
public String getUpdateAuthorFullName()
- Specified by:
getUpdateAuthorFullName
in interface Comment
getUpdated
public Date getUpdated()
- Specified by:
getUpdated
in interface Comment
setAuthor
public void setAuthor(String author)
- Specified by:
setAuthor
in interface MutableComment
setBody
public void setBody(String body)
- Specified by:
setBody
in interface MutableComment
setGroupLevel
public void setGroupLevel(String groupLevel)
- Specified by:
setGroupLevel
in interface MutableComment
setRoleLevelId
public void setRoleLevelId(Long roleLevelId)
- Specified by:
setRoleLevelId
in interface MutableComment
setCreated
public void setCreated(Date created)
- Specified by:
setCreated
in interface MutableComment
setUpdateAuthor
public void setUpdateAuthor(String updateAuthor)
- Specified by:
setUpdateAuthor
in interface MutableComment
setUpdated
public void setUpdated(Date updated)
- Specified by:
setUpdated
in interface MutableComment
getRoleLevelId
public Long getRoleLevelId()
- Specified by:
getRoleLevelId
in interface Comment
getRoleLevel
public ProjectRole getRoleLevel()
- Specified by:
getRoleLevel
in interface Comment
getIssue
public Issue getIssue()
- Specified by:
getIssue
in interface Comment
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Copyright © 2002-2009 Atlassian. All Rights Reserved.