|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.fulcrum.intake.validator.DefaultValidator
org.apache.fulcrum.intake.validator.IntegerValidator
org.apache.fulcrum.intake.validator.IntegerRangeValidator
public class IntegerRangeValidator
Validates an int field in dependency on another int field.
| Name | Valid Values | Default Value |
|---|---|---|
| less-than | <name of other field> | |
| greater-than | <name of other field> | |
| less-than-or-equal | <name of other field> | |
| greater-than-or-equal | <name of other field> |
| Field Summary |
|---|
| Fields inherited from class org.apache.fulcrum.intake.validator.DefaultValidator |
|---|
errorMessage, log, maxLength, maxLengthMessage, minLength, minLengthMessage, required, requiredMessage |
| Fields inherited from interface 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 |
| Constructor Summary | |
|---|---|
IntegerRangeValidator()
Default constructor |
|
IntegerRangeValidator(Map paramMap)
|
|
| Method Summary | |
|---|---|
void |
assertValidity(Field testField)
Determine whether a testValue meets the criteria specified in the constraints defined for this validator |
void |
assertValidity(String testValue,
Group group)
Determine whether a testValue meets the criteria specified in the constraints defined for this validator |
String |
getInvalidNumberMessage()
Get the value of invalidNumberMessage. |
String |
getMaxValueMessage()
Get the value of maxValueMessage. |
String |
getMinValueMessage()
Get the value of minValueMessage. |
void |
init(Map paramMap)
Constructor to use when initialising Object |
void |
setInvalidNumberMessage(String invalidNumberMessage)
Set the value of invalidNumberMessage. |
void |
setMaxValueMessage(String maxValueMessage)
Set the value of maxValueMessage. |
void |
setMinValueMessage(String minValueMessage)
Set the value of minValueMessage. |
| Methods inherited from class org.apache.fulcrum.intake.validator.IntegerValidator |
|---|
assertValidity, getMaxValue, getMinValue, setMaxValue, setMinValue |
| Methods inherited from class org.apache.fulcrum.intake.validator.DefaultValidator |
|---|
getMaxLength, getMaxLengthMessage, getMessage, getMinLength, getMinLengthMessage, getRequiredMessage, isRequired, isValid, 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 IntegerRangeValidator(Map paramMap)
throws IntakeException
IntakeExceptionpublic IntegerRangeValidator()
| Method Detail |
|---|
public void init(Map paramMap)
throws InvalidMaskException
init in interface InitableByConstraintMapinit in class IntegerValidatorparamMap -
InvalidMaskException
public void assertValidity(Field testField)
throws ValidationException
assertValidity in interface ValidatorassertValidity in class DefaultValidatortestField - a Field to be tested
ValidationException - containing an error message if the
testValue did not pass the validation tests.
public void assertValidity(String testValue,
Group group)
throws ValidationException
testValue - a String to be testedgroup - the group this field belongs to
ValidationException - containing an error message if the
testValue did not pass the validation tests.public String getMinValueMessage()
public void setMinValueMessage(String minValueMessage)
minValueMessage - Value to assign to minValueMessage.public String getMaxValueMessage()
public void setMaxValueMessage(String maxValueMessage)
maxValueMessage - Value to assign to maxValueMessage.public String getInvalidNumberMessage()
public void setInvalidNumberMessage(String invalidNumberMessage)
invalidNumberMessage - Value to assign to invalidNumberMessage.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||