Class: WirisPlugin::FileConfigurationUpdater
- Inherits:
-
Object
- Object
- WirisPlugin::FileConfigurationUpdater
- Extended by:
- ConfigurationUpdaterInterface
- Includes:
- Wiris
- Defined in:
- lib/com/wiris/plugin/impl/FileConfigurationUpdater.rb
Instance Method Summary collapse
- #init(obj) ⇒ Object
-
#initialize ⇒ FileConfigurationUpdater
constructor
A new instance of FileConfigurationUpdater.
- #updateConfiguration(ref_configuration) ⇒ Object
Methods included from ConfigurationUpdaterInterface
Constructor Details
#initialize ⇒ FileConfigurationUpdater
Returns a new instance of FileConfigurationUpdater.
12 13 14 |
# File 'lib/com/wiris/plugin/impl/FileConfigurationUpdater.rb', line 12 def initialize() super() end |
Instance Method Details
#init(obj) ⇒ Object
15 16 |
# File 'lib/com/wiris/plugin/impl/FileConfigurationUpdater.rb', line 15 def init(obj) end |
#updateConfiguration(ref_configuration) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/com/wiris/plugin/impl/FileConfigurationUpdater.rb', line 17 def updateConfiguration(ref_configuration) configuration = ref_configuration confDir = PropertiesTools::getProperty(configuration,ConfigurationKeys::CONFIGURATION_PATH) if confDir != nil confFile = confDir + "/configuration.ini" s = Storage::newStorage(confFile) if s::exists() defaultIniFile = IniFile::newIniFileFromFilename(confFile) h = defaultIniFile::getProperties() iter = h::keys() while iter::hasNext() key = iter::next() PropertiesTools::setProperty(configuration,key,h::get(key)) end end end end |