/** * Get the value of commentsForReview * * @return the value of commentsForReview */ public List<StudyCommentUI> getCommentsForReview() { if (commentsForReview == null) { commentsForReview = new ArrayList(); List<StudyComment> tempCommentsForReview = studyCommentService.getAbusiveStudyComments(); Iterator iterator = tempCommentsForReview.iterator(); while (iterator.hasNext()) { StudyComment studyComment = (StudyComment) iterator.next(); StudyCommentUI studyCommentUI = new StudyCommentUI(studyComment); commentsForReview.add(studyCommentUI); } totalNotifications = new Long(Integer.toString(commentsForReview.size())); } return commentsForReview; }
public void deleteFlaggedComment(ActionEvent event) { if (deleteCommentLink.getAttributes().get("commentId") != null) { flaggedCommentId = new Long(deleteCommentLink.getAttributes().get("commentId").toString()); } String deletedMessage = "You reported as abusive a comment in the study titled, " + getFlaggedStudyTitle() + ". " + "\n" + "The comment was, \"" + getFlaggedStudyComment() + "\". " + "\n" + "This comment was deleted in accordance with the " + "study comments terms of use."; studyCommentService.deleteComment(flaggedCommentId, deletedMessage); getVDCRequestBean().setSuccessMessage("Successfully deleted the flagged comment."); // cleanup flaggedCommentId = new Long("0"); commentsForReview = null; actionComplete = true; }
public void ignoreCommentFlag(ActionEvent event) { if (ignoreCommentFlagLink.getAttributes().get("commentId") != null) { flaggedCommentId = new Long(ignoreCommentFlagLink.getAttributes().get("commentId").toString()); } String okMessage = "You reported as abusive a comment in the study titled, " + getFlaggedStudyTitle() + ". " + "\n" + "The comment was, \"" + getFlaggedStudyComment() + "\". " + "\n" + "According to the terms of use of this study, the " + "reported comment is not an abuse. This comment will remain posted, and will " + "no longer appear to you as reported."; studyCommentService.okComment(flaggedCommentId, okMessage); getVDCRequestBean().setSuccessMessage("Successfully ignored the flagged comment."); // cleanup flaggedCommentId = new Long("0"); commentsForReview = null; actionComplete = true; }