iSeries Remote Systems
v6.0.0

com.ibm.etools.iseries.core.ui.validators
Class ValidatorISeriesObject

java.lang.Object
  extended bycom.ibm.etools.iseries.core.ui.validators.ValidatorISeriesObject
All Implemented Interfaces:
ICellEditorValidator, IInputValidator, IISeriesMessages, com.ibm.etools.systems.core.ISystemMessages, com.ibm.etools.systems.core.ui.validators.ISystemValidator, com.ibm.etools.systems.core.ui.validators.ISystemValidatorUniqueString
Direct Known Subclasses:
ValidatorISeriesAspDev, ValidatorISeriesAutList, ValidatorISeriesCCSIDValue, ValidatorISeriesCommandName, ValidatorISeriesDataArea, ValidatorISeriesDataQ, ValidatorISeriesField, ValidatorISeriesFile, ValidatorISeriesJobD, ValidatorISeriesJobName, ValidatorISeriesJobNumber, ValidatorISeriesJobUser, ValidatorISeriesLibrary, ValidatorISeriesMember, ValidatorISeriesMemberType, ValidatorISeriesModule, ValidatorISeriesMsgFile, ValidatorISeriesObjectAttr, ValidatorISeriesObjectType, ValidatorISeriesProgram, ValidatorISeriesRecord

public class ValidatorISeriesObject
extends Object
implements IISeriesMessages, com.ibm.etools.systems.core.ISystemMessages, com.ibm.etools.systems.core.ui.validators.ISystemValidator, com.ibm.etools.systems.core.ui.validators.ISystemValidatorUniqueString

This class is used in dialogs that prompt for an object name.

This does basic validation, but offers a single place to enhance that checking should we decide to.

We are now using a new algorithm for error checking that handles the variant characters allowed in iseries names ('@', '#' and '$') by including all possible variants of them. So, while an illegal name can still sneak through if the wrong variant is used for the target ccsid, the chance is pretty small, and we never do the worse outcome which is flag a valid name as not valid.

The naming rules for OS/400 member, object, file and library names are as follows:


Field Summary
protected  boolean areQuotesAllowed
           
static String Copyright
           
protected  com.ibm.etools.systems.core.messages.SystemMessage currentMessage
           
static ValidatorISeriesObject DEFAULT_SINGLETON
          To save memory we have a singleton of a very-often used configuration.
static boolean EMPTY_ALLOWED_NO
           
static boolean EMPTY_ALLOWED_YES
           
protected static String INVARIANTS
           
protected  boolean isEmptyAllowed
           
protected  boolean isGenericAllowed
           
static int MAX_OBJNAME_LENGTH
           
protected  int maxLength
           
protected  com.ibm.etools.systems.core.messages.SystemMessage msg_Empty
           
protected  com.ibm.etools.systems.core.messages.SystemMessage msg_Invalid
           
protected  com.ibm.etools.systems.core.messages.SystemMessage msg_NotUnique
           
protected  StringBuffer specialCharsExtended
           
protected static StringBuffer specialCharsNumeric
           
protected  com.ibm.etools.systems.core.ui.validators.ValidatorUniqueString uniqueNameValidator
           
static StringBuffer VALIDCHARS_ENDPOS
          All valid characters for the non-first chars of an iSeries name, using VARIANTS for the $, @ and # characters.
static StringBuffer VALIDCHARS_FIRSTPOS
          All valid characters for the first char of an iSeries name, using VARIANTS for the $, @ and # characters.
static String VARIANTS
          This is a all possible codepage translations from EBCDIC to UCS-2, for the famous three variant characters @,$ and #.
