lib/core/core_controller.rb
# controller_refresh call lorj framework to execute a controller refresh
# task
#
# The controller must respect the following rule:
# - If the refresh was unsuccessful, due to errors, the original object
#   should be kept intact.
# - A boolean should be return to inform that therefresh was executed
#   successfully or not.
#
# * *parameters:*
#   - +object_type+: Lorj object type to use for the refresh.
#   - +object+     : object to refresh.
#
# * *returns*:
#   - boolean: true if refresh was executed successfully.
#     false otherwise.
#
controller_refresh call lorj framework to execute a controller refresh
task

The controller must respect the following rule:
If the refresh was unsuccessful, due to errors, the original object
should be kept intact.
A boolean should be return to inform that therefresh was executed
successfully or not.

*parameters:
+object_type+: Lorj object type to use for the refresh.
+object+     : object to refresh.

*returns*:
boolean: true if refresh was executed successfully.
false otherwise.
controller_refresh call lorj framework to execute a controller refresh task The controller must respect the following rule : If the refresh was unsuccessful due to errors the original object should be kept intact . A boolean should be return to inform that therefresh was executed successfully or not . * parameters : + object_type + : Lorj object type to use for the refresh . + object + : object to refresh . * returns * : boolean : true if refresh was executed successfully . false otherwise .
def controller_refresh(sObjectType, data_obj)
      return false unless data_obj.is_a?(Lorj::Data) && !data_obj.empty?
      controller_obj = data_obj[:object]
      is_refreshed = @controller.refresh(sObjectType, controller_obj)
      PrcLib.runtime_fail "Controller function 'refresh' must return true or "\
                          "false. Class returned: '%s'",
                          is_refreshed.class unless is_refreshed.boolean?
      Lorj.debug(1, '%s.%s - refreshed.',
                 @process.class, sObjectType) if is_refreshed
      data_obj.set(controller_obj, sObjectType) do |sObjType, an_object|
        begin
          _return_map(sObjType, an_object)
        rescue => e
          PrcLib.runtime_fail 'update %s.%s : %s',
                              @process.class, sObjectType, e.message
        end
      end
      is_refreshed
    end
def controller_refresh ( sObjectType , data_obj ) return false unless data_obj . is_a? ( Lorj :: Data ) && ! data_obj . empty? controller_obj = data_obj [ :object ] is_refreshed = @controller . refresh ( sObjectType , controller_obj ) PrcLib . runtime_fail "Controller function 'refresh' must return true or " "false. Class returned: '%s'" , is_refreshed . class unless is_refreshed . boolean? Lorj . debug ( 1 , '%s.%s - refreshed.' , @process . class , sObjectType ) if is_refreshed data_obj . set ( controller_obj , sObjectType ) do | sObjType , an_object | begin _return_map ( sObjType , an_object ) rescue => e PrcLib . runtime_fail 'update %s.%s : %s' , @process . class , sObjectType , e . message end end is_refreshed end
controller_refresh call lorj framework to execute a controller refresh
task
controller_refresh call lorj framework to execute a controller refresh task
sObjectType
<not_specific>
data_obj
<not_specific>