|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.turbine.services.intake.validator.DefaultValidator
org.apache.turbine.services.intake.validator.BooleanValidator
Validator for boolean field types.
Values are validated by attemting to match the value to
a list of strings for true and false values. The string
values are compared without reguard to case.
Valid values for Boolean.TRUE:
Field Summary |
Fields inherited from class org.apache.turbine.services.intake.validator.DefaultValidator |
errorMessage, log, maxLength, maxLengthMessage, minLength, minLengthMessage, required, requiredMessage |
Fields inherited from interface org.apache.turbine.services.intake.validator.Validator |
FLEXIBLE_RULE_NAME, FORMAT_RULE_NAME, INVALID_NUMBER_RULE_NAME, MASK_RULE_NAME, MAX_LENGTH_RULE_NAME, MAX_VALUE_RULE_NAME, MIN_LENGTH_RULE_NAME, MIN_VALUE_RULE_NAME, REQUIRED_RULE_NAME |
Constructor Summary | |
BooleanValidator()
Default Constructor |
|
BooleanValidator(java.util.Map paramMap)
Constructor to use when initialising Object |
Method Summary | |
void |
assertValidity(java.lang.String testValue)
Determine whether a testValue meets the criteria specified in the constraints defined for this validator |
java.lang.Boolean |
parse(java.lang.String stringValue)
Parses a srting value into a Boolean object. |
Methods inherited from class org.apache.turbine.services.intake.validator.DefaultValidator |
getMaxLength, getMaxLengthMessage, getMessage, getMinLength, getMinLengthMessage, getRequiredMessage, init, isRequired, isValid, setMaxLength, setMaxLengthMessage, setMinLength, setMinLengthMessage, setRequired, setRequiredMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BooleanValidator()
public BooleanValidator(java.util.Map paramMap) throws InvalidMaskException
paramMap
-
InvalidMaskException
Method Detail |
public void assertValidity(java.lang.String testValue) throws ValidationException
assertValidity
in interface Validator
assertValidity
in class DefaultValidator
testValue
- a String
to be tested
ValidationException
- containing an error message if the
testValue did not pass the validation tests.public java.lang.Boolean parse(java.lang.String stringValue) throws java.text.ParseException
stringValue
- the value to parse
Boolean object
- Throws:
java.text.ParseException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |