Class CustomerRefHandlerMethodArgumentResolver
- java.lang.Object
-
- com.broadleafcommerce.cartoperation.web.resolver.CustomerRefHandlerMethodArgumentResolver
-
- All Implemented Interfaces:
org.springframework.web.method.support.HandlerMethodArgumentResolver
public class CustomerRefHandlerMethodArgumentResolver extends Object implements org.springframework.web.method.support.HandlerMethodArgumentResolver
Resolves theCustomerRef
parameter for controller methods that require it.- Author:
- Chris Kittrell
-
-
Field Summary
Fields Modifier and Type Field Description protected static Class<ResolveCustomerRef>
clazz
-
Constructor Summary
Constructors Constructor Description CustomerRefHandlerMethodArgumentResolver(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Optional<ResolveCustomerRef>
findAnnotation(org.springframework.core.MethodParameter param)
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils
getAuthenticationUtils()
protected com.broadleafcommerce.common.extension.TypeFactory
getTypeFactory()
protected void
handleRegisteredOnly(ResolveCustomerRef annotation)
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)
-
-
-
Field Detail
-
clazz
protected static final Class<ResolveCustomerRef> clazz
-
-
Method Detail
-
supportsParameter
public boolean supportsParameter(org.springframework.core.MethodParameter parameter)
- Specified by:
supportsParameter
in interfaceorg.springframework.web.method.support.HandlerMethodArgumentResolver
-
resolveArgument
public Object resolveArgument(@Nullable org.springframework.core.MethodParameter parameter, org.springframework.web.method.support.ModelAndViewContainer mavContainer, @Nullable org.springframework.web.context.request.NativeWebRequest webRequest, org.springframework.web.bind.support.WebDataBinderFactory binderFactory)
- Specified by:
resolveArgument
in interfaceorg.springframework.web.method.support.HandlerMethodArgumentResolver
-
findAnnotation
protected Optional<ResolveCustomerRef> findAnnotation(org.springframework.core.MethodParameter param)
-
handleRegisteredOnly
protected void handleRegisteredOnly(ResolveCustomerRef annotation)
-
getAuthenticationUtils
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthenticationUtils()
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-
-