Interface BindingResult
- All Known Implementing Classes:
BindingResultImpl
public interface BindingResult
Represents the result of a binding operation in the Lutece MVC framework.
This interface provides methods to check for errors, retrieve error messages,
and access detailed information about binding and validation errors.
-
Method Summary
Modifier and TypeMethodDescriptionReturns an immutable set of all binding and validation errors.Returns an immutable list of all messages representing both binding and validation errors.Returns an immutable set of all binding errors.Returns an immutable set of all binding and validation errors for a specific parameter.Returns an immutable set of all validation errors.booleanisFailed()Returnstrueif there is at least one parameter error.
-
Method Details
-
isFailed
boolean isFailed()Returnstrueif there is at least one parameter error.- Returns:
trueif there is at least one parameter error
-
getAllMessages
Returns an immutable list of all messages representing both binding and validation errors. This method is a shortcut for:getAllErrors().stream().map(ParamError::getMessage).collect(Collectors.toList())
- Returns:
- A list of human-readable messages
-
getAllErrors
Set<ParamError> getAllErrors()Returns an immutable set of all binding and validation errors.- Returns:
- All binding and validation errors.
-
getBindingErrors
Set<BindingError> getBindingErrors()Returns an immutable set of all binding errors.- Returns:
- All binding errors.
-
getValidationErrors
Set<ValidationError> getValidationErrors()Returns an immutable set of all validation errors.- Returns:
- All validation errors.
-
getErrors
Returns an immutable set of all binding and validation errors for a specific parameter.- Parameters:
param- parameter name- Returns:
- All binding and validation errors for the parameter.
-