|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.jwarp.service.param.AValidator
|
+--org.jwarp.service.param.StringValidator
A validator for strings with length check
| Field Summary | |
(package private) int |
max
Maximal string length |
(package private) int |
min
Minimal string length |
| Fields inherited from class org.jwarp.service.param.AValidator |
contentValidator, mayBeEmpty, required |
| Constructor Summary | |
StringValidator()
|
|
StringValidator(int min)
A Constructor (2/2): sets min length |
|
StringValidator(int min,
int max)
A Constructor (1/2): sets min and max length |
|
| Method Summary | |
void |
configure(org.jdom.Element config)
Pass the Configuration to the Configurable
class. |
int |
getMax()
Get the upper limit of the string length |
int |
getMin()
Get the lower limit of the string length |
java.lang.String |
getValidationClass()
Returns the class name of the class being validated. |
void |
setMax(int max)
Sets the upper limit for string length |
void |
setMin(int min)
Sets the lower limit for string length |
void |
validate(java.lang.Object value)
The validate function Checks for a string with size in given range |
| Methods inherited from class org.jwarp.service.param.AValidator |
getMayBeEmpty, getNextValidator, getRequired, setMayBeEmpty, setNextValidator, setRequired |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
int min
int max
| Constructor Detail |
public StringValidator(int min,
int max)
min - Minimal lengthmax - Maximal lengthpublic StringValidator(int min)
min - Minimal lengthpublic StringValidator()
| Method Detail |
public void configure(org.jdom.Element config)
throws ConfigurationException
IConfigurableConfiguration to the Configurable
class. This method must always be called after the constructor and before any other method.org.jwarp.service.configuration.IConfigurableconfiguration - the class configurations.
public void validate(java.lang.Object value)
throws ParameterException
validate in class AValidatorcontens - The paramter content to be checkedpublic void setMin(int min)
max - The new lower limitpublic void setMax(int max)
max - The new upper limitpublic int getMin()
public int getMax()
public java.lang.String getValidationClass()
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||