Class: Operaton::Bpm::Client::Variable::Impl::Mapper::XmlValueMapper

Inherits:
PrimitiveValueMapper show all
Defined in:
lib/operaton/bpm/client/variable/impl/mapper/xml_value_mapper.rb

Overview

Mirrors org.operaton.bpm.client.variable.impl.mapper.XmlValueMapper

Instance Attribute Summary

Attributes inherited from AbstractTypedValueMapper

#value_type

Instance Method Summary collapse

Methods inherited from PrimitiveValueMapper

#read_value

Methods inherited from AbstractTypedValueMapper

#can_handle_typed_value, #can_handle_typed_value_field, #serialization_dataformat, #type

Methods included from ValueMapper

#can_handle_typed_value, #can_handle_typed_value_field, #read_value, #serialization_dataformat, #type

Constructor Details

#initializeXmlValueMapper

Returns a new instance of XmlValueMapper.



14
15
16
# File 'lib/operaton/bpm/client/variable/impl/mapper/xml_value_mapper.rb', line 14

def initialize
  super(ClientValues::XML)
end

Instance Method Details

#convert_to_typed_value(untyped_value) ⇒ Object



18
19
20
# File 'lib/operaton/bpm/client/variable/impl/mapper/xml_value_mapper.rb', line 18

def convert_to_typed_value(untyped_value)
  ClientValues.xml_value(untyped_value.value)
end

#read_typed_value(typed_value_field) ⇒ Object



26
27
28
# File 'lib/operaton/bpm/client/variable/impl/mapper/xml_value_mapper.rb', line 26

def read_typed_value(typed_value_field)
  ClientValues.xml_value(typed_value_field.value)
end

#write_value(xml_value, typed_value_field) ⇒ Object



22
23
24
# File 'lib/operaton/bpm/client/variable/impl/mapper/xml_value_mapper.rb', line 22

def write_value(xml_value, typed_value_field)
  typed_value_field.value = xml_value.value
end