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 providedApplicationUseras the authorgetCommentsOfRequest(com.atlassian.jira.user.ApplicationUser user, ServiceDeskCommentQuery commentQuery) Retrieve a page ofServiceDeskCommentof a particularCustomerRequestgetServiceDeskCommentById(com.atlassian.jira.user.ApplicationUser user, Long commentId) Gets aServiceDeskCommentfrom a comment id.getServiceDeskCommentByJiraComment(com.atlassian.jira.user.ApplicationUser user, com.atlassian.jira.issue.comments.Comment comment) Gets aServiceDeskCommentfrom an associatedComment.Return a newServiceDeskCommentCreateParameters.Builderto build parameter to create comments 
- 
Method Details
- 
getServiceDeskCommentById
@Nonnull ServiceDeskComment getServiceDeskCommentById(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull Long commentId) Gets aServiceDeskCommentfrom a comment id. AServiceDeskCommentshares the same id as the underlying JiraComment.- Parameters:
 commentId- the id of theServiceDeskComment- Returns:
 - the 
ServiceDeskCommentwith 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 aServiceDeskCommentfrom an associatedComment. EachServiceDeskCommentis associated with exactly oneComment.- Parameters:
 comment- the JIRAComment- Returns:
 - the 
ServiceDeskCommentassociated with the givenComment - Throws:
 ServiceDeskServiceException- on error
 - 
newCreateBuilder
ServiceDeskCommentCreateParameters.Builder newCreateBuilder()Return a newServiceDeskCommentCreateParameters.Builderto 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 providedApplicationUseras the author- Parameters:
 user- the author of the commentcreateParameters- contains comment body and visibility (public/internal)- Returns:
 ServiceDeskCommentif successful, orAnErrorif fail- Throws:
 ServiceDeskServiceException- on error
 - 
newQueryBuilder
ServiceDeskCommentQuery.Builder newQueryBuilder()- Returns:
 - a new 
ServiceDeskCommentQuery.Builderto build comment query 
 - 
getCommentsOfRequest
@Nonnull PagedResponse<ServiceDeskComment> getCommentsOfRequest(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull ServiceDeskCommentQuery commentQuery) Retrieve a page ofServiceDeskCommentof a particularCustomerRequest- Parameters:
 user- the user executing the querycommentQuery- the query to filter comments- Returns:
 - an 
AnErrorif failure, or a paged collection ofServiceDeskComment - Throws:
 ServiceDeskServiceException- on error
 
 -