SourceForge.net Logo

de.mindmatters.faces.spring.context.servlet
Class FacesControllerAdapter

java.lang.Object
  extended byorg.springframework.context.support.ApplicationObjectSupport
      extended byorg.springframework.web.context.support.WebApplicationObjectSupport
          extended byorg.springframework.web.servlet.support.WebContentGenerator
              extended byorg.springframework.web.servlet.mvc.AbstractController
                  extended byde.mindmatters.faces.spring.context.servlet.AbstractFacesController
                      extended byde.mindmatters.faces.spring.context.servlet.FacesControllerAdapter
All Implemented Interfaces:
ApplicationContextAware, Controller, InitializingBean, ServletContextAware

public final class FacesControllerAdapter
extends AbstractFacesController

Adapter used by the modified DispatcherServlet (via the FacesControllerHandlerAdapter to integrate proprietary Controller to the faces lifecycle.

With the help of this adapter a FacesContext will be created for an assured render phase.

Author:
Andreas Kuhrwahl
See Also:
#handle(HttpServletRequest, HttpServletResponse, Object)

Field Summary
 
Fields inherited from class de.mindmatters.faces.spring.context.servlet.AbstractFacesController
log
 
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator
HEADER_CACHE_CONTROL, HEADER_EXPIRES, HEADER_PRAGMA, METHOD_GET, METHOD_HEAD, METHOD_POST
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
FacesControllerAdapter()
          Constructor for use as a bean.
FacesControllerAdapter(Controller controller)
          Creates a FacesControllerAdapter with the given delegate controller.
 
Method Summary
protected  ModelAndView handleRequestInternal(FacesContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Template method. Subclasses must implement this. The contract is the same as for handleRequest.
protected  void initFacesController()
          Hook method for subclasses for initialization purposes.
 void setController(Controller controller)
          Sets the adapted Controller to delegate to.
 
Methods inherited from class de.mindmatters.faces.spring.context.servlet.AbstractFacesController
afterPropertiesSet, doAfterExecution, doBeforeExecution, getLifecycle, handleRequestInternal, setLifecycleId, setServletContext
 
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, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseExpiresHeader
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, isContextRequired
 
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

FacesControllerAdapter

public FacesControllerAdapter()
Constructor for use as a bean.


FacesControllerAdapter

public FacesControllerAdapter(Controller controller)
Creates a FacesControllerAdapter with the given delegate controller.

Parameters:
controller - the adapted Controller to delegate to
Method Detail

initFacesController

protected void initFacesController()
Hook method for subclasses for initialization purposes.

Overrides:
initFacesController in class AbstractFacesController

setController

public void setController(Controller controller)
Sets the adapted Controller to delegate to.

Parameters:
controller - the adapted Controller to delegate to

handleRequestInternal

protected ModelAndView handleRequestInternal(FacesContext context,
                                             javax.servlet.http.HttpServletRequest request,
                                             javax.servlet.http.HttpServletResponse response)
                                      throws java.lang.Exception
Template method. Subclasses must implement this. The contract is the same as for handleRequest.

Specified by:
handleRequestInternal in class AbstractFacesController
Parameters:
context - current FacesContext
request - current HTTP request
response - current HTTP response
Returns:
a ModelAndView to render, or null if handled directly
Throws:
java.lang.Exception - in case of errors
See Also:
#handleRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

SourceForge.net Logo

Copyright © 2002 mindmatters GmbH & Co. KG