Klasse BooleanValidator
java.lang.Object
org.apache.fulcrum.intake.validator.DefaultValidator<Boolean>
org.apache.fulcrum.intake.validator.BooleanValidator
- Alle implementierten Schnittstellen:
org.apache.avalon.framework.logger.LogEnabled
,InitableByConstraintMap
,Validator<Boolean>
Validator for boolean field types.
Values are validated by attempting to match the value to a list of strings for true and false values. The string values are compared without regard to case.
Valid values for Boolean.TRUE:
Values are validated by attempting to match the value to a list of strings for true and false values. The string values are compared without regard to case.
Valid values for Boolean.TRUE:
- TRUE
- T
- YES
- Y
- 1
- ON
- FALSE
- F
- NO
- N
- 0
- OFF
- Version:
- $Id$
- Autor:
- Quinton McCombs, Colin Chalmers, Jürgen Hoffmann
-
Feldübersicht
Von Klasse geerbte Felder org.apache.fulcrum.intake.validator.DefaultValidator
errorMessage, log, maxLength, maxLengthMessage, minLength, minLengthMessage, required, requiredMessage
Von Schnittstelle geerbte Felder org.apache.fulcrum.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
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
assertValidity
(String testValue) Determine whether a testValue meets the criteria specified in the constraints defined for this validatorParses a string value into a Boolean object.Von Klasse geerbte Methoden org.apache.fulcrum.intake.validator.DefaultValidator
assertValidity, enableLogging, getMaxLength, getMaxLengthMessage, getMessage, getMinLength, getMinLengthMessage, getRequiredMessage, init, isRequired, isValid, isValid, setMaxLength, setMaxLengthMessage, setMinLength, setMinLengthMessage, setRequired, setRequiredMessage
-
Konstruktordetails
-
BooleanValidator
public BooleanValidator()Default Constructor
-
-
Methodendetails
-
assertValidity
Determine whether a testValue meets the criteria specified in the constraints defined for this validator- Angegeben von:
assertValidity
in SchnittstelleValidator<Boolean>
- Setzt außer Kraft:
assertValidity
in KlasseDefaultValidator<Boolean>
- Parameter:
testValue
- aString
to be tested- Löst aus:
ValidationException
- containing an error message if the testValue did not pass the validation tests.
-
parse
Parses a string value into a Boolean object.- Parameter:
stringValue
- the value to parse- Gibt zurück:
- a
Boolean
object - Löst aus:
ParseException
- if the value cannot be parsed to a boolean
-