protected  boolean wasQuoted
           
 
Fields inherited from interface com.ibm.etools.iseries.core.IISeriesMessages
MSG_ASPDEVNAME_EMPTY, MSG_ASPDEVNAME_NOTVALID, MSG_AUTLNAME_EMPTY, MSG_AUTLNAME_NOTVALID, MSG_CANNOT_POSITION_TO_LINE, MSG_CCSID_EMPTY, MSG_CCSID_NOTVALID, MSG_CMD_COMPLETED, MSG_CMD_DONEINTJOB, MSG_CMD_INTJOB_BUSY, MSG_CMD_MSGSNOTAVAIL, MSG_CMD_NO_INTJOB, MSG_CMD_NOMSGHELP, MSG_CMD_NOMSGS, MSG_CMD_NOTRUN, MSG_CMD_SBMTOINTJOB, MSG_CMD_SUBMITTED, MSG_CMDNAME_EMPTY, MSG_CMDNAME_NOTVALID, MSG_COMM_CACHE_CLEAR, MSG_COMM_CACHE_INVALID_LOCATION, MSG_COMM_CACHE_NOT_AVAILABLE, MSG_COMM_CANNOT_FIND_PGM, MSG_COMM_CANNOT_FIND_SRVPGM, MSG_COMM_CANNOT_START_DEBUG_ROUTER, MSG_COMM_CANNOT_START_DEBUG_ROUTER_PORT, MSG_COMM_CANNOT_START_DEBUG_ROUTER_STARTED, MSG_COMM_CANNOT_START_RAC, MSG_COMM_CANNOT_STOP_DEBUG_ROUTER, MSG_COMM_CANNOT_STOP_RAC, MSG_COMM_CODE_AUTHORITY, MSG_COMM_CODE_MUSTCLOSE, MSG_COMM_CODE_REG_ERROR, MSG_COMM_CONNECTION_ERROR, MSG_COMM_CONNECTION_NOT_EST, MSG_COMM_CONSOLE_IMPORT_CHOOSE, MSG_COMM_CONSOLE_IMPORT_CODESERVER_XML_PARSE_ERROR, MSG_COMM_CONSOLE_IMPORT_CONNECTION_NAME_EXISTS, MSG_COMM_CONSOLE_IMPORT_FVDCSEC_PARSE_ERROR, MSG_COMM_CONSOLE_IMPORT_FVDCSEC_READ_ERROR, MSG_COMM_CONSOLE_IMPORT_FVDCTCP_ACCESS_ERROR, MSG_COMM_CONSOLE_IMPORT_FVDCTCP_NO_FILE, MSG_COMM_CONSOLE_IMPORT_FVDCTCP_READ_ERROR, MSG_COMM_CONSOLE_IMPORT_IMPORT_ERROR, MSG_COMM_CONSOLE_IMPORT_LIBRARY_XML_READ_ERROR, MSG_COMM_CONSOLE_IMPORT_NO_PROFILE_ERROR, MSG_COMM_CONSOLE_IMPORT_SUMMARY, MSG_COMM_ERROR_BIND, MSG_COMM_ERROR_CLIENT_SECURITY, MSG_COMM_ERROR_JDK_MISSING, MSG_COMM_ERROR_RSESERVER_MISSING, MSG_COMM_ERROR_SERVER_SECURITY, MSG_COMM_GENERAL_IO_ERROR, MSG_COMM_HOST_PTF_MISSING, MSG_COMM_HOSTSVR_NOT_STARTED, MSG_COMM_IJOB_BUSY, MSG_COMM_IJOB_DISCONNECTED, MSG_COMM_LOCAL_SERVER_USED, MSG_COMM_MODULE_NOT_IN_PGM, MSG_COMM_MODULE_NOT_IN_SRVPGM, MSG_COMM_NETWOR_INTERRUPTED, MSG_COMM_NETWORK_DOWN, MSG_COMM_NO_IJOB, MSG_COMM_OS400_VERSION_NOT_SUPPORTED, MSG_COMM_OUTSTANDING_REQ, MSG_COMM_OUTSTANDING_REQS, MSG_COMM_PGM_NO_DEBUG_DATA, MSG_COMM_PTF_MISSING, MSG_COMM_REQUEST_NOT_RESPONDED, MSG_COMM_RQSHELL_PTF_MISSING, MSG_COMM_SRVPGM_NO_DEBUG_DATA, MSG_COMM_UNKNOW_HOST, MSG_COMMAND_EMPTY, MSG_COMMAND_INTERACTIVE, MSG_COMMAND_NOTVALID, MSG_COMMAND_SBMJOB, MSG_COMMANDPARMS_EMPTY, MSG_COMMANDPARMS_NOTVALID, MSG_CONNECTION_COMMPROPERTIES, MSG_CONNECTION_PREFIX, MSG_CONSECUTIVE_SOSI, MSG_COPYLIBRARY_FAILED, MSG_COPYMEMBER_FAILED, MSG_COPYOBJECT_FAILED, MSG_CPA_IMPORT_ERROR_DURING_IMPORT, MSG_CPA_IMPORT_ERROR_READING_TYPES_FILE, MSG_CPA_IMPORT_SELECT_DIRECTORY, MSG_CPA_IMPORT_SPECIFY_CONNECTION_PROFILE, MSG_CPA_IMPORT_SUMMARY_OF_IMPORT, MSG_CPO_IMPORT_DEFAULT_HOST_MUST_BE_SPECIFIED, MSG_CPO_IMPORT_ERROR_DURING_IMPORT, MSG_CPO_IMPORT_FILE_IS_EMPTY, MSG_CPO_IMPORT_FILE_NOT_FOUND, MSG_CPO_IMPORT_FILE_PARSE_ERROR, MSG_CPO_IMPORT_FILE_READ_ERROR, MSG_CPO_IMPORT_FILTER_NAME_EXISTS, MSG_CPO_IMPORT_LIST_OF_FILTERS_IMPORTED, MSG_CPO_IMPORT_NO_FILTERS_TO_IMPORT, MSG_CPO_IMPORT_NO_PROFILE_EXISTS, MSG_CPO_IMPORT_NOT_VALID_CODE_PROJECT, MSG_CPO_IMPORT_PLEASE_ENTER_CPO_FILE, MSG_CPO_IMPORT_PROFILE_NAME_EXISTS, MSG_CPO_IMPORT_SELECT_PROJECT_FILE, MSG_CPO_IMPORT_SPECIFY_CONNECTION_PROFILE, MSG_CPO_IMPORT_SUMMARY_OF_OPERATIONS, MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR, MSG_DOWNLOAD_FAILED, MSG_DOWNLOAD_LOCK_NO_READ, MSG_DOWNLOAD_LOCK_NO_WRITE, MSG_DOWNLOAD_LOCK_NO_WRITE_DSPJOB, MSG_DOWNLOAD_NO_WRITE, MSG_DSPEC_ALT_EMPTY, MSG_DSPEC_ALTSET_INVALID, MSG_DSPEC_BASED_EMPTY, MSG_DSPEC_BASED_INVALID, MSG_DSPEC_CONST_EMPTY, MSG_DSPEC_CONST_INVALID, MSG_DSPEC_DIM_EMPTY, MSG_DSPEC_DIM_INVALID, MSG_DSPEC_DS_LENGTH_EMPTY, MSG_DSPEC_DS_LENGTH_INVALID, MSG_DSPEC_DS_LIKE_EMPTY, MSG_DSPEC_DTAARA_EMPTY, MSG_DSPEC_DTAARA_INVALID, MSG_DSPEC_EXPORT_EMPTY, MSG_DSPEC_EXTFLD_EMPTY, MSG_DSPEC_EXTFMT_INVALID, MSG_DSPEC_EXTNAME_EMPTY, MSG_DSPEC_FROMFILE_EMPTY, MSG_DSPEC_IMPORT_EMPTY, MSG_DSPEC_INZ_EMPTY, MSG_DSPEC_INZ_INVALID, MSG_DSPEC_ITEMNAME_EMPTY, MSG_DSPEC_ITEMNAME_INVALID, MSG_DSPEC_LENGTH_OUTOFRANGE, MSG_DSPEC_LONGNAME_INVALID, MSG_DSPEC_NOT_ALLOWED_CURRENT_PROC, MSG_DSPEC_NOT_ALLOWED_WITH_ALT, MSG_DSPEC_NOT_ALLOWED_WITH_ASC, MSG_DSPEC_NOT_ALLOWED_WITH_BASED, MSG_DSPEC_NOT_ALLOWED_WITH_CTDATA, MSG_DSPEC_NOT_ALLOWED_WITH_DADS, MSG_DSPEC_NOT_ALLOWED_WITH_DESC, MSG_DSPEC_NOT_ALLOWED_WITH_DIM, MSG_DSPEC_NOT_ALLOWED_WITH_EXTFMT, MSG_DSPEC_NOT_ALLOWED_WITH_FROM, MSG_DSPEC_NOT_ALLOWED_WITH_FROM_POS, MSG_DSPEC_NOT_ALLOWED_WITH_LIKEDS, MSG_DSPEC_NOT_ALLOWED_WITH_PERRCD, MSG_DSPEC_NOT_ALLOWED_WITH_PSDS, MSG_DSPEC_NOT_ALLOWED_WITH_RUNTIME, MSG_DSPEC_NOT_ALLOWED_WITH_TO, MSG_DSPEC_OCCURS_EMPTY, MSG_DSPEC_OVERLAY_EMPTY, MSG_DSPEC_OVERLAY_INVALID, MSG_DSPEC_PERRCD_EMPTY, MSG_DSPEC_POSITION_INVALID, MSG_DSPEC_PREFIX_EMPTY, MSG_DSPEC_PREFIX_INVALID, MSG_DSPEC_SHORT_NAME_INVALID, MSG_DSPEC_START_INVALID, MSG_DSPEC_SUBNAME_EMPTY, MSG_DSPEC_SUBNAME_EXISTS, MSG_DSPEC_TOFILE_EMPTY, MSG_DSPEC_WITH_ARRAY_ONLY, MSG_DTAARANAME_EMPTY, MSG_DTAARANAME_NOTVALID, MSG_DTAQNAME_EMPTY, MSG_DTAQNAME_NOTVALID, MSG_FILENAME_EMPTY, MSG_FILENAME_NOTVALID, MSG_FLDNAME_EMPTY, MSG_FLDNAME_NOTVALID, MSG_FREEFORM_CONVERTER_FAILED, MSG_FREEFORM_CONVERTER_OK, MSG_GENERICNAME_NOTVALID, MSG_IASPNAME_NOTVALID, MSG_ISERIES_SEARCH_COLUMNNUMBER_EMPTY, MSG_ISERIES_SEARCH_EVENTFILE_LOCKED, MSG_ISERIES_SEARCH_INPUT_BOTH, MSG_ISERIES_SEARCH_INPUT_NUMBER, MSG_ISERIES_SEARCH_INPUT_POSITIVE_NUMBER, MSG_ISERIES_SEARCH_RECORD_LENGTH, MSG_ISERIES_SEARCH_SEARCHSTRING_EMPTY, MSG_JMC_CTORPAGE_DESC, MSG_JMC_CTORPARAMPAGE_DESC, MSG_JMC_METHPAGE_DESC, MSG_JMC_METHPARAMPAGE_DESC, MSG_JMCWIZARD_CANNOTREADFILE, MSG_JMCWIZARD_CLASSNOPARENT, MSG_JMCWIZARD_CLASSNOTFOUND, MSG_JMCWIZARD_FILEEXISTS, MSG_JMCWIZARD_FILENOTFOUND, MSG_JMCWIZARD_NAMEHASBLANK, MSG_JMCWIZARD_NAMEHASNUM, MSG_JMCWIZARD_NAMEREQ, MSG_JMCWIZARD_NOCONNECTION, MSG_JMCWIZARD_NOJAVART, MSG_JMCWIZARD_NUMHASNONDIGIT, MSG_JMCWIZARD_NUMOUTOFRANGE, MSG_JMCWIZARD_REPL_QUEST, MSG_JMCWIZARD_UNZIPERR, MSG_JOB_NAME_EMPTY, MSG_JOB_NAME_NOTVALID, MSG_JOB_NUMBER_EMPTY, MSG_JOB_NUMBER_NOTVALID, MSG_JOB_PROPERTY_CHG_ERROR, MSG_JOB_PROPERTY_INVALID, MSG_JOB_STATUS_NOT_CHECKED, MSG_JOB_USER_EMPTY, MSG_JOB_USER_NOTVALID, MSG_JOBDNAME_EMPTY, MSG_JOBDNAME_NOTVALID, MSG_JOBMONITOR_REFRESH_HOUR, MSG_JOBMONITOR_REFRESH_HOURS, MSG_JOBMONITOR_REFRESH_MINUTE, MSG_JOBMONITOR_REFRESH_MINUTES, MSG_JOBMONITOR_REFRESH_NEVER, MSG_JOBMONITOR_REFRESH_SECONDS, MSG_LIB_EXISTS, MSG_LIB_NOTFOUND, MSG_LIB_NOTFOUND_CREATE, MSG_LIB_QTEMP_NOTALLOWED, MSG_LIBL_ALREADYCURLIB, MSG_LIBL_ALREADYONLIBL, MSG_LIBL_FILTER_ALREADY_EXISTS, MSG_LIBL_FILTER_QUESTION, MSG_LIBNAME_EMPTY, MSG_LIBNAME_NOTVALID, MSG_LISTRETRIEVAL_CANCELLED, MSG_LISTRETRIEVAL_FAILED, MSG_MBR_SRCDTAREQUIRED, MSG_MBRNAME_EMPTY, MSG_MBRNAME_NOTVALID, MSG_MBRTYPE_DUPLICATE, MSG_MBRTYPE_GENERIC_EMPTY, MSG_MBRTYPE_GENERIC_NOTVALID, MSG_MBRTYPE_NOTUNIQUE, MSG_MBRTYPE_SCALAR_EMPTY, MSG_MBRTYPE_SCALAR_NOTVALID, MSG_MEMBER_NOT_FOUND, MSG_MODULENAME_EMPTY, MSG_MODULENAME_NOTVALID, MSG_MOVEMEMBER_FAILED, MSG_MOVEMEMBER_SAMEFILE, MSG_MOVEOBJECT_FAILED, MSG_MOVEOBJECT_SAMELIBRARY, MSG_MSGFILENAME_EMPTY, MSG_MSGFILENAME_NOTVALID, MSG_NEW_COMPILE_MAIN_COMMAND_EMPTY, MSG_NEW_COMPILE_MAIN_COMMAND_INTRO, MSG_NEW_COMPILE_MAIN_DESC, MSG_NEW_COMPILE_MAIN_NAME_DUPLICATE, MSG_NEW_COMPILE_MAIN_NAME_EMPTY, MSG_NEW_COMPILE_MAIN_NAME_INTRO, MSG_NEWMBRTYPE_EMPTY, MSG_NEWMBRTYPE_INUSE, MSG_NFS_CREATE_DIR_QUESTION, MSG_NFS_DIR_NOT_CREATED, MSG_NFS_DISPLAY_ALL_LIB, MSG_NFS_ENTERNAME, MSG_NFS_ENTERNEWNAME, MSG_NFS_ENTERTYPE, MSG_NFS_INVALID_SUBSET_ATTRIB, MSG_NFS_INVALID_SUBSET_NAME, MSG_NFS_INVALID_SUBSET_SIZE, MSG_NFS_INVALID_SUBSET_TYPE, MSG_NFS_INVALID_SUBSVAR, MSG_NFS_INVALIDCHARACTER, MSG_NFS_INVALIDNAME, MSG_NFS_INVALIDTYPE, MSG_NFS_MISSING_SUBSVAR, MSG_NFS_OVERWRITE_FILE_QUESTION, MSG_NFS_READONLY_FILE, MSG_NFS_TYPENOTFOUND, MSG_NO_QTEMP_EDIT_SUPPORT, MSG_OBJATTR_EMPTY, MSG_OBJATTR_GENERIC_EMPTY, MSG_OBJATTR_GENERIC_NOTVALID, MSG_OBJATTR_NOTVALID, MSG_OBJATTR_SCALAR_EMPTY, MSG_OBJATTR_SCALAR_NOTVALID, MSG_OBJNAME_EMPTY, MSG_OBJNAME_NOTVALID, MSG_OBJTYPE_ALLALLNOTVALID, MSG_OBJTYPE_DUPLICATE, MSG_OBJTYPE_EMPTY, MSG_OBJTYPE_NOTUNIQUE, MSG_OBJTYPE_NOTVALID, MSG_OBJTYPEATTR_EMPTY, MSG_OBJTYPEATTR_NOTVALID, MSG_OPEN_IN_EDITOR_NO_MEMBER, MSG_PASSWORD_GOING_TO_EXPIRE, MSG_PASSWORD_GOING_TO_EXPIRE_TOMORROW, MSG_PASSWORD_NEW_ADJACENT_DIGITS, MSG_PASSWORD_NEW_CHARACTER_INVALID, MSG_PASSWORD_NEW_CONSECUTIVE_REPEAT_CHARACTER, MSG_PASSWORD_NEW_DISALLOWED, MSG_PASSWORD_NEW_NO_NUMERIC, MSG_PASSWORD_NEW_PREVIOUSLY_USED, MSG_PASSWORD_NEW_REPEAT_CHARACTER, MSG_PASSWORD_NEW_SAME_POSITION, MSG_PASSWORD_NEW_TOO_LONG, MSG_PASSWORD_NEW_TOO_SHORT, MSG_PASSWORD_NEW_USERID, MSG_PASSWORD_OLD_NOT_VALID, MSG_PATH_PREFIX, MSG_PATHNAME_EMPTY, MSG_PGMNAME_EMPTY, MSG_PGMNAME_NOTVALID, MSG_PGMSRVPGMNAME_EMPTY, MSG_PGMSRVPGMNAME_NOTVALID, MSG_PREFIX, MSG_PROCEDURE, MSG_QUESTION_CRTLIB, MSG_RCDNAME_EMPTY, MSG_RCDNAME_NOTVALID, MSG_RECORD_LENGTH_EMPTY, MSG_RECORD_LENGTH_NOTVALID, MSG_RECORD_NF, MSG_REFLIB_REQUIRED, MSG_RPGWIZARD_ALL_OPTIONS_SELECTED, MSG_RPGWIZARD_ARRAY_NAME_INVALID, MSG_RPGWIZARD_ARRAY_NOT_INTEGER, MSG_RPGWIZARD_CCSID_EMPTY, MSG_RPGWIZARD_CCSID_INVALID, MSG_RPGWIZARD_CLASS_EMPTY, MSG_RPGWIZARD_CLASS_INVALID, MSG_RPGWIZARD_CONSTANT_NAME_INVALID, MSG_RPGWIZARD_DECIMAL_NOT_INTEGER, MSG_RPGWIZARD_DECIMAL_OUT_OF_RANGE, MSG_RPGWIZARD_EXTNAME_INVALID, MSG_RPGWIZARD_FIELDTYPE_NAME_EMPTY, MSG_RPGWIZARD_FIELDTYPE_NAME_INVALID, MSG_RPGWIZARD_FORMAT_INVALID, MSG_RPGWIZARD_FORMAT_NOT_SELECTED, MSG_RPGWIZARD_LENGTH_EMPTY, MSG_RPGWIZARD_LENGTH_INVALID, MSG_RPGWIZARD_LENGTH_NOT_INTEGER, MSG_RPGWIZARD_LENGTH_OUT_OF_RANGE, MSG_RPGWIZARD_NUMCONST_NAME_EMPTY, MSG_RPGWIZARD_NUMCONST_NAME_INVALID, MSG_RPGWIZARD_PARAMETER_NAME_EMPTY, MSG_RPGWIZARD_PARAMETER_NAME_EXIST, MSG_RPGWIZARD_PARAMETER_NAME_INVALID, MSG_RPGWIZARD_PROCEDURE_NAME_EMPTY, MSG_RPGWIZARD_PROCEDURE_NAME_INVALID, MSG_RPGWIZARD_TYPE_NOT_SELECTED, MSG_SAVEFILE_CREATING, MSG_SAVEFILE_EXIST_NOTSAVF, MSG_SAVEFILE_EXIST_REPLACE, MSG_SAVEFILE_LOCAL_ERROR, MSG_SAVEFILE_RESTORING, MSG_SAVEFILE_RSTLIB_EXISTS, MSG_SAVEFILE_UPLOAD_DONE, MSG_SAVEFILE_UPLOAD_ERROR, MSG_SBMJOB_PARMS_NOCMD, MSG_SBMJOB_PARMS_NOJOBD, MSG_SIGNON_GENERAL_ERROR, MSG_SIGNON_PASSWORD_ERROR, MSG_SIGNON_PASSWORD_EXPIRED, MSG_SIGNON_PASSWORD_INCORRECT, MSG_SIGNON_PASSWORD_INCORRECT_USER_DISABLED, MSG_SIGNON_PASSWORD_NEW_VERIFY_MISMATCH, MSG_SIGNON_USERID_DISABLED, MSG_SIGNON_USERID_ERROR, MSG_SIGNON_USERID_INVALID, MSG_SRVPGMNAME_EMPTY, MSG_SRVPGMNAME_NOTVALID, MSG_STATUS_UPLOADING, MSG_STATUS_VERIFYING, MSG_SYNTAX_CHECK_ILERPG_DLLS_NOTLOADED, MSG_SYNTAX_CHECK_ILERPG_ERROR, MSG_SYNTAX_CHECK_ILERPG_OK, MSG_SYNTAX_CHECK_MORE_THAN_MAX_MSG, MSG_SYNTAX_CHECK_SQL_OFFLINE, MSG_TABLE_EXPORT_ERROR, MSG_TITLE, MSG_UNEPECTED_UNKNOWN, MSG_UNEXPCTED_UNEXPECTED, MSG_UPLOAD_LOCK_NO_READ, MSG_UPLOAD_LOCK_NO_WRITE, MSG_UPLOAD_LOCK_NO_WRITE_DSPJOB, MSG_UPLOAD_MEMBER_EXISTS, MSG_UPLOAD_NO_MEMBER, MSG_UPLOAD_NO_WRITE, MSG_USERID_EMPTY, MSG_USERID_NOTVALID, MSG_VERIFY_DLLS_NOTLOADED, MSG_VERIFY_ILERPG_COMM_BUSY, MSG_VERIFY_ILERPG_COMPILE_ERR, MSG_VERIFY_ILERPG_DLLS_NOTLOADED, MSG_VERIFY_ILERPG_IO_LISTFIL, MSG_VERIFY_ILERPG_LOW_SEVERITY, MSG_VERIFY_ILERPG_NO_MEMORY, MSG_VERIFY_ILERPG_OK, MSG_VERIFY_ILERPG_OPEN_LISTFIL, MSG_VERIFY_ILERPG_STOP_KEY_PRESSED, MSG_VERIFY_ILERPG_SYSERR, PLUGIN_ID, PREFIX, RESID_PREFIX
 
