Class: CPEE::Properties::PutExecutionHandler

Inherits:
Riddl::Implementation
  • Object
show all
Defined in:
lib/cpee/implementation_properties.rb

Overview

}}}

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.set(id, opts, hw) ⇒ Object

{{{



333
334
335
336
337
338
339
340
341
342
343
344
345
# File 'lib/cpee/implementation_properties.rb', line 333

def self::set(id,opts,hw)
  CPEE::Persistence::set_item(id,opts,'executionhandler',:executionhandler => hw)
  desc = CPEE::Persistence::extract_item(id,opts,'description')
  dslx = CPEE::Persistence::extract_item(id,opts,'dslx')
  xml = XML::Smart::string(dslx)
  xml.register_namespace 'd', 'http://cpee.org/ns/description/1.0'
  dsl = Object.const_get('CPEE::ExecutionHandler::' + hw.capitalize)::dslx_to_dsl(xml)
  CPEE::Persistence::set_item(id,opts,'description',
    :description => xml,
    :dslx => dslx,
    :dsl => dsl
  )
end

Instance Method Details

#responseObject



346
347
348
349
350
351
352
353
354
355
# File 'lib/cpee/implementation_properties.rb', line 346

def response
  id = @a[0]
  opts = @a[1]
  if opts[:statemachine].readonly? id
    @status = 423
  else
    PutExecutionHandler::set(id,opts,@p[0].value)
  end
  nil
end