Package com.germinus.easyconf
Class ConfigurationLoader
- java.lang.Object
-
- com.germinus.easyconf.ConfigurationLoader
-
class ConfigurationLoader extends java.lang.Object
Handles the actual reading of the configuration- Author:
- jferrer
-
-
Field Summary
Fields Modifier and Type Field Description private static Log
log
private static ConfigurationSerializer
serializer
-
Constructor Summary
Constructors Constructor Description ConfigurationLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.lang.Object
loadXMLFile(java.net.URL confFileUrl, ComponentProperties properties)
Read an XML file and return an Object representation of its contentsConfigurationObjectCache
readConfigurationObject(java.lang.String companyId, java.lang.String componentName, java.lang.String confName, ComponentProperties properties)
private ConfigurationObjectCache
readConfigurationObjectFromDatabase(java.lang.String companyId, java.lang.String componentName, java.lang.String confName, ComponentProperties properties, java.lang.String sourceName)
private ConfigurationObjectCache
readConfigurationObjectFromXMLFile(java.lang.String companyId, java.lang.String componentName, java.lang.String confName, ComponentProperties properties)
ComponentProperties
readPropertiesConfiguration(java.lang.String companyId, java.lang.String componentName)
void
saveConfigurationObjectIntoDatabase(java.lang.Object configurationObject, java.lang.String companyId, java.lang.String componentName, java.lang.String confName, ComponentProperties properties)
-
-
-
Field Detail
-
log
private static final Log log
-
serializer
private static final ConfigurationSerializer serializer
-
-
Method Detail
-
readPropertiesConfiguration
public ComponentProperties readPropertiesConfiguration(java.lang.String companyId, java.lang.String componentName)
-
readConfigurationObject
public ConfigurationObjectCache readConfigurationObject(java.lang.String companyId, java.lang.String componentName, java.lang.String confName, ComponentProperties properties) throws java.io.IOException, org.xml.sax.SAXException
- Throws:
java.io.IOException
org.xml.sax.SAXException
-
readConfigurationObjectFromDatabase
private ConfigurationObjectCache readConfigurationObjectFromDatabase(java.lang.String companyId, java.lang.String componentName, java.lang.String confName, ComponentProperties properties, java.lang.String sourceName)
-
readConfigurationObjectFromXMLFile
private ConfigurationObjectCache readConfigurationObjectFromXMLFile(java.lang.String companyId, java.lang.String componentName, java.lang.String confName, ComponentProperties properties) throws java.io.FileNotFoundException, java.io.IOException, org.xml.sax.SAXException
- Throws:
java.io.FileNotFoundException
java.io.IOException
org.xml.sax.SAXException
-
loadXMLFile
java.lang.Object loadXMLFile(java.net.URL confFileUrl, ComponentProperties properties) throws java.io.IOException, org.xml.sax.SAXException
Read an XML file and return an Object representation of its contents- Throws:
java.io.IOException
org.xml.sax.SAXException
-
saveConfigurationObjectIntoDatabase
public void saveConfigurationObjectIntoDatabase(java.lang.Object configurationObject, java.lang.String companyId, java.lang.String componentName, java.lang.String confName, ComponentProperties properties)
-
-