public class ValidationException extends Exception
Modifier and Type | Field and Description |
---|---|
protected Form |
form |
protected Map<String,String> |
invalidFields |
static String |
IS_INVALID_MSG |
static String |
IS_REQUIRED_MSG |
protected Map<String,String> |
requiredFields |
Constructor and Description |
---|
ValidationException() |
ValidationException(String message) |
ValidationException(String message,
Throwable cause) |
Modifier and Type | Method and Description |
---|---|
ValidationException |
addInvalidField(String key) |
ValidationException |
addInvalidField(String key,
String message) |
ValidationException |
addRequiredField(String key) |
ValidationException |
addRequiredField(String key,
String message) |
String |
getError(String key) |
Form |
getForm() |
Collection<String> |
getInvalidFields() |
String |
getMessage() |
Collection<String> |
getRequiredFields() |
String |
getXmlMessage() |
boolean |
hasErrors(String key) |
boolean |
hasFieldErrors() |
boolean |
hasInvalidFields() |
boolean |
hasRequiredFields() |
void |
setForm(Form form) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final String IS_REQUIRED_MSG
public static final String IS_INVALID_MSG
protected Map<String,String> invalidFields
protected Map<String,String> requiredFields
public ValidationException(String message)
public ValidationException(String message, Throwable cause)
public ValidationException()
public String getMessage()
getMessage
in class Throwable
public String getXmlMessage()
public ValidationException addRequiredField(String key)
public ValidationException addRequiredField(String key, String message)
public ValidationException addInvalidField(String key)
public ValidationException addInvalidField(String key, String message)
public boolean hasFieldErrors()
public boolean hasInvalidFields()
public boolean hasRequiredFields()
public Collection<String> getRequiredFields()
public Collection<String> getInvalidFields()
Copyright © 2015 Nuxeo SA. All rights reserved.