Package eu.acclimatize.unison
Class IndexHALController
java.lang.Object
eu.acclimatize.unison.IndexHALController
A controller class for the root or index mappings.
-
Constructor Summary
ConstructorsConstructorDescriptionIndexHALController(BaseURIBuilder builder) Creates an instance of IndexHALController. -
Method Summary
Modifier and TypeMethodDescriptioncreateModel(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.ModelAndViewindexHTML(javax.servlet.http.HttpServletResponse response) Maps the /index end-point to the root index HTML file.org.springframework.web.servlet.ModelAndViewrootHTML(javax.servlet.http.HttpServletResponse response) Maps root to the index HTML file.
-
Constructor Details
-
IndexHALController
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.
-