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
,org.springframework.hateoas.server.mvc.UriComponentsContributor
,org.springframework.web.method.support.HandlerMethodArgumentResolver
public class HateoasPageableHandlerMethodArgumentResolver
extends PageableHandlerMethodArgumentResolver
implements org.springframework.hateoas.server.mvc.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
(org.springframework.web.util.UriComponentsBuilder builder, org.springframework.core.MethodParameter parameter, Object value) org.springframework.hateoas.TemplateVariables
getPaginationTemplateVariables
(org.springframework.core.MethodParameter parameter, org.springframework.web.util.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 org.springframework.hateoas.TemplateVariables getPaginationTemplateVariables(org.springframework.core.MethodParameter parameter, org.springframework.web.util.UriComponents template) Returns the template variable for the pagination parameters.- Parameters:
parameter
- can be null.- Returns:
- Since:
- 1.7
-
enhance
public void enhance(org.springframework.web.util.UriComponentsBuilder builder, @Nullable org.springframework.core.MethodParameter parameter, Object value) - Specified by:
enhance
in interfaceorg.springframework.hateoas.server.mvc.UriComponentsContributor
-