Package org.ametys.core.userpref
Class UserPreferencesErrors
- java.lang.Object
-
- org.ametys.core.userpref.UserPreferencesErrors
-
public class UserPreferencesErrors extends Object
User preferences errors.
-
-
Constructor Summary
Constructors Constructor Description UserPreferencesErrors()Default constructor.UserPreferencesErrors(Map<String,Errors> errors)Constructor with parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddError(String fieldId, I18nizableText error)Add an error.voidaddErrors(String fieldId, List<I18nizableText> errors)Add an error list.Map<String,Errors>getErrors()Get the errors.ErrorsgetErrors(String fieldId)Get the errors for a single field.booleanhasErrors()Tests if the form has errors.voidsetErrors(Map<String,Errors> errors)Set the errors.
-
-
-
Constructor Detail
-
UserPreferencesErrors
public UserPreferencesErrors()
Default constructor.
-
UserPreferencesErrors
public UserPreferencesErrors(Map<String,Errors> errors)
Constructor with parameters.- Parameters:
errors- the errors.
-
-
Method Detail
-
getErrors
public Errors getErrors(String fieldId)
Get the errors for a single field.- Parameters:
fieldId- the field ID.- Returns:
- the field errors.
-
setErrors
public void setErrors(Map<String,Errors> errors)
Set the errors.- Parameters:
errors- the errors to set
-
addError
public void addError(String fieldId, I18nizableText error)
Add an error.- Parameters:
fieldId- the field ID.error- the error message.
-
addErrors
public void addErrors(String fieldId, List<I18nizableText> errors)
Add an error list.- Parameters:
fieldId- the field ID.errors- the error messages.
-
hasErrors
public boolean hasErrors()
Tests if the form has errors.- Returns:
- true if there are errors, false otherwise.
-
-