|
|||||||||||
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.NumberValidator
org.apache.turbine.services.intake.validator.NumberKeyValidator
Validates numbers with the following constraints in addition to those listed in DefaultValidator.
Name | Valid Values | Default Value |
---|---|---|
minValue | greater than Integer.MIN_VALUE | |
maxValue | less than BigDecimal.MAX_VALUE | |
notANumberMessage | Some text | Entry was not a valid number |
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 | |
NumberKeyValidator()
Deprecated. |
|
NumberKeyValidator(java.util.Map paramMap)
Deprecated. |
Method Summary | |
void |
assertValidity(java.lang.String testValue)
Deprecated. Determine whether a testValue meets the criteria specified in the constraints defined for this validator |
protected void |
doInit(java.util.Map paramMap)
Deprecated. |
protected java.lang.String |
getDefaultInvalidNumberMessage()
Deprecated. |
java.lang.String |
getInvalidNumberMessage()
Get the value of invalidNumberMessage. |
org.apache.torque.om.NumberKey |
getMaxValue()
Deprecated. Get the value of maxValue. |
java.lang.String |
getMaxValueMessage()
Get the value of maxValueMessage. |
org.apache.torque.om.NumberKey |
getMinValue()
Deprecated. Get the value of minValue. |
java.lang.String |
getMinValueMessage()
Get the value of minValueMessage. |
void |
init(java.util.Map paramMap)
Extract the relevant parameters from the constraints listed in |
void |
setInvalidNumberMessage(java.lang.String invalidNumberMessage)
Set the value of invalidNumberMessage. |
void |
setMaxValue(org.apache.torque.om.NumberKey maxValue)
Deprecated. Set the value of maxValue. |
void |
setMaxValueMessage(java.lang.String maxValueMessage)
Set the value of maxValueMessage. |
void |
setMinValue(org.apache.torque.om.NumberKey minValue)
Deprecated. Set the value of minValue. |
void |
setMinValueMessage(java.lang.String minValueMessage)
Set the value of minValueMessage. |
Methods inherited from class org.apache.turbine.services.intake.validator.DefaultValidator |
getMaxLength, getMaxLengthMessage, getMessage, getMinLength, getMinLengthMessage, getRequiredMessage, 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 NumberKeyValidator(java.util.Map paramMap) throws InvalidMaskException
public NumberKeyValidator()
Method Detail |
protected void doInit(java.util.Map paramMap)
protected java.lang.String getDefaultInvalidNumberMessage()
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 org.apache.torque.om.NumberKey getMinValue()
public void setMinValue(org.apache.torque.om.NumberKey minValue)
minValue
- Value to assign to minValue.public org.apache.torque.om.NumberKey getMaxValue()
public void setMaxValue(org.apache.torque.om.NumberKey maxValue)
maxValue
- Value to assign to maxValue.public void init(java.util.Map paramMap) throws InvalidMaskException
init
in interface InitableByConstraintMap
init
in class DefaultValidator
paramMap
- a Map
of rule
's
containing constraints on the input.
InvalidMaskException
- an invalid mask was specifiedpublic java.lang.String getMinValueMessage()
public void setMinValueMessage(java.lang.String minValueMessage)
minValueMessage
- Value to assign to minValueMessage.public java.lang.String getMaxValueMessage()
public void setMaxValueMessage(java.lang.String maxValueMessage)
maxValueMessage
- Value to assign to maxValueMessage.public java.lang.String getInvalidNumberMessage()
public void setInvalidNumberMessage(java.lang.String invalidNumberMessage)
invalidNumberMessage
- Value to assign to invalidNumberMessage.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |