org.enhydra.barracuda.core.forms
Class ValidationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.enhydra.barracuda.core.util.exceptions.NestableException
                    |
                    +--org.enhydra.barracuda.core.forms.ValidationException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DeferredValidationException, ParseException, UnableToValidateException

public class ValidationException
extends NestableException

This class defines the validation exception. Code that catches these exceptions should check for subExceptions, as this class can be used to group collections of ValidationExceptions.

See Also:
Serialized Form

Field Summary
protected  java.lang.Object source
           
protected  java.util.List subExceptions
           
 
Constructor Summary
ValidationException()
          The noargs public contructor for ValidationException
ValidationException(java.lang.Object source)
          The public contructor for ValidationException
ValidationException(java.lang.Object source, java.lang.String s)
          The public contructor for ValidationException
ValidationException(java.lang.Object isource, java.lang.String s, java.lang.Exception ibaseException)
          The public contructor for ValidationException
ValidationException(java.lang.String s)
          The public contructor for ValidationException
 
Method Summary
 void addSubException(ValidationException ve)
          Add a sub exception
 java.util.List getExceptionList()
          Collapse all sub-exceptions into a single list of Validation exceptions
protected  java.util.List getExceptionList(ValidationException ve)
           
 java.lang.Object getSource()
          Get the form element which caused this error
 java.util.List getSubExceptions()
          Get a copy of the list of sub-exceptions.
 boolean hasSubExceptions()
          See if this particular ValidationException has sub-exceptions
 java.lang.String toString()
           
 
Methods inherited from class org.enhydra.barracuda.core.util.exceptions.NestableException
getBaseException, getRootException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

subExceptions

protected java.util.List subExceptions

source

protected java.lang.Object source
Constructor Detail

ValidationException

public ValidationException()
The noargs public contructor for ValidationException


ValidationException

public ValidationException(java.lang.String s)
The public contructor for ValidationException

Parameters:
s - a String describing the exception

ValidationException

public ValidationException(java.lang.Object source)
The public contructor for ValidationException

Parameters:
source - the object which caused this error (usually a FormElement)

ValidationException

public ValidationException(java.lang.Object source,
                           java.lang.String s)
The public contructor for ValidationException

Parameters:
source - the object which caused this error (usually a FormElement)
s - a String describing the exception

ValidationException

public ValidationException(java.lang.Object isource,
                           java.lang.String s,
                           java.lang.Exception ibaseException)
The public contructor for ValidationException

Parameters:
s - a String describing the exception
Method Detail

getSource

public java.lang.Object getSource()
Get the form element which caused this error

Returns:
the form element which caused this error

hasSubExceptions

public boolean hasSubExceptions()
See if this particular ValidationException has sub-exceptions

Returns:
true if this particular ValidationException has sub-exceptions

addSubException

public void addSubException(ValidationException ve)
Add a sub exception

Parameters:
ve - a sub-exception to be added

getSubExceptions

public java.util.List getSubExceptions()
Get a copy of the list of sub-exceptions. May be null if there are no sub-exceptions.

Returns:
a copy of the list of sub-exceptions

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable

getExceptionList

public java.util.List getExceptionList()
Collapse all sub-exceptions into a single list of Validation exceptions


getExceptionList

protected java.util.List getExceptionList(ValidationException ve)


Copyright © 2001 Enhydra.org