Package com.germinus.easyconf
Class AggregatedProperties
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)
- Author:
- jferrer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBaseFileName(String fileName) private ConfigurationaddDatasourceProperties(String datasourcePath) private ConfigurationaddFileProperties(String fileName, CompositeConfiguration loadedConf) voidaddGlobalFileName(String fileName) private voidaddIncludedPropertiesSources(Configuration newConf, CompositeConfiguration loadedConf) private ConfigurationaddJndiProperties(String sourcePath) private ConfigurationaddPropertiesSource(String sourceName, CompositeConfiguration loadedConf) Read the given source of properties and add it to the composite configuration.private StringgetProperty(String key) Look for the property in environment, global and base configuration, in this orderprivate LonggetReloadDelay(CompositeConfiguration loadedConf, FileConfiguration newConf) boolean
-
Field Details
-
log
private static final Log log -
baseConf
private CompositeConfiguration baseConf -
globalConf
private CompositeConfiguration globalConf -
systemConfiguration
private SystemConfiguration systemConfiguration -
prefixedSystemConfiguration
private Configuration prefixedSystemConfiguration -
componentName
-
companyId
-
loadedSources
-
baseConfigurationLoaded
private boolean baseConfigurationLoaded
-
-
Constructor Details
-
AggregatedProperties
-
-
Method Details
-
getProperty
Look for the property in environment, global and base configuration, in this order- Parameters:
key-- Returns:
-
getPrefix
-
addBaseFileName
-
addGlobalFileName
-
addPropertiesSource
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(String fileName, CompositeConfiguration loadedConf) throws ConfigurationException - Throws:
ConfigurationException
-
getReloadDelay
-
addDatasourceProperties
-
addJndiProperties
-
addIncludedPropertiesSources
private void addIncludedPropertiesSources(Configuration newConf, CompositeConfiguration loadedConf) -
loadedSources
-
hasBaseConfiguration
public boolean hasBaseConfiguration() -
getComponentName
-