Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.edit.wizards.validator
Class ValidatorFieldType

java.lang.Object
  extended by ValidatorSpecialChar
      extended by com.ibm.etools.iseries.edit.wizards.validator.ValidatorFieldType
Direct Known Subclasses:
ValidatorConstantName, ValidatorConstantValue, ValidatorDataArea, ValidatorDSpecExternalName, ValidatorDSpecName, ValidatorInzValue, ValidatorProcedureName, ValidatorProcedureParameterName

public class ValidatorFieldType
extends ValidatorSpecialChar

This class is used in dialogs that prompt for a field type. The IInputValidator interface is used by jface's InputDialog class and numerous other platform and system classes.


Field Summary
static String Copyright
           
static String FIELDTYPE_INVALID_CHARS
           
static int FIELDTYPE_MAXLENGTH_NAME
           
static String reservedPage
           
static String[] reservedWordsForDate
           
 
Constructor Summary
ValidatorFieldType(boolean emptyAllowed, String specialChars)
          Constructor when a blank field name is ok
ValidatorFieldType(boolean emptyAllowed, SystemMessage emptyMessage, SystemMessage invalidMessage, String specialChars)
          Constructor for subclasses, override it using different error messages
ValidatorFieldType(String specialChars)
          Constructor when a blank name is not ok
 
Method Summary
protected  String doMessageSubstitution(SystemMessage msg, String substitution)
          Helper method to substitute data into a message
protected  boolean followNamingRule(String text)
           
 int getMaximumNameLength()
          Return the max number of chars for user ID: 128
 boolean isEmptyAllowed()
           
 boolean isReserved(String text)
           
 boolean isReservedForDate(String text)
           
 boolean isReservedForPage(String text)
           
 SystemMessage isSyntaxOk(String newText)
          We could do additional syntax checking here if we decide to.
 String isValid(String newText)
          Validate each character.
 boolean isValidChar(char ch)
           
 void setEmptyAllowed(boolean b)
           
 void setFunctionAllowed(boolean b)
           
 void setReservedAllowed(boolean b)
           
 
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

reservedWordsForDate

public static final String[] reservedWordsForDate

reservedPage

public static final String reservedPage
See Also:
Constant Field Values

FIELDTYPE_INVALID_CHARS

public static final String FIELDTYPE_INVALID_CHARS
See Also:
Constant Field Values

FIELDTYPE_MAXLENGTH_NAME

public static final int FIELDTYPE_MAXLENGTH_NAME
See Also:
Constant Field Values
Constructor Detail

ValidatorFieldType

public ValidatorFieldType(String specialChars)
Constructor when a blank name is not ok


ValidatorFieldType

public ValidatorFieldType(boolean emptyAllowed,
                          String specialChars)
Constructor when a blank field name is ok


ValidatorFieldType

public ValidatorFieldType(boolean emptyAllowed,
                          SystemMessage emptyMessage,
                          SystemMessage invalidMessage,
                          String specialChars)
Constructor for subclasses, override it using different error messages

Method Detail

isSyntaxOk

public SystemMessage isSyntaxOk(String newText)
We could do additional syntax checking here if we decide to. This method is called by parent class if all other error checking passes.


getMaximumNameLength

public int getMaximumNameLength()
Return the max number of chars for user ID: 128


isValid

public String isValid(String newText)
Validate each character.


followNamingRule

protected boolean followNamingRule(String text)

isValidChar

public boolean isValidChar(char ch)

isReserved

public boolean isReserved(String text)

isReservedForDate

public boolean isReservedForDate(String text)

isReservedForPage

public boolean isReservedForPage(String text)

isEmptyAllowed

public boolean isEmptyAllowed()
Returns:

setEmptyAllowed

public void setEmptyAllowed(boolean b)
Parameters:
b -

setReservedAllowed

public void setReservedAllowed(boolean b)
Parameters:
b -

setFunctionAllowed

public void setFunctionAllowed(boolean b)
Parameters:
b -

doMessageSubstitution

protected String doMessageSubstitution(SystemMessage msg,
                                       String substitution)
Helper method to substitute data into a message


Rational Developer for Power Systems Software
V7.6

Copyright © 2011 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.