org.riotfamily.common.web.dwr
Class DwrController
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
org.riotfamily.common.web.dwr.DwrController
- All Implemented Interfaces:
- BeanFactoryAware, BeanNameAware, InitializingBean, ApplicationContextAware, ServletContextAware, Controller
public class DwrController
- extends AbstractController
- implements BeanNameAware, InitializingBean, BeanFactoryAware, ServletContextAware
Field Summary |
protected org.directwebremoting.WebContextFactory.WebContextBuilder |
webContextBuilder
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
webContextBuilder
protected org.directwebremoting.WebContextFactory.WebContextBuilder webContextBuilder
DwrController
public DwrController()
setMapping
public void setMapping(String mapping)
setBeanName
public void setBeanName(String beanName)
- Specified by:
setBeanName
in interface BeanNameAware
setBeanFactory
public void setBeanFactory(BeanFactory beanFactory)
throws BeansException
- Is called by the Spring container to set the bean factory.
This bean factory is then used to obtain the global DWR configuration
from. This global configuration is optional as DWR will provide defaults
where possible.
- Specified by:
setBeanFactory
in interface BeanFactoryAware
- Throws:
BeansException
setConfigurators
public void setConfigurators(List<?> configurators)
- Sets the configurators to apply to this controller. The configurators
are used to set up DWR correctly.
setParameters
public void setParameters(Map<?,?> parameters)
- Sets parameters just like the init-parameters of the DwrServlet.
setIncludeDefaultConfig
public void setIncludeDefaultConfig(boolean includeDefaultConfig)
- Sets whether the default DWR configuration should be included
(default is
true
).
This default configuration contains all build-in creators and converters.
You normally want this default configuration to be included.
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Is called by the Spring container after all properties have been set.
This method actually makes sure the container is correctly initialized
and all configurators are processed.
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Throws:
Exception
- in case setting up fails
handleRequestInternal
protected ModelAndView handleRequestInternal(HttpServletRequest request,
HttpServletResponse response)
throws Exception
- Handles all request to this controller.
It delegates to the UrlProcessor
and also takes care of
setting and unsetting of the current WebContext
.
- Specified by:
handleRequestInternal
in class AbstractController
- Throws:
Exception
getPathOffset
protected int getPathOffset(HttpServletRequest request)