public class ConfigPathConfigurer extends Object implements org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>, org.springframework.context.ApplicationContextAware, org.springframework.core.Ordered
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
allBeans |
protected Map<String,ConfigPath> |
allConfigPaths |
protected PathSharingContext |
appCtx |
protected ConfigPath |
path
'home' directory for all other paths to be resolved
relative to; defaults to directory of primary XML config file
|
Constructor and Description |
---|
ConfigPathConfigurer() |
Modifier and Type | Method and Description |
---|---|
protected void |
fixupConfigPath(ConfigPath cp,
String patchName) |
protected Object |
fixupPaths(Object bean,
String beanName)
Find any ConfigPath properties in the passed bean; ensure that
if they have a null 'base', that is replaced with the job home
directory.
|
Map<String,ConfigPath> |
getAllConfigPaths() |
int |
getOrder()
Act as late as possible.
|
ConfigPath |
getPath() |
protected String |
interpolate(String rawPath) |
void |
onApplicationEvent(org.springframework.context.ApplicationEvent event)
Fix all beans with ConfigPath properties that lack a base path
or a name, to use a job-implied base path and name.
|
Object |
postProcessAfterInitialization(Object bean,
String beanName)
Remember all beans for later fixup.
|
Object |
postProcessBeforeInitialization(Object bean,
String beanName) |
protected void |
remember(String key,
ConfigPath cp) |
void |
setApplicationContext(org.springframework.context.ApplicationContext appCtx)
Remember ApplicationContext, and if possible primary
configuration file's home directory.
|
void |
snapshotToLaunchDir(File readFile) |
protected ConfigPath path
protected PathSharingContext appCtx
protected Map<String,ConfigPath> allConfigPaths
public ConfigPath getPath()
public Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessAfterInitialization
in interface org.springframework.beans.factory.config.BeanPostProcessor
org.springframework.beans.BeansException
BeanPostProcessor.postProcessAfterInitialization(java.lang.Object, java.lang.String)
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
onApplicationEvent
in interface org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
protected Object fixupPaths(Object bean, String beanName)
bean
- beanName
- protected void fixupConfigPath(ConfigPath cp, String patchName)
public void setApplicationContext(org.springframework.context.ApplicationContext appCtx) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)
protected void remember(String key, ConfigPath cp)
public Map<String,ConfigPath> getAllConfigPaths()
public Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessBeforeInitialization
in interface org.springframework.beans.factory.config.BeanPostProcessor
org.springframework.beans.BeansException
public int getOrder()
getOrder
in interface org.springframework.core.Ordered
Ordered.getOrder()
public void snapshotToLaunchDir(File readFile) throws IOException
IOException
Copyright © 2003-2014 Internet Archive. All Rights Reserved.