|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.core.io.DefaultResourceLoader org.springframework.context.support.AbstractApplicationContext org.springframework.context.support.AbstractRefreshableApplicationContext org.springframework.context.support.AbstractRefreshableConfigApplicationContext org.springframework.context.support.AbstractXmlApplicationContext ch.elca.el4j.core.context.ModuleApplicationContext
public class ModuleApplicationContext
Class that loads the ApplicationContext given an array of config files and an array of exclusion config files. The files can be declared via classpath or filepath.
Classpath files can be declared by the following two patterns: "ch/elca/.../x.xml" or by "classpath:ch/elca/.../x.xml".
Filepath files have to be declared in the following way: "file:C:/folder/.../x.xml".
Classpath and filepath files can be declared via ant-style pattern. For instance "classpath:ch/elca/el4j/*.xml" will be resolved into all xml files in the specified classpath. If there is more than one file having the same classpath in two different jars, then you have to change classpath:folder/... into classpath*:folder/... Otherwise, only the file(s) from the first jar is loaded.
Additional features:BeanFactoryPostProcessor
) can override properties of
BeanFactoryPostProcessor
s that come later in the order
(see Ordered
for more details).
ModuleWebApplicationContext
Field Summary | |
---|---|
static String |
EL4J_DEBUGGING_LOGGER
The common debugging logger for EL4J. |
protected static org.slf4j.Logger |
s_el4jLogger
This logger is used to print out some global debugging info. |
Fields inherited from class org.springframework.context.support.AbstractApplicationContext |
---|
APPLICATION_EVENT_MULTICASTER_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, logger, MESSAGE_SOURCE_BEAN_NAME |
Fields inherited from interface org.springframework.context.ConfigurableApplicationContext |
---|
CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, SYSTEM_ENVIRONMENT_BEAN_NAME, SYSTEM_PROPERTIES_BEAN_NAME |
Fields inherited from interface org.springframework.beans.factory.BeanFactory |
---|
FACTORY_BEAN_PREFIX |
Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver |
---|
CLASSPATH_ALL_URL_PREFIX |
Fields inherited from interface org.springframework.core.io.ResourceLoader |
---|
CLASSPATH_URL_PREFIX |
Constructor Summary | |
---|---|
ModuleApplicationContext(ModuleApplicationContextConfiguration config)
Constructor to create a module application context by using the given configurations. |
|
ModuleApplicationContext(String[] inclusiveConfigLocations,
boolean allowBeanDefinitionOverriding)
|
|
ModuleApplicationContext(String[] inclusiveConfigLocations,
String[] exclusiveConfigLocations,
boolean allowBeanDefinitionOverriding,
ApplicationContext parent)
Merge with outer resources is set to true . |
|
ModuleApplicationContext(String[] inclusiveConfigLocations,
String[] exclusiveConfigLocations,
boolean allowBeanDefinitionOverriding,
ApplicationContext parent,
boolean mergeWithOuterResources)
Most specific resource last is set to false . |
|
ModuleApplicationContext(String[] inclusiveConfigLocations,
String[] exclusiveConfigLocations,
boolean allowBeanDefinitionOverriding,
ApplicationContext parent,
boolean mergeWithOuterResources,
boolean mostSpecificResourceLast,
boolean mostSpecificBeanDefinitionCounts)
With this constructor we use no app context creation listener. |
|
ModuleApplicationContext(String[] inclusiveConfigLocations,
String[] exclusiveConfigLocations,
boolean allowBeanDefinitionOverriding,
ApplicationContext parent,
boolean mergeWithOuterResources,
boolean mostSpecificResourceLast,
boolean mostSpecificBeanDefinitionCounts,
ModuleApplicationContextCreationListener creationListener)
Create a new ModuleApplicationContext with the given parent, loading the definitions from the given XML files in "inclusiveConfigLocations" excluded the XML files defined in "exclusiveConfigLocations". |
|
ModuleApplicationContext(String[] inclusiveConfigLocations,
String exclusiveConfigLocation,
boolean allowBeanDefinitionOverriding)
|
|
ModuleApplicationContext(String inclusiveConfigLocation,
boolean allowBeanDefinitionOverriding)
|
|
ModuleApplicationContext(String inclusiveConfigLocation,
String[] exclusiveConfigLocations,
boolean allowBeanDefinitionOverriding)
|
|
ModuleApplicationContext(String inclusiveConfigLocation,
String exclusiveConfigLocation,
boolean allowBeanDefinitionOverriding)
|
Methods inherited from class org.springframework.context.support.AbstractXmlApplicationContext |
---|
getConfigResources, initBeanDefinitionReader, loadBeanDefinitions, loadBeanDefinitions, setValidating |
Methods inherited from class org.springframework.context.support.AbstractRefreshableConfigApplicationContext |
---|
afterPropertiesSet, getDefaultConfigLocations, resolvePath, setBeanName, setConfigLocation, setConfigLocations, setId |
Methods inherited from class org.springframework.context.support.AbstractRefreshableApplicationContext |
---|
cancelRefresh, closeBeanFactory, customizeBeanFactory, getBeanFactory, hasBeanFactory, refreshBeanFactory, setAllowBeanDefinitionOverriding, setAllowCircularReferences |
Methods inherited from class org.springframework.core.io.DefaultResourceLoader |
---|
getClassLoader, getResourceByPath, setClassLoader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ch.elca.el4j.core.context.RefreshableModuleApplicationContext |
---|
refresh |
Methods inherited from interface org.springframework.core.io.ResourceLoader |
---|
getClassLoader |
Field Detail |
---|
public static final String EL4J_DEBUGGING_LOGGER
protected static final org.slf4j.Logger s_el4jLogger
Constructor Detail |
---|
public ModuleApplicationContext(String inclusiveConfigLocation, boolean allowBeanDefinitionOverriding)
ModuleApplicationContext(
String[], boolean)
public ModuleApplicationContext(String[] inclusiveConfigLocations, boolean allowBeanDefinitionOverriding)
ModuleApplicationContext(
String[], String[], boolean, ApplicationContext)
public ModuleApplicationContext(String inclusiveConfigLocation, String exclusiveConfigLocation, boolean allowBeanDefinitionOverriding)
ModuleApplicationContext(
String[], String[], boolean, ApplicationContext)
public ModuleApplicationContext(String[] inclusiveConfigLocations, String exclusiveConfigLocation, boolean allowBeanDefinitionOverriding)
ModuleApplicationContext(
String[], String[], boolean, ApplicationContext)
public ModuleApplicationContext(String inclusiveConfigLocation, String[] exclusiveConfigLocations, boolean allowBeanDefinitionOverriding)
ModuleApplicationContext(
String[], String[], boolean, ApplicationContext)
public ModuleApplicationContext(String[] inclusiveConfigLocations, String[] exclusiveConfigLocations, boolean allowBeanDefinitionOverriding, ApplicationContext parent)
true
.
ModuleApplicationContext(
String[], String[], boolean, ApplicationContext, boolean)
public ModuleApplicationContext(String[] inclusiveConfigLocations, String[] exclusiveConfigLocations, boolean allowBeanDefinitionOverriding, ApplicationContext parent, boolean mergeWithOuterResources)
false
.true
.
ModuleApplicationContext(
String[], String[], boolean, ApplicationContext, boolean, boolean,
boolean, ModuleApplicationContextCreationListener)
public ModuleApplicationContext(String[] inclusiveConfigLocations, String[] exclusiveConfigLocations, boolean allowBeanDefinitionOverriding, ApplicationContext parent, boolean mergeWithOuterResources, boolean mostSpecificResourceLast, boolean mostSpecificBeanDefinitionCounts)
ModuleApplicationContext(
String[], String[], boolean, ApplicationContext, boolean, boolean,
boolean, ModuleApplicationContextCreationListener)
public ModuleApplicationContext(String[] inclusiveConfigLocations, String[] exclusiveConfigLocations, boolean allowBeanDefinitionOverriding, ApplicationContext parent, boolean mergeWithOuterResources, boolean mostSpecificResourceLast, boolean mostSpecificBeanDefinitionCounts, ModuleApplicationContextCreationListener creationListener)
inclusiveConfigLocations
- array of file pathsexclusiveConfigLocations
- array of file paths which are excludedallowBeanDefinitionOverriding
- a boolean which defines if overriding of bean definitions is
allowedparent
- the parent contextmergeWithOuterResources
- a boolean which defines if the resources retrieved by the
configuration files section of the manifest files should be
merged with resources found by searching in the file system.mostSpecificResourceLast
- Indicates if the most specific resource should be the last
resource in the fetched resource array. If its value is set to
true
and only one resource is requested the
least specific resource will be returned.mostSpecificBeanDefinitionCounts
- Indicates that the most specific bean definition is used.creationListener
- Is the listener to hock in while creation of the application context.public ModuleApplicationContext(ModuleApplicationContextConfiguration config)
config
- Is the used configuration.Method Detail |
---|
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
postProcessBeanFactory
in class AbstractApplicationContext
public String[] getConfigLocations()
getConfigLocations
in class AbstractRefreshableConfigApplicationContext
public String[] getExclusiveConfigLocations()
public String[] getInclusiveConfigLocations()
public boolean isAllowBeanDefinitionOverriding()
public boolean isMergeWithOuterResources()
public boolean isMostSpecificResourceLast()
public boolean isMostSpecificBeanDefinitionCounts()
public Resource getResource(String location)
getResource
in interface ResourceLoader
getResource
in class DefaultResourceLoader
public Resource[] getResources(String locationPattern) throws IOException
getResources
in interface ResourcePatternResolver
getResources
in class AbstractApplicationContext
IOException
protected DefaultListableBeanFactory createBeanFactory()
createBeanFactory
in class AbstractRefreshableApplicationContext
protected ResourcePatternResolver getResourcePatternResolver()
getResourcePatternResolver
in class AbstractApplicationContext
protected void invokeBeanFactoryPostProcessors(ConfigurableListableBeanFactory beanFactory)
BeanFactoryPostProcessor.postProcessBeanFactory(
ConfigurableListableBeanFactory)
is invoked ordered but also the
creation of the factory post processor beans!
invokeBeanFactoryPostProcessors
in class AbstractApplicationContext
protected void prepareRefresh()
prepareRefresh
in class AbstractApplicationContext
protected void finishRefresh()
ModuleApplicationListener
s that context has been refreshed.
finishRefresh
in class AbstractApplicationContext
public boolean isRefreshed()
isRefreshed
in interface RefreshableModuleApplicationContext
true
if context is refreshed i.e. fully initialized
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |