Interface SirenEntityClassProvider


  • public interface SirenEntityClassProvider
    SPI to provide information about the nature of the content of a Siren entity.
    Since:
    1.0.0
    Author:
    Ingo Griebsch
    See Also:
    Siren Entity Class
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static SirenEntityClassProvider DEFAULT_INSTANCE
      The default instance that can be used if no specific implementation of this interface is necessary.
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default List<String> get​(@NonNull org.springframework.hateoas.RepresentationModel<?> model)
      Returns the class(es) explaining the nature of the content of a Siren entity.
    • Field Detail

      • DEFAULT_INSTANCE

        static final SirenEntityClassProvider DEFAULT_INSTANCE
        The default instance that can be used if no specific implementation of this interface is necessary.
    • Method Detail

      • get

        default List<String> get​(@NonNull
                                 @NonNull org.springframework.hateoas.RepresentationModel<?> model)
        Returns the class(es) explaining the nature of the content of a Siren entity.

        The default implementation returns a simplified form of the class name of the RepresentationModel instance (not containing 'Model').

        Parameters:
        model - the RepresentationModel that is transfered into a Siren entity. Is never null.
        Returns:
        the classes explaining the nature of the content of a Siren entity.