Class RestObject

  • Direct Known Subclasses:
    ObjectSummary

    public abstract class RestObject
    extends Object
    A standard REST object implementing the HATEOAS standard

    See here: https://spring.io/understanding/HATEOAS

    • Constructor Detail

      • RestObject

        public RestObject()
        Basic constructor to initialize the links list
    • Method Detail

      • addLink

        public void addLink​(String rel,
                            String href)
        Non-REST method to add a new Link to this object for return
        Parameters:
        rel - The link type
        href - The link URL
      • getLinks

        public List<LinkgetLinks()
        The list of links
        Returns:
        The list of links
      • setLinks

        public void setLinks​(List<Link> links)
        Sets the list of links to the given one
        Parameters:
        links - The list of links to add