Class ResolverResult<T>
java.lang.Object
fr.paris.lutece.portal.util.mvc.binding.ResolverResult<T>
- Type Parameters:
T- the type of the resolved value
A wrapper object that holds the result of a parameter resolution.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ResolverResult<T>failed(T value, BindingError error) Creates a result with the given value and binding errors.static <T> ResolverResult<T>failed(T value, List<BindingError> errors) Creates a result with the given value and binding errors.Returns the list of binding errors, if any.getValue()Returns the resolved value.static <T> ResolverResult<T>success(T value) Creates a successful result with the resolved value and no errors.
-
Method Details
-
success
Creates a successful result with the resolved value and no errors.- Parameters:
value- the resolved value- Returns:
- a successful
ResolverResult
-
failed
Creates a result with the given value and binding errors.- Parameters:
value- the resolved value (may be null)errors- the list of binding errors- Returns:
- a
ResolverResultwith errors
-
failed
Creates a result with the given value and binding errors.- Parameters:
value- the resolved value (may be null)error- of binding- Returns:
- a
ResolverResultwith errors
-
getValue
Returns the resolved value.- Returns:
- the resolved value, or
nullif resolution failed
-
getErrors
Returns the list of binding errors, if any.- Returns:
- a list of errors, or an empty list if there were none
-