Public Member Functions | |
StringValidator () | |
void | setFixed (String fixedValue) |
void | setFixedValue (String fixedValue) |
void | setMaxLength (int maxLength) |
void | setMinLength (int minLength) |
void | setLength (int length) |
void | setRequired (boolean required) |
void | setWhiteSpace (String value) |
String | normalize (String value) |
void | validate (String value, ValidationContext context) throws ValidationException |
void | validate (Object object) throws ValidationException |
void | validate (Object object, ValidationContext context) throws ValidationException |
The String Validation class
org.exolab.castor.xml.validators.StringValidator.StringValidator | ( | ) |
Creates a new StringValidator with no restrictions
String org.exolab.castor.xml.validators.StringValidator.normalize | ( | String | value | ) |
NOTE: THIS METHOD SHOULD NOT BE HERE..SHOULD BE MOVED TO A FieldHandler or to the Unmarshaller...but not here!!! (kvisco 20030125)
Normalizes the given string according to the whiteSpace facet used
value | the String to normalize |
Referenced by org.exolab.castor.xml.validators.StringValidator.validate().
void org.exolab.castor.xml.validators.StringValidator.setFixed | ( | String | fixedValue | ) |
Sets the fixed value in which all valid Strings must match.
fixedValue | the fixed value that all Strings must match |
Referenced by org.exolab.castor.xml.validators.StringValidator.setFixedValue().
void org.exolab.castor.xml.validators.StringValidator.setFixedValue | ( | String | fixedValue | ) |
Only used for backward compatibility for object model generated with an old version of Castor
References org.exolab.castor.xml.validators.StringValidator.setFixed().
void org.exolab.castor.xml.validators.StringValidator.setLength | ( | int | length | ) |
Sets the length that valid Strings must be
length | the length that valid Strings must be |
References org.exolab.castor.xml.validators.StringValidator.setMaxLength(), and org.exolab.castor.xml.validators.StringValidator.setMinLength().
void org.exolab.castor.xml.validators.StringValidator.setMaxLength | ( | int | maxLength | ) |
Sets the maximum length of that a valid String must be. To remove the max length facet, use a negative value.
maxLength | the maximum length for valid Strings |
Referenced by org.exolab.castor.xml.validators.StringValidator.setLength().
void org.exolab.castor.xml.validators.StringValidator.setMinLength | ( | int | minLength | ) |
Sets the minimum length that valid Strings must be
minLength | the minimum length that valid Strings must be |
Referenced by org.exolab.castor.xml.validators.StringValidator.setLength().
void org.exolab.castor.xml.validators.StringValidator.setRequired | ( | boolean | required | ) |
Sets whether or not a String is required (non null)
required | the flag indicating whether Strings are required |
Reimplemented in org.exolab.castor.xml.validators.NameValidator.
void org.exolab.castor.xml.validators.StringValidator.setWhiteSpace | ( | String | value | ) |
Sets the whiteSpace facet of the validator
The value of the whiteSpace facet must be one of the following:
any other value will generate a Warning and set the whiteSpace to preserved
whiteSpace | the whiteSpace value |
Referenced by org.exolab.castor.mapping.xml.BindXmlDescriptor.BindXmlDescriptor(), org.exolab.castor.mapping.xml.CacheTypeMappingDescriptor.CacheTypeMappingDescriptor(), org.exolab.castor.mapping.xml.ClassMappingDescriptor.ClassMappingDescriptor(), org.exolab.castor.builder.binding.ClassTypeDescriptor.ClassTypeDescriptor(), org.exolab.castor.builder.binding.ComponentBindingTypeDescriptor.ComponentBindingTypeDescriptor(), alma.acs.tools.comphelpergen.generated.ComponentHelperInfoDescriptor.ComponentHelperInfoDescriptor(), alma.acs.tools.comphelpergen.generated.ComponentInterfaceDescriptor.ComponentInterfaceDescriptor(), org.exolab.castor.mapping.xml.ContainerDescriptor.ContainerDescriptor(), alma.tools.entitybuilder.generated.EntitySchemaDescriptor.EntitySchemaDescriptor(), org.exolab.castor.mapping.xml.FieldMappingDescriptor.FieldMappingDescriptor(), org.exolab.castor.builder.binding.FieldTypeDescriptor.FieldTypeDescriptor(), org.exolab.castor.mapping.xml.IncludeDescriptor.IncludeDescriptor(), org.exolab.castor.builder.binding.InterfaceDescriptor.InterfaceDescriptor(), org.exolab.castor.mapping.xml.KeyGeneratorDefDescriptor.KeyGeneratorDefDescriptor(), org.exolab.castor.mapping.xml.MappingRootDescriptor.MappingRootDescriptor(), org.exolab.castor.mapping.xml.MapToDescriptor.MapToDescriptor(), org.exolab.castor.builder.binding.NamingTypeDescriptor.NamingTypeDescriptor(), org.exolab.castor.builder.binding.PackageTypeChoiceDescriptor.PackageTypeChoiceDescriptor(), org.exolab.castor.builder.binding.PackageTypeDescriptor.PackageTypeDescriptor(), org.exolab.castor.mapping.xml.ParamDescriptor.ParamDescriptor(), org.exolab.castor.mapping.xml.PropertyTypeDescriptor.PropertyTypeDescriptor(), org.exolab.castor.mapping.xml.SqlDescriptor.SqlDescriptor(), and alma.tools.entitybuilder.generated.XmlNamespace2JPackageDescriptor.XmlNamespace2JPackageDescriptor().
void org.exolab.castor.xml.validators.StringValidator.validate | ( | String | value, | |
ValidationContext | context | |||
) | throws ValidationException |
Reimplemented in org.exolab.castor.xml.validators.NameValidator.
References org.exolab.castor.xml.validators.PatternValidator.hasPattern(), org.exolab.castor.xml.validators.PatternValidator.isNillable(), and org.exolab.castor.xml.validators.StringValidator.normalize().
Referenced by org.exolab.castor.xml.validators.StringValidator.validate().
void org.exolab.castor.xml.validators.StringValidator.validate | ( | Object | object, | |
ValidationContext | context | |||
) | throws ValidationException |
Validates the given Object
object | the Object to validate | |
context | the ValidationContext |
Implements org.exolab.castor.xml.TypeValidator.
Reimplemented in org.exolab.castor.xml.validators.NameValidator.
References org.exolab.castor.xml.validators.StringValidator.validate().
void org.exolab.castor.xml.validators.StringValidator.validate | ( | Object | object | ) | throws ValidationException |
Validates the given Object
object | the Object to validate |
Reimplemented in org.exolab.castor.xml.validators.NameValidator.
References org.exolab.castor.xml.validators.StringValidator.validate().