Class: NotifierPlugin::SendToDataqueueHandlerType

Inherits:
DataqueueHandlerType 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 DataqueueHandlerType

#might_fail

Methods inherited from BaseHandlerType

#generate_attr_map, #might_fail

Constructor Details

#initializeSendToDataqueueHandlerType

Returns a new instance of SendToDataqueueHandlerType.



820
821
822
823
824
825
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 820

def initialize
  super
  @required_attributes = [
    SNDDTQ_VALUE_ATTR
  ] # .to_set
end

Instance Method Details

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



831
832
833
834
835
836
837
838
839
840
841
842
843
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 831

def gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen)
  params = super(handler, join, attrMap, cell, adpt_gen)

  sent_value = attrMap[SNDDTQ_VALUE_ATTR].get_rhs.to_s

  # $id$等の置換
  name_array = cell.get_celltype.get_name_array(cell)
  sent_value = cell.get_celltype.subst_name(sent_value, name_array)

  params << sent_value

      return params
end

#gen_cfg_handler_type(handler) ⇒ Object



845
846
847
848
849
850
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 845

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

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



827
828
829
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 827

def validate_join(handler, cell, join, *args)
  return super(handler, cell, join, *args) && handler == EVENT_HANDLER
end