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)

It also knows the source the a property to offer user information.

Author:
  jferrer

## Field Summary

Fields
Modifier and Type
Field
Description
`private CompositeConfiguration`
`baseConf`
`private boolean`
`baseConfigurationLoaded`
`private String`
`companyId`
`private String`
`componentName`
`private CompositeConfiguration`
`globalConf`
`private List`
`loadedSources`
`private static final Log`
`log`
`private Configuration`
`prefixedSystemConfiguration`
`private SystemConfiguration`
`systemConfiguration`

## Constructor Summary

Constructors
Constructor
Description
`AggregatedProperties(String companyId, String componentName)`

## Method Summary

Modifier and Type
Method
Description
`void`
`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.
`String`
`getComponentName()`
`private String`
`getPrefix()`
`Object`
`getProperty(String key)`
Look for the property in environment, global and base configuration, in this order
`private Long`
`getReloadDelay(CompositeConfiguration loadedConf, FileConfiguration newConf)`
`boolean`
`hasBaseConfiguration()`
`List`
`loadedSources()`

## 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

private String componentName

### companyId

private String companyId

### loadedSources

private List loadedSources

### baseConfigurationLoaded

private boolean baseConfigurationLoaded

## Constructor Details

### AggregatedProperties

public AggregatedProperties(String companyId, String componentName)

## Method Details

### getProperty

public Object getProperty(String key)
Look for the property in environment, global and base configuration, in this order

Parameters:
  `key` -
Returns:

### getPrefix

private String getPrefix()

### addBaseFileName

public void addBaseFileName(String fileName)

### addGlobalFileName

public void addGlobalFileName(String fileName)

### addPropertiesSource

private Configuration addPropertiesSource(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(String fileName, CompositeConfiguration loadedConf) throws ConfigurationException

Throws:
  `ConfigurationException`

### getReloadDelay

private Long getReloadDelay(CompositeConfiguration loadedConf, FileConfiguration newConf)

### addDatasourceProperties

private Configuration addDatasourceProperties(String datasourcePath)

### addJndiProperties

private Configuration addJndiProperties(String sourcePath)

### addIncludedPropertiesSources

private void addIncludedPropertiesSources(Configuration newConf, CompositeConfiguration loadedConf)

### loadedSources

public List loadedSources()

### hasBaseConfiguration

public boolean hasBaseConfiguration()

### getComponentName

public String getComponentName()