Spring Data Core

org.springframework.data.web
Class PagedResourcesAssemblerArgumentResolver

java.lang.Object
  extended by org.springframework.data.web.PagedResourcesAssemblerArgumentResolver
All Implemented Interfaces:
HandlerMethodArgumentResolver

public class PagedResourcesAssemblerArgumentResolver
extends Object
implements HandlerMethodArgumentResolver

HandlerMethodArgumentResolver to allow injection of PagedResourcesAssembler into Spring MVC controller methods.

Since:
1.6
Author:
Oliver Gierke, Nick Williams

Constructor Summary
PagedResourcesAssemblerArgumentResolver(HateoasPageableHandlerMethodArgumentResolver resolver, org.springframework.hateoas.MethodLinkBuilderFactory<?> linkBuilderFactory)
          Creates a new PagedResourcesAssemblerArgumentResolver using the given PageableHandlerMethodArgumentResolver and MethodLinkBuilderFactory.
 
Method Summary
 Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory)
           
 boolean supportsParameter(MethodParameter parameter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PagedResourcesAssemblerArgumentResolver

public PagedResourcesAssemblerArgumentResolver(HateoasPageableHandlerMethodArgumentResolver resolver,
                                               org.springframework.hateoas.MethodLinkBuilderFactory<?> linkBuilderFactory)
Creates a new PagedResourcesAssemblerArgumentResolver using the given PageableHandlerMethodArgumentResolver and MethodLinkBuilderFactory.

Parameters:
resolver - can be null.
linkBuilderFactory - can be null, will be defaulted to a ControllerLinkBuilderFactory.
Method Detail

supportsParameter

public boolean supportsParameter(MethodParameter parameter)
Specified by:
supportsParameter in interface HandlerMethodArgumentResolver

resolveArgument

public Object resolveArgument(MethodParameter parameter,
                              ModelAndViewContainer mavContainer,
                              NativeWebRequest webRequest,
                              WebDataBinderFactory binderFactory)
                       throws Exception
Specified by:
resolveArgument in interface HandlerMethodArgumentResolver
Throws:
Exception

Spring Data Core

Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.