List of usage examples for org.apache.commons.configuration FileConfiguration load
void load() throws ConfigurationException;
From source file:halfpipe.properties.UrlPropertiesSource.java
private void loadConfig(Map<String, Object> map, FileConfiguration config) throws ConfigurationException { config.load(); Iterator<String> keys = config.getKeys(); while (keys.hasNext()) { String key = keys.next(); map.put(key, config.getProperty(key)); }// w w w. j a va2 s . co m }
From source file:gda.jython.authoriser.FileAuthoriser.java
private FileConfiguration openStaffFile() throws ConfigurationException, IOException { String defXmlDir = LocalProperties.get(LocalProperties.GDA_CONFIG) + File.separator + "xml"; String xmlDir = LocalProperties.get(GDA_USER_PERMISSIONS_DIR, defXmlDir); FileConfiguration configFile = LocalParameters.getXMLConfiguration(xmlDir, BEAMLINESTAFF, true); configFile.clear();//from w ww. j a v a2 s .c o m configFile.load(); return configFile; }
From source file:gda.jython.authoriser.FileAuthoriser.java
private FileConfiguration openConfigFile() throws ConfigurationException, IOException { String defXmlDir = LocalProperties.get(LocalProperties.GDA_CONFIG) + File.separator + "xml"; String xmlDir = LocalProperties.get(GDA_USER_PERMISSIONS_DIR, defXmlDir); FileConfiguration configFile = LocalParameters.getXMLConfiguration(xmlDir, AUTHORISATIONLEVELS, true); configFile.clear();//from w w w .j a va2s .co m configFile.load(); return configFile; }
From source file:io.datalayer.conf.XmlConfigurationTest.java
/** * Helper method for checking if a save operation was successful. Loads a * saved configuration and then tests against a reference configuration. * //from w w w . j ava2s .c om * @param checkConfig * the configuration to check * @throws ConfigurationException * if an error occurs */ private void checkSavedConfig(FileConfiguration checkConfig) throws ConfigurationException { checkConfig.load(); ConfigurationAssert.assertEquals(conf, checkConfig); }
From source file:org.parosproxy.paros.view.AbstractFrame.java
private FileConfiguration loadConfig() { FileConfiguration config = Model.createConfig(); try {/* ww w . java 2s. c om*/ config.load(); } catch (ConfigurationException e) { e.printStackTrace(); } return config; }