public abstract class CordovaAction
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
action |
protected org.json.JSONArray |
args |
protected org.apache.cordova.CallbackContext |
callbackContext |
protected org.apache.cordova.CordovaInterface |
cordova |
Constructor and Description |
---|
CordovaAction(java.lang.String action,
org.json.JSONArray args,
org.apache.cordova.CallbackContext callbackContext,
org.apache.cordova.CordovaInterface cordova) |
Modifier and Type | Method and Description |
---|---|
protected org.json.JSONObject |
checkJsonArgs(org.json.JSONArray args,
java.lang.String[] reqArgs)
Tests if args are available and all required parameters exist.
|
java.lang.String |
getAction() |
void |
run()
Log a message which action is running
|
protected java.lang.String action
protected org.json.JSONArray args
protected org.apache.cordova.CallbackContext callbackContext
protected org.apache.cordova.CordovaInterface cordova
public CordovaAction(java.lang.String action, org.json.JSONArray args, org.apache.cordova.CallbackContext callbackContext, org.apache.cordova.CordovaInterface cordova)
public java.lang.String getAction()
protected org.json.JSONObject checkJsonArgs(org.json.JSONArray args, java.lang.String[] reqArgs) throws org.json.JSONException, java.lang.Exception
args
- JSONArray where at index 0 a JSONObect is expectedreqArgs
- String[] which lists all required argsorg.json.JSONException
java.lang.Exception
public void run()
run
in interface java.lang.Runnable