public CaseCommentList getComments(String containerId, String caseId, String sort, Integer page, Integer pageSize) { verifyContainerId(containerId, caseId); CommentSortBy sortBy = parseCommentSortBy(sort); Collection<CommentInstance> caseComments = caseService.getCaseComments(caseId, sortBy, ConvertUtils.buildQueryContext(page, pageSize)); logger.debug("Comments for case {} are {}", caseId, caseComments); List<CaseComment> comments = ConvertUtils.transformCaseComments(caseComments); CaseCommentList commentsList = new CaseCommentList(comments); return commentsList; }