|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.issue.comments.DefaultCommentManager
Constructor Summary | |
DefaultCommentManager(IssueManager issueManager,
TextAnalyzer textAnalyzer,
CacheManager cacheManager,
ProjectRoleManager projectRoleManager,
CommentPermissionManager commentPermissionManager,
OfBizDelegator delegator)
|
Method Summary | |
Comment |
convertToComment(org.ofbiz.core.entity.GenericValue gv)
This is a convienice method that can be used to convert a GenericValue representation of a comment to a comment object. |
Comment |
create(Issue issue,
String author,
String body,
boolean dispatchEvent)
Creates a comment and associates it with the given issue. |
Comment |
create(Issue issue,
String author,
String body,
String groupLevel,
Long roleLevelId,
boolean dispatchEvent)
Creates a comment and associates it with the given issue. |
Comment |
create(Issue issue,
String author,
String body,
String groupLevel,
Long roleLevelId,
Date created,
boolean dispatchEvent)
Creates a comment and associates it with the given issue. |
Comment |
getCommentById(Long commentId,
User user)
Will return a comment for the passed in commentId. |
List |
getComments(Issue issue)
This will return all comments for a given issue. |
List |
getCommentsForUser(Issue issue,
User user)
Retrieves all Comment s on the
given Issue that the given User has permission to see. |
ProjectRole |
getProjectRole(Long projectRoleId)
This is a convenience method to allow us to easily get a ProjectRole. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultCommentManager(IssueManager issueManager, TextAnalyzer textAnalyzer, CacheManager cacheManager, ProjectRoleManager projectRoleManager, CommentPermissionManager commentPermissionManager, OfBizDelegator delegator)
Method Detail |
public ProjectRole getProjectRole(Long projectRoleId)
CommentManager
CommentImpl
to get a ProjectRole
.
NOTE: If you are trying to retrieve a ProjectRole
then you should be using the
ProjectRoleManager
.
getProjectRole
in interface CommentManager
projectRoleId
- the id to the ProjectRole
object you would like returned.
public Comment convertToComment(org.ofbiz.core.entity.GenericValue gv)
CommentManager
convertToComment
in interface CommentManager
gv
- is the GenericValue representation of a comment.public Comment getCommentById(Long commentId, User user)
CommentManager
getCommentById
in interface CommentManager
commentId
- the id representing the Comment
you would like to retrieve.
Comment
or null (if the user cannot browse the comment).public List getCommentsForUser(Issue issue, User user)
CommentManager
Comment
s on the
given Issue that the given User
has permission to see.
If the passed in user is null, only comments with no permission level set will be returned.
NOTE: keep in mind null user represents an anonymous i.e. non-logged in user.
getCommentsForUser
in interface CommentManager
issue
- the issue are associated with.user
- the user whose permission level will be used to limit the comments returned.
Comment
spublic List getComments(Issue issue)
CommentManager
User
please use
CommentManager.getCommentsForUser(Issue issue, User user)
getComments
in interface CommentManager
issue
- the comments are associated with.
public Comment create(Issue issue, String author, String body, boolean dispatchEvent)
CommentManager
create
in interface CommentManager
issue
- the issue to associate the comment with.author
- the user who has created this comment.body
- the text of the comment.dispatchEvent
- if true then an event of type EventType.ISSUE_COMMENTED_ID
will be dispatched and any notifications listening for that event will be triggered. If false no event will be
dispatched.
public Comment create(Issue issue, String author, String body, String groupLevel, Long roleLevelId, boolean dispatchEvent) throws DataAccessException
CommentManager
create
in interface CommentManager
issue
- the issue to associate the comment with.author
- the user who has created this comment.body
- the text of the comment.groupLevel
- is the group name to limit comment visibility to, this must be a valid group name.roleLevelId
- is the id of the the ProjectRole
to limit comment visiblity to, this must reference a
valid project role.dispatchEvent
- if true then an event of type EventType.ISSUE_COMMENTED_ID
will be dispatched and any notifications listening for that event will be triggered. If false no event will be
dispatched.
DataAccessException
public Comment create(Issue issue, String author, String body, String groupLevel, Long roleLevelId, Date created, boolean dispatchEvent) throws DataAccessException
CommentManager
create
in interface CommentManager
issue
- the issue to associate the comment with.author
- the user who has created this comment.body
- the text of the comment.groupLevel
- is the group name to limit comment visibility to, this must be a valid group name.roleLevelId
- is the id of the the ProjectRole
to limit comment visiblity to, this must reference a
valid project role.created
- is the date that will be used as the comments creation date.dispatchEvent
- if true then an event of type EventType.ISSUE_COMMENTED_ID
will be dispatched and any notifications listening for that event will be triggered. If false no event will be
dispatched.
DataAccessException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |