org.exolab.castor.xml
Class ValidationContext
java.lang.Object
org.exolab.castor.xml.ValidationContext
public class ValidationContext
extends java.lang.Object
A class which can be used to hold validation information, used
by the TypeValidator interface.
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:15 $
Configuration | getConfiguration() - Returns the Configuration to use during validation.
|
ClassDescriptorResolver | getResolver() - Returns the ClassDescriptorResolver to use during validation.
|
boolean | isFailFast() - Returns true if the validation process should fail
upon first error encountered, otherwise the validation
processs will attempt to validate as much as possible
(even after the first error is encountered) and collect as
many errors before either returning (no errors) or
throwing a validationException containing the list of
errors.
|
void | setConfiguration(Configuration config) - Sets the Configuration used during validation
|
void | setFailFast(boolean failFast) - Sets the fail-fast flag.
|
void | setResolver(ClassDescriptorResolver resolver) - Sets the ClassDescriptorResolver to use during validation.
|
ValidationContext
public ValidationContext()
Creates a new ValidationContext
getConfiguration
public Configuration getConfiguration()
Returns the Configuration to use during validation.
- the Configuration to use. Will never be null.
getResolver
public ClassDescriptorResolver getResolver()
Returns the ClassDescriptorResolver to use during validation.
- the ClassDescriptorResolver to use. May be null.
isFailFast
public boolean isFailFast()
Returns true if the validation process should fail
upon first error encountered, otherwise the validation
processs will attempt to validate as much as possible
(even after the first error is encountered) and collect as
many errors before either returning (no errors) or
throwing a validationException containing the list of
errors.
NOTE: DISABLEING OF FAIL-FAST IS NOT YET ENABLED.
- true if fail-fast processing is enabled.
setConfiguration
public void setConfiguration(Configuration config)
Sets the Configuration used during validation
config
- the Configuration to use
setFailFast
public void setFailFast(boolean failFast)
Sets the fail-fast flag. Fail-fast is enabled by default.
When fail-fast is enabled (default or by setting the
flag to true) the validation process will throw an
exception upon the first error encountered.
When fail-fast is disabled (by setting the flag to false)
the validation processs will attempt to validate even
after the first error is encountered and collect as
many errors before either returning (no errors) or
throwing a validationException containing the list of
errors.
NOTE: DISABLEING FAIL-FAST IS NOT YET ENABLED.
failFast
- a boolean that when true enables fail-fast
validation, otherwise the validator will attempt to validate
as much as it can reporting as many errors as possible before
returning.
setResolver
public void setResolver(ClassDescriptorResolver resolver)
Sets the ClassDescriptorResolver to use during validation.
resolver
- the ClassDescriptorResolver to use.
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com