|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.iscreen.ValidationException
public class ValidationException
When a validation failure occurs, eventually a ValidationException is thrown to the caller. This is a checked 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 java.util.Map |
namedFailures
|
Constructor Summary | |
---|---|
ValidationException()
Default constructor with no pre-defined validation failures. |
|
ValidationException(java.util.List validationFailures)
Constructor with pre-defined validation failures. |
|
ValidationException(java.util.List validationFailures,
java.util.List validationWarnings)
Constructor with pre-defined validation failures and warnings. |
Method Summary | |
---|---|
void |
addFailure(ValidationFailure failure)
Add a failure to this exception. |
void |
addValidationException(ValidationException e)
|
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. |
java.util.List |
getFailures(int minimumSeverity,
int maximumSeverity)
Retrieves the failures that meet the minimum severity level and maximum severity level passed in (inclusive). |
java.util.List |
getNamedFailures(java.lang.String validatorName)
Retrieves the List of failures (and warnings) that are associated with a particular "name." The name is defined in the configuration, and is associated with a particular use of a validator. |
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 java.util.Map namedFailures
Constructor Detail |
---|
public ValidationException()
public ValidationException(java.util.List validationFailures)
validationFailures
- The List of ValidationFailures for this exception.public ValidationException(java.util.List validationFailures, java.util.List validationWarnings)
validationFailures
- The List of failures for this exception.validationWarnings
- The List of warnings 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 getFailures(int minimumSeverity, int maximumSeverity)
minimumSeverity
- The minimal severity level (inclusive).maximumSeverity
- The maximum severity level (inclusive).
public java.util.List getNamedFailures(java.lang.String validatorName)
validatorName
- The name to find failures against.
public java.util.List getFailureMessages()
public void addValidationException(ValidationException e)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |