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 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()