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; } }
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"); }
public static String getBackupDir(ManageableThread thread) throws AppException { return thread.loadDirectory("backupDir", true, false); }
public static String getExportDir(ManageableThread thread) throws AppException { return thread.loadDirectory("exportDir", true, true); }