Interface RepresentationModelFactory


  • public interface RepresentationModelFactory
    A factory to create a RepresentationModel 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 a RepresentationModel 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 a RepresentationModel based on the given input.

        The default implementation instantiates the concrete RepresentationModel based on the assumption that the RepresentationModel() constructors is accessible, add the given links to the model and applies the properties (if given).

        Parameters:
        type - the type of the instance that should be created. Must be assignable to RepresentationModel. Is never null.
        links - the links which should be use to instantiate the model. Is never null.
        properties - the properties which should be applied on the instantiated model. Can be null.
        Returns:
        the created RepresentationModel instance.