Interface RepresentationModelFactory
-
public interface RepresentationModelFactory
A factory to create aRepresentationModel
instance based on the given input that is evaluated during deserialization.- Since:
- 1.0.0
- Author:
- Ingo Griebsch
- See Also:
RepresentationModel
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default org.springframework.hateoas.RepresentationModel<?>
create(@NonNull com.fasterxml.jackson.databind.JavaType type, @NonNull Iterable<org.springframework.hateoas.Link> links, Map<String,Object> properties)
Creates aRepresentationModel
based on the given input.
-
-
-
Method Detail
-
create
default org.springframework.hateoas.RepresentationModel<?> create(@NonNull @NonNull com.fasterxml.jackson.databind.JavaType type, @NonNull @NonNull Iterable<org.springframework.hateoas.Link> links, @Nullable Map<String,Object> properties)
Creates aRepresentationModel
based on the given input.The default implementation instantiates the concrete
RepresentationModel
based on the assumption that theRepresentationModel()
constructors is accessible, add the given links to themodel
and applies the properties (if given).- Parameters:
type
- the type of the instance that should be created. Must be assignable toRepresentationModel
. Is never null.links
- the links which should be use to instantiate themodel
. Is never null.properties
- the properties which should be applied on the instantiatedmodel
. Can be null.- Returns:
- the created
RepresentationModel
instance.
-
-