Interface SirenActionFieldTypeConverter

    • Method Summary

      All Methods Instance Methods Default Methods Deprecated Methods 
      Modifier and Type Method Description
      default SirenActionFieldType convert​(@NonNull org.springframework.hateoas.AffordanceModel.PropertyMetadata fieldMetadata, @NonNull org.springframework.http.MediaType actionType)
      Deprecated.
      default Optional<org.springframework.hateoas.mediatype.html.HtmlInputType> execute​(@NonNull org.springframework.hateoas.AffordanceModel.PropertyMetadata fieldMetadata, @NonNull org.springframework.http.MediaType actionType)
      Converts the given property metadata and the type of the respective Siren action into a HtmlInputType, if possible.
    • Field Detail

      • DEFAULT_INSTANCE

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

      • convert

        @Deprecated
        default SirenActionFieldType convert​(@NonNull
                                             @NonNull org.springframework.hateoas.AffordanceModel.PropertyMetadata fieldMetadata,
                                             @NonNull
                                             @NonNull org.springframework.http.MediaType actionType)
        Deprecated.
        Converts the given property metadata and the type of the respective Siren action into a SirenActionFieldType.

        The default implementation always returns the fallback, as specified through the specification.

        Parameters:
        fieldMetadata - the metadata of the property. Is never null.
        actionType - the type of the action. Is never null.
        Returns:
        the matching SirenActionFieldType.
      • execute

        default Optional<org.springframework.hateoas.mediatype.html.HtmlInputType> execute​(@NonNull
                                                                                           @NonNull org.springframework.hateoas.AffordanceModel.PropertyMetadata fieldMetadata,
                                                                                           @NonNull
                                                                                           @NonNull org.springframework.http.MediaType actionType)
        Converts the given property metadata and the type of the respective Siren action into a HtmlInputType, if possible.

        The default implementation always returns the fallback, as specified through the specification.

        Parameters:
        fieldMetadata - the metadata of the property. Is never null.
        actionType - the type of the action. Is never null.
        Returns:
        the matching HtmlInputType or an empty Optional.