Class: NotifierPlugin::UserHandlerType

Inherits:
BaseHandlerType show all
Defined in:
lib/tecsgen/plugin/NotifierPlugin.rb

Instance Attribute Summary

Attributes inherited from BaseHandlerType

#required_attributes

Instance Method Summary collapse

Methods inherited from BaseHandlerType

#generate_attr_map, #initialize, #might_fail

Constructor Details

This class inherits a constructor from NotifierPlugin::BaseHandlerType

Instance Method Details

#gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen) ⇒ Object



882
883
884
885
886
887
888
889
890
891
892
893
894
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 882

def gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen)
  # tTimeEventHandlerの結合先を取得
  handler_cell = join.get_rhs_cell
    call_join = handler_cell.get_join_list.get_item(:ciHandlerBody)

  # 結合されていない場合はtecsgenがエラーを出すはずなのでここでは
  # エラーにせず無視する.
  return [] unless call_join

  # アダプタ関数ハンドルを取得
  adapter_handle = adpt_gen.make_adapter_handle(call_join)
      return [adapter_handle[1], adapter_handle[0]]
end

#gen_cfg_handler_type(handler) ⇒ Object



875
876
877
878
879
880
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 875

def gen_cfg_handler_type(handler)
  case handler
    when EVENT_HANDLER then return "TNFY_HANDLER"
    else raise "unknown handler #{handler}"
  end
end

#validate_join(handler, cell, join, *args) ⇒ Object



869
870
871
872
873
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 869

def validate_join(handler, cell, join, *args)
  return super(handler, cell, join, *args) &&
    handler != ERROR_HANDLER && # invalid for error handler
    join && join.get_rhs_cell.get_celltype.get_name == :tTimeEventHandler
end