Interface Link

  • All Known Implementing Classes:
    DefaultLink

    public interface Link

    Interface for a hateoas link.

    See this

    Since:
    1.1
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  Link.Builder
      Build for creating Link instances.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.CharSequence ABOUT
      About link.
      static java.lang.CharSequence HELP
      Help link.
      static java.lang.CharSequence HREF
      Href link.
      static java.lang.CharSequence SELF
      Self link.
    • Field Detail

      • HELP

        static final java.lang.CharSequence HELP
        Help link.
      • SELF

        static final java.lang.CharSequence SELF
        Self link.
      • ABOUT

        static final java.lang.CharSequence ABOUT
        About link.
      • HREF

        static final java.lang.CharSequence HREF
        Href link.
    • Method Detail

      • getHref

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

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

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

        default java.util.Optional<java.lang.String> getDeprecation()
        Returns:
        The deprecation URI
      • getProfile

        default java.util.Optional<java.lang.String> getProfile()
        Returns:
        The profile URI
      • getName

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

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

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

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

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

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

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