public class

ActionScheduleInfo

extends Object
implements Parcelable
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
long TRIGGER_LIMIT The triggers limit for a single schedule.
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<ActionScheduleInfo> CREATOR
Protected Constructors
ActionScheduleInfo(Parcel in)
Public Methods
int describeContents()
Map<StringJsonValue> getActions()
Gets the scheduled actions.
long getEnd()
Gets the schedule end time in MS.
String getGroup()
Gets the schedule group.
int getLimit()
Gets the schedule fulfillment limit.
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

Constants

public static final long TRIGGER_LIMIT

The triggers limit for a single schedule.

Constant Value: 10 (0x000000000000000a)

Fields

public static final Creator<ActionScheduleInfo> CREATOR

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 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 int getLimit ()

Gets the schedule fulfillment limit.

Returns
  • The fulfillment limit.

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. Trigger payload as defined by Trigger#predicate.
 - "limit": Optional, defaults to 1. Number of times to trigger the actions payload before cancelling the schedule.
 - "actions": Required. Actions payload to run when one or more of the triggers meets its goal.

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)