![]() |
Mendix Runtime
Documentation for the Mendix Runtime Environment API
|
Public Member Functions | |
| abstract Map< String,?extends Object > | execute (JSONObject params) throws Exception |
| final String | getName () |
| final String | getDescription () |
| final void | setContext (IContext context) |
| final IContext | getContext () |
| final void | setName (String name) |
| final void | setDescription (String description) |
| void | setJSONGenerator (JSONGenerator generator) |
| ClientAction | clone () |
| List< String > | getParameterNames () |
| void | setMxRuntimeRequest (IMxRuntimeRequest request) |
Protected Member Functions | |
| Map< String,?extends Object > | convertJSONObject (JSONObject jsonObject) throws JSONException |
| List<?extends Object > | convertJSONArray (JSONArray array) throws JSONException |
Protected Attributes | |
| IContext | context |
| IMxRuntimeRequest | request |
| JSONGenerator | generator |
Abstract class used to define ExternalInterface actions
The definition consist of three element: name, params and returnValue
name: unique name identifying this action
params: number of params defined by name and ParamType
returnValue: result of executing this action, defined by name-ParamType pairs
Example:
public RetrieveXPathAction extends ExternalInterfaceAction
{
public RetrieveXPathAction
{
this.setName("retrieveXPath");
}
public abstract Map<String, Object> execute(Map<String, Object> params)
{
String xpath = (String) params.get("xpath");
Integer limit = (Integer) params.get("limit");
Integer offset = (Integer) params.get("offset");
Map<String,String> sort = (Map<String,String>) params.get("sort");
Integer depth = (Integer) params.get("depth");
List<IMendixObject> mxobjects = Core.retrieveXPath(xpath, limit, offset, sort, depth);
Map<String, Object> result = new LinkedHashMap<String, Object>();
result.put("mxobjects", mxobjects);
return result;
}
}
| ClientAction com.mendix.systemwideinterfaces.ClientAction.clone | ( | ) |
| List<? extends Object> com.mendix.systemwideinterfaces.ClientAction.convertJSONArray | ( | JSONArray | array | ) | throws JSONException [protected] |
| Map<String,? extends Object> com.mendix.systemwideinterfaces.ClientAction.convertJSONObject | ( | JSONObject | jsonObject | ) | throws JSONException [protected] |
| abstract Map<String, ? extends Object> com.mendix.systemwideinterfaces.ClientAction.execute | ( | JSONObject | params | ) | throws Exception [pure virtual] |
Execute this action
| params | has to have the same structure as this.params, but instead of ParamType's it should contain values |
| final IContext com.mendix.systemwideinterfaces.ClientAction.getContext | ( | ) |
| final String com.mendix.systemwideinterfaces.ClientAction.getDescription | ( | ) |
| final String com.mendix.systemwideinterfaces.ClientAction.getName | ( | ) |
| List<String> com.mendix.systemwideinterfaces.ClientAction.getParameterNames | ( | ) |
| final void com.mendix.systemwideinterfaces.ClientAction.setContext | ( | IContext | context | ) |
| context | the context |
| final void com.mendix.systemwideinterfaces.ClientAction.setDescription | ( | String | description | ) |
| description | the description to set |
| void com.mendix.systemwideinterfaces.ClientAction.setJSONGenerator | ( | JSONGenerator | generator | ) |
| generator | the json generator to set |
| void com.mendix.systemwideinterfaces.ClientAction.setMxRuntimeRequest | ( | IMxRuntimeRequest | request | ) |
| request | the mxruntime request to set |
| final void com.mendix.systemwideinterfaces.ClientAction.setName | ( | String | name | ) |
| name | the name to set |
JSONGenerator com.mendix.systemwideinterfaces.ClientAction.generator [protected] |
IMxRuntimeRequest com.mendix.systemwideinterfaces.ClientAction.request [protected] |