Пример #1
0
  public void hideIgnored(Set<Integer> hideSet, Set<Integer> ignoreList) {
    if (comment != null) {
      if (comment.isIgnored(ignoreList)) {
        hideNode(hideSet);
      }
    }

    if (comment == null || !hideSet.contains(comment.getId())) {
      for (CommentNode child : childs) {
        child.hideIgnored(hideSet, ignoreList);
      }
    }
  }
Пример #2
0
  public void hideAnonymous(UserDao userDao, Set<Integer> hideSet)
      throws SQLException, UserNotFoundException {
    if (comment != null) {
      User commentAuthor = userDao.getUserCached(comment.getUserid());

      if (commentAuthor.isAnonymousScore()) {
        hideNode(hideSet);
      }
    }

    if (comment == null || !hideSet.contains(comment.getId())) {
      for (CommentNode child : childs) {
        child.hideAnonymous(userDao, hideSet);
      }
    }
  }
Пример #3
0
  public void hideNode(Set<Integer> hideSet) {
    if (comment != null) {
      hideSet.add(comment.getId());
    }

    for (CommentNode child : childs) {
      child.hideNode(hideSet);
    }
  }
Пример #4
0
 public String getReplyTitle() {
   if (reply != null) {
     String replyTitle = reply.getTitle();
     if (replyTitle.trim().isEmpty()) {
       return "комментарий";
     }
     return replyTitle;
   } else {
     return "";
   }
 }