Ejemplo n.º 1
0
 /**
  * Save the list of ParamInfo-s into the given file
  *
  * @param infoList List of infos
  * @param filename The filename to write to
  */
 public void doSave(List infoList, String filename) {
   try {
     Element root = createDom(XmlUtil.makeDocument(), infoList);
     IOUtil.writeFile(filename, XmlUtil.toString(root));
   } catch (Exception exc) {
     LogUtil.printException(log_, "Error writing file", exc);
   }
 }
Ejemplo n.º 2
0
 /** Write out the user's editable param infos */
 private void saveData() {
   Document usersDoc = XmlUtil.makeDocument();
   Element usersRoot = createDom(usersDoc, getFirstTable().getParamInfoList());
   try {
     resources.setWritableDocument(usersDoc, usersRoot);
     resources.writeWritable();
     // Reinitialize the static state
     paramInfos = new ArrayList();
     paramToInfo = new Hashtable();
     init(resources);
   } catch (Exception exc) {
     LogUtil.printException(log_, "writing aliases xml", exc);
   }
 }