boolean load(Element pj_el) {
    // General settings
    this.rep_location = loadString("rep_location", pj_el);
    this.out_location = loadString("out_location", pj_el);
    this.rep_server = loadString("rep_server", pj_el);
    this.rep_server_port = loadInt("rep_server_port", pj_el);
    this.max_pdf_storage = loadInt("max_pdf_storage", pj_el);
    this.min_pdf_lifetime = loadInt("min_pdf_lifetime", pj_el);

    // Db information
    this.db_driver = loadString("db_driver", pj_el);
    this.db_conn_str = loadString("db_conn_str", pj_el);
    this.db_user = loadString("db_user", pj_el);
    this.db_pwd = loadString("db_pwd", pj_el);

    // Generation Information
    this.gen_jasp_root = loadString("gen_jasp_root", pj_el);
    this.gen_class_dir = loadString("gen_class_dir", pj_el);

    Iterator it = pj_el.getChildren("ReportFacade").iterator();
    while (it.hasNext()) {
      Element repf_el = (Element) it.next();
      ReportFacade repf = createEmptyRep();
      repf.load(repf_el);
    }

    return ObjValid();
  }
  void save(Element pj_el) {
    // General settings
    saveString("rep_location", rep_location, pj_el);
    saveString("out_location", out_location, pj_el);
    saveString("rep_server", rep_server, pj_el);
    saveInt("rep_server_port", rep_server_port, pj_el);
    saveInt("max_pdf_storage", max_pdf_storage, pj_el);
    saveInt("min_pdf_lifetime", min_pdf_lifetime, pj_el);

    // Db Information
    saveString("db_driver", db_driver, pj_el);
    saveString("db_conn_str", db_conn_str, pj_el);
    saveString("db_user", db_user, pj_el);
    saveString("db_pwd", db_pwd, pj_el);

    // Generation Information
    saveString("gen_jasp_root", gen_jasp_root, pj_el);
    saveString("gen_class_dir", gen_class_dir, pj_el);

    Iterator it = reports.getIterator();
    while (it.hasNext()) {
      ReportFacade r = (ReportFacade) it.next();
      Element repf_el = new Element("ReportFacade");
      r.save(repf_el);
      pj_el.addContent(repf_el);
    }
  }
 public ReportFacade createRep(String name, File jrxml) {
   ReportFacade rf = new ReportFacade(this);
   boolean b = rf.createReport(name, jrxml, facade.getDirectory());
   if (!b) {
     Logger.addItem(new LogItem(Logger.LEVEL_ERROR, "Create Report failed"));
     return null;
   }
   reports.add(rf);
   Logger.addItem(new LogItem(Logger.LEVEL_INFO, "Report added"));
   return rf;
 }
 public void deleteRep(ReportFacade rep) {
   boolean b = rep.deleteReport();
   if (!b) return;
   reports.remove(rep);
 }
 private ReportFacade createEmptyRep() {
   ReportFacade rf = new ReportFacade(this);
   rf.createEmptyReport();
   reports.add(rf);
   return rf;
 }