Fields inherited from interface com.ibm.etools.systems.core.ISystemMessages
copyright, FILEMSG_ARCHIVE_CORRUPTED, FILEMSG_COPY_FILE_FAILED, FILEMSG_COPY_ROOT, FILEMSG_CREATE_FILE_FAILED, FILEMSG_CREATE_FILE_FAILED_EXIST, FILEMSG_CREATE_FOLDER_FAILED, FILEMSG_CREATE_FOLDER_FAILED_EXIST, FILEMSG_CREATE_RESOURCE_NOTVISIBLE, FILEMSG_DELETE_FILE_FAILED, FILEMSG_DESTINATION_CONFLICTING, FILEMSG_DESTINATION_EMPTY, FILEMSG_ERROR_NOFILETYPES, FILEMSG_EXPORT_ERROR, FILEMSG_EXPORT_FAILED, FILEMSG_EXPORT_NONE_SELECTED, FILEMSG_EXPORT_PROBLEMS, FILEMSG_FILE_NOTFOUND, FILEMSG_FOLDER_IS_FILE, FILEMSG_FOLDER_NOTEMPTY, FILEMSG_FOLDER_NOTFOUND, FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE, FILEMSG_IMPORT_ERROR, FILEMSG_IMPORT_FAILED, FILEMSG_IMPORT_FILTERING, FILEMSG_IMPORT_NONE_SELECTED, FILEMSG_IMPORT_PROBLEMS, FILEMSG_IMPORT_SELF, FILEMSG_IO_ERROR, FILEMSG_MOVE_FILE_FAILED, FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOUCE, FILEMSG_MOVE_TARGET_EQUALS_SOURCE, FILEMSG_NOT_WRITABLE, FILEMSG_RENAME_FILE_FAILED, FILEMSG_RENAME_RESOURCE_NOTVISIBLE, FILEMSG_SECURITY_ERROR, FILEMSG_SOURCE_EMPTY, FILEMSG_SOURCE_IS_FILE, FILEMSG_TARGET_EXISTS, FILEMSG_VALIDATE_FILEFILTERSTRING_EMPTY, FILEMSG_VALIDATE_FILEFILTERSTRING_NOINCLUDES, FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE, FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID, MSG_ADDTO_VIRTUAL_DEST, MSG_CACHE_UNABLE_TO_SYNCH, MSG_CACHE_UPLOAD_BEFORE_DELETE, MSG_COMBINETO_VIRTUAL_DEST, MSG_COMM_AUTH_FAILED, MSG_COMM_CONNECT_FAILED, MSG_COMM_DAEMON_NOTSTARTED, MSG_COMM_ENVVAR_DUPLICATE, MSG_COMM_ENVVAR_INVALIDCHAR, MSG_COMM_ENVVAR_NONAME, MSG_COMM_INCOMPATIBLE_PROTOCOL, MSG_COMM_INCOMPATIBLE_UPDATE, MSG_COMM_INVALID_LOGIN, MSG_COMM_PORT_WARNING, MSG_COMM_PWD_BLANKFIELD, MSG_COMM_PWD_EXISTS, MSG_COMM_PWD_INVALID, MSG_COMM_PWD_MISMATCH, MSG_COMM_REXEC_NOTSTARTED, MSG_COMM_SERVER_NOTSTARTED, MSG_CONFIRM_CHANGES, MSG_CONFIRM_CHANGES_CANCELABLE, MSG_CONFIRM_DELETE, MSG_CONFIRM_DELETE_USERACTION, MSG_CONFIRM_DELETE_USERTYPE, MSG_CONFIRM_DELETEPROFILE, MSG_CONFIRM_DELETEREMOTE, MSG_CONFIRM_ENABLE_CLASSIC_HELP, MSG_CONFIRM_RELOADRSE, MSG_CONNECT_CANCELLED, MSG_CONNECT_DAEMON_FAILED, MSG_CONNECT_DAEMON_FAILED_EXCEPTION, MSG_CONNECT_FAILED, MSG_CONNECT_PROGRESS, MSG_CONNECT_SSL_EXCEPTION, MSG_CONNECT_UNKNOWNHOST, MSG_CONNECTING_TO_SERVER, MSG_CONNECTION_DELETED, MSG_CONNECTWITHPORT_PROGRESS, MSG_CONVERTTO_VIRTUAL_DEST, MSG_COPY_PROGRESS, MSG_COPYCONNECTION_PROGRESS, MSG_COPYCONNECTIONS_PROGRESS, MSG_COPYFILTER_PROGRESS, MSG_COPYFILTERPOOL_COMPLETE, MSG_COPYFILTERPOOL_PROGRESS, MSG_COPYFILTERPOOLS_PROGRESS, MSG_COPYFILTERS_PROGRESS, MSG_COPYFILTERSTRING_PROGRESS, MSG_COPYFILTERSTRINGS_PROGRESS, MSG_COPYGENERIC_PROGRESS, MSG_COPYSUBSYSTEMS_PROGRESS, MSG_COPYTHINGGENERIC_PROGRESS, MSG_DEST_NOT_IN_SOURCE, MSG_DEST_TARGET_READONLY, MSG_DISCONNECT_CANCELLED, MSG_DISCONNECT_FAILED, MSG_DISCONNECT_PROGRESS, MSG_DISCONNECTWITHPORT_PROGRESS, MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR, MSG_DOWNLOAD_NO_WRITE, MSG_DOWNLOAD_PROGRESS, MSG_ERROR_CONNECTION_NOTFOUND, MSG_ERROR_ENABLE_CLASSIC_HELP, MSG_ERROR_EXTENSION_EMPTY, MSG_ERROR_FILE_NOTFOUND, MSG_ERROR_FILENAME_INVALID, MSG_ERROR_FOLDER_NOTFOUND, MSG_ERROR_FOLDERORFILE_NOTFOUND, MSG_ERROR_GENERAL, MSG_ERROR_LIST_TITLE, MSG_ERROR_PROFILE_NOTFOUND, MSG_ERROR_UNEXPECTED, MSG_EXCEPTION_DELETING, MSG_EXCEPTION_MOVING, MSG_EXCEPTION_OCCURRED, MSG_EXCEPTION_RENAMING, MSG_EXPAND_CANCELLED, MSG_EXPAND_CONNECTIONCREATED, MSG_EXPAND_EMPTY, MSG_EXPAND_FAILED, MSG_EXPAND_FILTERCREATED, MSG_EXPAND_PREFIX, MSG_EXTRACT_PROGRESS, MSG_FILE_INUSE, MSG_FILTERPOOL_CREATED, MSG_FOLDER_INUSE, MSG_GENERIC_E, MSG_GENERIC_E_HELP, MSG_GENERIC_E_TWOPARMS_HELP, MSG_GENERIC_I, MSG_GENERIC_I_HELP, MSG_GENERIC_I_TWOPARMS_HELP, MSG_GENERIC_Q, MSG_GENERIC_Q_HELP, MSG_GENERIC_Q_TWOPARMS_HELP, MSG_GENERIC_U, MSG_GENERIC_U_HELP, MSG_GENERIC_U_TWOPARMS_HELP, MSG_GENERIC_W, MSG_GENERIC_W_HELP, MSG_GENERIC_W_TWOPARMS_HELP, MSG_HOSTNAME_NOTFOUND, MSG_HOSTNAME_VERIFYING, MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION, MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION, MSG_INITIALIZING_SERVER, MSG_LIST_CANCELLED, MSG_LIST_PREFIX, MSG_LOADING_PROFILE_SHOULDBE_ACTIVATED, MSG_LOADING_PROFILE_SHOULDNOTBE_DEACTIVATED, MSG_MOVE_PROGRESS, MSG_MOVECONNECTION_PROGRESS, MSG_MOVECONNECTIONS_PROGRESS, MSG_MOVEFILTER_PROGRESS, MSG_MOVEFILTERPOOL_COMPLETE, MSG_MOVEFILTERPOOL_PROGRESS, MSG_MOVEFILTERPOOLS_PROGRESS, MSG_MOVEFILTERS_PROGRESS, MSG_MOVEFILTERSTRING_PROGRESS, MSG_MOVEFILTERSTRINGS_PROGRESS, MSG_MOVEGENERIC_PROGRESS, MSG_MOVETHINGGENERIC_PROGRESS, MSG_OFFLINE_CANT_CONNECT, MSG_OPERATION_CANCELLED, MSG_OPERATION_DISCONNECTED, MSG_OPERATION_FAILED, MSG_OPERATION_FINISHED, MSG_OPERATION_RUNNING, MSG_OPERTION_STOPPED, MSG_PERCENT_DONE, MSG_PREFIX, MSG_QUERY_PROGRESS, MSG_QUERY_PROPERTIES_PROGRESS, MSG_REMOTE_JAR_EXPORT_OVERWRITE_FILE, MSG_REMOTE_SEARCH_INVALID_REGEX, MSG_RENAMEFILTER_FAILED, MSG_RESOLVE_PROGRESS, MSG_RESTORE_FAILED, MSG_RUN_PROGRESS, MSG_SAVE_CHANGES_PENDING, MSG_SAVE_FAILED, MSG_SAVING_PROGRESS, MSG_SET_PROGRESS, MSG_SET_PROPERTIES_PROGRESS, MSG_STARTING_SERVER_VIA_DAEMON, MSG_STARTING_SERVER_VIA_REXEC, MSG_SYNCHRONIZE_PROGRESS, MSG_TRANSFER_INVALID, MSG_UCMD_INVOCATION_EMPTY, MSG_UDA_LOAD_ERROR, MSG_UDA_ROOTTAG_ERROR, MSG_UFF_PATTERN_EMPTY, MSG_UFF_PATTERN_INVALID_REGEX, MSG_UNDERCONSTRUCTION, MSG_UPDATEFILTER_FAILED, MSG_UPLOAD_FILE_EXISTS, MSG_UPLOAD_PROGRESS, MSG_VALIDATE_ARCHIVE_NAME, MSG_VALIDATE_COMPILELABEL_EMPTY, MSG_VALIDATE_COMPILELABEL_NOTUNIQUE, MSG_VALIDATE_COMPILELABEL_NOTVALID, MSG_VALIDATE_COMPILESTRING_EMPTY, MSG_VALIDATE_COMPILESTRING_NOTVALID, MSG_VALIDATE_CONNECTIONNAME_EMPTY, MSG_VALIDATE_CONNECTIONNAME_NOTUNIQUE, MSG_VALIDATE_CONNECTIONNAME_NOTUNIQUE_OTHERPROFILE, MSG_VALIDATE_CONNECTIONNAME_NOTVALID, MSG_VALIDATE_ENTRY_EMPTY, MSG_VALIDATE_ENTRY_NOTUNIQUE, MSG_VALIDATE_ENTRY_NOTVALID, MSG_VALIDATE_FILENAME_NOTVALID, MSG_VALIDATE_FILTERNAME_EMPTY, MSG_VALIDATE_FILTERNAME_NOTUNIQUE, MSG_VALIDATE_FILTERNAME_NOTVALID, MSG_VALIDATE_FILTERPOOLNAME_EMPTY, MSG_VALIDATE_FILTERPOOLNAME_NOTUNIQUE, MSG_VALIDATE_FILTERPOOLNAME_NOTVALID, MSG_VALIDATE_FILTERSTRING_ALREADYEXISTS, MSG_VALIDATE_FILTERSTRING_DUPLICATES, MSG_VALIDATE_FILTERSTRING_EMPTY, MSG_VALIDATE_FILTERSTRING_NOTUNIQUE, MSG_VALIDATE_FILTERSTRING_NOTVALID, MSG_VALIDATE_FOLDERNAME_NOTVALID, MSG_VALIDATE_HOSTNAME_EMPTY, MSG_VALIDATE_NAME_EMPTY, MSG_VALIDATE_NAME_NOTUNIQUE, MSG_VALIDATE_NAME_NOTVALID, MSG_VALIDATE_NOT_NUMERIC, MSG_VALIDATE_NUMBER_EMPTY, MSG_VALIDATE_NUMBER_NOTVALID, MSG_VALIDATE_NUMBER_OUTOFRANGE, MSG_VALIDATE_PASSWORD_EMPTY, MSG_VALIDATE_PASSWORD_EXPIRED, MSG_VALIDATE_PATH_EMPTY, MSG_VALIDATE_PATH_NOTUNIQUE, MSG_VALIDATE_PATH_NOTVALID, MSG_VALIDATE_PORT_EMPTY, MSG_VALIDATE_PORT_NOTVALID, MSG_VALIDATE_PROFILENAME_EMPTY, MSG_VALIDATE_PROFILENAME_NOTUNIQUE, MSG_VALIDATE_PROFILENAME_NOTVALID, MSG_VALIDATE_PROFILENAME_RESERVED, MSG_VALIDATE_RENAME_EMPTY, MSG_VALIDATE_RENAME_NOTUNIQUE, MSG_VALIDATE_RENAME_NOTVALID, MSG_VALIDATE_RENAME_OLDEQUALSNEW, MSG_VALIDATE_SRCTYPE_EMPTY, MSG_VALIDATE_SRCTYPE_NOTUNIQUE, MSG_VALIDATE_SRCTYPE_NOTVALID, MSG_VALIDATE_UDACMD_EMPTY, MSG_VALIDATE_UDACMD_NOTVALID, MSG_VALIDATE_UDACMT_EMPTY, MSG_VALIDATE_UDACMT_NOTVALID, MSG_VALIDATE_UDANAME_EMPTY, MSG_VALIDATE_UDANAME_NOTUNIQUE, MSG_VALIDATE_UDANAME_NOTVALID, MSG_VALIDATE_UDTNAME_EMPTY, MSG_VALIDATE_UDTNAME_NOTUNIQUE, MSG_VALIDATE_UDTNAME_NOTVALID, MSG_VALIDATE_UDTTYPES_EMPTY, MSG_VALIDATE_UDTTYPES_NOTVALID, MSG_VALIDATE_USERID_EMPTY, MSG_VALIDATE_USERID_NOTVALID, MSG_WIZARD_PAGE_ERROR, NEW_FILE_ACTION, NEW_FILE_WIZARD, NEW_FOLDER_ACTION, NEW_FOLDER_WIZARD, PLUGIN_ID, PREFIX, RESID_PREFIX
 
