Class: WirisPlugin::CustomConfigurationUpdater
- Inherits:
-
Object
- Object
- WirisPlugin::CustomConfigurationUpdater
- Extended by:
- ConfigurationUpdaterInterface
- Includes:
- Wiris
- Defined in:
- lib/com/wiris/plugin/impl/CustomConfigurationUpdater.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
- #init(obj) ⇒ Object
-
#initialize(config) ⇒ CustomConfigurationUpdater
constructor
A new instance of CustomConfigurationUpdater.
- #updateConfiguration(ref_configuration) ⇒ Object
Methods included from ConfigurationUpdaterInterface
Constructor Details
#initialize(config) ⇒ CustomConfigurationUpdater
Returns a new instance of CustomConfigurationUpdater.
12 13 14 15 |
# File 'lib/com/wiris/plugin/impl/CustomConfigurationUpdater.rb', line 12 def initialize(config) super() self.config = config end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
11 12 13 |
# File 'lib/com/wiris/plugin/impl/CustomConfigurationUpdater.rb', line 11 def config @config end |
Instance Method Details
#init(obj) ⇒ Object
16 17 |
# File 'lib/com/wiris/plugin/impl/CustomConfigurationUpdater.rb', line 16 def init(obj) end |
#updateConfiguration(ref_configuration) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/com/wiris/plugin/impl/CustomConfigurationUpdater.rb', line 18 def updateConfiguration(ref_configuration) configuration = ref_configuration confClass = PropertiesTools::getProperty(configuration,ConfigurationKeys::CONFIGURATION_CLASS) if (confClass != nil) && (confClass::indexOf("com.wiris.plugin.servlets.configuration.ParameterServletConfigurationUpdater") != -1) return end if confClass != nil cls = Type::resolveClass(confClass) if cls == nil raise Exception,("Class " + confClass) + " not found." end obj = Type::createInstance(cls,Array.new()) if obj == nil raise Exception,("Instance from " + cls.to_s) + " cannot be created." end cu = (obj) @config::initialize_(cu) cu::updateConfiguration(configuration) end end |