@Test public void testGetResource() throws IOException { Resource resource = configurationLocator.getResource("mock.mifosChartOfAccounts.xml"); Assert.assertNotNull(resource); Assert.assertTrue(resource.exists()); }
public Resource getResource(String configurationName) throws IOException { Resource res = getConfigurationResource(configurationName); LOGGER.info("ConfigurationLocator found configuration in resource: " + res.getDescription()); return res; }
ConfigurationLocator { public Resource getResource(String configurationName) throws IOException { Resource res = getConfigurationResource(configurationName); LOGGER.info("ConfigurationLocator found configuration in resource: " + res.getDescription()); return res; } }
ConfigurationLocator { public Resource getResource(String configurationName) throws IOException { Resource res = getConfigurationResource(configurationName); LOGGER.info("ConfigurationLocator found configuration in resource: " + res.getDescription()); return res; } ConfigurationLocator(); }
ConfigurationLocator { public Resource getResource(String configurationName) throws IOException { Resource res = getConfigurationResource(configurationName); LOGGER.info("ConfigurationLocator found configuration in resource: " + res.getDescription()); return res; } ConfigurationLocator(); @SuppressWarnings("PMD") // TODO It may be clearer if this returned an URI or URL instead of a String? String getCustomFilePath(String filename); String getFilePath(String filename); @SuppressWarnings({"PMD.OnlyOneReturn"}) String getConfigurationDirectory(); Resource getResource(String configurationName); Resource getUploadedMifosLogo(); void setConfigurationLocatorHelper(ConfigurationLocatorHelper fileFactory); void setDefaultConfigPath(String path); String resolvePath(String fileName); String getLogoDirectory(); String getLogoName(); }
ConfigurationLocator { public Resource getResource(String configurationName) throws IOException { Resource res = getConfigurationResource(configurationName); LOGGER.info("ConfigurationLocator found configuration in resource: " + res.getDescription()); return res; } ConfigurationLocator(); @SuppressWarnings("PMD") // TODO It may be clearer if this returned an URI or URL instead of a String? String getCustomFilePath(String filename); String getFilePath(String filename); @SuppressWarnings({"PMD.OnlyOneReturn"}) String getConfigurationDirectory(); Resource getResource(String configurationName); Resource getUploadedMifosLogo(); void setConfigurationLocatorHelper(ConfigurationLocatorHelper fileFactory); void setDefaultConfigPath(String path); String resolvePath(String fileName); String getLogoDirectory(); String getLogoName(); static final String LOCATOR_ENVIRONMENT_PROPERTY_NAME; }