|
org.eclipse.rse.ui.validators
Class ValidatorConnectionName
java.lang.Object
org.eclipse.rse.ui.validators.ValidatorUniqueString
org.eclipse.rse.ui.validators.ValidatorConnectionName
-
All Implemented Interfaces:
-
IInputValidator,
ICellEditorValidator,
ISystemValidator,
ISystemValidatorUniqueString
-
public class ValidatorConnectionName
- extends
ValidatorUniqueString
- implements
ISystemValidator
This class is used in dialogs that prompt for a connection alias name.
Relies on Eclipse supplied method to test for folder name validity.
The IInputValidator interface is used by jface's
InputDialog class and numerous other platform and system classes.
Methods inherited from class org.eclipse.rse.ui.validators.
ValidatorUniqueString
|
doMessageSubstitution,
getExistingNamesList,
getSystemMessage,
getSystemMessageText,
isSyntaxOk,
isValid,
isValid,
quotedToLowerCase,
setCaseSensitive,
setErrorMessages,
setExistingNamesList,
setExistingNamesList,
setUseUpperCase,
toString,
validate
|
MAX_CONNECTIONNAME_LENGTH
public static final int MAX_CONNECTIONNAME_LENGTH
-
See Also:
-
Constant Field Values
ValidatorConnectionName
public ValidatorConnectionName(
Collection existingNameList)
- Constructor.
-
Parameters:
-
existingNameList - list of existing names (strings) in owning profile. Can be null if not a rename operation.
validateNameNotInUse
public static boolean validateNameNotInUse(
String proposedName,
Shell shell)
- Validate the given connection name is not already used in any profile. This is too expensive
to do per keystroke, so you should call this after as a final test. Note, this is a warning
situation, not an error, as we assume we have already tested for the containing profile, and
thus is a test for a match on a connection in a non-containing profile. This results in msg
rseg1241 being presented to the user, and if he chooses No to not continue, we return false
here. You should stop processing on false. Else, we return true meaning everything is ok.
-
-
getMaximumNameLength
public int getMaximumNameLength()
- Return the max length for connections: 100
-
-
Specified by:
-
getMaximumNameLength
in interface
ISystemValidator
-
Overrides:
-
getMaximumNameLength
in class
ValidatorUniqueString
-
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.
|
|