org.acegisecurity.domain.validation
Class ValidationManagerImpl
java.lang.Object
org.acegisecurity.domain.validation.ValidationManagerImpl
- All Implemented Interfaces:
- ValidationManager, InitializingBean
public class ValidationManagerImpl
- extends Object
- implements InitializingBean, ValidationManager
Default implementation of ValidationManager.
- Version:
- $Id: ValidationManagerImpl.java,v 1.9 2005/11/17 00:55:50 benalex Exp $
- Author:
- Ben Alex, Matthew E. Porter
|
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.apache.commons.logging.Log logger
ValidationManagerImpl
public ValidationManagerImpl()
setIntrospectionManager
public void setIntrospectionManager(IntrospectionManager introspectionManager)
getIntrospectionManager
public IntrospectionManager getIntrospectionManager()
setStrictValidation
public void setStrictValidation(boolean strictValidation)
- Indicates whether a
ValidatorNotFoundException should be thrown
if any domain object does not have a corresponding
Validator.
Defaults to true. This is a reasonable default, as callers
of ValidationManager should expect the object to support
validation.
- Parameters:
strictValidation - set to false if you wish to
silently ignore any domain object that is missing a
Validator
isStrictValidation
public boolean isStrictValidation()
setValidationRegistryManager
public void setValidationRegistryManager(ValidationRegistryManager validationRegistryManager)
getValidationRegistryManager
public ValidationRegistryManager getValidationRegistryManager()
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet in interface InitializingBean
- Throws:
Exception
validate
public void validate(Object domainObject)
throws BindException,
ValidatorNotFoundException
- Validates the passed domain object, along with any children,
grandchildren, great-grandchildren etc.
- Specified by:
validate in interface ValidationManager
- Parameters:
domainObject - to validate (cannot be null)
- Throws:
BindException - if a validation problem occurs
ValidatorNotFoundException - if no matching Validator
could be found for the object or its children (only ever thrown
if the strictValidation) was set to
true).
Copyright © 2004-2005 Acegi Technology Pty Limited. All Rights Reserved.