ch.elca.el4j.web.context
Class ModuleDispatcherServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.springframework.web.servlet.HttpServletBean
              extended by org.springframework.web.servlet.FrameworkServlet
                  extended by org.springframework.web.servlet.DispatcherServlet
                      extended by ch.elca.el4j.web.context.ModuleDispatcherServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ModuleDispatcherServlet
extends DispatcherServlet

This class extends Springs DispatcherServlet. It inherits the its complete behaviour but replaces the web application context with a ModuleWebApplicationContext which preserves the order of module dependencies when resources are resolved.

Author:
Andreas Bur (ABU)
See Also:
Serialized Form
File-location:
ModuleDispatcherServlet
Last check-in date:
2010-11-02 11:44:37 +0100 (Di, 02. Nov 2010) by swisswheel for revision 4204

Field Summary
 
Fields inherited from class org.springframework.web.servlet.DispatcherServlet
HANDLER_ADAPTER_BEAN_NAME, HANDLER_EXCEPTION_RESOLVER_BEAN_NAME, HANDLER_MAPPING_BEAN_NAME, LOCALE_RESOLVER_ATTRIBUTE, LOCALE_RESOLVER_BEAN_NAME, MULTIPART_RESOLVER_BEAN_NAME, PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger, REQUEST_TO_VIEW_NAME_TRANSLATOR_BEAN_NAME, THEME_RESOLVER_ATTRIBUTE, THEME_RESOLVER_BEAN_NAME, THEME_SOURCE_ATTRIBUTE, VIEW_RESOLVER_BEAN_NAME, WEB_APPLICATION_CONTEXT_ATTRIBUTE
 
Fields inherited from class org.springframework.web.servlet.FrameworkServlet
DEFAULT_CONTEXT_CLASS, DEFAULT_NAMESPACE_SUFFIX, SERVLET_CONTEXT_PREFIX
 
Fields inherited from class org.springframework.web.servlet.HttpServletBean
logger
 
Constructor Summary
ModuleDispatcherServlet()
           
 
Method Summary
protected  WebApplicationContext createWebApplicationContext(WebApplicationContext parent)
          
 String getContextConfigLocation()
          
 String getExclusiveLocations()
           
 String getInclusiveLocations()
           
 boolean isAllowBeanDefinitionOverriding()
           
 boolean isMergeWithOuterResources()
           
 void setAllowBeanDefinitionOverriding(boolean allowBeanDefinitionOverriding)
          Sets whether it's allowed to override bean definitions, as it may happen by using the same bean name in different configuration files, which are loaded sequentially.
 void setExclusiveLocations(String exclusiveLocations)
          Sets the list of configuration files that have to be excluded from the application context's configuration.
 void setInclusiveLocations(String inclusiveLocations)
          Sets the list of configuration files that have to be included when the application context is initialized.
 void setMergeWithOuterResources(boolean mergeWithOuterResources)
          Sets whether configuration locations retrieved by the pattern resolver have to be merged with resources looked up in the file system.
 
Methods inherited from class org.springframework.web.servlet.DispatcherServlet
buildLocaleContext, checkMultipart, cleanupMultipart, createDefaultStrategy, doDispatch, doService, getDefaultStrategies, getDefaultStrategy, getDefaultViewName, getHandler, getHandler, getHandlerAdapter, getMultipartResolver, getThemeSource, initStrategies, noHandlerFound, onRefresh, processHandlerException, render, resolveViewName, setCleanupAfterInclude, setDetectAllHandlerAdapters, setDetectAllHandlerExceptionResolvers, setDetectAllHandlerMappings, setDetectAllViewResolvers
 
Methods inherited from class org.springframework.web.servlet.FrameworkServlet
createWebApplicationContext, destroy, doDelete, doGet, doOptions, doPost, doPut, doTrace, findWebApplicationContext, getContextAttribute, getContextClass, getNamespace, getServletContextAttributeName, getUsernameForRequest, getWebApplicationContext, initFrameworkServlet, initServletBean, initWebApplicationContext, onApplicationEvent, postProcessWebApplicationContext, processRequest, refresh, setContextAttribute, setContextClass, setContextConfigLocation, setDispatchOptionsRequest, setDispatchTraceRequest, setNamespace, setPublishContext, setPublishEvents, setThreadContextInheritable
 
Methods inherited from class org.springframework.web.servlet.HttpServletBean
addRequiredProperty, getServletContext, getServletName, init, initBeanWrapper
 
Methods inherited from class javax.servlet.http.HttpServlet
doHead, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletInfo, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleDispatcherServlet

public ModuleDispatcherServlet()
Method Detail

createWebApplicationContext

protected WebApplicationContext createWebApplicationContext(WebApplicationContext parent)
                                                     throws BeansException

Overrides:
createWebApplicationContext in class FrameworkServlet
Throws:
BeansException

setAllowBeanDefinitionOverriding

public void setAllowBeanDefinitionOverriding(boolean allowBeanDefinitionOverriding)
Sets whether it's allowed to override bean definitions, as it may happen by using the same bean name in different configuration files, which are loaded sequentially.

Parameters:
allowBeanDefinitionOverriding - Whether it's allowed to override bean definitions.

setExclusiveLocations

public void setExclusiveLocations(String exclusiveLocations)
Sets the list of configuration files that have to be excluded from the application context's configuration.

Parameters:
exclusiveLocations - Configuration locations to exclude.

setInclusiveLocations

public void setInclusiveLocations(String inclusiveLocations)
Sets the list of configuration files that have to be included when the application context is initialized.

Parameters:
inclusiveLocations - Configuration locations to include.

isAllowBeanDefinitionOverriding

public boolean isAllowBeanDefinitionOverriding()
Returns:
Returns whether it's allowed to override already exisiting bean definitions.

getExclusiveLocations

public String getExclusiveLocations()
Returns:
Returns the list of configuration locations that are excluded when the application context is initialized.

getInclusiveLocations

public String getInclusiveLocations()
Returns:
Returns the list of configuration locations that are used to initialize the application context.

getContextConfigLocation

public String getContextConfigLocation()

Overrides:
getContextConfigLocation in class FrameworkServlet

isMergeWithOuterResources

public boolean isMergeWithOuterResources()
Returns:
Returns true if the resource pattern resolver merges items found in the manifest configuration section with items found in the file system. false otherwise.

setMergeWithOuterResources

public void setMergeWithOuterResources(boolean mergeWithOuterResources)
Sets whether configuration locations retrieved by the pattern resolver have to be merged with resources looked up in the file system.

Parameters:
mergeWithOuterResources - true for merging configuration locations provided through the manifest file with resources looked up in the file system. false otherwise.


Copyright © 2005-2011 ELCA. All Rights Reserved.