Exemplo n.º 1
0
  public void loadCheckboxes(List comments) {
    ArrayList all = new ArrayList();
    ArrayList approvedList = new ArrayList();
    ArrayList spamList = new ArrayList();
    Iterator it = comments.iterator();
    while (it.hasNext()) {
      CommentData comment = (CommentData) it.next();
      all.add(comment.getId());
      if (comment.getApproved().booleanValue()) {
        approvedList.add(comment.getId());
      }
      if (comment.getSpam().booleanValue()) {
        spamList.add(comment.getId());
      }
    }
    String[] idArray = (String[]) all.toArray(new String[all.size()]);
    ids = Utilities.stringArrayToString(idArray, ",");

    approvedComments = (String[]) approvedList.toArray(new String[approvedList.size()]);
    spamComments = (String[]) spamList.toArray(new String[spamList.size()]);
  }
  public void removeComment(CommentData comment) throws RollerException {
    this.strategy.remove(comment);

    // update weblog last modified date.  date updated by saveWebsite()
    RollerFactory.getRoller().getUserManager().saveWebsite(comment.getWeblogEntry().getWebsite());
  }