|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.iscreen.ObjectValidationException
public class ObjectValidationException
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).
Field Summary | |
---|---|
protected java.util.List |
failures
|
protected ValidationException |
validationException
|
Constructor Summary | |
---|---|
ObjectValidationException()
Default constructor with no pre-defined validation failures. |
|
ObjectValidationException(java.util.List validationFailures)
Constructor with pre-defined validation failures. |
|
ObjectValidationException(ValidationException e)
Constructed from an existing ValidationException. |
Method Summary | |
---|---|
void |
addFailure(ValidationFailure failure)
Add a failure to this exception. |
java.util.List |
getFailureMessages()
Retrieves the list of failure messages (List of String objects). |
java.util.List |
getFailures()
Retrieves the List of ValidationFailures associated with this exception that represent the failures. |
java.util.List |
getFailures(int minimumSeverity)
Retrieves the failures that meet the minimum severity level passed in. |
ValidationException |
getRootException()
Provides access to the root ValidationException that was used to construct this exception. |
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 |
Field Detail |
---|
protected java.util.List failures
protected ValidationException validationException
Constructor Detail |
---|
public ObjectValidationException()
public ObjectValidationException(ValidationException e)
e
- An existing ValidationException.public ObjectValidationException(java.util.List validationFailures)
validationFailures
- The List of ValidationFailures for this exception.Method Detail |
---|
public void addFailure(ValidationFailure failure)
failure
- The ValidationFailure to add to this exception.public java.util.List getFailures()
public java.util.List getFailures(int minimumSeverity)
minimumSeverity
- The minimal severity level.
public java.util.List getFailureMessages()
public ValidationException getRootException()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |