Method Summary |
void |
assertValidity(java.lang.String testValue)
Determine whether a testValue meets the criteria specified
in the constraints defined for this validator |
protected void |
doAssertValidity(java.lang.String testValue)
Method to allow subclasses to add additional validation |
int |
getMaxLength()
This value can be used to construct a form input field so
lets make it available |
java.lang.String |
getMessage()
Get the last error message resulting from invalid input. |
void |
init(java.util.Map paramMap)
Extract the relevant parameters from the constraints listed
in tags within the intake.xml file. |
boolean |
isValid(java.lang.String testValue)
Determine whether a testValue meets the criteria specified
in the constraints defined for this validator |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
required
protected boolean required
requiredMessage
protected java.lang.String requiredMessage
mask
protected org.apache.regexp.RE mask
maskMessage
protected java.lang.String maskMessage
minLength
protected int minLength
minLengthMessage
protected java.lang.String minLengthMessage
maxLength
protected int maxLength
maxLengthMessage
protected java.lang.String maxLengthMessage
message
protected java.lang.String message
DefaultValidator
public DefaultValidator(java.util.Map paramMap)
throws TurbineException
DefaultValidator
public DefaultValidator()
init
public void init(java.util.Map paramMap)
throws TurbineException
- Extract the relevant parameters from the constraints listed
in tags within the intake.xml file.
- Specified by:
init
in interface Validator
- Parameters:
paramMap
- a Map
of Rule
's
containing constraints on the input.- Throws:
TurbineException
- if an error occurs
isValid
public boolean isValid(java.lang.String testValue)
- Determine whether a testValue meets the criteria specified
in the constraints defined for this validator
- Specified by:
isValid
in interface Validator
- Parameters:
testValue
- a String
to be tested- Returns:
- true if valid, false otherwise
assertValidity
public void assertValidity(java.lang.String testValue)
throws ValidationException
- Determine whether a testValue meets the criteria specified
in the constraints defined for this validator
- Specified by:
assertValidity
in interface Validator
- Parameters:
testValue
- a String
to be tested- Throws:
ValidationException
- containing an error message if the
testValue did not pass the validation tests.
getMessage
public java.lang.String getMessage()
- Get the last error message resulting from invalid input.
- Specified by:
getMessage
in interface Validator
- Returns:
- a
String
message, or the empty String "".
doAssertValidity
protected void doAssertValidity(java.lang.String testValue)
throws ValidationException
- Method to allow subclasses to add additional validation
getMaxLength
public int getMaxLength()
- This value can be used to construct a form input field so
lets make it available
Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.