Package com.germinus.easyconf

# Class ConfigurationLoader

java.lang.Object
com.germinus.easyconf.ConfigurationLoader

class ConfigurationLoader extends Object
Handles the actual reading of the configuration

Author:
  jferrer

## Field Summary

Fields
Modifier and Type
Field
Description
`private static final Log`
`log`
`private static final ConfigurationSerializer`
`serializer`

## Constructor Summary

Constructors
Constructor
Description
`ConfigurationLoader()`

## Method Summary

Modifier and Type
Method
Description
`(package private) Object`
`loadXMLFile(URL confFileUrl, ComponentProperties properties)`
Read an XML file and return an Object representation of its contents
`ConfigurationObjectCache`
`readConfigurationObject(String companyId, String componentName, String confName, ComponentProperties properties)`
`private ConfigurationObjectCache`
`readConfigurationObjectFromDatabase(String companyId, String componentName, String confName, ComponentProperties properties, String sourceName)`
`private ConfigurationObjectCache`
`readConfigurationObjectFromXMLFile(String companyId, String componentName, String confName, ComponentProperties properties)`
`ComponentProperties`
`readPropertiesConfiguration(String companyId, String componentName)`
`void`
`saveConfigurationObjectIntoDatabase(Object configurationObject, String companyId, String componentName, String confName, ComponentProperties properties)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### log

private static final Log log

### serializer

private static final ConfigurationSerializer serializer

## Constructor Details

### ConfigurationLoader

ConfigurationLoader()

## Method Details

### readPropertiesConfiguration

public ComponentProperties readPropertiesConfiguration(String companyId, String componentName)

### readConfigurationObject

public ConfigurationObjectCache readConfigurationObject(String companyId, String componentName, String confName, ComponentProperties properties) throws IOException, SAXException

Throws:
  `IOException`
  `SAXException`

### readConfigurationObjectFromDatabase

private ConfigurationObjectCache readConfigurationObjectFromDatabase(String companyId, String componentName, String confName, ComponentProperties properties, String sourceName)

### readConfigurationObjectFromXMLFile

private ConfigurationObjectCache readConfigurationObjectFromXMLFile(String companyId, String componentName, String confName, ComponentProperties properties) throws FileNotFoundException, IOException, SAXException

Throws:
  `FileNotFoundException`
  `IOException`
  `SAXException`

### loadXMLFile

Object loadXMLFile(URL confFileUrl, ComponentProperties properties) throws IOException, SAXException
Read an XML file and return an Object representation of its contents

Throws:
  `IOException`
  `SAXException`

### saveConfigurationObjectIntoDatabase

public void saveConfigurationObjectIntoDatabase(Object configurationObject, String companyId, String componentName, String confName, ComponentProperties properties)