Fields inherited from interface com.ibm.etools.systems.core.ui.validators.ISystemValidatorUniqueString
copyright
 
Constructor Summary
ValidatorISeriesObject()
          Constructor when an emptry string is not allowed, and generic names are allowed.
ValidatorISeriesObject(boolean isEmptyAllowed, boolean isGenericAllowed)
          Constructor
 
Method Summary
static boolean containsBadCharacters(char newChar, StringBuffer badChars)
          Return true if the given character is one of the given invalid characters.
static boolean containsBadCharacters(String newText, StringBuffer badChars)
          Return true if the given string contains any of the given invalid characters.
static boolean containsBadCharacters(String newText, StringBuffer badChars, int startingPos)
          Return true if the given string contains any of the given invalid characters.
protected  String doMessageSubstitution(com.ibm.etools.systems.core.messages.SystemMessage msg, String substitution)
          Helper method to substitute data into a message
 String[] getExistingNamesList()
          Return the existing names list.
 int getMaximumNameLength()
          Return the max length for iSeries objects: 10 Child classes override by setting maxLength.
 boolean getQuotesAllowed()
          Return if quoted names are allowed.
 com.ibm.etools.systems.core.messages.SystemMessage getSystemMessage()
          When isValid returns non-null, call this to get the SystemMessage object for the error versus the simple string message.
