Class RepresentationModelProcessorHandlerMethodReturnValueHandler
java.lang.Object
org.springframework.hateoas.server.mvc.RepresentationModelProcessorHandlerMethodReturnValueHandler
- All Implemented Interfaces:
HandlerMethodReturnValueHandler
public class RepresentationModelProcessorHandlerMethodReturnValueHandler
extends Object
implements HandlerMethodReturnValueHandler
HandlerMethodReturnValueHandler
to post-process the objects returned from controller methods using the
configured RepresentationModelProcessor
s.- Since:
- 0.20
- Author:
- Oliver Gierke
-
Constructor Summary
ConstructorDescriptionRepresentationModelProcessorHandlerMethodReturnValueHandler
(HandlerMethodReturnValueHandler delegate, Supplier<RepresentationModelProcessorInvoker> invoker) -
Method Summary
Modifier and TypeMethodDescriptionvoid
handleReturnValue
(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) void
setRootLinksAsHeaders
(boolean rootLinksAsHeaders) boolean
supportsReturnType
(MethodParameter returnType)
-
Constructor Details
-
RepresentationModelProcessorHandlerMethodReturnValueHandler
public RepresentationModelProcessorHandlerMethodReturnValueHandler(HandlerMethodReturnValueHandler delegate, Supplier<RepresentationModelProcessorInvoker> invoker)
-
-
Method Details
-
setRootLinksAsHeaders
public void setRootLinksAsHeaders(boolean rootLinksAsHeaders) - Parameters:
rootLinksAsHeaders
- the rootLinksAsHeaders to set
-
supportsReturnType
- Specified by:
supportsReturnType
in interfaceHandlerMethodReturnValueHandler
-
handleReturnValue
public void handleReturnValue(@Nullable Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception - Specified by:
handleReturnValue
in interfaceHandlerMethodReturnValueHandler
- Throws:
Exception
-