@Test public void testFindConfiguration() throws Exception { XMLConfiguration config = MonetaConfiguration.findConfiguration(); Assert.assertTrue(config != null); System.setProperty(MonetaConfiguration.MONETA_CONFIGURATION_PROPERTY, CONFIG_TEST_FILE_NAME); config = MonetaConfiguration.findConfiguration(); Assert.assertTrue(config != null); }
protected static final XMLConfiguration findConfiguration() { String configFileName = System.getProperty(MONETA_CONFIGURATION_PROPERTY); XMLConfiguration config = null; if ( !StringUtils.isEmpty(configFileName)) { return loadConfigurationFromFile(configFileName); } InputStream configurationStream = MonetaConfiguration.class.getClassLoader().getResourceAsStream(DEFAULT_CONFIGURATION_FILE_NAME); if (configurationStream == null) { throw new MonetaException("Moneta configuration not found"); } config = loadConfigurationFromStream(configurationStream); return config; }
MonetaConfiguration { protected static final XMLConfiguration findConfiguration() { String configFileName = System.getProperty(MONETA_CONFIGURATION_PROPERTY); XMLConfiguration config = null; if ( !StringUtils.isEmpty(configFileName)) { return loadConfigurationFromFile(configFileName); } InputStream configurationStream = MonetaConfiguration.class.getClassLoader().getResourceAsStream(DEFAULT_CONFIGURATION_FILE_NAME); if (configurationStream == null) { throw new MonetaException("Moneta configuration not found"); } config = loadConfigurationFromStream(configurationStream); return config; } }
MonetaConfiguration { protected static final XMLConfiguration findConfiguration() { String configFileName = System.getProperty(MONETA_CONFIGURATION_PROPERTY); XMLConfiguration config = null; if ( !StringUtils.isEmpty(configFileName)) { return loadConfigurationFromFile(configFileName); } InputStream configurationStream = MonetaConfiguration.class.getClassLoader().getResourceAsStream(DEFAULT_CONFIGURATION_FILE_NAME); if (configurationStream == null) { throw new MonetaException("Moneta configuration not found"); } config = loadConfigurationFromStream(configurationStream); return config; } MonetaConfiguration();  MonetaConfiguration(InputStream configurationStream); }
MonetaConfiguration { protected static final XMLConfiguration findConfiguration() { String configFileName = System.getProperty(MONETA_CONFIGURATION_PROPERTY); XMLConfiguration config = null; if ( !StringUtils.isEmpty(configFileName)) { return loadConfigurationFromFile(configFileName); } InputStream configurationStream = MonetaConfiguration.class.getClassLoader().getResourceAsStream(DEFAULT_CONFIGURATION_FILE_NAME); if (configurationStream == null) { throw new MonetaException("Moneta configuration not found"); } config = loadConfigurationFromStream(configurationStream); return config; } 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 findConfiguration() { String configFileName = System.getProperty(MONETA_CONFIGURATION_PROPERTY); XMLConfiguration config = null; if ( !StringUtils.isEmpty(configFileName)) { return loadConfigurationFromFile(configFileName); } InputStream configurationStream = MonetaConfiguration.class.getClassLoader().getResourceAsStream(DEFAULT_CONFIGURATION_FILE_NAME); if (configurationStream == null) { throw new MonetaException("Moneta configuration not found"); } config = loadConfigurationFromStream(configurationStream); return config; } 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; }