org.exolab.castor.xml.validators
public class StringValidator extends PatternValidator implements TypeValidator
Version: $Revision: 6230 $ $Date: 2004-12-11 02:13:52 -0700 (Sat, 11 Dec 2004) $
Constructor Summary | |
---|---|
StringValidator()
Creates a new StringValidator with no restrictions
|
Method Summary | |
---|---|
String | normalize(String value)
NOTE: THIS METHOD SHOULD NOT BE HERE..SHOULD BE MOVED
TO A FieldHandler or to the Unmarshaller...but not
here! |
void | setFixed(String fixedValue)
Sets the fixed value in which all valid Strings must match. |
void | setFixedValue(String fixedValue)
Only used for backward compatibility for object model generated with an old
version of Castor |
void | setLength(int length)
Sets the length that valid Strings must be |
void | setMaxLength(int maxLength)
Sets the maximum length of that a valid String must be.
|
void | setMinLength(int minLength)
Sets the minimum length that valid Strings must be |
void | setRequired(boolean required)
Sets whether or not a String is required (non null) |
void | setWhiteSpace(String value) Sets the whiteSpace facet of the validator The value of the whiteSpace facet must be one of the following:
|
void | validate(String value, ValidationContext context) |
void | validate(Object object)
Validates the given Object
|
void | validate(Object object, ValidationContext context)
Validates the given Object
|
Parameters: value the String to normalize
Parameters: fixedValue the fixed value that all Strings must match
Deprecated: since 0.9.4_beta
Only used for backward compatibility for object model generated with an old version of CastorParameters: length the length that valid Strings must be
Parameters: maxLength the maximum length for valid Strings
Parameters: minLength the minimum length that valid Strings must be
Parameters: required the flag indicating whether Strings are required
Sets the whiteSpace facet of the validator
The value of the whiteSpace facet must be one of the following:
Parameters: value the whiteSpace value
Parameters: object the Object to validate
Parameters: object the Object to validate context the ValidationContext