Class GlobalController
java.lang.Object
tech.ailef.dbadmin.external.controller.GlobalController
This class registers some global ModelAttributes and exception handlers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe baseUrl as specified in the properties file by the usergetQueryParams(jakarta.servlet.http.HttpServletRequest request) A multi valued map containing the query parameters.getRequestUrl(jakarta.servlet.http.HttpServletRequest request) The full request URL, not including the query stringThe UserConfiguration object used to retrieve values specified in the settings table.handleNotFound(Exception e, org.springframework.ui.Model model, jakarta.servlet.http.HttpServletResponse response)
-
Constructor Details
-
GlobalController
public GlobalController()
-
-
Method Details
-
handleNotFound
@ExceptionHandler(DbAdminNotFoundException.class) public String handleNotFound(Exception e, org.springframework.ui.Model model, jakarta.servlet.http.HttpServletResponse response) -
getVersion
-
getQueryParams
@ModelAttribute("dbadmin_queryParams") public Map<String,String[]> getQueryParams(jakarta.servlet.http.HttpServletRequest request) A multi valued map containing the query parameters. It is used primarily in building complex URL when performing faceted search with multiple filters.- Parameters:
request- the incoming request- Returns:
- multi valued map of request parameters
-
getBaseUrl
The baseUrl as specified in the properties file by the user- Returns:
-
getRequestUrl
@ModelAttribute("dbadmin_requestUrl") public String getRequestUrl(jakarta.servlet.http.HttpServletRequest request) The full request URL, not including the query string- Parameters:
request-- Returns:
-
getUserConf
The UserConfiguration object used to retrieve values specified in the settings table.- Returns:
-