Class ControllerUtils
java.lang.Object
uk.ac.manchester.spinnaker.alloc.web.ControllerUtils
Utilities to support MVC controllers.
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier 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 SummaryModifier 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_ERRORThe name of the Spring MVC error view.- See Also:
 
- 
MAIN_URIThe main URI variable for JSP pages.- See Also:
 
- 
CHANGE_PASSWORD_URIThe change password URI variable for JSP pages.- See Also:
 
- 
LOGOUT_URIThe login URI variable for JSP pages.- See Also:
 
- 
LOGIN_URIThe logout URI variable for JSP pages.- See Also:
 
- 
LOGIN_OIDC_URIThe OIDC URI variable for JSP pages.- See Also:
 
- 
SPALLOC_CSS_URIThe Spalloc CSS URI variable for JSP pages.- See Also:
 
- 
SPALLOC_JS_URIThe Spalloc JS URI variable for JSP pages.- See Also:
 
- 
LOGIN_PATHThe URI path to use to perform logins.- See Also:
 
- 
LOGIN_OIDC_PATHThe URI path to use to perform OIDC logins.- See Also:
 
- 
CHANGE_PASSWORD_PATHThe URI path to use to change passwords.- See Also:
 
- 
LOGOUT_PATHThe URI path to use to perform logouts.- See Also:
 
- 
SPALLOC_CSS_PATHThe URI path of the Spalloc CSS file.- See Also:
 
- 
SPALLOC_JS_PATHThe URI path of the Spalloc JS file.- See Also:
 
 
- 
- 
Method Details- 
uriConvert 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 result
- objects- Values to substitute into the template; can be none at all
- Returns:
- URL that will invoke the method
- See Also:
 
- 
errorCreate a view that shows an error to the user.- Parameters:
- message- The error message.
- Returns:
- The view.
 
- 
errorMessageConvert a problem with validation into a user-suitable error message.- Parameters:
- error- The error detail.
- Returns:
- The message.
 
 
-