Package org.ametys.plugins.survey.answer
Class SurveyErrors
java.lang.Object
org.ametys.plugins.survey.answer.SurveyErrors
Survey errors.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String, List<I18nizableText>> The errors as a Map of field ID -> error messages. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SurveyErrors(Map<String, List<I18nizableText>> 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.booleanTests if the form has errors.voidsetErrors(Map<String, List<I18nizableText>> errors) Set the errors.
-
Field Details
-
_errors
The errors as a Map of field ID -> error messages.
-
-
Constructor Details
-
SurveyErrors
public SurveyErrors()Default constructor. -
SurveyErrors
Constructor with parameters.- Parameters:
errors- the errors.
-
-
Method Details
-
getErrors
Get the errors.- Returns:
- the 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.
-