public class CartHandlerMethodArgumentResolver extends Object implements org.springframework.web.method.support.HandlerMethodArgumentResolver
EntityMissingException
for methods where the Cart parameter is not marked as nullable and
the cart could not be determined.Constructor and Description |
---|
CartHandlerMethodArgumentResolver(CartHolder<com.broadleafcommerce.cart.client.domain.Cart> requestCartHolder) |
Modifier and Type | Method and Description |
---|---|
protected <A extends Annotation> |
hasAnnotation(org.springframework.core.MethodParameter param,
Class<A> annotationClass)
Tells whether the method parameter has the given annotation on it
|
protected boolean |
isRequired(org.springframework.core.MethodParameter param)
Tells if the given parameter is required.
|
Object |
resolveArgument(org.springframework.core.MethodParameter parameter,
org.springframework.web.method.support.ModelAndViewContainer mavContainer,
org.springframework.web.context.request.NativeWebRequest webRequest,
org.springframework.web.bind.support.WebDataBinderFactory binderFactory) |
boolean |
supportsParameter(org.springframework.core.MethodParameter parameter) |
public CartHandlerMethodArgumentResolver(CartHolder<com.broadleafcommerce.cart.client.domain.Cart> requestCartHolder)
public boolean supportsParameter(org.springframework.core.MethodParameter parameter)
supportsParameter
in interface org.springframework.web.method.support.HandlerMethodArgumentResolver
public Object resolveArgument(@NonNull org.springframework.core.MethodParameter parameter, org.springframework.web.method.support.ModelAndViewContainer mavContainer, @NonNull org.springframework.web.context.request.NativeWebRequest webRequest, org.springframework.web.bind.support.WebDataBinderFactory binderFactory)
resolveArgument
in interface org.springframework.web.method.support.HandlerMethodArgumentResolver
protected boolean isRequired(org.springframework.core.MethodParameter param)
Nullable
annotations on the parameter.param
- the method parameter to testprotected <A extends Annotation> boolean hasAnnotation(org.springframework.core.MethodParameter param, Class<A> annotationClass)
A
- some annotation classparam
- the method parameter to testannotationClass
- the annotation class to test the presence ofCopyright © 2021. All rights reserved.