public class

ActionScheduleInfo

extends Object
implements Parcelable ScheduleInfo
java.lang.Object
   ↳ com.urbanairship.automation.ActionScheduleInfo

Class Overview

Class encapsulating the implementor-set information for an action schedule.

Summary

Nested Classes
class ActionScheduleInfo.Builder Builder class. 
Constants
String ACTIONS_KEY Actions json key.
long TRIGGER_LIMIT The triggers limit for a single schedule.
[Expand]
Inherited Constants
From interface android.os.Parcelable
From interface com.urbanairship.automation.ScheduleInfo
Protected Constructors
ActionScheduleInfo(Parcel in)
Public Methods
int describeContents()
Map<StringJsonValue> getActions()
Gets the scheduled actions.
JsonValue getData()
Gets the schedule data.
ScheduleDelay getDelay()
Gets the schedule's delay.
long getEditGracePeriod()
Gets the edit grace period in ms.
long getEnd()
Gets the schedule end time in ms.
String getGroup()
Gets the schedule group.
long getInterval()
Gets the schedule execution interval in ms.
int getLimit()
Gets the schedule fulfillment limit.
int getPriority()
Gets the schedule priority level.
long getStart()
Gets the schedule start time in ms.
List<Trigger> getTriggers()
Gets the action triggers.
static ActionScheduleInfo.Builder newBuilder()
Creates a new Builder instance.
static ActionScheduleInfo parseJson(JsonValue value)
Parses an ActionScheduleInfo from a JsonValue.
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable
From interface com.urbanairship.automation.ScheduleInfo

Constants

public static final String ACTIONS_KEY

Actions json key.

Constant Value: "actions"

public static final long TRIGGER_LIMIT

The triggers limit for a single schedule.

Constant Value: 10 (0x000000000000000a)

Protected Constructors

protected ActionScheduleInfo (Parcel in)

Public Methods

public int describeContents ()

public Map<StringJsonValue> getActions ()

Gets the scheduled actions.

Returns
  • A map of action names to action values.

public JsonValue getData ()

Gets the schedule data.

Returns
  • Schedule data.

public ScheduleDelay getDelay ()

Gets the schedule's delay.

Returns
  • A ScheduleDelay instance.

public long getEditGracePeriod ()

Gets the edit grace period in ms.

Returns
  • The edit grace period in ms.

public long getEnd ()

Gets the schedule end time in ms.

Returns
  • The schedule end time in ms.

public String getGroup ()

Gets the schedule group.

Returns
  • The schedule group.

public long getInterval ()

Gets the schedule execution interval in ms.

Returns
  • The interval in ms.

public int getLimit ()

Gets the schedule fulfillment limit.

Returns
  • The fulfillment limit.

public int getPriority ()

Gets the schedule priority level.

Returns
  • The priority level.

public long getStart ()

Gets the schedule start time in ms.

Returns
  • The schedule start time in ms.

public List<Trigger> getTriggers ()

Gets the action triggers.

Returns
  • A list of triggers.

public static ActionScheduleInfo.Builder newBuilder ()

Creates a new Builder instance.

Returns
  • The Builder instance.

public static ActionScheduleInfo parseJson (JsonValue value)

Parses an ActionScheduleInfo from a JsonValue.

The expected JsonValue is a map containing:
 - "group": Optional. Group identifier. Useful to cancel schedules for a specific campaign.
 - "start": Optional. Start time as an ISO 8601 timestamp. Time before the schedule starts listening for events.
 - "end": Optional. End time as an ISO 8601 timestamp. After the schedule is past the end time it will automatically be canceled.
 - "triggers": Required. An array of triggers.
 - "limit": Optional, defaults to 1. Number of times to trigger the actions payload before cancelling the schedule.
 - "priority": Optional, defaults to 0. In case of conflict, schedules will be executed by priority in ascending order.
 - "actions": Required. Actions payload to run when one or more of the triggers meets its goal.
 - "delay": Optional ScheduleDelay.
 

Parameters
value The schedule.
Returns
  • The parsed ActionScheduleInfo.
Throws
JsonException If the JsonValue does not produce a valid ActionScheduleInfo.

public void writeToParcel (Parcel dest, int flags)