Class IridaRepresentationModel

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.Iterable<org.springframework.hateoas.Link> links)
      Adds all given Links to the resource.
      void add​(org.springframework.hateoas.Link link)
      Adds the given link to the resource.
      boolean equals​(java.lang.Object obj)
      java.util.Optional<org.springframework.hateoas.Link> getLink​(java.lang.String rel)
      Returns the link with the given rel.
      java.util.List<org.springframework.hateoas.Link> getLinks()
      Returns all Links contained in this resource.
      RemoteStatus getRemoteStatus()
      Get the RemoteStatus for this object if it was read from a remote source
      java.lang.String getSelfHref()
      Convenience method for getting the self rel href for an object read from a remote site
      int hashCode()
      boolean hasLink​(java.lang.String rel)
      Returns whether the resource contains a Link with the given rel.
      boolean hasLinks()
      Returns whether the resource contains Links at all.
      void removeLinks()
      Removes all Links added to the resource so far.
      void setRemoteStatus​(RemoteStatus status)
      Set the RemoteStatus for this object if it was read from a remote source
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • IridaRepresentationModel

        public IridaRepresentationModel()
    • Method Detail

      • add

        public void add​(org.springframework.hateoas.Link link)
        Adds the given link to the resource.
        Parameters:
        link - The link to add to the resource
      • add

        public void add​(java.lang.Iterable<org.springframework.hateoas.Link> links)
        Adds all given Links to the resource.
        Parameters:
        links - The list of links to add to the resource
      • hasLinks

        public boolean hasLinks()
        Returns whether the resource contains Links at all.
        Returns:
        true/false whether the resource contains the link
      • hasLink

        public boolean hasLink​(java.lang.String rel)
        Returns whether the resource contains a Link with the given rel.
        Parameters:
        rel - The rel name to test
        Returns:
        true/false if it has a link with the given rel
      • getLinks

        public java.util.List<org.springframework.hateoas.Link> getLinks()
        Returns all Links contained in this resource.
        Returns:
        The list of links for this resource
      • removeLinks

        public void removeLinks()
        Removes all Links added to the resource so far.
      • getLink

        public java.util.Optional<org.springframework.hateoas.Link> getLink​(java.lang.String rel)
        Returns the link with the given rel.
        Parameters:
        rel - the String rel to get a link for
        Returns:
        the link with the given rel or null if none found.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getSelfHref

        public java.lang.String getSelfHref()
        Convenience method for getting the self rel href for an object read from a remote site
        Returns:
        String href if available, null otherwise
      • setRemoteStatus

        public void setRemoteStatus​(RemoteStatus status)
        Set the RemoteStatus for this object if it was read from a remote source
        Parameters:
        status - the RemoteStatus object