|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception blackboard.data.ValidationException
public class ValidationException
This exception is thrown to indicate that a data object has invalid or corrupt data. It is generally thrown by persisters or loaders. UI validation should prevent this exception from appearing in application code, but in many cases, validation is not guaranteed to occur on inbound data (such as an import feed).
Constructor Summary | |
---|---|
ValidationException()
Default constructor. |
|
ValidationException(java.lang.String str)
Constructs a ValidationException with the given message. |
|
ValidationException(java.util.Vector warnings)
Creates a ValidationException with a list of warnings. |
Method Summary | |
---|---|
void |
addWarning(java.lang.String error,
java.lang.String constraint)
Adds a warning to this exception. |
void |
addWarning(ValidationWarning vw)
Adds a warning to this exception. |
java.lang.String |
getMessage()
Gets the message associated with this exception and a list of all the attached warnings. |
java.util.Vector |
getWarnings()
Returns a list of the warnings attached to this exception. |
void |
include(ValidationException ve)
Provides ability to chain ValidationExceptions that are spawned in seperate method calls but share a line of processing. |
java.lang.String |
toString()
For now simply wraps getMessage() |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ValidationException()
public ValidationException(java.lang.String str)
ValidationException
with the given message.
str
- Message to include in the exceptionpublic ValidationException(java.util.Vector warnings)
warnings
- Vector of warning objects to attach to this exception.
Replaces any vector already associated.Method Detail |
---|
public java.util.Vector getWarnings()
public void include(ValidationException ve)
public void addWarning(java.lang.String error, java.lang.String constraint)
error
- an error string stating what went wrong (generic)constraint
- the field specific constrint that was violatedpublic void addWarning(ValidationWarning vw)
vw
- warning to addpublic java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public java.lang.String toString()
getMessage()
toString
in class java.lang.Throwable
getMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |