ConfigurationOverrides { public void updateWithOverrides(String configFile, ServletContext context, Path appPath, Element configElement) throws JDOMException, IOException { String resource = lookupOverrideParameter(context, appPath); ServletResourceLoader loader = new ServletResourceLoader(context, appPath); updateConfig(loader, resource, configFile, configElement); } ConfigurationOverrides(final String overrides); void updateLoggingAsAccordingToOverrides(ServletContext context, Path appPath); void updateWithOverrides(String configFile, ServletContext context, Path appPath, Element configElement); Element loadXmlFileAndUpdate(String servletRelativePath, ServletContext context); List<String> loadTextFileAndUpdate(String configFilePath, ServletContext context, Path appPath, BufferedReader reader); @SuppressWarnings("unchecked") void importSpringConfigurations(XmlBeanDefinitionReader reader, ConfigurableBeanFactory beanFactory, ServletContext servletContext, Path appPath); void postProcessSpringBeanFactory(ConfigurableListableBeanFactory beanFactory, ServletContext servletContext,
                                             Path appPath); void onSpringApplicationContextFinishedRefresh(ConfigurableListableBeanFactory beanFactory, ServletContext servletContext,
                                                          Path appPath); static final String OVERRIDES_KEY; static final ConfigurationOverrides DEFAULT; }
@Test public void noUpdateConfig() throws JDOMException, IOException { Element config = Xml.loadFile(classLoader.getResource("test-config.xml")); Element unchanged = (Element) config.clone(); ConfigurationOverrides.DEFAULT.updateWithOverrides("config.xml", null, falseAppPath, config); assertLang("eng", config); assertEquals(Xml.selectString(unchanged, "default/gui/xml[@name = 'countries']/@file"), Xml.selectString(config, "default/gui/xml[@name = 'countries']/@file")); }