Пример #1
0
 public List<CommentAttributes> getCommentsForReceiver(
     String courseId,
     String giverEmail,
     CommentParticipantType recipientType,
     String receiverEmail)
     throws EntityDoesNotExistException {
   verifyIsCoursePresent(courseId, "get");
   List<CommentAttributes> comments =
       commentsDb.getCommentsForReceiver(courseId, recipientType, receiverEmail);
   Iterator<CommentAttributes> iterator = comments.iterator();
   while (iterator.hasNext()) {
     CommentAttributes c = iterator.next();
     if (!c.giverEmail.equals(giverEmail)) {
       iterator.remove();
     }
   }
   return comments;
 }
Пример #2
0
 public List<CommentAttributes> getCommentsForReceiver(
     String courseId, CommentParticipantType recipientType, String receiverEmail)
     throws EntityDoesNotExistException {
   verifyIsCoursePresent(courseId, "get");
   return commentsDb.getCommentsForReceiver(courseId, recipientType, receiverEmail);
 }