com.germinus.easyconf
Class AggregatedProperties
java.lang.Object
CompositeConfiguration
com.germinus.easyconf.AggregatedProperties
public class AggregatedProperties
- extends CompositeConfiguration
Provides configuration properties from several sources making distintion
from:
- Base properties specific to the current component
- Global properties which may be prefixed
- System properties (so that they are available as variables to the other
property files)
It also knows the source the a property to offer user information.
- Author:
- jferrer
Constructor Summary |
AggregatedProperties(java.lang.String companyId,
java.lang.String componentName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static final Log log
baseConf
private CompositeConfiguration baseConf
globalConf
private CompositeConfiguration globalConf
systemConfiguration
private SystemConfiguration systemConfiguration
prefixedSystemConfiguration
private Configuration prefixedSystemConfiguration
componentName
private java.lang.String componentName
companyId
private java.lang.String companyId
loadedSources
private java.util.List loadedSources
baseConfigurationLoaded
private boolean baseConfigurationLoaded
AggregatedProperties
public AggregatedProperties(java.lang.String companyId,
java.lang.String componentName)
getProperty
public java.lang.Object getProperty(java.lang.String key)
- Look for the property in environment, global and base configuration, in
this order
- Parameters:
key
-
- Returns:
getPrefix
private java.lang.String getPrefix()
addBaseFileName
public void addBaseFileName(java.lang.String fileName)
addGlobalFileName
public void addGlobalFileName(java.lang.String fileName)
addPropertiesSource
private Configuration addPropertiesSource(java.lang.String sourceName,
CompositeConfiguration loadedConf)
- Read the given source of properties and add it to the composite
configuration. The added configuration will be returned. If it is not
found null will be returned.
addFileProperties
private Configuration addFileProperties(java.lang.String fileName,
CompositeConfiguration loadedConf)
throws ConfigurationException
- Throws:
ConfigurationException
getReloadDelay
private java.lang.Long getReloadDelay(CompositeConfiguration loadedConf,
FileConfiguration newConf)
addDatasourceProperties
private Configuration addDatasourceProperties(java.lang.String datasourcePath)
addJndiProperties
private Configuration addJndiProperties(java.lang.String sourcePath)
addIncludedPropertiesSources
private void addIncludedPropertiesSources(Configuration newConf,
CompositeConfiguration loadedConf)
loadedSources
public java.util.List loadedSources()
hasBaseConfiguration
public boolean hasBaseConfiguration()
getComponentName
public java.lang.String getComponentName()