Public Member Functions | Protected Member Functions

org.exolab.castor.xml.ValidationContext Class Reference

List of all members.

Public Member Functions

 ValidationContext ()
Configuration getConfiguration ()
ClassDescriptorResolver getResolver ()
boolean isFailFast ()
void setConfiguration (Configuration config)
void setFailFast (boolean failFast)
void setResolver (ClassDescriptorResolver resolver)

Protected Member Functions

boolean isValidated (Object obj)
void addValidated (Object obj)
void removeValidated (Object obj)

Detailed Description

A class which can be used to hold validation information, used by the TypeValidator interface.

Author:
Keith Visco
Version:
Revision:
1.2
Date:
2004/10/06 08:10:17

Constructor & Destructor Documentation

org.exolab.castor.xml.ValidationContext.ValidationContext (  ) 

Creates a new ValidationContext


Member Function Documentation

void org.exolab.castor.xml.ValidationContext.addValidated ( Object  obj  )  [protected]
Configuration org.exolab.castor.xml.ValidationContext.getConfiguration (  ) 

Returns the Configuration to use during validation.

Returns:
the Configuration to use. Will never be null.
ClassDescriptorResolver org.exolab.castor.xml.ValidationContext.getResolver (  ) 

Returns the ClassDescriptorResolver to use during validation.

Returns:
the ClassDescriptorResolver to use. May be null.
boolean org.exolab.castor.xml.ValidationContext.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.

Returns:
true if fail-fast processing is enabled.
boolean org.exolab.castor.xml.ValidationContext.isValidated ( Object  obj  )  [protected]
void org.exolab.castor.xml.ValidationContext.removeValidated ( Object  obj  )  [protected]
void org.exolab.castor.xml.ValidationContext.setConfiguration ( Configuration  config  ) 

Sets the Configuration used during validation

Parameters:
config the Configuration to use

Referenced by org.exolab.castor.xml.UnmarshalHandler.endElement().

void org.exolab.castor.xml.ValidationContext.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.

Parameters:
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.
void org.exolab.castor.xml.ValidationContext.setResolver ( ClassDescriptorResolver  resolver  ) 

Sets the ClassDescriptorResolver to use during validation.

Parameters:
resolver the ClassDescriptorResolver to use.

Referenced by org.exolab.castor.xml.UnmarshalHandler.endElement().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties