Class ControllerUtils
java.lang.Object
uk.ac.manchester.spinnaker.alloc.web.ControllerUtils
Utilities to support MVC controllers.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe URI path to use to change passwords.static final StringThe change password URI variable for JSP pages.static final StringThe URI path to use to perform OIDC logins.static final StringThe OIDC URI variable for JSP pages.static final StringThe URI path to use to perform logins.static final StringThe logout URI variable for JSP pages.static final StringThe URI path to use to perform logouts.static final StringThe login URI variable for JSP pages.static final StringThe main URI variable for JSP pages.static final StringThe name of the Spring MVC error view.static final StringThe URI path of the Spalloc CSS file.static final StringThe Spalloc CSS URI variable for JSP pages.static final StringThe URI path of the Spalloc JS file.static final StringThe Spalloc JS URI variable for JSP pages. -
Method Summary
Modifier and TypeMethodDescriptionstatic ModelAndViewCreate a view that shows an error to the user.static StringerrorMessage(ObjectError error) Convert a problem with validation into a user-suitable error message.static URIConvert the result of calling a component builder delegate into a URL.
-
Field Details
-
MVC_ERROR
-
MAIN_URI
-
CHANGE_PASSWORD_URI
The change password URI variable for JSP pages.- See Also:
-
LOGOUT_URI
-
LOGIN_URI
-
LOGIN_OIDC_URI
-
SPALLOC_CSS_URI
-
SPALLOC_JS_URI
-
LOGIN_PATH
-
LOGIN_OIDC_PATH
-
CHANGE_PASSWORD_PATH
-
LOGOUT_PATH
-
SPALLOC_CSS_PATH
-
SPALLOC_JS_PATH
-
-
Method Details
-
uri
Convert the result of calling a component builder delegate into a URL. Fixes the scheme tohttpsand always ignores the query part.Do not define a
staticvariable holding the result ofMvcUriComponentsBuilder.on(Class); it tries to be request-aware, and that defeats it. Rely on the Spring MVC core to do the relevant object caching.- Parameters:
selfCall- component builder delegate resultobjects- Values to substitute into the template; can be none at all- Returns:
- URL that will invoke the method
- See Also:
-
error
Create a view that shows an error to the user.- Parameters:
message- The error message.- Returns:
- The view.
-
errorMessage
Convert a problem with validation into a user-suitable error message.- Parameters:
error- The error detail.- Returns:
- The message.
-