public class ViewControllerRegistration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private ParameterizableViewController |
controller |
private java.lang.String |
urlPath |
Constructor and Description |
---|
ViewControllerRegistration(java.lang.String urlPath) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getUrlPath() |
protected ParameterizableViewController |
getViewController() |
ViewControllerRegistration |
setStatusCode(HttpStatus statusCode)
Set the status code to set on the response.
|
ViewControllerRegistration |
setViewName(java.lang.String viewName)
Set the view name to return.
|
private final java.lang.String urlPath
private final ParameterizableViewController controller
public ViewControllerRegistration(java.lang.String urlPath)
public ViewControllerRegistration setStatusCode(HttpStatus statusCode)
If not set the response status will be 200 (OK).
public ViewControllerRegistration setViewName(java.lang.String viewName)
If not specified, the view controller will return null
as the
view name in which case the configured RequestToViewNameTranslator
will select the view name. The DefaultRequestToViewNameTranslator
for example translates "/foo/bar" to "foo/bar".
DefaultRequestToViewNameTranslator
protected java.lang.String getUrlPath()
protected ParameterizableViewController getViewController()