protected  String getSystemMessageText(com.ibm.etools.systems.core.messages.SystemMessage msg)
          Helper method to set the current system message and return its level one text
 boolean isEmptyAllowed()
          Return if empty names are allowed.
 boolean isGenericAllowed()
          Return if generic names are allowed.
static boolean isNumeric(String newText)
          Return true if the given string is all numeric, containing only digits 0-9, starting the search at the first character of the given input string.
static boolean isNumeric(String newText, int startingPos)
          Return true if the given string is all numeric, containing only digits 0-9, starting the search at the given offset into the input string.
static boolean isOneOf(char testChar, StringBuffer charSet)
          Return true if the given character is in the given character set.
static boolean isQuoted(String name)
          Returns true if given name is a quoted or extended name.
 com.ibm.etools.systems.core.messages.SystemMessage isSyntaxOk(String newText)
          Overridable entry point.
 String isValid(Object newValue)
          As required by ICellEditor.
 String isValid(String newText)
          Called to do verification of user-entered text.
static boolean onlyContains(String newText, StringBuffer charSet)
          Return true if the given string only contains characters in the given character set, starting the search at the first character of the given input string.
static boolean onlyContains(String newText, StringBuffer charSet, int startingPos)
          Return true if the given string only contains characters in the given character set, starting the search at the given offset into the input string.
 ValidatorISeriesObject reset()
          Clear previously specified configuration information.
 void setCaseSensitive(boolean caseSensitive)
          Reset whether this is a case-sensitive list or not.
 ValidatorISeriesObject setEmptyAllowed(boolean allowed)
          Set if empty names are allowed.
 void setErrorMessages(com.ibm.etools.systems.core.messages.SystemMessage msg_Empty, com.ibm.etools.systems.core.messages.SystemMessage msg_NotValid)
          Supply your own error message text.
 ValidatorISeriesObject setErrorMessages(com.ibm.etools.systems.core.messages.SystemMessage msg_Empty, com.ibm.etools.systems.core.messages.SystemMessage msg_NotValid, com.ibm.etools.systems.core.messages.SystemMessage msg_NotUnique)
          Supply your own error message text.
 void setExistingNamesList(String[] names)
          Set a list of existing names if this is available.
 void setExistingNamesList(Vector names)
          Set a list of existing names if this is available.
 ValidatorISeriesObject setGenericAllowed(boolean allowed)
          Set if generic names are allowed.
 ValidatorISeriesObject setQuotesAllowed(boolean allowed)
          Set if quoted names are allowed.
 com.ibm.etools.systems.core.messages.SystemMessage validate(String text)
          For convenience, this is a shortcut to calling:
 boolean wasQuoted()
          Returns true if the last name passed into isValid(String) was quoted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

