Interface Link

All Known Implementing Classes:
DefaultLink

public interface Link

Interface for a hateoas link.

See this

Since:
1.1
Author:
Graeme Rocher
  • Field Details

  • Method Details

    • getHref

      String getHref()
      Returns:
      The URI to template to
    • isTemplated

      default boolean isTemplated()
      Returns:
      Whether the URI is templated
    • getType

      default Optional<MediaType> getType()
      Returns:
      The type of the URI
    • getDeprecation

      default Optional<String> getDeprecation()
      Returns:
      The deprecation URI
    • getProfile

      default Optional<String> getProfile()
      Returns:
      The profile URI
    • getName

      default Optional<String> getName()
      Returns:
      The name of the link
    • getTitle

      default Optional<String> getTitle()
      Returns:
      The title of the link
    • getHreflang

      default Optional<String> getHreflang()
      Returns:
      The language of the link
    • of

      static Link of(URI uri)
      Create a link from the given URI.
      Parameters:
      uri - The URI
      Returns:
      The link
    • of

      static Link of(String uri)
      Create a link from the given URI.
      Parameters:
      uri - The URI
      Returns:
      The link
    • build

      static Link.Builder build(URI uri)
      Create a link from the given URI.
      Parameters:
      uri - The URI
      Returns:
      The link
    • build

      static Link.Builder build(String uri)
      Create a link from the given URI.
      Parameters:
      uri - The URI
      Returns:
      The link