Class ValidationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.nuxeo.ecm.webengine.forms.validation.ValidationException
-
- All Implemented Interfaces:
Serializable
public class ValidationException extends Exception
- Author:
- Bogdan Stefanescu
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description ValidationException()
ValidationException(String message)
ValidationException(String message, Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
IS_REQUIRED_MSG
public static final String IS_REQUIRED_MSG
- See Also:
- Constant Field Values
-
IS_INVALID_MSG
public static final String IS_INVALID_MSG
- See Also:
- Constant Field Values
-
form
protected transient Form form
-
-
Method Detail
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
getXmlMessage
public String getXmlMessage()
-
addRequiredField
public ValidationException addRequiredField(String key)
-
addRequiredField
public ValidationException addRequiredField(String key, String message)
-
addInvalidField
public ValidationException addInvalidField(String key)
-
addInvalidField
public ValidationException addInvalidField(String key, String message)
-
hasFieldErrors
public boolean hasFieldErrors()
-
hasInvalidFields
public boolean hasInvalidFields()
-
hasRequiredFields
public boolean hasRequiredFields()
-
getRequiredFields
public Collection<String> getRequiredFields()
-
getInvalidFields
public Collection<String> getInvalidFields()
-
hasErrors
public boolean hasErrors(String key)
-
setForm
public void setForm(Form form)
-
getForm
public Form getForm()
-
-