Class RestObject

  • Direct Known Subclasses:
    ObjectSummary

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

    This is one of the output types allowed by default in BaseCommonPluginResource, as extending this class indicates that you have considered its implications as an API response.

    • 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