Interface PagedModelFactory


  • public interface PagedModelFactory
    A factory to create a PagedModel instance based on the given input that is evaluated during deserialization.
    Since:
    1.0.0
    Author:
    Ingo Griebsch
    See Also:
    PagedModel
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default org.springframework.hateoas.PagedModel<?> create​(@NonNull com.fasterxml.jackson.databind.JavaType type, @NonNull Iterable<org.springframework.hateoas.Link> links, @NonNull Iterable<Object> content, @NonNull org.springframework.hateoas.PagedModel.PageMetadata metadata)
      Creates a PagedModel based on the given input.
    • Method Detail

      • create

        default org.springframework.hateoas.PagedModel<?> create​(@NonNull
                                                                 @NonNull com.fasterxml.jackson.databind.JavaType type,
                                                                 @NonNull
                                                                 @NonNull Iterable<org.springframework.hateoas.Link> links,
                                                                 @NonNull
                                                                 @NonNull Iterable<Object> content,
                                                                 @NonNull
                                                                 @NonNull org.springframework.hateoas.PagedModel.PageMetadata metadata)
        Creates a PagedModel based on the given input.

        The default implementation instantiates the concrete PagedModel based on the assumption that the constructors of the model is accessible.

        Parameters:
        type - the type of the instance that should be created. Must be assignable to PagedModel.Is never null.
        links - the links which should be used to instantiate the model. Is never null.
        content - the objects which should be used to instantiate the model. Is never null.
        metadata - the PagedModel.PageMetadata which should be used to the instantiate model. Is never null.
        Returns:
        the created PagedModel instance.