Пример #1
0
  public static String getString(
      ManageableThread thread, String parameter, boolean mandatory, String defaultValue)
      throws AppException {
    if (mandatory) {
      return thread.loadMandatory(parameter);
    } else {
      Object value = thread.getParameter(parameter);

      return (value == null) ? defaultValue : (String) value;
    }
  }
Пример #2
0
  public static Boolean getBoolean(ManageableThread thread, String parameter, boolean defaultValue)
      throws AppException {
    Object objValue = thread.getParameter(parameter);

    if (objValue == null) {
      return defaultValue;
    }

    String value = (String) objValue;

    value = value.toUpperCase();

    return (value == null) ? defaultValue : value.equals("YES") || value.equals("Y");
  }
Пример #3
0
 public static String getBackupDir(ManageableThread thread) throws AppException {
   return thread.loadDirectory("backupDir", true, false);
 }
Пример #4
0
 public static String getExportDir(ManageableThread thread) throws AppException {
   return thread.loadDirectory("exportDir", true, true);
 }