Class ServletParameterBinder
java.lang.Object
fr.paris.lutece.portal.util.mvc.binding.ServletParameterBinder
Handles the binding of method parameters from an
HttpServletRequest.
This class uses available ParameterResolver implementations to resolve and bind method parameters
in the context of an MVC controller. It supports standard types like HttpServletRequest, and
delegates other parameter types to custom resolvers. If no resolver is found, a binding error is recorded.
This class is application-scoped and managed by CDI.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObject[]bindParameters(jakarta.servlet.http.HttpServletRequest request, Method method) Binds the parameters of the given method using values from theHttpServletRequest.
-
Constructor Details
-
ServletParameterBinder
public ServletParameterBinder()
-
-
Method Details
-
bindParameters
Binds the parameters of the given method using values from theHttpServletRequest.Each method parameter is matched against a set of
ParameterResolvers. If a matching resolver is found, it is used to resolve the value; otherwise, a binding error is logged and recorded. The special case ofHttpServletRequestparameters is handled directly.- Parameters:
request- The HTTP servlet request containing the input data.method- The method whose parameters are to be bound.- Returns:
- An array of arguments corresponding to the method's parameters, with resolved values or
nullif unresolved.
-