Class Link

  • All Implemented Interfaces:
    HalObject

    @ProviderType
    public final class Link
    extends Object
    implements HalObject
    Bean representation of a HAL link.
    • Constructor Detail

      • Link

        public Link​(com.fasterxml.jackson.databind.JsonNode model)
        Parameters:
        model - JSON model
      • Link

        public Link​(com.fasterxml.jackson.databind.node.ObjectNode model)
        Parameters:
        model - JSON model
      • Link

        public Link​(String href)
        Creates a link with a new model that only contains the given URI
        Parameters:
        href - the URI to put in the "href" property
    • Method Detail

      • getModel

        public com.fasterxml.jackson.databind.node.ObjectNode getModel()
        Description copied from interface: HalObject
        Returns the JSON model.
        Specified by:
        getModel in interface HalObject
        Returns:
        Model
      • getType

        public String getType()
        Returns:
        the type
      • setType

        public Link setType​(String type)
        Parameters:
        type - the type to set
        Returns:
        Link
      • getDeprecation

        public String getDeprecation()
        Returns:
        the deprecation
      • setDeprecation

        public Link setDeprecation​(String deprecation)
        Parameters:
        deprecation - the deprecation to set
        Returns:
        Link
      • getName

        public String getName()
        Returns:
        the name
      • setName

        public Link setName​(String name)
        Parameters:
        name - the name to set
        Returns:
        Link
      • getProfile

        public String getProfile()
        Returns:
        the profile
      • setProfile

        public Link setProfile​(String profile)
        Parameters:
        profile - the profile to set
        Returns:
        Link
      • getTitle

        public String getTitle()
        Returns:
        the title
      • setTitle

        public Link setTitle​(String title)
        Parameters:
        title - the title to set
        Returns:
        Link
      • getHreflang

        public String getHreflang()
        Returns:
        the hreflang
      • setHreflang

        public Link setHreflang​(String hreflang)
        Parameters:
        hreflang - the hreflang to set
        Returns:
        Link
      • getHref

        public String getHref()
        Returns:
        the href
      • setHref

        public Link setHref​(String href)
        Parameters:
        href - the href to set
        Returns:
        Link
      • isTemplated

        public boolean isTemplated()
        Returns:
        is templated
      • setTemplated

        public Link setTemplated​(boolean templated)
        Parameters:
        templated - the templated to set
        Returns:
        Link
      • remove

        public void remove()
        Removes this link from its context resource's JSON representation
        Throws:
        IllegalStateException - if this link was never added to a resource, or has already been removed
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object