Class RESTRootController


  • @Controller
    public class RESTRootController
    extends java.lang.Object
    A basis for clients to begin discovering other URLs in our API.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Map<java.lang.String,​java.lang.Class<?>> PUBLIC_CONTROLLERS
      A collection of the controllers in our system accessible by all authenticated users.
      static java.util.Map<java.lang.String,​java.lang.Class<?>> RESTRICTED_CONTROLLERS
      A collection of the controllers in our system accessible by users with `ROLE_ADMIN` or `ROLE_SEQUENCER` authorization.
    • Field Detail

      • PUBLIC_CONTROLLERS

        public static final java.util.Map<java.lang.String,​java.lang.Class<?>> PUBLIC_CONTROLLERS
        A collection of the controllers in our system accessible by all authenticated users.
      • RESTRICTED_CONTROLLERS

        public static final java.util.Map<java.lang.String,​java.lang.Class<?>> RESTRICTED_CONTROLLERS
        A collection of the controllers in our system accessible by users with `ROLE_ADMIN` or `ROLE_SEQUENCER` authorization.
    • Constructor Detail

      • RESTRootController

        public RESTRootController()
    • Method Detail

      • initLinks

        @PostConstruct
        public void initLinks()
        Initialize a collection of all controllers in the system.
      • getLinks

        @RequestMapping(method=GET,
                        value="/api")
        public ResponseResource<RootResource> getLinks​(javax.servlet.http.HttpServletRequest request)
        Creates a response with a set of links used to discover the rest of the system.
        Parameters:
        request - Incoming HTTP request object to check the user's role.
        Returns:
        a response to the client.
      • version

        @RequestMapping(method=GET,
                        value="/api/version")
        public RESTRootController.ResponseVersion version()
        Creates a response with the current build version.
        Returns:
        a response to the client