Mendix Runtime
Documentation for the Mendix Runtime Environment API
com.mendix.systemwideinterfaces.ClientAction Class Reference

List of all members.

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

Detailed Description

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

public RetrieveXPathAction extends ExternalInterfaceAction

public RetrieveXPathAction

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;


Member Function Documentation

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

paramshas to have the same structure as this.params, but instead of ParamType's it should contain values
result should have the same structure as this.returnValue, but instead of ParamType's is should contain values
final IContext com.mendix.systemwideinterfaces.ClientAction.getContext ( )
the context
final String com.mendix.systemwideinterfaces.ClientAction.getDescription ( )
the description
final String com.mendix.systemwideinterfaces.ClientAction.getName ( )
the name
List<String> com.mendix.systemwideinterfaces.ClientAction.getParameterNames ( )
the parameternames
final void com.mendix.systemwideinterfaces.ClientAction.setContext ( IContext  context)
contextthe context
final void com.mendix.systemwideinterfaces.ClientAction.setDescription ( String  description)
descriptionthe description to set
void com.mendix.systemwideinterfaces.ClientAction.setJSONGenerator ( JSONGenerator  generator)
generatorthe json generator to set
void com.mendix.systemwideinterfaces.ClientAction.setMxRuntimeRequest ( IMxRuntimeRequest  request)
requestthe mxruntime request to set
final void com.mendix.systemwideinterfaces.ClientAction.setName ( String  name)
namethe name to set

Member Data Documentation

The documentation for this class was generated from the following file: