org.jasig.cas.web
Class DelegatingController

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.support.WebContentGenerator
              extended by org.springframework.web.servlet.mvc.AbstractController
                  extended by org.jasig.cas.web.DelegatingController
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.mvc.Controller

public class DelegatingController
extends org.springframework.web.servlet.mvc.AbstractController

Delegating controller. Tries to find a controller among its delegates, that can handle the current request. If none is found, an error is generated.

Since:
3.5
Version:
$Id$
Author:
Frederic Esnault

Field Summary
 
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator
METHOD_GET, METHOD_HEAD, METHOD_POST
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
DelegatingController()
           
 
Method Summary
protected  org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles the request.
 void setDelegates(List<DelegateController> delegates)
           
 void setFailureView(String failureView)
           
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession
 
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingController

public DelegatingController()
Method Detail

handleRequestInternal

protected final org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request,
                                                                                   javax.servlet.http.HttpServletResponse response)
                                                                            throws Exception
Handles the request. Ask all delegates if they can handle the current request. The first to answer true is elected as the delegate that will process the request. If no controller answers true, we redirect to the error page.

Specified by:
handleRequestInternal in class org.springframework.web.servlet.mvc.AbstractController
Parameters:
request - the request to handle
response - the response to write to
Returns:
the model and view object
Throws:
Exception - if an error occurs during request handling

setDelegates

@NotNull
public void setDelegates(List<DelegateController> delegates)
Parameters:
delegates - the delegate controllers to set

setFailureView

public final void setFailureView(String failureView)
Parameters:
failureView - The failureView to set.


Copyright © 2004-2013 Jasig. All Rights Reserved.