MAX_OBJNAME_LENGTH

public static final int MAX_OBJNAME_LENGTH
See Also:
Constant Field Values

EMPTY_ALLOWED_NO

public static final boolean EMPTY_ALLOWED_NO
See Also:
Constant Field Values

EMPTY_ALLOWED_YES

public static final boolean EMPTY_ALLOWED_YES
See Also:
Constant Field Values

VARIANTS

public static final String VARIANTS
This is a all possible codepage translations from EBCDIC to UCS-2, for the famous three variant characters @,$ and #.

See Also:
Constant Field Values

VALIDCHARS_FIRSTPOS

public static final StringBuffer VALIDCHARS_FIRSTPOS
All valid characters for the first char of an iSeries name, using VARIANTS for the $, @ and # characters.


VALIDCHARS_ENDPOS

public static final StringBuffer VALIDCHARS_ENDPOS
All valid characters for the non-first chars of an iSeries name, using VARIANTS for the $, @ and # characters.


isEmptyAllowed

protected boolean isEmptyAllowed

isGenericAllowed

protected boolean isGenericAllowed

wasQuoted

protected boolean wasQuoted

areQuotesAllowed

protected boolean areQuotesAllowed

msg_Invalid

protected com.ibm.etools.systems.core.messages.SystemMessage msg_Invalid

