|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The CommentManager is used to retrieve and create comments in JIRA. Comments are always associated with an issue.
Method Summary | |
Comment |
convertToComment(org.ofbiz.core.entity.GenericValue commentGV)
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. |
Method Detail |
public List getCommentsForUser(Issue issue, User user)
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.
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)
User
please use
getCommentsForUser(Issue issue, User user)
issue
- the comments are associated with.
public Comment create(Issue issue, String author, String body, boolean dispatchEvent)
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)
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.
public Comment create(Issue issue, String author, String body, String groupLevel, Long roleLevelId, Date created, boolean dispatchEvent)
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.
public ProjectRole getProjectRole(Long projectRoleId)
CommentImpl
to get a ProjectRole
.
NOTE: If you are trying to retrieve a ProjectRole
then you should be using the
ProjectRoleManager
.
projectRoleId
- the id to the ProjectRole
object you would like returned.
public Comment convertToComment(org.ofbiz.core.entity.GenericValue commentGV)
commentGV
- is the GenericValue representation of a comment.public Comment getCommentById(Long commentId, User user)
commentId
- the id representing the Comment
you would like to retrieve.
Comment
or null (if the user cannot browse the comment).
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |