lib/core/core_object_params.rb
# internal runtime function for process call
# Build a process/controller parameters object (ObjectData)
#
# *parameters*:
#   - +object_type+       : object type requiring parameters.
#   - +sEventType+        : event type used to call the process
#   - +fname+             : caller function
#   - +as_controller+     : true to store parameters for controller.
#                           false to store parameters for process.
#
# *return*:
# - ObjectData : list of data and objects wanted by the process or
#                the controller. In case of the controller, hdata
#                controller map is also added.
#
# *raise*:
# - runtime error if required data is not set. (empty or nil)
#
internal runtime function for process call
Build a process/controller parameters object (ObjectData)

parameters*:
+object_type+       : object type requiring parameters.

return*:
ObjectData : list of data and objects wanted by the process or
the controller. In case of the controller, hdata
controller map is also added.

raise*:
runtime error if required data is not set. (empty or nil)
internal runtime function for process call Build a process / controller parameters object ( ObjectData ) parameters * : + object_type + : object type requiring parameters . return * : ObjectData : list of data and objects wanted by the process or the controller . In case of the controller hdata controller map is also added . raise * : runtime error if required data is not set . ( empty or nil )
def _get_object_params(object_type, sEventType, fname, as_controller,
                           new_params = nil)
      obj_params = PrcLib.model.meta_obj.rh_get(object_type, :params, :keys)
      PrcLib.runtime_fail "%s:'%s' Object data needs not set. Forgot "\
                           'obj_needs?', fname, object_type if obj_params.nil?
      if new_params.nil?
        new_params = _obj_param_init(object_type, sEventType, as_controller)
      end
      _object_params_event(object_type, sEventType).each do |param_obj|
        param_options = obj_params[param_obj.fpath]
        value = _build_param(new_params, param_obj, param_options)
        if as_controller && !value.nil?
          _build_hdata(object_type, new_params, param_obj, param_options, value)
        end
      end
      unless fname == :update_params
        new_params.refresh_set(self, object_type, sEventType, as_controller)
      end
      new_params
    end
def _get_object_params ( object_type , sEventType , fname , as_controller , new_params = nil ) obj_params = PrcLib . model . meta_obj . rh_get ( object_type , :params , :keys ) PrcLib . runtime_fail "%s:'%s' Object data needs not set. Forgot " 'obj_needs?' , fname , object_type if obj_params . nil? if new_params . nil? new_params = _obj_param_init ( object_type , sEventType , as_controller ) end _object_params_event ( object_type , sEventType ) . each do | param_obj | param_options = obj_params [ param_obj . fpath ] value = _build_param ( new_params , param_obj , param_options ) if as_controller && ! value . nil? _build_hdata ( object_type , new_params , param_obj , param_options , value ) end end unless fname == :update_params new_params . refresh_set ( self , object_type , sEventType , as_controller ) end new_params end
internal runtime function for process call
Build a process/controller parameters object (ObjectData)
internal runtime function for process call Build a process / controller parameters object ( ObjectData )
# Building handler parameters # hdata is built for controller. ie, ObjectData is NOT internal.
object_type
<not_specific>
sEventType
<not_specific>
fname
<not_specific>
as_controller
<not_specific>
new_params
<not_specific>