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 TypeMethodDescriptionvoid
addBaseFileName
(String fileName) private Configuration
addDatasourceProperties
(String datasourcePath) private Configuration
addFileProperties
(String fileName, CompositeConfiguration loadedConf) void
addGlobalFileName
(String fileName) private void
addIncludedPropertiesSources
(Configuration newConf, CompositeConfiguration loadedConf) private Configuration
addJndiProperties
(String sourcePath) private Configuration
addPropertiesSource
(String sourceName, CompositeConfiguration loadedConf) Read the given source of properties and add it to the composite configuration.private String
getProperty
(String key) Look for the property in environment, global and base configuration, in this orderprivate Long
getReloadDelay
(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
-