Class RepresentationModelProcessorInvoker
java.lang.Object
org.springframework.hateoas.server.mvc.RepresentationModelProcessorInvoker
Component to easily invoke all
RepresentationModelProcessor
instances registered for values of type
RepresentationModel
.- Since:
- 0.20
- Author:
- Oliver Gierke, Greg Turnquist
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
RepresentationModelProcessorInvoker.ProcessorWrapper
forRepresentationModelProcessor
s targetingCollectionModel
. -
Constructor Summary
ConstructorDescriptionCreates a newRepresentationModelProcessorInvoker
to consider the givenRepresentationModelProcessor
to post-process the controller methods return value to before invoking the delegate. -
Method Summary
Modifier and TypeMethodDescription<T extends RepresentationModel<T>>
TinvokeProcessorsFor
(T value) Invokes allRepresentationModelProcessor
instances registered for the type of the given value.<T extends RepresentationModel<T>>
TinvokeProcessorsFor
(T value, ResolvableType referenceType) Invokes allRepresentationModelProcessor
instances registered for the type of the given value and reference type.
-
Constructor Details
-
RepresentationModelProcessorInvoker
Creates a newRepresentationModelProcessorInvoker
to consider the givenRepresentationModelProcessor
to post-process the controller methods return value to before invoking the delegate.- Parameters:
processors
- theRepresentationModelProcessor
s to be considered, must not be null.
-
-
Method Details
-
invokeProcessorsFor
Invokes allRepresentationModelProcessor
instances registered for the type of the given value.- Parameters:
value
- must not be null.- Returns:
-
invokeProcessorsFor
public <T extends RepresentationModel<T>> T invokeProcessorsFor(T value, ResolvableType referenceType) Invokes allRepresentationModelProcessor
instances registered for the type of the given value and reference type.- Parameters:
value
- must not be null.referenceType
- must not be null.- Returns:
-