Class ModelAttributeResolver
java.lang.Object
fr.paris.lutece.portal.util.mvc.binding.ModelAttributeResolver
- All Implemented Interfaces:
ParameterResolver
This class resolves parameters annotated with
ModelAttribute in the context
of a web request. It extracts model attributes from the request and converts them
to the appropriate type, handling binding errors.
The ModelAttributeResolver is used to inject model attributes into methods annotated with MVC annotations, allowing for easy access to model data in web applications.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionResolves and converts the given parameter from the HTTP request.booleanChecks if the resolver can handle the given parameter.
-
Constructor Details
-
ModelAttributeResolver
public ModelAttributeResolver()
-
-
Method Details
-
supports
Checks if the resolver can handle the given parameter.- Specified by:
supportsin interfaceParameterResolver- Parameters:
parameter- the parameter to check- Returns:
- true if the resolver can handle the parameter, false otherwise
-
resolve
public ResolverResult<?> resolve(jakarta.servlet.http.HttpServletRequest request, Parameter parameter) Resolves and converts the given parameter from the HTTP request.- Specified by:
resolvein interfaceParameterResolver- Parameters:
request- the HTTP requestparameter- the parameter to resolve- Returns:
- the result of the resolution and conversion
-