|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.rse.ui.validators.ValidatorUniqueString
org.eclipse.rse.subsystems.files.core.util.ValidatorFileFilterString
public class ValidatorFileFilterString
This class is used in dialogs that prompt for file filter strings. File filter strings are a bit complex to validate. They have to be:
The IInputValidator interface is implemented by our parent and it is used by jface's InputDialog class and property sheet window.
If you subclass this, consider overriding the getFileNameValidator and getFolderNameValidator methods.
Field Summary | |
---|---|
protected boolean |
isFileName
|
protected boolean |
isFolderName
|
protected SystemMessage |
msg_Invalid
|
protected IWorkspace |
workspace
|
Fields inherited from class org.eclipse.rse.ui.validators.ValidatorUniqueString |
---|
CASE_INSENSITIVE, CASE_SENSITIVE, caseSensitive, currentMessage, existingList, msg_Empty, msg_NonUnique, QUOTE, syntaxValidator, useUpperCase |
Constructor Summary | |
---|---|
ValidatorFileFilterString(IRemoteFileSubSystemConfiguration ssConfig)
Use this constructor when the name need not be unique, and you just want the syntax checking. |
|
ValidatorFileFilterString(IRemoteFileSubSystemConfiguration ssConfig,
String[] existingList)
Constructor accepting an Array for the list of existing names. |
|
ValidatorFileFilterString(IRemoteFileSubSystemConfiguration ssConfig,
Vector existingList)
Constructor accepting a Vector for the list of existing names. |
Method Summary | |
---|---|
protected ValidatorFileName |
getFileNameValidator()
Overridable extension point to get basic file name validator By default, queries it from the file subsystem configuration |
protected ValidatorFolderName |
getFolderNameValidator()
Overridable extension point to get basic folder name validator By default, queries it from the file subsystem configuration |
int |
getMaximumNameLength()
Return the max length for this file or folder name |
protected boolean |
isCaseSensitive(IRemoteFileSubSystemConfiguration ssConfig)
Return true if case sensitive, false it not. |
SystemMessage |
isSyntaxOk(String newText)
Validate each character. |
void |
setErrorMessages(SystemMessage msg_Empty,
SystemMessage msg_NonUnique,
SystemMessage msg_Invalid)
Supply your own error message text. |
void |
setIsFileName(boolean is)
Call this before calling isValid! |
void |
setIsFolderName(boolean is)
Call this before calling isValid! |
String |
toString()
|
Methods inherited from class org.eclipse.rse.ui.validators.ValidatorUniqueString |
---|
doMessageSubstitution, getExistingNamesList, getSystemMessage, getSystemMessageText, isValid, isValid, quotedToLowerCase, setCaseSensitive, setErrorMessages, setExistingNamesList, setExistingNamesList, setUseUpperCase, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected SystemMessage msg_Invalid
protected IWorkspace workspace
protected boolean isFileName
protected boolean isFolderName
Constructor Detail |
---|
public ValidatorFileFilterString(IRemoteFileSubSystemConfiguration ssConfig, Vector existingList)
ssConfig
- - The remote subsystem configuration we are validating filter strings inexistingList
- - A vector containing list of existing filter names to compare against.
Note that toString() is used to get the string from each item.public ValidatorFileFilterString(IRemoteFileSubSystemConfiguration ssConfig, String[] existingList)
ssConfig
- - The remote subsystem configuration we are validating filter strings inexistingList
- - An array containing list of existing strings to compare against.public ValidatorFileFilterString(IRemoteFileSubSystemConfiguration ssConfig)
ssConfig
- - The remote subsystem configuration we are validating filter strings inMethod Detail |
---|
public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
msg_Empty
- error message when entry field is emptymsg_NonUnique
- error message when value entered is not uniquemsg_Invalid
- error message when syntax is not validpublic void setIsFileName(boolean is)
setIsFolderName(boolean)
public void setIsFolderName(boolean is)
setIsFileName(boolean)
public SystemMessage isSyntaxOk(String newText)
isSyntaxOk
in class ValidatorUniqueString
protected ValidatorFileName getFileNameValidator()
protected ValidatorFolderName getFolderNameValidator()
protected boolean isCaseSensitive(IRemoteFileSubSystemConfiguration ssConfig)
ssConfig
- subsystem configurationpublic int getMaximumNameLength()
getMaximumNameLength
in interface ISystemValidator
getMaximumNameLength
in class ValidatorUniqueString
public String toString()
toString
in class ValidatorUniqueString
|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |