Package com.germinus.easyconf
Class ConfigurationLoader
- java.lang.Object
-
- com.germinus.easyconf.ConfigurationLoader
-
class ConfigurationLoader extends java.lang.ObjectHandles the actual reading of the configuration- Author:
- jferrer
-
-
Field Summary
Fields Modifier and Type Field Description private static Loglogprivate static ConfigurationSerializerserializer
-
Constructor Summary
Constructors Constructor Description ConfigurationLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.lang.ObjectloadXMLFile(java.net.URL confFileUrl, ComponentProperties properties)Read an XML file and return an Object representation of its contentsConfigurationObjectCachereadConfigurationObject(java.lang.String companyId, java.lang.String componentName, java.lang.String confName, ComponentProperties properties)private ConfigurationObjectCachereadConfigurationObjectFromDatabase(java.lang.String companyId, java.lang.String componentName, java.lang.String confName, ComponentProperties properties, java.lang.String sourceName)private ConfigurationObjectCachereadConfigurationObjectFromXMLFile(java.lang.String companyId, java.lang.String componentName, java.lang.String confName, ComponentProperties properties)ComponentPropertiesreadPropertiesConfiguration(java.lang.String companyId, java.lang.String componentName)voidsaveConfigurationObjectIntoDatabase(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.IOExceptionorg.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.FileNotFoundExceptionjava.io.IOExceptionorg.xml.sax.SAXException
-
loadXMLFile
java.lang.Object loadXMLFile(java.net.URL confFileUrl, ComponentProperties properties) throws java.io.IOException, org.xml.sax.SAXExceptionRead an XML file and return an Object representation of its contents- Throws:
java.io.IOExceptionorg.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)
-
-