|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.iscreen.impl.BaseValidationService
public abstract class BaseValidationService
This is the base class implementation of the ValidationService interface.
Field Summary | |
---|---|
protected java.util.Locale |
defaultLocale
|
protected java.lang.String |
id
|
Constructor Summary | |
---|---|
BaseValidationService(java.lang.String uniqueId,
java.util.Locale locale)
Constructor taking unique id. |
Method Summary | |
---|---|
protected DefaultValidatorContext |
constructContext(ContextBean root,
java.util.Locale locale)
This can be over-written by sub-classes, but it's not really necessary, since this service requires a particular implementation of the ValidatorContext. |
protected ContextBean |
constructContextBean(java.lang.Object objToValidate)
This can be over-written by sub-classes, but it's not really necessary, since this service requires an OGNL root object. |
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. |
protected abstract java.util.Iterator |
getWrapperIterator()
Retrieves an Iterator that will iterate through the ValidatorWrapper instances contained by this 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 |
Field Detail |
---|
protected java.lang.String id
protected java.util.Locale defaultLocale
Constructor Detail |
---|
public BaseValidationService(java.lang.String uniqueId, java.util.Locale locale)
uniqueId
- The unique id for this service.locale
- The default locale for this service.Method Detail |
---|
public void validate(java.lang.Object obj) throws ValidationException
ValidationService
validate
in interface ValidationService
obj
- 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 ValidationService
obj
- 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, java.util.Locale locale)
ValidationService
validateObject
in interface ValidationService
obj
- The object (usually a JavaBean) to validate.locale
- The locale used for failure message generation.public void validateObject(java.lang.Object obj)
ValidationService
validateObject
in interface ValidationService
obj
- The object (usually a JavaBean) to validate.public java.lang.String getServiceName()
ValidationService
getServiceName
in interface ValidationService
public DocumentationIterator getDocumentation()
getDocumentation
in interface ValidationService
protected abstract java.util.Iterator getWrapperIterator()
protected DefaultValidatorContext constructContext(ContextBean root, java.util.Locale locale)
root
- The ContextBean that the context needs.locale
- The locale to use in generating error messages.
protected ContextBean constructContextBean(java.lang.Object objToValidate)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |