Class RootResourceInformationHandlerMethodArgumentResolver
java.lang.Object
org.springframework.data.rest.webmvc.config.RootResourceInformationHandlerMethodArgumentResolver
- All Implemented Interfaces:
org.springframework.web.method.support.HandlerMethodArgumentResolver
public class RootResourceInformationHandlerMethodArgumentResolver
extends Object
implements org.springframework.web.method.support.HandlerMethodArgumentResolver
HandlerMethodArgumentResolver
to create RootResourceInformation
for injection into Spring MVC
controller methods.- Author:
- Jon Brisbin, Oliver Gierke
-
Constructor Summary
ConstructorDescriptionRootResourceInformationHandlerMethodArgumentResolver
(org.springframework.data.repository.support.Repositories repositories, org.springframework.data.repository.support.RepositoryInvokerFactory invokerFactory, ResourceMetadataHandlerMethodArgumentResolver resourceMetadataResolver) Creates a newRootResourceInformationHandlerMethodArgumentResolver
using the givenRepositories
,RepositoryInvokerFactory
andResourceMetadataHandlerMethodArgumentResolver
. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.data.repository.support.RepositoryInvoker
postProcess
(org.springframework.core.MethodParameter parameter, org.springframework.data.repository.support.RepositoryInvoker invoker, Class<?> domainType, Map<String, String[]> parameters) Potentially customize the givenRepositoryInvoker
for the given domain type.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)
-
Constructor Details
-
RootResourceInformationHandlerMethodArgumentResolver
public RootResourceInformationHandlerMethodArgumentResolver(org.springframework.data.repository.support.Repositories repositories, org.springframework.data.repository.support.RepositoryInvokerFactory invokerFactory, ResourceMetadataHandlerMethodArgumentResolver resourceMetadataResolver) Creates a newRootResourceInformationHandlerMethodArgumentResolver
using the givenRepositories
,RepositoryInvokerFactory
andResourceMetadataHandlerMethodArgumentResolver
.- Parameters:
repositories
- must not be null.invokerFactory
- must not be null.resourceMetadataResolver
- must not be null.
-
-
Method Details
-
supportsParameter
public boolean supportsParameter(org.springframework.core.MethodParameter parameter) - Specified by:
supportsParameter
in interfaceorg.springframework.web.method.support.HandlerMethodArgumentResolver
-
resolveArgument
public RootResourceInformation 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) throws Exception - Specified by:
resolveArgument
in interfaceorg.springframework.web.method.support.HandlerMethodArgumentResolver
- Throws:
Exception
-
postProcess
protected org.springframework.data.repository.support.RepositoryInvoker postProcess(org.springframework.core.MethodParameter parameter, org.springframework.data.repository.support.RepositoryInvoker invoker, Class<?> domainType, Map<String, String[]> parameters) Potentially customize the givenRepositoryInvoker
for the given domain type. Default implementations simply returns the given invoker as is.- Parameters:
parameter
- must not be null.invoker
- will never be null.domainType
- will never be null.parameters
- will never be null.- Returns:
- the post-processed
RepositoryInvoker
.
-