webmcp

annotate framework/env/execute/filtered_action.lua @ 382:810c020b0da4

Reverted changes to mondelefant_result_index and mondelefant_result_newindex C-functions (proxying of JSON document)
author jbe
date Mon Nov 16 18:31:49 2015 +0100 (2015-11-16)
parents eb3e236d261d
children
rev   line source
jbe/bsw@0 1 --[[--
jbe/bsw@0 2 action_status = -- status code returned by the action (a string)
jbe/bsw@0 3 execute.filtered_action{
jbe/bsw@0 4 module = module, -- module name of the action to be executed
jbe/bsw@0 5 action = action, -- name of the action to be executed
jbe/bsw@0 6 id = id, -- id to be returned by param.get_id(...) during execution
jbe/bsw@0 7 params = params -- parameters to be returned by param.get(...) during execution
jbe/bsw@0 8 }
jbe/bsw@0 9
jbe/bsw@0 10 Executes an action with associated filters.
jbe/bsw@0 11
jbe/bsw@0 12 --]]--
jbe/bsw@0 13
jbe/bsw@0 14 function execute.filtered_action(args)
jbe/bsw@0 15 local result
jbe/bsw@0 16 execute.multi_wrapped(
jbe@206 17 execute._create_sorted_execution_list(
jbe@206 18 function(add_by_path)
jbe@206 19 add_by_path("_filter")
jbe@206 20 add_by_path("_filter_action")
jbe@206 21 add_by_path(WEBMCP_APP_NAME, "_filter")
jbe@206 22 add_by_path(WEBMCP_APP_NAME, "_filter_action")
jbe@206 23 add_by_path(WEBMCP_APP_NAME, args.module, "_filter")
jbe@206 24 add_by_path(WEBMCP_APP_NAME, args.module, "_filter_action")
jbe@206 25 end,
jbe@206 26 function(full_path, relative_path)
jbe@206 27 trace.enter_filter{ path = relative_path }
jbe@206 28 execute.file_path{ file_path = full_path }
jbe@206 29 trace.execution_return()
jbe@206 30 end
jbe@206 31 ),
jbe/bsw@0 32 function()
jbe/bsw@0 33 result = execute.action(args)
jbe/bsw@0 34 end
jbe/bsw@0 35 )
jbe/bsw@0 36 return result
jbe/bsw@0 37 end

Impressum / About Us