@Test public void testLoadConfigurationFromFile() throws Exception { XMLConfiguration config = MonetaConfiguration.loadConfigurationFromFile(testFile.getAbsolutePath()); Assert.assertTrue(config != null); Throwable exceptionThrown = null; try {config = MonetaConfiguration.loadConfigurationFromFile("non-existent.xml");} catch (Exception e) { exceptionThrown = e; } Assert.assertTrue(exceptionThrown != null); }
protected static final XMLConfiguration loadConfigurationFromFile(String configFileName) { try { return loadConfigurationFromStream(new FileInputStream(configFileName)); } catch (Exception e) { throw new MonetaException("Moneta configuration file not loaded", e) .addContextValue("configFileName", configFileName); } }
MonetaConfiguration { protected static final XMLConfiguration loadConfigurationFromFile(String configFileName) { try { return loadConfigurationFromStream(new FileInputStream(configFileName)); } catch (Exception e) { throw new MonetaException("Moneta configuration file not loaded", e) .addContextValue("configFileName", configFileName); } } }
MonetaConfiguration { protected static final XMLConfiguration loadConfigurationFromFile(String configFileName) { try { return loadConfigurationFromStream(new FileInputStream(configFileName)); } catch (Exception e) { throw new MonetaException("Moneta configuration file not loaded", e) .addContextValue("configFileName", configFileName); } } MonetaConfiguration();  MonetaConfiguration(InputStream configurationStream); }
MonetaConfiguration { protected static final XMLConfiguration loadConfigurationFromFile(String configFileName) { try { return loadConfigurationFromStream(new FileInputStream(configFileName)); } catch (Exception e) { throw new MonetaException("Moneta configuration file not loaded", e) .addContextValue("configFileName", configFileName); } } MonetaConfiguration();  MonetaConfiguration(InputStream configurationStream); Connection getConnection(String sourceName); Topic getTopic(String topicName); Topic findByPlural(String pluralTopicName); List<Topic> getTopicList(); MonetaDataSource getMonetaDataSource(String sourceName); String[] getIgnoredContextPathNodes(); void setIgnoredContextPathNodes(String[] ignoredContextPathNodes); Map<String, HealthCheck> getHealthChecks(); }
MonetaConfiguration { protected static final XMLConfiguration loadConfigurationFromFile(String configFileName) { try { return loadConfigurationFromStream(new FileInputStream(configFileName)); } catch (Exception e) { throw new MonetaException("Moneta configuration file not loaded", e) .addContextValue("configFileName", configFileName); } } MonetaConfiguration();  MonetaConfiguration(InputStream configurationStream); Connection getConnection(String sourceName); Topic getTopic(String topicName); Topic findByPlural(String pluralTopicName); List<Topic> getTopicList(); MonetaDataSource getMonetaDataSource(String sourceName); String[] getIgnoredContextPathNodes(); void setIgnoredContextPathNodes(String[] ignoredContextPathNodes); Map<String, HealthCheck> getHealthChecks(); static final String MONETA_CONFIGURATION_PROPERTY; static final String DEFAULT_CONFIGURATION_FILE_NAME; }