/** * Create an Archival Unit * * @return true If successful */ private boolean createAu() { Configuration config = getAuConfigFromForm(); AuProxy au; Element element; try { au = getRemoteApi().createAndSaveAuConfiguration(getPlugin(), config); } catch (ArchivalUnit.ConfigurationException exception) { return error("Configuration failed: " + exception.getMessage()); } catch (IOException exception) { return error("Unable to save configuration: " + exception.getMessage()); } /* * Successful creation - add the AU name and ID to the response document */ element = getXmlUtils().createElement(getResponseRoot(), AP_E_AU); XmlUtils.addText(element, au.getName()); element = getXmlUtils().createElement(getResponseRoot(), AP_E_AUID); XmlUtils.addText(element, au.getAuId()); return true; }