msg_Empty

protected com.ibm.etools.systems.core.messages.SystemMessage msg_Empty

msg_NotUnique

protected com.ibm.etools.systems.core.messages.SystemMessage msg_NotUnique

currentMessage

protected com.ibm.etools.systems.core.messages.SystemMessage currentMessage

maxLength

protected int maxLength

INVARIANTS

protected static final String INVARIANTS
See Also:
Constant Field Values

specialCharsNumeric

protected static final StringBuffer specialCharsNumeric

specialCharsExtended

protected StringBuffer specialCharsExtended

uniqueNameValidator

protected com.ibm.etools.systems.core.ui.validators.ValidatorUniqueString uniqueNameValidator

DEFAULT_SINGLETON

public static ValidatorISeriesObject DEFAULT_SINGLETON
To save memory we have a singleton of a very-often used configuration. This does not allow empty strings or generic names.

Constructor Detail

ValidatorISeriesObject

public ValidatorISeriesObject()
Constructor when an emptry string is not allowed, and generic names are allowed.


ValidatorISeriesObject

public ValidatorISeriesObject(boolean isEmptyAllowed,
                              boolean isGenericAllowed)
Constructor

Parameters:
isEmptyAllowed - true if an empty string is valid
isGenericAllowed - true if one or more asterisks are allowed in the name
Method Detail

reset

public ValidatorISeriesObject reset()
Clear previously specified configuration information. Useful when re-using validators.


