Package com.germinus.easyconf
Class ConfigurationLoader
java.lang.Object
com.germinus.easyconf.ConfigurationLoader
Handles the actual reading of the configuration
- Author:
- jferrer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Log
private static final ConfigurationSerializer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) Object
loadXMLFile
(URL confFileUrl, ComponentProperties properties) Read an XML file and return an Object representation of its contentsreadConfigurationObject
(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) readPropertiesConfiguration
(String companyId, String componentName) void
saveConfigurationObjectIntoDatabase
(Object configurationObject, String companyId, String componentName, String confName, ComponentProperties properties)
-
Field Details
-
log
private static final Log log -
serializer
-
-
Constructor Details
-
ConfigurationLoader
ConfigurationLoader()
-
-
Method Details
-
readPropertiesConfiguration
-
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 -
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)
-