|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@PublicApi public interface CommentService
This is the business layer component that must be used to access all Comment
functionality.
This will perform validation before it hands off to the CommentManager
.
Operations will not be performed if validation fails.
Nested Class Summary | |
---|---|
static class |
CommentService.CommentCreateValidationResult
|
static class |
CommentService.CommentParameters
|
static class |
CommentService.CommentUpdateValidationResult
|
Method Summary | |
---|---|
Comment |
create(ApplicationUser user,
CommentService.CommentCreateValidationResult commentValidationResult,
boolean dispatchEvent)
Creates and persists a Comment on given Issue . |
Comment |
create(ApplicationUser user,
Issue issue,
String body,
boolean dispatchEvent,
ErrorCollection errorCollection)
Deprecated. use validateCommentCreate(ApplicationUser, com.atlassian.jira.bc.issue.comment.CommentService.CommentParameters) and create(ApplicationUser, CommentCreateValidationResult, boolean) . |
Comment |
create(ApplicationUser user,
Issue issue,
String body,
String groupLevel,
Long roleLevelId,
boolean dispatchEvent,
ErrorCollection errorCollection)
Deprecated. use validateCommentCreate(ApplicationUser, com.atlassian.jira.bc.issue.comment.CommentService.CommentParameters) and create(ApplicationUser, CommentCreateValidationResult, boolean) . |
Comment |
create(ApplicationUser user,
Issue issue,
String body,
String groupLevel,
Long roleLevelId,
Date created,
boolean dispatchEvent,
ErrorCollection errorCollection)
Deprecated. use validateCommentCreate(ApplicationUser, com.atlassian.jira.bc.issue.comment.CommentService.CommentParameters) and create(ApplicationUser, CommentCreateValidationResult, boolean) . |
Comment |
create(com.atlassian.crowd.embedded.api.User user,
Issue issue,
String body,
boolean dispatchEvent,
ErrorCollection errorCollection)
Deprecated. use validateCommentCreate(ApplicationUser, com.atlassian.jira.bc.issue.comment.CommentService.CommentParameters) and create(ApplicationUser, CommentCreateValidationResult, boolean) . |
Comment |
create(com.atlassian.crowd.embedded.api.User user,
Issue issue,
String body,
String groupLevel,
Long roleLevelId,
boolean dispatchEvent,
ErrorCollection errorCollection)
Deprecated. Use create(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue, String, String, Long, boolean, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Creates and persists a Comment on the given Issue set with current date and time. |
Comment |
create(com.atlassian.crowd.embedded.api.User user,
Issue issue,
String body,
String groupLevel,
Long roleLevelId,
Date created,
boolean dispatchEvent,
ErrorCollection errorCollection)
Deprecated. use validateCommentCreate(ApplicationUser, com.atlassian.jira.bc.issue.comment.CommentService.CommentParameters) and create(ApplicationUser, CommentCreateValidationResult, boolean) . |
void |
delete(JiraServiceContext jiraServiceContext,
Comment comment,
boolean dispatchEvent)
Deletes a comment and updates the issue's change history and updated date. |
Comment |
getCommentById(ApplicationUser user,
Long commentId,
ErrorCollection errorCollection)
|
Comment |
getCommentById(com.atlassian.crowd.embedded.api.User user,
Long commentId,
ErrorCollection errorCollection)
Deprecated. Use getCommentById(ApplicationUser user, Long commentId, ErrorCollection errorCollection) instead. Since v6.0. |
List<Comment> |
getCommentsForUser(ApplicationUser user,
Issue issue)
Will return a list of Comment s for the given user
Will return a list of Comment s for the given user. |
List<Comment> |
getCommentsForUser(ApplicationUser currentUser,
Issue issue,
ErrorCollection errorCollection)
Deprecated. Use getCommentsForUser(ApplicationUser currentUser, Issue issue) instead. Since v6.3. |
List<Comment> |
getCommentsForUser(com.atlassian.crowd.embedded.api.User currentUser,
Issue issue,
ErrorCollection errorCollection)
Deprecated. Use getCommentsForUser(ApplicationUser currentUser, Issue issue, ErrorCollection errorCollection) instead. Since v6.0. |
List<Comment> |
getCommentsForUserSince(ApplicationUser user,
Issue issue,
Date since)
Will return a list of Comment s that were created or updated since the provided date, for the given user. |
MutableComment |
getMutableComment(ApplicationUser user,
Long commentId,
ErrorCollection errorCollection)
|
MutableComment |
getMutableComment(com.atlassian.crowd.embedded.api.User user,
Long commentId,
ErrorCollection errorCollection)
Deprecated. Use getCommentById(com.atlassian.jira.user.ApplicationUser, Long, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0. |
boolean |
hasPermissionToCreate(ApplicationUser user,
Issue issue,
ErrorCollection errorCollection)
|
boolean |
hasPermissionToCreate(com.atlassian.crowd.embedded.api.User user,
Issue issue,
ErrorCollection errorCollection)
Deprecated. Use hasPermissionToCreate(ApplicationUser user, Issue issue, ErrorCollection errorCollection) instead. Since v6.0. |
boolean |
hasPermissionToDelete(JiraServiceContext jiraServiceContext,
Long commentId)
Determines whether the user can delete a comment. |
boolean |
hasPermissionToEdit(ApplicationUser user,
Comment comment,
ErrorCollection errorCollection)
|
boolean |
hasPermissionToEdit(JiraServiceContext jiraServiceContext,
Long commentId)
Determines whether the user can edit a comment. |
boolean |
hasPermissionToEdit(com.atlassian.crowd.embedded.api.User user,
Comment comment,
ErrorCollection errorCollection)
Deprecated. Use hasPermissionToCreate(ApplicationUser user, Issue issue, ErrorCollection errorCollection) instead. Since v6.0. |
boolean |
isGroupVisiblityEnabled()
Returns the flag that indicates whether group visiblity is enabled |
boolean |
isProjectRoleVisiblityEnabled()
Returns the flag that indicates whether project role visibility is enabled |
boolean |
isValidAllCommentData(ApplicationUser user,
Issue issue,
String body,
String groupLevel,
String roleLevelId,
ErrorCollection errorCollection)
|
boolean |
isValidAllCommentData(com.atlassian.crowd.embedded.api.User user,
Issue issue,
String body,
String groupLevel,
String roleLevelId,
ErrorCollection errorCollection)
Deprecated. Use isValidAllCommentData(ApplicationUser user, Issue issue, String body, String groupLevel, String roleLevelId, ErrorCollection errorCollection) instead. Since v6.0. |
boolean |
isValidCommentBody(String body,
ErrorCollection errorCollection)
Validates that the body is a valid string, if not the appropriate error is added to the errorCollection . |
boolean |
isValidCommentBody(String body,
ErrorCollection errorCollection,
boolean allowEmpty)
Validates that the body is a valid string, if not the appropriate error is added to the errorCollection . |
boolean |
isValidCommentData(ApplicationUser user,
Issue issue,
String groupLevel,
String roleLevelId,
ErrorCollection errorCollection)
|
boolean |
isValidCommentData(com.atlassian.crowd.embedded.api.User user,
Issue issue,
String groupLevel,
String roleLevelId,
ErrorCollection errorCollection)
Deprecated. Use isValidCommentData(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue, String, String, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0. |
void |
update(ApplicationUser user,
CommentService.CommentUpdateValidationResult updateCommentValidationResult,
boolean dispatchEvent)
Updates a Comment and sets the comments updated date to be now and the updatedAuthor to be the
passed in user. |
void |
update(ApplicationUser user,
MutableComment comment,
boolean dispatchEvent,
ErrorCollection errorCollection)
Deprecated. use update(ApplicationUser, CommentUpdateValidationResult, boolean) instead. |
void |
update(com.atlassian.crowd.embedded.api.User user,
MutableComment comment,
boolean dispatchEvent,
ErrorCollection errorCollection)
Deprecated. use update(ApplicationUser, CommentUpdateValidationResult, boolean) instead. |
CommentService.CommentCreateValidationResult |
validateCommentCreate(ApplicationUser user,
CommentService.CommentParameters commentParameters)
Confirms the parameters to create a comment are valid and that the user has the permission to do so. |
CommentService.CommentUpdateValidationResult |
validateCommentUpdate(ApplicationUser user,
Long commentId,
CommentService.CommentParameters commentParameters)
Confirms the parameters to update a comment are valid and that the updating user has the permission to do so. |
void |
validateCommentUpdate(ApplicationUser user,
Long commentId,
String body,
String groupLevel,
Long roleLevelId,
ErrorCollection errorCollection)
Deprecated. use validateCommentUpdate(ApplicationUser, Long, com.atlassian.jira.bc.issue.comment.CommentService.CommentParameters) . |
void |
validateCommentUpdate(com.atlassian.crowd.embedded.api.User user,
Long commentId,
String body,
String groupLevel,
Long roleLevelId,
ErrorCollection errorCollection)
Deprecated. Use validateCommentUpdate(ApplicationUser user, Long commentId, String body, String groupLevel, Long roleLevelId, ErrorCollection errorCollection) instead. Since v6.0.
Confirms the parameters to update a comment are valid and that the updating user has the permission to do so.
This method will validate the raw input parameters. This method only validates the parameters and will not
actually persist the changes, you must call update(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.comments.MutableComment, boolean, com.atlassian.jira.util.ErrorCollection) to persist the changes. If an error is encountered
then the ErrorCollection will contain the specific error message. |
Method Detail |
---|
CommentService.CommentCreateValidationResult validateCommentCreate(ApplicationUser user, @Nonnull CommentService.CommentParameters commentParameters)
create(ApplicationUser, com.atlassian.jira.bc.issue.comment.CommentService.CommentCreateValidationResult, boolean)
to persist the changes.
If an error is encountered then the CommentService.CommentCreateValidationResult
will contain the specific error message.
user
- The ApplicationUser
who will be performing the operation.commentParameters
- the comment parameters.
Comment create(ApplicationUser user, CommentService.CommentCreateValidationResult commentValidationResult, boolean dispatchEvent)
Comment
on given Issue
.
user
- The ApplicationUser
who will be performing the operation.commentValidationResult
- the results of validateCommentCreate(ApplicationUser, com.atlassian.jira.bc.issue.comment.CommentService.CommentParameters)
.dispatchEvent
- whether or not you want to have an event dispatched on Comment creation
@Deprecated Comment create(ApplicationUser user, Issue issue, String body, String groupLevel, Long roleLevelId, Date created, boolean dispatchEvent, ErrorCollection errorCollection)
validateCommentCreate(ApplicationUser, com.atlassian.jira.bc.issue.comment.CommentService.CommentParameters)
and create(ApplicationUser, CommentCreateValidationResult, boolean)
.
Comment
on the given Issue
.
user
- The ApplicationUser
who will be performing the operation.issue
- The Issue
you wish to associate the Comment
with. This can not be nullbody
- The body of the commentgroupLevel
- The group level visibility of the comment (null if roleLevelId specified)roleLevelId
- The role level visibility id of the comment (null if groupLevel specified)created
- The date of comment creationdispatchEvent
- whether or not you want to have an event dispatched on Comment creationerrorCollection
- holder for any errors that were thrown attempting to create a comment
@Deprecated Comment create(com.atlassian.crowd.embedded.api.User user, Issue issue, String body, String groupLevel, Long roleLevelId, Date created, boolean dispatchEvent, ErrorCollection errorCollection)
validateCommentCreate(ApplicationUser, com.atlassian.jira.bc.issue.comment.CommentService.CommentParameters)
and create(ApplicationUser, CommentCreateValidationResult, boolean)
.
Comment
on the given Issue
.
user
- The User
who will be performing the operation.issue
- The Issue
you wish to associate the Comment
with. This can not be nullbody
- The body of the commentgroupLevel
- The group level visibility of the comment (null if roleLevelId specified)roleLevelId
- The role level visibility id of the comment (null if groupLevel specified)created
- The date of comment creationdispatchEvent
- whether or not you want to have an event dispatched on Comment creationerrorCollection
- holder for any errors that were thrown attempting to create a comment
@Deprecated Comment create(ApplicationUser user, Issue issue, String body, String groupLevel, Long roleLevelId, boolean dispatchEvent, ErrorCollection errorCollection)
validateCommentCreate(ApplicationUser, com.atlassian.jira.bc.issue.comment.CommentService.CommentParameters)
and create(ApplicationUser, CommentCreateValidationResult, boolean)
.
Comment
on the given Issue
set with current date and time.
user
- The ApplicationUser
who will be performing the operation.issue
- The Issue
you wish to associate the Comment
with. This can not be nullbody
- The body of the commentgroupLevel
- The group level visibility of the comment (null if roleLevelId specified)roleLevelId
- The role level visibility id of the comment (null if groupLevel specified)dispatchEvent
- whether or not you want to have an event dispatched on Comment creationerrorCollection
- holder for any errors that were thrown attempting to create a comment
@Deprecated Comment create(com.atlassian.crowd.embedded.api.User user, Issue issue, String body, String groupLevel, Long roleLevelId, boolean dispatchEvent, ErrorCollection errorCollection)
create(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue, String, String, Long, boolean, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Creates and persists a Comment
on the given Issue
set with current date and time.
user
- The User
who will be performing the operation.issue
- The Issue
you wish to associate the Comment
with. This can not be nullbody
- The body of the commentgroupLevel
- The group level visibility of the comment (null if roleLevelId specified)roleLevelId
- The role level visibility id of the comment (null if groupLevel specified)dispatchEvent
- whether or not you want to have an event dispatched on Comment creationerrorCollection
- holder for any errors that were thrown attempting to create a comment
@Deprecated Comment create(ApplicationUser user, Issue issue, String body, boolean dispatchEvent, ErrorCollection errorCollection)
validateCommentCreate(ApplicationUser, com.atlassian.jira.bc.issue.comment.CommentService.CommentParameters)
and create(ApplicationUser, CommentCreateValidationResult, boolean)
.
Comment
on the given Issue
set with current date and time, visible to all
- no group level or role level restriction.
user
- The ApplicationUser
who will be performing the operation.issue
- The Issue
you wish to associate the Comment
with. This can not be nullbody
- The body of the commentdispatchEvent
- whether or not you want to have an event dispatched on Comment creationerrorCollection
- holder for any errors that were thrown attempting to create a comment
@Deprecated Comment create(com.atlassian.crowd.embedded.api.User user, Issue issue, String body, boolean dispatchEvent, ErrorCollection errorCollection)
validateCommentCreate(ApplicationUser, com.atlassian.jira.bc.issue.comment.CommentService.CommentParameters)
and create(ApplicationUser, CommentCreateValidationResult, boolean)
.
Comment
on the given Issue
set with current date and time, visible to all
- no group level or role level restriction.
user
- The User
who will be performing the operation.issue
- The Issue
you wish to associate the Comment
with. This can not be nullbody
- The body of the commentdispatchEvent
- whether or not you want to have an event dispatched on Comment creationerrorCollection
- holder for any errors that were thrown attempting to create a comment
@Deprecated void validateCommentUpdate(ApplicationUser user, Long commentId, String body, String groupLevel, Long roleLevelId, ErrorCollection errorCollection)
validateCommentUpdate(ApplicationUser, Long, com.atlassian.jira.bc.issue.comment.CommentService.CommentParameters)
.
update(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.comments.MutableComment, boolean, com.atlassian.jira.util.ErrorCollection)
to persist the changes. If an error is encountered
then the ErrorCollection
will contain the specific error message.
user
- The ApplicationUser
who will be performing the operation and who will be the updatedAuthor.commentId
- The id of the comment to be updated. Permissions will be checked to ensure that the user
has the right to update this comment. If the comment does not exist an error will be reported.body
- The body of the comment to be updated.groupLevel
- The group level visibility of the comment (null if roleLevelId specified)roleLevelId
- The role level visibility id of the comment (null if groupLevel specified)errorCollection
- holder for any errors that were thrown attempting to update a comment@Deprecated void validateCommentUpdate(com.atlassian.crowd.embedded.api.User user, Long commentId, String body, String groupLevel, Long roleLevelId, ErrorCollection errorCollection)
validateCommentUpdate(ApplicationUser user, Long commentId, String body, String groupLevel, Long roleLevelId, ErrorCollection errorCollection)
instead. Since v6.0.
Confirms the parameters to update a comment are valid and that the updating user has the permission to do so.
This method will validate the raw input parameters. This method only validates the parameters and will not
actually persist the changes, you must call update(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.comments.MutableComment, boolean, com.atlassian.jira.util.ErrorCollection)
to persist the changes. If an error is encountered
then the ErrorCollection
will contain the specific error message.
user
- The ApplicationUser
who will be performing the operation and who will be the updatedAuthor.commentId
- The id of the comment to be updated. Permissions will be checked to ensure that the user
has the right to update this comment. If the comment does not exist an error will be reported.body
- The body of the comment to be updated.groupLevel
- The group level visibility of the comment (null if roleLevelId specified)roleLevelId
- The role level visibility id of the comment (null if groupLevel specified)errorCollection
- holder for any errors that were thrown attempting to update a commentCommentService.CommentUpdateValidationResult validateCommentUpdate(ApplicationUser user, Long commentId, CommentService.CommentParameters commentParameters)
update(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.comments.MutableComment, boolean, com.atlassian.jira.util.ErrorCollection)
to persist the changes. If an error is encountered
then the ErrorCollection
will contain the specific error message.
user
- The ApplicationUser
who will be performing the operation and who will be the updatedAuthor.commentId
- The id of the comment to be updated. Permissions will be checked to ensure that the user
has the right to update this comment. If the comment does not exist an error will be reported.commentParameters
- the comment parameters.@Deprecated void update(ApplicationUser user, MutableComment comment, boolean dispatchEvent, ErrorCollection errorCollection)
update(ApplicationUser, CommentUpdateValidationResult, boolean)
instead.
Comment
and sets the comments updated date to be now and the updatedAuthor to be the
passed in user.
user
- the ApplicationUser
who must have permission to update this comment and who will be used as the updateAuthorcomment
- the object that contains the changes to the comment to persist.dispatchEvent
- whether or not you want to have an event dispatched on Comment update. If false then
the issue will not be reindexed.errorCollection
- holder for any errors that were thrown attempting to update a comment
IllegalArgumentException
- if comment or its id is null@Deprecated void update(com.atlassian.crowd.embedded.api.User user, MutableComment comment, boolean dispatchEvent, ErrorCollection errorCollection)
update(ApplicationUser, CommentUpdateValidationResult, boolean)
instead.
Comment
and sets the comments updated date to be now and the updatedAuthor to be the
passed in user.
user
- the User
who must have permission to update this comment and who will be used as the updateAuthorcomment
- the object that contains the changes to the comment to persist.dispatchEvent
- whether or not you want to have an event dispatched on Comment update. If false then
the issue will not be reindexed.errorCollection
- holder for any errors that were thrown attempting to update a comment
IllegalArgumentException
- if comment or its id is nullvoid update(ApplicationUser user, CommentService.CommentUpdateValidationResult updateCommentValidationResult, boolean dispatchEvent)
Comment
and sets the comments updated date to be now and the updatedAuthor to be the
passed in user.
user
- the ApplicationUser
who must have permission to update this comment and who will be used as the updateAuthorupdateCommentValidationResult
- the comment parameters.dispatchEvent
- whether or not you want to have an event dispatched on Comment update. If false then
the issue will not be reindexed.@Nonnull List<Comment> getCommentsForUser(@Nullable ApplicationUser user, @Nonnull Issue issue)
Comment
s for the given user
Will return a list of Comment
s for the given user.
user
- the user to check permissions against ApplicationUser
, or anonymous if null.issue
- the issue with associated comments. Must not be null.
List<Comment> getCommentsForUser(ApplicationUser currentUser, Issue issue, ErrorCollection errorCollection)
getCommentsForUser(ApplicationUser currentUser, Issue issue)
instead. Since v6.3.
Comment
s for the given user.
currentUser
- current ApplicationUser
issue
- the issue with associated commentserrorCollection
- holder for any errors that were thrown attempting to retrieve comments
List<Comment> getCommentsForUser(com.atlassian.crowd.embedded.api.User currentUser, Issue issue, ErrorCollection errorCollection)
getCommentsForUser(ApplicationUser currentUser, Issue issue, ErrorCollection errorCollection)
instead. Since v6.0.
Comment
s for the given user.
currentUser
- current User
issue
- the issue with associated commentserrorCollection
- holder for any errors that were thrown attempting to retrieve comments
@Nonnull List<Comment> getCommentsForUserSince(@Nullable ApplicationUser user, @Nonnull Issue issue, @Nonnull Date since)
Comment
s that were created or updated since the provided date, for the given user.
user
- the user to check permissions against ApplicationUser
, or anonymous if null.issue
- the issue with associated comments. Must not be null.since
- only comments created or updated after this date will be returned. Must not be null.
boolean hasPermissionToCreate(ApplicationUser user, Issue issue, ErrorCollection errorCollection)
boolean hasPermissionToCreate(com.atlassian.crowd.embedded.api.User user, Issue issue, ErrorCollection errorCollection)
hasPermissionToCreate(ApplicationUser user, Issue issue, ErrorCollection errorCollection)
instead. Since v6.0.
user
- The User
who will be performing the operation.issue
- The Issue
you wish to associate the Comment
with. This can not be null.errorCollection
- holder for any errors that were thrown attempting permission checks
boolean hasPermissionToEdit(ApplicationUser user, Comment comment, ErrorCollection errorCollection)
boolean hasPermissionToEdit(com.atlassian.crowd.embedded.api.User user, Comment comment, ErrorCollection errorCollection)
hasPermissionToCreate(ApplicationUser user, Issue issue, ErrorCollection errorCollection)
instead. Since v6.0.
user
- The User
who will be performing the operation.comment
- The Comment
you wish to edit.errorCollection
- holder for any errors that were thrown attempting permission checks
boolean isValidCommentBody(String body, ErrorCollection errorCollection)
errorCollection
. This method was added so
the CommentSystemField can validate the body and set the appropriate error message.
body
- comment body to validateerrorCollection
- holder for any errors that can occur in process of validation
boolean isValidCommentBody(String body, ErrorCollection errorCollection, boolean allowEmpty)
errorCollection
. This method was added so
the CommentSystemField can validate the body and set the appropriate error message.
body
- comment body to validateerrorCollection
- holder for any errors that can occur in process of validationallowEmpty
- indicates whether empty body is allowed
boolean isValidCommentData(ApplicationUser user, Issue issue, String groupLevel, String roleLevelId, ErrorCollection errorCollection)
boolean isValidCommentData(com.atlassian.crowd.embedded.api.User user, Issue issue, String groupLevel, String roleLevelId, ErrorCollection errorCollection)
isValidCommentData(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue, String, String, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
errorCollection
will contain the errors.
user
- The User
who will be performing the operation.issue
- issue to associate the comment withgroupLevel
- comment group visibility levelroleLevelId
- comment project role visibility level iderrorCollection
- holder for any errors that can occur in process of validation
boolean isValidAllCommentData(ApplicationUser user, Issue issue, String body, String groupLevel, String roleLevelId, ErrorCollection errorCollection)
boolean isValidAllCommentData(com.atlassian.crowd.embedded.api.User user, Issue issue, String body, String groupLevel, String roleLevelId, ErrorCollection errorCollection)
isValidAllCommentData(ApplicationUser user, Issue issue, String body, String groupLevel, String roleLevelId, ErrorCollection errorCollection)
instead. Since v6.0.
errorCollection
if any errors occur.
user
- The User
who will be performing the operation.issue
- issue to associate the comment withbody
- comment bodygroupLevel
- comment group visibility levelroleLevelId
- comment project role visibility level iderrorCollection
- holder for any errors that can occur in process of validarion
boolean isGroupVisiblityEnabled()
boolean isProjectRoleVisiblityEnabled()
Comment getCommentById(ApplicationUser user, Long commentId, ErrorCollection errorCollection)
Comment getCommentById(com.atlassian.crowd.embedded.api.User user, Long commentId, ErrorCollection errorCollection)
getCommentById(ApplicationUser user, Long commentId, ErrorCollection errorCollection)
instead. Since v6.0.
user
- who is looking up the commentcommentId
- the id representing the Comment
you would like to retrieve.errorCollection
- holder for any errors that can occur in process of validation
Comment
or null (if the user cannot browse the comment).MutableComment getMutableComment(ApplicationUser user, Long commentId, ErrorCollection errorCollection)
MutableComment getMutableComment(com.atlassian.crowd.embedded.api.User user, Long commentId, ErrorCollection errorCollection)
getCommentById(com.atlassian.jira.user.ApplicationUser, Long, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
MutableComment
for the passed in commentId. This
will return null if the user does not have permission to view the
comment. The difference between this method and
getCommentById(User,Long,ErrorCollection)
is that this method
returns a version of the Comment
that we can set values on.
user
- the current user.commentId
- the id that we use to find the comment object.errorCollection
- holder for any errors that can occur in process of validation
boolean hasPermissionToDelete(JiraServiceContext jiraServiceContext, Long commentId)
jiraServiceContext
- jiraServiceContext containing the user who wishes to delete a comment and the
errorCollection that will contain any errors encountered when calling the methodcommentId
- the id of the target comment (cannot be null)
boolean hasPermissionToEdit(JiraServiceContext jiraServiceContext, Long commentId)
jiraServiceContext
- JIRA service context containing the user who wishes to edit a comment and the
errorCollection that will contain any errors encountered when calling the methodcommentId
- the id of the target comment (cannot be null)
void delete(JiraServiceContext jiraServiceContext, Comment comment, boolean dispatchEvent)
hasPermissionToDelete(com.atlassian.jira.bc.JiraServiceContext,Long)
is successfully called first.
jiraServiceContext
- containing the user who wishes to delete a comment and the errorCollection
that will contain any errors encountered when calling the methodcomment
- the comment to delete (cannot be null)dispatchEvent
- a flag indicating whether to dispatch an issue updated event. If this flag is false then
the issue will not be reindexed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |