org.springframework.web.servlet.config.annotation
Class ViewControllerRegistration

java.lang.Object
  extended by org.springframework.web.servlet.config.annotation.ViewControllerRegistration

public class ViewControllerRegistration
extends Object

Encapsulates information required to create a view controller.

Since:
3.1
Author:
Rossen Stoyanchev, Keith Donald

Constructor Summary
ViewControllerRegistration(String urlPath)
          Creates a ViewControllerRegistration with the given URL path.
 
Method Summary
protected  String getUrlPath()
          Returns the URL path for the view controller.
protected  Object getViewController()
          Returns the view controllers.
 void setViewName(String viewName)
          Sets the view name to use for this view controller.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewControllerRegistration

public ViewControllerRegistration(String urlPath)
Creates a ViewControllerRegistration with the given URL path. When a request matches to the given URL path this view controller will process it.

Method Detail

setViewName

public void setViewName(String viewName)
Sets the view name to use for this view controller. This field is optional. If not specified the view controller will return a null view name, which will be resolved through the configured RequestToViewNameTranslator. By default that means "/foo/bar" would resolve to "foo/bar".


getUrlPath

protected String getUrlPath()
Returns the URL path for the view controller.


getViewController

protected Object getViewController()
Returns the view controllers.