public class ResourceProcessorHandlerMethodReturnValueHandler extends Object implements HandlerMethodReturnValueHandler
HandlerMethodReturnValueHandler to post-process the objects returned from controller methods using the
configured ResourceProcessors.| Constructor and Description |
|---|
ResourceProcessorHandlerMethodReturnValueHandler(HandlerMethodReturnValueHandler delegate,
List<org.springframework.hateoas.ResourceProcessor<?>> processors)
Creates a new
ResourceProcessorHandlerMethodReturnValueHandler using the given delegate to eventually
delegate calls to handleReturnValue(Object, MethodParameter, ModelAndViewContainer, NativeWebRequest) to. |
| Modifier and Type | Method and Description |
|---|---|
void |
handleReturnValue(Object returnValue,
MethodParameter returnType,
ModelAndViewContainer mavContainer,
NativeWebRequest webRequest) |
void |
setRootLinksAsHeaders(boolean rootLinksAsHeaders) |
boolean |
supportsReturnType(MethodParameter returnType) |
public ResourceProcessorHandlerMethodReturnValueHandler(HandlerMethodReturnValueHandler delegate, List<org.springframework.hateoas.ResourceProcessor<?>> processors)
ResourceProcessorHandlerMethodReturnValueHandler using the given delegate to eventually
delegate calls to handleReturnValue(Object, MethodParameter, ModelAndViewContainer, NativeWebRequest) to.
Will consider the given ResourceProcessor to post-process the controller methods return value to before
invoking the delegate.delegate - the HandlerMethodReturnValueHandler to evenually delegate calls to, must not be
null.processors - the ResourceProcessors to be considered, must not be null.public void setRootLinksAsHeaders(boolean rootLinksAsHeaders)
rootLinksAsHeaders - the rootLinksAsHeaders to setpublic boolean supportsReturnType(MethodParameter returnType)
supportsReturnType in interface HandlerMethodReturnValueHandlerpublic void handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception
handleReturnValue in interface HandlerMethodReturnValueHandlerExceptionCopyright © 2011-2014-2014 Pivotal Software, Inc.. All Rights Reserved.