コード例 #1
0
 // 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));
   }
 }
コード例 #2
0
 public String getStringParameter(String parameter) {
   ConfigurationDefaults def = ConfigurationDefaults.getInstance();
   String result;
   try {
     result = getStringParameter(parameter, def.getStringParameter(parameter));
   } catch (ConfigurationParameterNotFoundException e) {
     result = getStringParameter(parameter, ConfigurationDefaults.def_String);
   }
   return result;
 }