Package org.springframework.data.web
Class HateoasSortHandlerMethodArgumentResolver
java.lang.Object
org.springframework.data.web.SortHandlerMethodArgumentResolverSupport
org.springframework.data.web.SortHandlerMethodArgumentResolver
org.springframework.data.web.HateoasSortHandlerMethodArgumentResolver
- All Implemented Interfaces:
SortArgumentResolver
,org.springframework.hateoas.server.mvc.UriComponentsContributor
,org.springframework.web.method.support.HandlerMethodArgumentResolver
public class HateoasSortHandlerMethodArgumentResolver
extends SortHandlerMethodArgumentResolver
implements org.springframework.hateoas.server.mvc.UriComponentsContributor
Extension of
SortHandlerMethodArgumentResolver
that also supports enhancing URIs using Spring HATEOAS
support.- Since:
- 1.6
- Author:
- Oliver Gierke, Thomas Darimont, Nick Williams
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
enhance
(org.springframework.web.util.UriComponentsBuilder builder, org.springframework.core.MethodParameter parameter, Object value) org.springframework.hateoas.TemplateVariables
getSortTemplateVariables
(org.springframework.core.MethodParameter parameter, org.springframework.web.util.UriComponents template) Returns the template variables for the sort parameter.Methods inherited from class org.springframework.data.web.SortHandlerMethodArgumentResolver
resolveArgument, supportsParameter
Methods inherited from class org.springframework.data.web.SortHandlerMethodArgumentResolverSupport
foldIntoExpressions, getDefaultFromAnnotationOrFallback, getPropertyDelimiter, getSortParameter, legacyFoldExpressions, setFallbackSort, setPropertyDelimiter, setQualifierDelimiter, setSortParameter
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
-
HateoasSortHandlerMethodArgumentResolver
public HateoasSortHandlerMethodArgumentResolver()
-
-
Method Details
-
getSortTemplateVariables
public org.springframework.hateoas.TemplateVariables getSortTemplateVariables(org.springframework.core.MethodParameter parameter, org.springframework.web.util.UriComponents template) Returns the template variables for the sort parameter.- Parameters:
parameter
- must not be null.- Returns:
- Since:
- 1.7
-
enhance
public void enhance(org.springframework.web.util.UriComponentsBuilder builder, @Nullable org.springframework.core.MethodParameter parameter, @Nullable Object value) - Specified by:
enhance
in interfaceorg.springframework.hateoas.server.mvc.UriComponentsContributor
-