IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.rcp.xui.validator
Class TextLengthValidator

java.lang.Object
  extended by com.ibm.btt.rcp.xui.validator.Validator
      extended by com.ibm.btt.rcp.xui.validator.TextLengthValidator
All Implemented Interfaces:
IValidator

public class TextLengthValidator
extends Validator

Checks if a string has non whitespace characters. Parameters allow you to constrain the length. Ignore any illegal settings as -1 etc.


Constructor Summary
TextLengthValidator()
          Default constructor for TextLengthValidator
TextLengthValidator(int ilength, int iminLength, int imaxLength)
          Constructor for TextLengthValidator
 
Method Summary
 int getLength()
          Get Length Attribute
 int getMaxLength()
          Get MaxLength Attribute
 int getMinLength()
          Get MinLength Attribute
 void setLength(int length)
          Set Length Attribute
 void setMaxLength(int maxLength)
          Set MaxLength Attribute
 void setMinLength(int minLength)
          Set MinLength Attribute
 java.lang.String validate(IXUIWidget source, java.lang.String text)
          Validate input text if this text is valid.
 
Methods inherited from class com.ibm.btt.rcp.xui.validator.Validator
getErrorMessage, setErrorMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextLengthValidator

public TextLengthValidator()
Default constructor for TextLengthValidator


TextLengthValidator

public TextLengthValidator(int ilength,
                           int iminLength,
                           int imaxLength)
Constructor for TextLengthValidator

Parameters:
ilength - If set, checks if there are exactly flags.length number of characters.
iminLength - If set, checks if there are at least flags.minlength number of characters.
imaxLength - If set, checks if there are at most flags.maxlength number of characters.
Method Detail

validate

public java.lang.String validate(IXUIWidget source,
                                 java.lang.String text)
Description copied from interface: IValidator
Validate input text if this text is valid. Return error message, return null means no validate error

Returns:

getLength

public int getLength()
Get Length Attribute

Returns:
length If set, checks if there are exactly flags.length number of characters.

setLength

public void setLength(int length)
Set Length Attribute

Parameters:
length - If set, checks if there are exactly flags.length number of characters.

getMaxLength

public int getMaxLength()
Get MaxLength Attribute

Returns:
maxLength If set, checks if there are at most flags.maxlength number of characters.

setMaxLength

public void setMaxLength(int maxLength)
Set MaxLength Attribute

Parameters:
maxLength - If set, checks if there are at most flags.maxlength number of characters.

getMinLength

public int getMinLength()
Get MinLength Attribute

Returns:
minLength If set, checks if there are at least flags.minlength number of characters.

setMinLength

public void setMinLength(int minLength)
Set MinLength Attribute

Parameters:
minLength - If set, checks if there are at least flags.minlength number of characters.

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2010