Interface ServiceDeskCommentService
@PublicApi
public interface ServiceDeskCommentService
This components provides the ability to create public and private comments
for service projects.
-
Method Summary
Modifier and TypeMethodDescriptioncreateServiceDeskComment
(com.atlassian.jira.user.ApplicationUser user, ServiceDeskCommentCreateParameters createParameters) Create a new service project comment with the providedApplicationUser
as the authorgetCommentsOfRequest
(com.atlassian.jira.user.ApplicationUser user, ServiceDeskCommentQuery commentQuery) Retrieve a page ofServiceDeskComment
of a particularCustomerRequest
getServiceDeskCommentById
(com.atlassian.jira.user.ApplicationUser user, Long commentId) Gets aServiceDeskComment
from a comment id.getServiceDeskCommentByJiraComment
(com.atlassian.jira.user.ApplicationUser user, com.atlassian.jira.issue.comments.Comment comment) Gets aServiceDeskComment
from an associatedComment
.Return a newServiceDeskCommentCreateParameters.Builder
to build parameter to create comments
-
Method Details
-
getServiceDeskCommentById
@Nonnull ServiceDeskComment getServiceDeskCommentById(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull Long commentId) Gets aServiceDeskComment
from a comment id. AServiceDeskComment
shares the same id as the underlying JiraComment
.- Parameters:
commentId
- the id of theServiceDeskComment
- Returns:
- the
ServiceDeskComment
with the given id if it exists. - Throws:
ServiceDeskServiceException
- on error
-
getServiceDeskCommentByJiraComment
@Nonnull ServiceDeskComment getServiceDeskCommentByJiraComment(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull com.atlassian.jira.issue.comments.Comment comment) Gets aServiceDeskComment
from an associatedComment
. EachServiceDeskComment
is associated with exactly oneComment
.- Parameters:
comment
- the JIRAComment
- Returns:
- the
ServiceDeskComment
associated with the givenComment
- Throws:
ServiceDeskServiceException
- on error
-
newCreateBuilder
ServiceDeskCommentCreateParameters.Builder newCreateBuilder()Return a newServiceDeskCommentCreateParameters.Builder
to build parameter to create comments -
createServiceDeskComment
@Nonnull ServiceDeskComment createServiceDeskComment(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull ServiceDeskCommentCreateParameters createParameters) Create a new service project comment with the providedApplicationUser
as the author- Parameters:
user
- the author of the commentcreateParameters
- contains comment body and visibility (public/internal)- Returns:
ServiceDeskComment
if successful, orAnError
if fail- Throws:
ServiceDeskServiceException
- on error
-
newQueryBuilder
ServiceDeskCommentQuery.Builder newQueryBuilder()- Returns:
- a new
ServiceDeskCommentQuery.Builder
to build comment query
-
getCommentsOfRequest
@Nonnull PagedResponse<ServiceDeskComment> getCommentsOfRequest(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull ServiceDeskCommentQuery commentQuery) Retrieve a page ofServiceDeskComment
of a particularCustomerRequest
- Parameters:
user
- the user executing the querycommentQuery
- the query to filter comments- Returns:
- an
AnError
if failure, or a paged collection ofServiceDeskComment
- Throws:
ServiceDeskServiceException
- on error
-