Class CookieResolver
java.lang.Object
fr.paris.lutece.portal.util.mvc.binding.AbstractParameterResolver
fr.paris.lutece.portal.util.mvc.binding.CookieResolver
- All Implemented Interfaces:
ParameterResolver
This class resolves parameters annotated with
CookieValue in the context
of a web request. It extracts cookie values from the request and converts them
to the appropriate type, handling default values and required cookies.
The CookieResolver is used to inject cookie values into methods annotated with MVC annotations, allowing for easy access to cookie 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
-
CookieResolver
public CookieResolver()
-
-
Method Details
-
supports
Checks if the resolver can handle the given parameter.- 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.- Parameters:
request- the HTTP requestparameter- the parameter to resolve- Returns:
- the result of the resolution and conversion
-