org.exolab.castor.xml
Class ValidationContext

java.lang.Object
  extended byorg.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.

Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:15 $
Author:
Keith Visco

Constructor Summary
ValidationContext()
          Creates a new ValidationContext
 
Method Summary
 org.exolab.castor.util.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(org.exolab.castor.util.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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationContext

public ValidationContext()
Creates a new ValidationContext

Method Detail

getConfiguration

public org.exolab.castor.util.Configuration getConfiguration()
Returns the Configuration to use during validation.

Returns:
the Configuration to use. Will never be null.

getResolver

public ClassDescriptorResolver getResolver()
Returns the ClassDescriptorResolver to use during validation.

Returns:
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.

Returns:
true if fail-fast processing is enabled.

setConfiguration

public void setConfiguration(org.exolab.castor.util.Configuration config)
Sets the Configuration used during validation

Parameters:
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.

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.

setResolver

public void setResolver(ClassDescriptorResolver resolver)
Sets the ClassDescriptorResolver to use during validation.

Parameters:
resolver - the ClassDescriptorResolver to use.


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com