|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.context.support.ApplicationObjectSupport org.springframework.web.context.support.WebApplicationObjectSupport org.springframework.web.servlet.support.WebContentGenerator org.springframework.web.servlet.mvc.AbstractController de.mindmatters.faces.spring.context.servlet.AbstractFacesController
Convenience superclass for controller implementations, using the Template
Method design pattern which creates a FacesContext on the beginning of
request handling. The modified
DispatcherServlet
acts on
AbstractFacesController implementations.
name | default | description |
---|---|---|
lifecycleId | LifecycleFactory.DEFAULT_LIFECYCLE |
the lifecycle id for identifying the proper lifecycle this controller will run in |
DispatcherServlet
Field Summary | |
protected org.apache.commons.logging.Log |
log
For logging. |
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 | |
AbstractFacesController()
|
Method Summary | |
void |
afterPropertiesSet()
Initializes the faces lifecycle this controller runs in. |
protected void |
doAfterExecution(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Template method. |
protected void |
doBeforeExecution(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Template method. |
protected Lifecycle |
getLifecycle()
|
protected abstract ModelAndView |
handleRequestInternal(FacesContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Template method. |
protected ModelAndView |
handleRequestInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Creates a FacesContext and delegates to the corresponding template methods doBeforeExecution ,
handleRequestInternal , doAfterExecution . |
protected void |
initFacesController()
Hook method for subclasses for initialization purposes. |
void |
setLifecycleId(java.lang.String lifecycleId)
Sets the lifecycle id for identifying the proper lifecycle this controller will run in. |
void |
setServletContext(javax.servlet.ServletContext servletContext)
|
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 |
Field Detail |
protected final org.apache.commons.logging.Log log
Constructor Detail |
public AbstractFacesController()
Method Detail |
public final void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
protected void initFacesController()
public final void setServletContext(javax.servlet.ServletContext servletContext)
setServletContext
in interface ServletContextAware
public final void setLifecycleId(java.lang.String lifecycleId)
LifecycleFactory.DEFAULT_LIFECYCLE
will be used.
lifecycleId
- the lifecycle id for identifying the proper lifecycleprotected final ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
doBeforeExecution
,
handleRequestInternal
, doAfterExecution
.
request
- current HTTP requestresponse
- current HTTP response
null
if handled
directly
java.lang.Exception
- in case of errorsdoBeforeExecution(HttpServletRequest, HttpServletResponse)
,
handleRequestInternal(FacesContext, HttpServletRequest,
HttpServletResponse)
,
doAfterExecution(HttpServletRequest, HttpServletResponse)
protected abstract ModelAndView handleRequestInternal(FacesContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
handleRequest
.
context
- current FacesContextrequest
- current HTTP requestresponse
- current HTTP response
null
if handled
directly
java.lang.Exception
- in case of errors#handleRequest(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
protected void doBeforeExecution(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
handleRequest
.
request
- current HTTP requestresponse
- current HTTP response
java.lang.Exception
- in case of errorshandleRequestInternal(HttpServletRequest, HttpServletResponse)
,
handleRequestInternal(FacesContext, HttpServletRequest,
HttpServletResponse)
protected void doAfterExecution(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
handleRequest
.
request
- current HTTP requestresponse
- current HTTP response
java.lang.Exception
- in case of errorshandleRequestInternal(HttpServletRequest, HttpServletResponse)
,
handleRequestInternal(FacesContext, HttpServletRequest,
HttpServletResponse)
protected final Lifecycle getLifecycle()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |