| |
|
| java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException org.iscreen.ObjectValidationException
ObjectValidationException | public class ObjectValidationException extends RuntimeException (Code) | | When a validation failure occurs, eventually an ObjectValidationException is
thrown to the caller. This is an unchecked exception that should be
handled by the caller. The exception contains the list of ValidationFailures
that represent the validations that have failed. Ultimately, the failures
should be used to notify the end user (or system).
author: Shellman, Dan |
ObjectValidationException | public ObjectValidationException()(Code) | | Default constructor with no pre-defined validation failures.
|
ObjectValidationException | public ObjectValidationException(ValidationException e)(Code) | | Constructed from an existing ValidationException.
Parameters: e - An existing ValidationException. |
ObjectValidationException | public ObjectValidationException(List validationFailures)(Code) | | Constructor with pre-defined validation failures.
Parameters: validationFailures - The List of ValidationFailures for this exception. |
ObjectValidationException | public ObjectValidationException(List validationFailures, List validationWarnings)(Code) | | Constructor with pre-defined validation failures and warnings. Each
List must contain ValidationFailure objects.
Parameters: validationFailures - The List of failures for this exception. Parameters: validationWarnings - The List of warnings for this exception. |
addFailure | public void addFailure(ValidationFailure failure)(Code) | | Add a failure to this exception. This failure will be appended
to the end of the internal list of failures.
Parameters: failure - The ValidationFailure to add to this exception. |
addWarning | public void addWarning(ValidationFailure warning)(Code) | | Add a warning to this exception. This warning will be appended
to the end of the internal list of warnings.
Parameters: warning - The warning to add to this exception. |
getFailureMessages | public List getFailureMessages()(Code) | | Retrieves the list of failure messages (List of String objects).
Returns the List of failure messages (as Strings). |
getFailures | public List getFailures()(Code) | | Retrieves the List of ValidationFailures associated with this exception
that represent the failures.
Returns a List of ValidationFailures. |
getRootException | public ValidationException getRootException()(Code) | | Provides access to the root ValidationException that was used
to construct this exception. This is interesting in order to get
access to the appropriate stack trace information.
Returns the root ValidationException that generated this exception. |
getWarningMessages | public List getWarningMessages()(Code) | | Retrieves the list of warning messages (List of String objects).
Returns the List of warning messages (as Strings). |
getWarnings | public List getWarnings()(Code) | | Retrieves the List of ValidationFailures associated with this exception
that represent the warnings.
Returns a List of warnings. |
|
|
|