Class BackendIdHandlerMethodArgumentResolver
java.lang.Object
org.springframework.data.rest.webmvc.support.BackendIdHandlerMethodArgumentResolver
- All Implemented Interfaces:
HandlerMethodArgumentResolver
public class BackendIdHandlerMethodArgumentResolver
extends Object
implements HandlerMethodArgumentResolver
HandlerMethodArgumentResolver
to resolve entity ids for injection int handler method arguments annotated with
BackendId
.- Author:
- Oliver Gierke
-
Constructor Summary
ConstructorDescriptionBackendIdHandlerMethodArgumentResolver
(org.springframework.plugin.core.PluginRegistry<BackendIdConverter, Class<?>> idConverters, ResourceMetadataHandlerMethodArgumentResolver resourceMetadataResolver, BaseUri baseUri) Creates a newBackendIdHandlerMethodArgumentResolver
for the givenBackendIdConverter
s andResourceMetadataHandlerMethodArgumentResolver
. -
Method Summary
Modifier and TypeMethodDescriptionresolveArgument
(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest request, WebDataBinderFactory binderFactory) boolean
supportsParameter
(MethodParameter parameter)
-
Constructor Details
-
BackendIdHandlerMethodArgumentResolver
public BackendIdHandlerMethodArgumentResolver(org.springframework.plugin.core.PluginRegistry<BackendIdConverter, Class<?>> idConverters, ResourceMetadataHandlerMethodArgumentResolver resourceMetadataResolver, BaseUri baseUri) Creates a newBackendIdHandlerMethodArgumentResolver
for the givenBackendIdConverter
s andResourceMetadataHandlerMethodArgumentResolver
.- Parameters:
idConverters
- theBackendIdConverter
s registered in the system, must not be null..resourceMetadataResolver
- the resolver to obtainResourceMetadata
from, must not be null.baseUri
- must not be null.
-
-
Method Details
-
supportsParameter
- Specified by:
supportsParameter
in interfaceHandlerMethodArgumentResolver
-
resolveArgument
public Serializable resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest request, WebDataBinderFactory binderFactory) throws Exception - Specified by:
resolveArgument
in interfaceHandlerMethodArgumentResolver
- Throws:
Exception
-