Package org.ametys.core.userpref
Class UserPreferencesErrors
java.lang.Object
org.ametys.core.userpref.UserPreferencesErrors
User preferences errors.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.UserPreferencesErrors(Map<String, Errors> errors) Constructor with parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddError(String fieldId, I18nizableText error) Add an error.voidaddErrors(String fieldId, List<I18nizableText> errors) Add an error list.Get the errors.Get the errors for a single field.booleanTests if the form has errors.voidSet the errors.
-
Field Details
-
_errors
The errors as a Map of field ID -> error messages.
-
-
Constructor Details
-
UserPreferencesErrors
public UserPreferencesErrors()Default constructor. -
UserPreferencesErrors
Constructor with parameters.- Parameters:
errors- the errors.
-
-
Method Details
-
getErrors
Get the errors.- Returns:
- the errors.
-
getErrors
Get the errors for a single field.- Parameters:
fieldId- the field ID.- Returns:
- the field errors.
-
setErrors
Set the errors.- Parameters:
errors- the errors to set
-
addError
Add an error.- Parameters:
fieldId- the field ID.error- the error message.
-
addErrors
Add an error list.- Parameters:
fieldId- the field ID.errors- the error messages.
-
hasErrors
Tests if the form has errors.- Returns:
- true if there are errors, false otherwise.
-