Class: OSGIConf::Conf
- Inherits:
-
Object
- Object
- OSGIConf::Conf
- Defined in:
- lib/nakamura/osgiconf.rb
Instance Attribute Summary collapse
-
#log ⇒ Object
Returns the value of attribute log.
Instance Method Summary collapse
-
#initialize(sling) ⇒ Conf
constructor
A new instance of Conf.
- #setProperties(factoryPid, props) ⇒ Object
Constructor Details
#initialize(sling) ⇒ Conf
Returns a new instance of Conf.
11 12 13 14 15 |
# File 'lib/nakamura/osgiconf.rb', line 11 def initialize(sling) @sling = sling @log = Logger.new(STDOUT) @log.level = Logger::WARN end |
Instance Attribute Details
#log ⇒ Object
Returns the value of attribute log.
9 10 11 |
# File 'lib/nakamura/osgiconf.rb', line 9 def log @log end |
Instance Method Details
#setProperties(factoryPid, props) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/nakamura/osgiconf.rb', line 17 def setProperties(factoryPid, props) path = "/system/console/configMgr/%5BTemporary%20PID%20replaced%20by%20real%20PID%20upon%20save%5D" props["propertylist"] = props.keys.join(",") props["apply"] = true props["action"] = "ajaxConfigManager" props["factoryPid"] = factoryPid res = @sling.execute_post(@sling.url_for(path), props) if ( res.code != "200" ) @log.debug(res.body) @log.info(" Unable to update config for #{factoryPid}") end return res end |