Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.ui.validators
Class ValidatorFilterString

java.lang.Object
  extended by 

org.eclipse.rse.ui.validators.ValidatorUniqueString
      extended by 
org.eclipse.rse.ui.validators.ValidatorFilterString
All Implemented Interfaces:
IInputValidator, ICellEditorValidator, ISystemValidator, ISystemValidatorUniqueString

public class ValidatorFilterString
extends ValidatorUniqueString
implements ISystemValidator

This class is used in dialogs that prompt for filter strings. This class typically needs to be overridden for a particular subsystem factory provider. By default, it simply checks for uniqueness.


Field Summary
static int MAX_FILTERSTRINGNAME_LENGTH
           
protected   SystemMessage msg_Invalid
           
 
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
ValidatorFilterString (boolean caseSensitive)
          Use this constructor when the name need not be unique, and you just want the syntax checking.
ValidatorFilterString ( Collection existingList, boolean caseSensitive)
          Constructor accepting a collection of existing strings, as simple strings.
ValidatorFilterString ( ISystemFilterString[] existingList, boolean caseSensitive)
          Constructor accepting an Array for the list of existing strings, as actual filter strings.
ValidatorFilterString ( String[] existingList, boolean caseSensitive)
          Constructor accepting an Array for the list of existing strings, as simple strings.
 
Method Summary
protected static  String[] convertFilterStringsToStrings ( ISystemFilterString[] filterStrings)
          Converts an array of filter strings into an array of strings
 int getMaximumNameLength ()
          Return the max length for filter strings: 1000
  SystemMessage isSyntaxOk ( String newText)
          Validate each character.
 void setDuplicateFilterStringErrorMessage ( SystemMessage msg)
          Set the error message to issue when a duplicate filter string is found.
 void setErrorMessages ( SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
          Supply your own error message text.
  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
 
Methods inherited from interface org.eclipse.rse.ui.validators. ISystemValidator
getSystemMessage, validate
 
Methods inherited from interface org.eclipse.jface.dialogs. IInputValidator
isValid
 
Methods inherited from interface org.eclipse.jface.viewers. ICellEditorValidator
isValid
 

Field Detail

MAX_FILTERSTRINGNAME_LENGTH

public static final int MAX_FILTERSTRINGNAME_LENGTH
See Also:
Constant Field Values

msg_Invalid

protected 
SystemMessage msg_Invalid
Constructor Detail

ValidatorFilterString

public ValidatorFilterString(
Collection existingList,
                             boolean caseSensitive)
Constructor accepting a collection of existing strings, as simple strings.

Parameters:
existingList - A collection of strings to compare against. This will not be modified by the validator.
caseSensitive - true if comparisons are to be case sensitive, false if case insensitive.

ValidatorFilterString

public ValidatorFilterString(
String[] existingList,
                             boolean caseSensitive)
Constructor accepting an Array for the list of existing strings, as simple strings.

Parameters:
existingList - An array containing list of existing strings to compare against.
caseSensitive - true if comparisons are to be case sensitive, false if case insensitive.

ValidatorFilterString

public ValidatorFilterString(
ISystemFilterString[] existingList,
                             boolean caseSensitive)
Constructor accepting an Array for the list of existing strings, as actual filter strings.

Parameters:
existingList - An array containing list of existing filter strings to compare against.
caseSensitive - true if comparisons are to be case sensitive, false if case insensitive.

ValidatorFilterString

public ValidatorFilterString(boolean caseSensitive)
Use this constructor when the name need not be unique, and you just want the syntax checking.

Method Detail

setDuplicateFilterStringErrorMessage

public void setDuplicateFilterStringErrorMessage(
SystemMessage msg)
Set the error message to issue when a duplicate filter string is found.


convertFilterStringsToStrings

protected static 
String[] convertFilterStringsToStrings(
ISystemFilterString[] filterStrings)
Converts an array of filter strings into an array of strings


setErrorMessages

public void setErrorMessages(
SystemMessage msg_Empty,
                             
SystemMessage msg_NonUnique,
                             
SystemMessage msg_Invalid)
Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.

Parameters:
msg_Empty - error message when entry field is empty
msg_NonUnique - error message when value entered is not unique
msg_Invalid - error message when syntax is not valid

toString

public 
String toString()
Overrides:
toString in class ValidatorUniqueString

isSyntaxOk

public 
SystemMessage isSyntaxOk(
String newText)
Validate each character. Override of parent method. Override yourself to refine the error checking. We don't do anything by default.

Overrides:
isSyntaxOk in class ValidatorUniqueString

getMaximumNameLength

public int getMaximumNameLength()
Return the max length for filter strings: 1000

Specified by:
getMaximumNameLength in interface ISystemValidator
Overrides:
getMaximumNameLength in class ValidatorUniqueString

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire