Package org.springframework.data.web
Class HateoasPageableHandlerMethodArgumentResolver
java.lang.Object
org.springframework.data.web.PageableHandlerMethodArgumentResolverSupport
org.springframework.data.web.PageableHandlerMethodArgumentResolver
org.springframework.data.web.HateoasPageableHandlerMethodArgumentResolver
- All Implemented Interfaces:
PageableArgumentResolver
,UriComponentsContributor
,HandlerMethodArgumentResolver
public class HateoasPageableHandlerMethodArgumentResolver
extends PageableHandlerMethodArgumentResolver
implements UriComponentsContributor
Extension of
PageableHandlerMethodArgumentResolver
that also supports enhancing URIs using Spring HATEOAS
support.- Since:
- 1.6
- Author:
- Oliver Gierke, Nick Williams
-
Constructor Summary
ConstructorDescriptionConstructs an instance of this resolver with a defaultHateoasSortHandlerMethodArgumentResolver
.Creates a newHateoasPageableHandlerMethodArgumentResolver
using the givenHateoasSortHandlerMethodArgumentResolver
.. -
Method Summary
Modifier and TypeMethodDescriptionvoid
enhance
(UriComponentsBuilder builder, MethodParameter parameter, Object value) getPaginationTemplateVariables
(MethodParameter parameter, UriComponents template) Returns the template variable for the pagination parameters.Methods inherited from class org.springframework.data.web.PageableHandlerMethodArgumentResolver
resolveArgument, supportsParameter
Methods inherited from class org.springframework.data.web.PageableHandlerMethodArgumentResolverSupport
getMaxPageSize, getPageable, getPageParameterName, getParameterNameToUse, getSizeParameterName, isFallbackPageable, isOneIndexedParameters, setFallbackPageable, setMaxPageSize, setOneIndexedParameters, setPageParameterName, setPrefix, setQualifierDelimiter, setSizeParameterName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.hateoas.server.mvc.UriComponentsContributor
supportsParameter
-
Constructor Details
-
HateoasPageableHandlerMethodArgumentResolver
public HateoasPageableHandlerMethodArgumentResolver()Constructs an instance of this resolver with a defaultHateoasSortHandlerMethodArgumentResolver
. -
HateoasPageableHandlerMethodArgumentResolver
public HateoasPageableHandlerMethodArgumentResolver(@Nullable HateoasSortHandlerMethodArgumentResolver sortResolver) Creates a newHateoasPageableHandlerMethodArgumentResolver
using the givenHateoasSortHandlerMethodArgumentResolver
..- Parameters:
sortResolver
-
-
-
Method Details
-
getPaginationTemplateVariables
public TemplateVariables getPaginationTemplateVariables(MethodParameter parameter, UriComponents template) Returns the template variable for the pagination parameters.- Parameters:
parameter
- can be null.- Returns:
- Since:
- 1.7
-
enhance
public void enhance(UriComponentsBuilder builder, @Nullable MethodParameter parameter, Object value) - Specified by:
enhance
in interfaceUriComponentsContributor
-