// Sets a parameter back to its default public boolean setParameter(String parameter) throws ConfigurationParameterNotFoundException { ConfigurationDefaults def = ConfigurationDefaults.getInstance(); try { return setParameter(parameter, def.getIntParameter(parameter)); } catch (Exception e) { return setParameter(parameter, def.getStringParameter(parameter)); } }
public int getIntParameter(String parameter) { ConfigurationDefaults def = ConfigurationDefaults.getInstance(); int result; try { result = getIntParameter(parameter, def.getIntParameter(parameter)); } catch (ConfigurationParameterNotFoundException e) { result = getIntParameter(parameter, ConfigurationDefaults.def_int); } return result; }
public boolean getBooleanParameter(String parameter) { ConfigurationDefaults def = ConfigurationDefaults.getInstance(); int result; try { result = getIntParameter(parameter, def.getIntParameter(parameter)); } catch (ConfigurationParameterNotFoundException e) { result = getIntParameter(parameter, ConfigurationDefaults.def_boolean); } return result == 0 ? false : true; }