Class IndexHALController

java.lang.Object
eu.acclimatize.unison.IndexHALController

@RestController public class IndexHALController extends Object
A controller class for the root or index mappings.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of IndexHALController.
  • Method Summary

    Modifier and Type
    Method
    Description
    createModel(javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)
    Creates a HAL representation for the root.
    indexHAL(javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)
    Creates a HAL representation for the index.
    org.springframework.web.servlet.ModelAndView
    indexHTML(javax.servlet.http.HttpServletResponse response)
    Maps the /index end-point to the root index HTML file.
    org.springframework.web.servlet.ModelAndView
    rootHTML(javax.servlet.http.HttpServletResponse response)
    Maps root to the index HTML file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IndexHALController

      public IndexHALController(BaseURIBuilder builder)
      Creates an instance of IndexHALController.
      Parameters:
      builder - Used in creating links.
  • Method Details

    • createModel

      @GetMapping(value="/", produces="application/hal+json") public UnisonModel createModel(javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)
      Creates a HAL representation for the root.
      Parameters:
      response - The HTTP servlet response used to add the HTTP vary header.
      request - The HTTP servlet request used in creating base URIs.
      Returns:
      A representational model for Unison.
    • indexHAL

      @GetMapping(value="/index", produces="application/hal+json") public UnisonModel indexHAL(javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)
      Creates a HAL representation for the index.
      Parameters:
      response - The HTTP servlet response used to add the HTTP vary header.
      request - The HTTP servlet request used in creating base URIs.
      Returns:
      A representational model for Unison.
    • rootHTML

      @GetMapping("/") public org.springframework.web.servlet.ModelAndView rootHTML(javax.servlet.http.HttpServletResponse response)
      Maps root to the index HTML file.
      Parameters:
      response - The HTTP servlet response used to add the HTTP vary header.
      Returns:
      A model and view of the index file.
    • indexHTML

      @GetMapping("/index") public org.springframework.web.servlet.ModelAndView indexHTML(javax.servlet.http.HttpServletResponse response)
      Maps the /index end-point to the root index HTML file.
      Parameters:
      response - The HTTP servlet response used to add the HTTP vary header.
      Returns:
      A model and view of the index file.