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 Logprivate static final ConfigurationSerializer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) ObjectloadXMLFile(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 ConfigurationObjectCachereadConfigurationObjectFromDatabase(String companyId, String componentName, String confName, ComponentProperties properties, String sourceName) private ConfigurationObjectCachereadConfigurationObjectFromXMLFile(String companyId, String componentName, String confName, ComponentProperties properties) readPropertiesConfiguration(String companyId, String componentName) voidsaveConfigurationObjectIntoDatabase(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:
IOExceptionSAXException
-
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:
IOExceptionSAXException
-
saveConfigurationObjectIntoDatabase
public void saveConfigurationObjectIntoDatabase(Object configurationObject, String companyId, String componentName, String confName, ComponentProperties properties)
-