|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.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<ValidationWarning> warnings)
Creates a ValidationException with a list of warnings. |
|
| Method Summary | |
|---|---|
void |
addConstraintViolations(java.lang.String errorMsgKey,
blackboard.platform.validation.ConstraintViolation[] violations,
blackboard.platform.intl.BbResourceBundle resourceBundle)
Adds constraint violations to the exception. |
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<ValidationWarning> |
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<ValidationWarning> warnings)
warnings - Vector of warning objects to attach to this exception.
Replaces any vector already associated.| Method Detail |
|---|
public java.util.Vector<ValidationWarning> 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 add
public void addConstraintViolations(java.lang.String errorMsgKey,
blackboard.platform.validation.ConstraintViolation[] violations,
blackboard.platform.intl.BbResourceBundle resourceBundle)
errorMsgKey - Error string stating what went wrong (generic)violations - Violations to add (if null, no warnings will be added)resourceBundle - Bundle containing the resources referenced by the violationspublic java.lang.String getMessage()
getMessage in class java.lang.Throwablepublic java.lang.String toString()
getMessage()
toString in class java.lang.ThrowablegetMessage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||