|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iscreen.ValidationServiceWrapper
public class ValidationServiceWrapper
This wrapper around a ValidationService is itself a ValidationService implementation. However, it can be used as a wrapper that takes a validation factory and the validation set name, bypassing the need to call the factory's getValidationService() method.
| Constructor Summary | |
|---|---|
ValidationServiceWrapper(java.lang.Object beanToValidate)
This constructor uses all defaults. |
|
ValidationServiceWrapper(ValidationFactoryConfig config,
java.lang.String validationSetName)
Construct the wrapper with a factory config and the ValidationSet name (the name of the service). |
|
ValidationServiceWrapper(ValidationFactoryConfig config,
java.lang.String metaPropertyName,
java.lang.String metaValue)
Construct the wrapper with a factory config and meta data about the validation service. |
|
ValidationServiceWrapper(ValidationFactory factory,
java.lang.String validationSetName)
Construct the wrapper with an existing factory and the ValidationSet name (the name of the service). |
|
ValidationServiceWrapper(ValidationFactory factory,
java.lang.String metaPropertyName,
java.lang.String metaValue)
Construct the wrapper with an existing factory and meta data about the validation service. |
|
| Method Summary | |
|---|---|
DocumentationIterator |
getDocumentation()
Retrieves an iterator of String values representing the documentation configured for this validation service (the underlying validation set). |
java.lang.String |
getServiceName()
The service name (unique id) of the service. |
void |
validate(java.lang.Object obj)
Called to validate an object (typically a JavaBean). |
void |
validate(java.lang.Object obj,
java.util.Locale locale)
Called to validate an object (typically a JavaBean). |
void |
validateObject(java.lang.Object obj)
Identical to validate() except that it throws the unchecked exception ObjectValidationException instead of a checked exception. |
void |
validateObject(java.lang.Object obj,
java.util.Locale locale)
Identical to validate() except that it throws the unchecked exception ObjectValidationException instead of a checked exception. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ValidationServiceWrapper(java.lang.Object beanToValidate)
beanToValidate - The bean to be validated.
public ValidationServiceWrapper(ValidationFactory factory,
java.lang.String validationSetName)
factory - The factory containing the validation servicevalidationSetName - The fully qualified name of the validation set
public ValidationServiceWrapper(ValidationFactory factory,
java.lang.String metaPropertyName,
java.lang.String metaValue)
new ValidationServiceWrapper( factory, "className", bean.getClass().getName() );
factory - The config of the validation factorymetaPropertyName - The property name of the meta datametaValue - The value of the meta data.
public ValidationServiceWrapper(ValidationFactoryConfig config,
java.lang.String validationSetName)
config - The config of the validation factoryvalidationSetName - The fully qualified name of the validation set
public ValidationServiceWrapper(ValidationFactoryConfig config,
java.lang.String metaPropertyName,
java.lang.String metaValue)
new ValidationServiceWrapper( config, "className", bean.getClass().getName() );
config - The config of the validation factorymetaPropertyName - The property name of the meta datametaValue - The value of the meta data.| Method Detail |
|---|
public void validate(java.lang.Object obj)
throws ValidationException
ValidationService
validate in interface ValidationServiceobj - The object (usually a JavaBean) to validate.
ValidationException - The exception containing any
validation failures.
public void validate(java.lang.Object obj,
java.util.Locale locale)
throws ValidationException
ValidationService
validate in interface ValidationServiceobj - The object (usually a JavaBean) to validate.locale - The locale used for failure message generation.
ValidationException - The exception containing any
validation failures.public void validateObject(java.lang.Object obj)
ValidationService
validateObject in interface ValidationServiceobj - The object (usually a JavaBean) to validate.
public void validateObject(java.lang.Object obj,
java.util.Locale locale)
ValidationService
validateObject in interface ValidationServiceobj - The object (usually a JavaBean) to validate.locale - The locale used for failure message generation.public java.lang.String getServiceName()
ValidationService
getServiceName in interface ValidationServicepublic DocumentationIterator getDocumentation()
getDocumentation in interface ValidationService
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||