|
| MSAction (int id, String actionName, int ruleID, String ruleName, int actionType, JSONObject meta, Date created, Date updated, String status) |
|
int | getActionID () |
|
String | getName () |
|
MSActionType | getType () |
|
HashMap< String, Object > | getMessage () |
|
void | setMessage (HashMap< String, Object > msg) |
|
int | getRuleID () |
|
void | setRuleID (int id) |
|
String | getRuleName () |
|
void | setRuleName (String name) |
|
JSONObject | getMeta () |
|
void | setMeta (JSONObject meta) |
|
String | getStatus () |
|
void | setStatus (String newstat) |
|
Date | getCreated () |
|
void | setCreated (Date date) |
|
Date | getUpdated () |
|
void | setUpdated (Date date) |
|
void | executeWebhook (final Context context, HashMap< String, String > postParams, final HashMap< String, String > additionalHeaders, final WebhookHandler handler) throws MSException |
|
| MSAction (Parcel p) |
|
| ModelBase (Object...objects) |
|
|
static final String | idString = "_id" |
|
static final String[] | base_columns = { idString } |
|
void com.mobstac.beaconstac.models.MSAction.executeWebhook |
( |
final Context |
context, |
|
|
HashMap< String, String > |
postParams, |
|
|
final HashMap< String, String > |
additionalHeaders, |
|
|
final WebhookHandler |
handler |
|
) |
| throws MSException |
This method must be called when action type is webhook. This posts data to the URL configured in Beaconstac developer portal. Throws MSException if called on an action that is not of type Webhook.
- Parameters
-
context | An instance of context |
postParams | A dictionary of data that you want to post to the URL. Please note that timestamp and data available in factsDictionary is automatically posted. |
additionalHeaders | A dictionary of HTTP headers with values. Plesae note that HTTP headers sent from the portal are set by default |
handler | A class that implements WebhookHandler to take care of success and error handlers |
int com.mobstac.beaconstac.models.MSAction.getActionID |
( |
| ) |
|
Returns the ID of the action
Date com.mobstac.beaconstac.models.MSAction.getCreated |
( |
| ) |
|
- Returns
- the date when the action was created
HashMap<String, Object> com.mobstac.beaconstac.models.MSAction.getMessage |
( |
| ) |
|
Returns the message of the action. This is a HashMap. Message HashMap can have keys: text, url depending on the type of action
JSONObject com.mobstac.beaconstac.models.MSAction.getMeta |
( |
| ) |
|
- Returns
- A dictionary that contains meta information associated with the action
String com.mobstac.beaconstac.models.MSAction.getName |
( |
| ) |
|
Returns the name of the action
int com.mobstac.beaconstac.models.MSAction.getRuleID |
( |
| ) |
|
Returns the rule ID associated to the action
String com.mobstac.beaconstac.models.MSAction.getRuleName |
( |
| ) |
|
Returns the name of the rule this action is associated with
String com.mobstac.beaconstac.models.MSAction.getStatus |
( |
| ) |
|
- Returns
- the status of action This can have following values - A - active P - paused R - removed
MSActionType com.mobstac.beaconstac.models.MSAction.getType |
( |
| ) |
|
Returns the type of the action. This can have values: popup, webpage, video, audio, custom
Date com.mobstac.beaconstac.models.MSAction.getUpdated |
( |
| ) |
|
- Returns
- the date when the action was last updated
void com.mobstac.beaconstac.models.MSAction.setCreated |
( |
Date |
date | ) |
|
Set the date when the action was created
- Parameters
-
void com.mobstac.beaconstac.models.MSAction.setMessage |
( |
HashMap< String, Object > |
msg | ) |
|
Set the message of the action.
- Parameters
-
msg | HashMap with keys text, url etc. depending on the type of action |
void com.mobstac.beaconstac.models.MSAction.setMeta |
( |
JSONObject |
meta | ) |
|
Set meta dictionary
- Parameters
-
void com.mobstac.beaconstac.models.MSAction.setRuleID |
( |
int |
id | ) |
|
Set the rule id
- Parameters
-
void com.mobstac.beaconstac.models.MSAction.setRuleName |
( |
String |
name | ) |
|
Sets the name of the rule this action is associated with
- Parameters
-
void com.mobstac.beaconstac.models.MSAction.setStatus |
( |
String |
newstat | ) |
|
Set the action status
- Parameters
-
void com.mobstac.beaconstac.models.MSAction.setUpdated |
( |
Date |
date | ) |
|
Set the date when the action was last updated
- Parameters
-
The documentation for this class was generated from the following file: