com.plumtree.uiinfrastructure.validators
Class IntRangeValidator

java.lang.Object
  extended by com.plumtree.uiinfrastructure.pagecontrols.framework.AValidator
      extended by com.plumtree.uiinfrastructure.validators.IntRangeValidator
All Implemented Interfaces:
IValidator

public class IntRangeValidator
extends AValidator
implements IValidator

Validates that an object is within a given int range bounded by m_intMax & m_intMin.

Author:
caiusv

Field Summary
 java.lang.String m_strFormName
          name of the form where this validator appears (used by JavaScript validation)
 java.lang.String m_strInputName
          name of the input which this validator works on (used by JavaScript validation)
 java.lang.String VALIDATOR_NAME
           
 
Fields inherited from class com.plumtree.uiinfrastructure.pagecontrols.framework.AValidator
m_sErrorMessage
 
Constructor Summary
IntRangeValidator(java.lang.String _sFormName, java.lang.String _sInputName, java.lang.String _sDefaultValue, int _iMax, int _iMin)
          Creates a new IntRangeValidator.
 
Method Summary
 java.lang.String GetJSFunction(java.lang.String _sParameters)
          Return the name of the JavaScript validation method along with whatever parameters the script needs.
 java.lang.String GetJSValidationCode()
          Returns the JavaScript Validation method that may be used on a page to validate associated form input.
 java.lang.String GetName()
          Return the name of this Validator
 UIError Validate(java.lang.Object _oObject)
          Return a UIError object if the object passed in is not an int within the range specified by the m_intMax & m_intMin.
 
Methods inherited from class com.plumtree.uiinfrastructure.pagecontrols.framework.AValidator
GetErrorMessage, SetErrorMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.plumtree.uiinfrastructure.activityspace.IValidator
SetErrorMessage
 

Field Detail

VALIDATOR_NAME

public java.lang.String VALIDATOR_NAME

m_strFormName

public java.lang.String m_strFormName
name of the form where this validator appears (used by JavaScript validation)


m_strInputName

public java.lang.String m_strInputName
name of the input which this validator works on (used by JavaScript validation)

Constructor Detail

IntRangeValidator

public IntRangeValidator(java.lang.String _sFormName,
                         java.lang.String _sInputName,
                         java.lang.String _sDefaultValue,
                         int _iMax,
                         int _iMin)
Creates a new IntRangeValidator.

Parameters:
_sFormName - name of the form whre this appears
_sInputName - name of the input element
_sDefaultValue - default value of the input element
_iMax - max value for the int validated
_iMin - min value for the int validated
Method Detail

Validate

public UIError Validate(java.lang.Object _oObject)
Return a UIError object if the object passed in is not an int within the range specified by the m_intMax & m_intMin.

Specified by:
Validate in interface IValidator
Returns:
a UIError containing the error message set with SetErrorMessage()

GetJSValidationCode

public java.lang.String GetJSValidationCode()
Returns the JavaScript Validation method that may be used on a page to validate associated form input.

Specified by:
GetJSValidationCode in interface IValidator
Returns:
See Also:
IValidator.GetJSValidationCode()

GetJSFunction

public java.lang.String GetJSFunction(java.lang.String _sParameters)
Return the name of the JavaScript validation method along with whatever parameters the script needs.

Specified by:
GetJSFunction in interface IValidator
Parameters:
_sParameters - areguments to Javascript function
Returns:

GetName

public java.lang.String GetName()
Return the name of this Validator

Specified by:
GetName in interface IValidator



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.