toolbox.web.validation
Class ValidationException

Package class diagram package ValidationException
java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by toolbox.web.validation.ValidationException
All Implemented Interfaces:
java.io.Serializable

public class ValidationException
extends java.lang.Exception

Exception that is thrown when validation exceptions occur.

See Also:
Serialized Form

Constructor Summary
ValidationException()
          Default constructor
ValidationException(java.lang.Exception ex)
          Creates a new ValidationException from the given Exception.
ValidationException(java.lang.String msg)
          Generates a ValidationException with the given message.
 
Method Summary
 void addMessage(java.lang.String msg)
          Add a validation exception message to this exception
 void addMessages(java.util.Collection msgs)
          Add the messages from the given collection to the message list of this exception.
 java.util.List getMessages()
          Return the list of validation exception messages.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValidationException

public ValidationException()
Default constructor


ValidationException

public ValidationException(java.lang.Exception ex)
Creates a new ValidationException from the given Exception.

Parameters:
ex - Underlying exception that occured.

ValidationException

public ValidationException(java.lang.String msg)
Generates a ValidationException with the given message.

Parameters:
msg - String containing the exception message.
Method Detail

addMessage

public void addMessage(java.lang.String msg)
Add a validation exception message to this exception

Parameters:
msg - Message to add

addMessages

public void addMessages(java.util.Collection msgs)
Add the messages from the given collection to the message list of this exception.

Parameters:
msgs - Collection containing messages.

getMessages

public java.util.List getMessages()
Return the list of validation exception messages.

Returns:
List containing validation exception messages.