public class HybrisContextLoaderListener
extends ContextLoaderListener
HttpSessionListener for
Supports loading additional web spring config files. The additional config files are specified in a hybris
configuration property. The property name is built as follows: <display-name>.additionalWebSpringConfigs Where
<display-name> is ServletContext.getServletContextName() which is actually the <display-name>
element from the web.xml for the web application.| Modifier and Type | Field and Description |
|---|---|
protected static String |
ADDITIONAL_WEB_SPRING_CONFIGS |
protected static String |
ADDITIONAL_WEB_SPRING_CONFIGS_FROM_EXT |
static String |
CORE_SPRING_DEVELOPMENT_MODE_FLAG_KEY |
static String |
WEB_SPRING_DEVELOPMENT_MODE_FLAG_KEY |
| Constructor and Description |
|---|
HybrisContextLoaderListener() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCustomConfigLocations(ConfigurableWebApplicationContext applicationContext,
List<String> customConfLocations) |
protected void |
adjustTenant(ServletContext servletContext) |
protected void |
attachTenantIDToServletContext(ServletContext ctx,
String tenantID) |
void |
contextInitialized(ServletContextEvent event) |
protected WebApplicationContext |
createWebApplicationContext(ServletContext servletContext) |
protected void |
customizeContext(ServletContext servletContext,
ConfigurableWebApplicationContext applicationContext) |
protected WebApplicationContext |
doInitWebApplicationContext(ServletContext servletContext) |
protected void |
fillConfigLocations(String appName,
List<String> locations) |
protected void |
fillConfigLocationsFromExtension(String appName,
String fromExtension,
List<String> locations) |
protected void |
fillConfigLocationsFromExtensions(String appName,
List<String> locations) |
protected void |
fillConfigLocationsFromParameter(String parameterKey,
List<String> locations) |
protected void |
fillLegacyConfigLocations(String appName,
List<String> locations) |
protected String |
getTenanId(String contextPath) |
static String |
getTenantIDForWebapp(ServletContext ctx) |
WebApplicationContext |
initWebApplicationContext(ServletContext servletContext)
Overridden just for handling not found tenants.
|
protected ApplicationContext |
loadParentContext(ServletContext servletContext) |
protected String |
readConfigParameter(String parameterKey) |
protected void |
registerHttpSessionListener(ServletContext servletContext) |
protected void |
startRegistry() |
protected static final String ADDITIONAL_WEB_SPRING_CONFIGS
protected static final String ADDITIONAL_WEB_SPRING_CONFIGS_FROM_EXT
public static final String CORE_SPRING_DEVELOPMENT_MODE_FLAG_KEY
public static final String WEB_SPRING_DEVELOPMENT_MODE_FLAG_KEY
public void contextInitialized(ServletContextEvent event)
protected void registerHttpSessionListener(ServletContext servletContext)
public WebApplicationContext initWebApplicationContext(ServletContext servletContext)
loadParentContext(ServletContext).protected WebApplicationContext doInitWebApplicationContext(ServletContext servletContext)
protected ApplicationContext loadParentContext(ServletContext servletContext)
throws BeansException
BeansExceptionprotected void customizeContext(ServletContext servletContext,
ConfigurableWebApplicationContext applicationContext)
protected void adjustTenant(ServletContext servletContext)
throws TenantNotFoundException
TenantNotFoundExceptionpublic static String getTenantIDForWebapp(ServletContext ctx)
protected void attachTenantIDToServletContext(ServletContext ctx,
String tenantID)
protected void startRegistry()
protected WebApplicationContext createWebApplicationContext(ServletContext servletContext)
protected void fillLegacyConfigLocations(String appName, List<String> locations)
protected void fillConfigLocationsFromExtensions(String appName, List<String> locations)
protected void fillConfigLocationsFromExtension(String appName, String fromExtension, List<String> locations)
protected void fillConfigLocationsFromParameter(String parameterKey, List<String> locations)
protected void addCustomConfigLocations(ConfigurableWebApplicationContext applicationContext,
List<String> customConfLocations)
Copyright © 2017 SAP SE. All Rights Reserved.