setErrorMessages

public void setErrorMessages(com.ibm.etools.systems.core.messages.SystemMessage msg_Empty,
                             com.ibm.etools.systems.core.messages.SystemMessage msg_NotValid)
Supply your own error message text. By default, messages from ISeriesSystemPlugin resource bundle are used.


setErrorMessages

public ValidatorISeriesObject setErrorMessages(com.ibm.etools.systems.core.messages.SystemMessage msg_Empty,
                                               com.ibm.etools.systems.core.messages.SystemMessage msg_NotValid,
                                               com.ibm.etools.systems.core.messages.SystemMessage msg_NotUnique)
Supply your own error message text. By default, messages from ISeriesSystemPlugin resource bundle are used.

Returns:
this so you return xxx.setYYY(...)

setEmptyAllowed

public ValidatorISeriesObject setEmptyAllowed(boolean allowed)
Set if empty names are allowed. If true, an null or zero-length name is not considered an error.

Returns:
this so you return xxx.setYYY(...)

setGenericAllowed

public ValidatorISeriesObject setGenericAllowed(boolean allowed)
Set if generic names are allowed. If true, the validity of the generic syntax is not checked, but at least the '*' character is permitted.

Returns:
this so you return xxx.setYYY(...)

setQuotesAllowed

public ValidatorISeriesObject setQuotesAllowed(boolean allowed)
Set if quoted names are allowed. This is used by subclasses for things like member types.

Returns:
this so you return xxx.setYYY(...)

setCaseSensitive

public void setCaseSensitive(boolean caseSensitive)
Reset whether this is a case-sensitive list or not. This is a no-op and only here to satisfy an interface we implement.

Specified by:
setCaseSensitive in interface com.ibm.etools.systems.core.ui.validators.ISystemValidatorUniqueString

setExistingNamesList

public void setExistingNamesList(String[] names)
Set a list of existing names if this is available. Validator will ensure none of those names are selected.

Specified by:
setExistingNamesList in interface com.ibm.etools.systems.core.ui.validators.ISystemValidatorUniqueString

setExistingNamesList

public void setExistingNamesList(Vector names)
Set a list of existing names if this is available. Validator will ensure none of those names are selected.

Specified by:
setExistingNamesList in interface com.ibm.etools.systems.core.ui.validators.ISystemValidatorUniqueString

getExistingNamesList

public String[] getExistingNamesList()
Return the existing names list. This will be a case-normalized and sorted list.

Specified by:
getExistingNamesList in interface com.ibm.etools.systems.core.ui.validators.ISystemValidatorUniqueString

isQuoted

public static boolean isQuoted(String name)
Returns true if given name is a quoted or extended name.


containsBadCharacters

public static boolean containsBadCharacters(String newText,
                                            StringBuffer badChars)
Return true if the given string contains any of the given invalid characters.


containsBadCharacters

public static boolean containsBadCharacters(String newText,
                                            StringBuffer badChars,
                                            int startingPos)
Return true if the given string contains any of the given invalid characters.

Parameters:
newText - input string to search
startingPos - zero-based starting position of input string to start search at

containsBadCharacters

public static boolean containsBadCharacters(char newChar,
                                            StringBuffer badChars)
Return true if the given character is one of the given invalid characters.


isNumeric

public static boolean isNumeric(String newText)
Return true if the given string is all numeric, containing only digits 0-9, starting the search at the first character of the given input string.

Parameters:
newText - input string to search

isNumeric

public static boolean isNumeric(String newText,
                                int startingPos)
Return true if the given string is all numeric, containing only digits 0-9, starting the search at the given offset into the input string.

Parameters:
newText - input string to search
startingPos - zero-based starting position of input string to start search at

onlyContains

public static boolean onlyContains(String newText,
                                   StringBuffer charSet)
Return true if the given string only contains characters in the given character set, starting the search at the first character of the given input string.

Parameters:
newText - input string to search
charSet - characters to test input only contains

onlyContains

public static boolean onlyContains(String newText,
                                   StringBuffer charSet,
                                   int startingPos)
Return true if the given string only contains characters in the given character set, starting the search at the given offset into the input string.

Parameters:
newText - input string to search
charSet - characters to test input only contains
startingPos - zero-based starting position of input string to start search at

isOneOf

public static boolean isOneOf(char testChar,
                              StringBuffer charSet)
Return true if the given character is in the given character set.

Parameters:
testChar - input character to search
charSet - characters to test input only contains

wasQuoted

public boolean wasQuoted()
Returns true if the last name passed into isValid(String) was quoted.


isSyntaxOk

public com.ibm.etools.systems.core.messages.SystemMessage isSyntaxOk(String newText)
Overridable entry point. Called after other base checking succeeds. Override in child to do your own syntax checking.

Parameters:
newText - the input text to be verified
Returns:
A error message if the verify failed, or null if it is successful.

isEmptyAllowed

public boolean isEmptyAllowed()
Return if empty names are allowed. If true, an null or zero-length name is not considered an error.


isGenericAllowed

public boolean isGenericAllowed()
Return if generic names are allowed. If true, the validity of the generic syntax is not checked, but at least the '*' character is permitted.


getQuotesAllowed

public boolean getQuotesAllowed()
Return if quoted names are allowed. This is used by subclasses for things like member types.


doMessageSubstitution

protected String doMessageSubstitution(com.ibm.etools.systems.core.messages.SystemMessage msg,
                                       String substitution)
Helper method to substitute data into a message


getSystemMessageText

protected String getSystemMessageText(com.ibm.etools.systems.core.messages.SystemMessage msg)
Helper method to set the current system message and return its level one text


getMaximumNameLength

public int getMaximumNameLength()
Return the max length for iSeries objects: 10 Child classes override by setting maxLength.

Specified by:
getMaximumNameLength in interface com.ibm.etools.systems.core.ui.validators.ISystemValidator

isValid

public String isValid(String newText)
Called to do verification of user-entered text.

Specified by:
isValid in interface IInputValidator
Parameters:
newText - the input text to be verified
Returns:
A error message string if the verify failed, or null if it is successful.

isValid

public String isValid(Object newValue)
As required by ICellEditor. Simply calls isValid(String)

Specified by:
isValid in interface ICellEditorValidator

getSystemMessage

public com.ibm.etools.systems.core.messages.SystemMessage getSystemMessage()
When isValid returns non-null, call this to get the SystemMessage object for the error versus the simple string message.

Specified by:
getSystemMessage in interface com.ibm.etools.systems.core.ui.validators.ISystemValidator

validate

public com.ibm.etools.systems.core.messages.SystemMessage validate(String text)
For convenience, this is a shortcut to calling:

  if (isValid(text) != null)
    msg = getSystemMessage();
 

Specified by:
validate in interface com.ibm.etools.systems.core.ui.validators.ISystemValidator

iSeries Remote Systems
v6.0.0

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.