/** * Updates the configuration of the given resource from the configuration object model. */ public ConfigurationParametersUpdateResponse configurationParametersUpdate( String resourceId, String configType, ConfigParameters model) throws Exception { File xmlFile = File.createTempFile("conf", "xml"); FileWriter fos = null; try { fos = new FileWriter(xmlFile); fos.write(model.toXML()); fos.close(); return configurationParametersUpdate(resourceId,configType,xmlFile); } finally { IOUtils.closeQuietly(fos); xmlFile.delete(); } }
/** * Updates the configuration of the given resource from the configuration object model. */ public ConfigurationParametersUpdateResponse configurationParametersUpdate( String resourceId, String configType, ConfigParameters model) throws Exception { File xmlFile = File.createTempFile("conf", "xml"); FileWriter fos = null; try { fos = new FileWriter(xmlFile); fos.write(model.toXML()); fos.close(); return configurationParametersUpdate(resourceId,configType,xmlFile); } finally { IOUtils.closeQuietly(fos); xmlFile.delete(); } }