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 Details

    • isFailed

      boolean isFailed()
      Returns true if there is at least one parameter error.
      Returns:
      true if there is at least one parameter error
    • getAllMessages

      List<String> 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

      Set<ParamError> getErrors(String param)
      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.