Interface SortArgumentResolver

All Superinterfaces:
org.springframework.web.method.support.HandlerMethodArgumentResolver
All Known Implementing Classes:
HateoasSortHandlerMethodArgumentResolver, SortHandlerMethodArgumentResolver

public interface SortArgumentResolver extends org.springframework.web.method.support.HandlerMethodArgumentResolver
Argument resolver to extract a Sort object from a NativeWebRequest for a particular MethodParameter. A SortArgumentResolver can either resolve Sort itself or wrap another SortArgumentResolver to post-process Sort.
Since:
1.13
Author:
Mark Paluch
See Also:
  • HandlerMethodArgumentResolver
  • Method Summary

    Modifier and Type
    Method
    Description
    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)
    Resolves a Sort method parameter into an argument value from a given request.

    Methods inherited from interface org.springframework.web.method.support.HandlerMethodArgumentResolver

    supportsParameter
  • Method Details

    • resolveArgument

      @NonNull Sort resolveArgument(org.springframework.core.MethodParameter parameter, @Nullable org.springframework.web.method.support.ModelAndViewContainer mavContainer, org.springframework.web.context.request.NativeWebRequest webRequest, @Nullable org.springframework.web.bind.support.WebDataBinderFactory binderFactory)
      Resolves a Sort method parameter into an argument value from a given request.
      Specified by:
      resolveArgument in interface org.springframework.web.method.support.HandlerMethodArgumentResolver
      Parameters:
      parameter - the method parameter to resolve. This parameter must have previously been passed to HandlerMethodArgumentResolver.supportsParameter(org.springframework.core.MethodParameter) which must have returned true.
      mavContainer - the ModelAndViewContainer for the current request
      webRequest - the current request
      binderFactory - a factory for creating WebDataBinder instances
      Returns:
      the resolved argument value