@Test public void testLoadConfigFileWithWrongPath() { DawgConfiguration config = new DawgConfiguration(); System.setProperty(DawgConfiguration.DAWG_PATH_PARAM, ""); File f = new File("", "dawg.ini"); try { config.load(new FileInputStream(f)) ; } catch (IOException e) { LOGGER.debug("Configuration loading failed upon not finding the specified file. This is the expected result."); } }
public void load(String configFileName) throws IOException { if(configFileName == null) this.ini = Config.loadIni(); else this.ini = Config.loadIni(configFileName); if(!this.ini.containsKey(INI_SECTION)) this.ini.add(INI_SECTION); }
DawgConfiguration { public void load(String configFileName) throws IOException { if(configFileName == null) this.ini = Config.loadIni(); else this.ini = Config.loadIni(configFileName); if(!this.ini.containsKey(INI_SECTION)) this.ini.add(INI_SECTION); } }
DawgConfiguration { public void load(String configFileName) throws IOException { if(configFileName == null) this.ini = Config.loadIni(); else this.ini = Config.loadIni(configFileName); if(!this.ini.containsKey(INI_SECTION)) this.ini.add(INI_SECTION); } DawgConfiguration(); }
DawgConfiguration { public void load(String configFileName) throws IOException { if(configFileName == null) this.ini = Config.loadIni(); else this.ini = Config.loadIni(configFileName); if(!this.ini.containsKey(INI_SECTION)) this.ini.add(INI_SECTION); } DawgConfiguration(); String getDawgShowUrl(); String getDawgHouseUrl(); String getDawgVersion(); String getDawgShowHealthUrl(); String getDawgHouseHealthUrl(); String getDawgPoundHealthUrl(); String getDawgPoundUrl(); AuthServerConfig getAuthConfig(); LdapAuthServerConfig getLdapAuthConfig(); String get(String key); String get(String key, String def); T get(String key, Class<T> clazz, T def); void put(String key, String value); void load(String configFileName); boolean tryLoad(String configFileName); void load(InputStream is); boolean tryLoad(InputStream is); }
DawgConfiguration { public void load(String configFileName) throws IOException { if(configFileName == null) this.ini = Config.loadIni(); else this.ini = Config.loadIni(configFileName); if(!this.ini.containsKey(INI_SECTION)) this.ini.add(INI_SECTION); } DawgConfiguration(); String getDawgShowUrl(); String getDawgHouseUrl(); String getDawgVersion(); String getDawgShowHealthUrl(); String getDawgHouseHealthUrl(); String getDawgPoundHealthUrl(); String getDawgPoundUrl(); AuthServerConfig getAuthConfig(); LdapAuthServerConfig getLdapAuthConfig(); String get(String key); String get(String key, String def); T get(String key, Class<T> clazz, T def); void put(String key, String value); void load(String configFileName); boolean tryLoad(String configFileName); void load(InputStream is); boolean tryLoad(InputStream is); static final String INI_SECTION; static final String INI_AUTH_SECTION; static final String DAWG_PATH_PARAM; static final String DEFAULT_DAWG_PATH; static final String DAWG_SHOW_URL; static final String DAWG_HOUSE_URL; static final String DAWG_POUND_URL; static final String DAWG_SHOW_HEALTH_URL; static final String DAWG_HOUSE_HEALTH_URL; static final String DAWG_POUND_HEALTH_URL; static final String DEFAULT_DAWG_SHOW_HEALTH_URL; static final String DEFAULT_DAWG_HOUSE_HEALTH_URL; static final String DEFAULT_DAWG_POUND_HEALTH_URL; static final String DAWG_VERSION; }