public class

Automation

extends AirshipComponent
java.lang.Object
   ↳ com.urbanairship.AirshipComponent
     ↳ com.urbanairship.automation.Automation

Class Overview

This class is the primary interface to the Urban Airship On Device Automation API. If accessed outside of the main process, the class methods will no-op.

Summary

Constants
long SCHEDULES_LIMIT Automation schedules limit.
Public Methods
Future<Void> cancel(Collection<String> ids)
Cancels schedules for a given list of schedule IDs.
Future<Void> cancel(String id)
Cancels a schedule for a given schedule ID.
Future<Void> cancelAll()
Cancels all schedules.
PendingResult<Boolean> cancelGroup(String group)
Cancels a group of schedules.
PendingResult<ActionSchedule> getSchedule(String scheduleId)
Gets a schedule for the given schedule ID.
PendingResult<Collection<ActionSchedule>> getSchedules(String group)
Gets all schedules for a given group.
PendingResult<Collection<ActionSchedule>> getSchedules(Set<String> scheduleIds)
Gets a list of schedules with the given IDs.
PendingResult<Collection<ActionSchedule>> getSchedules()
Gets all the schedules.
PendingResult<ActionSchedule> schedule(ActionScheduleInfo scheduleInfo)
Schedules a single action schedule.
PendingResult<List<ActionSchedule>> schedule(List<ActionScheduleInfo> scheduleInfos)
Schedules a list of action schedules.
Protected Methods
void init()
Initialize the manager.
void tearDown()
Tear down the manager.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final long SCHEDULES_LIMIT

Automation schedules limit.

Constant Value: 100 (0x0000000000000064)

Public Methods

public Future<Void> cancel (Collection<String> ids)

Cancels schedules for a given list of schedule IDs.

Parameters
ids The list of schedule IDs.
Returns
  • A pending result.

public Future<Void> cancel (String id)

Cancels a schedule for a given schedule ID.

Parameters
id The schedule ID.
Returns
  • A pending result.

public Future<Void> cancelAll ()

Cancels all schedules.

Returns
  • A pending result.

public PendingResult<Boolean> cancelGroup (String group)

Cancels a group of schedules.

Parameters
group The schedule group.
Returns
  • A pending result.

public PendingResult<ActionSchedule> getSchedule (String scheduleId)

Gets a schedule for the given schedule ID.

Parameters
scheduleId The schedule ID.
Returns
  • A pending result.

public PendingResult<Collection<ActionSchedule>> getSchedules (String group)

Gets all schedules for a given group.

Parameters
group The group.
Returns
  • A pending result.

public PendingResult<Collection<ActionSchedule>> getSchedules (Set<String> scheduleIds)

Gets a list of schedules with the given IDs.

Parameters
scheduleIds The requested schedule IDs.
Returns
  • A pending result.

public PendingResult<Collection<ActionSchedule>> getSchedules ()

Gets all the schedules.

Returns
  • A pending result.

public PendingResult<ActionSchedule> schedule (ActionScheduleInfo scheduleInfo)

Schedules a single action schedule.

Parameters
scheduleInfo The ActionScheduleInfo instance.
Returns
  • A pending result.

public PendingResult<List<ActionSchedule>> schedule (List<ActionScheduleInfo> scheduleInfos)

Schedules a list of action schedules.

Parameters
scheduleInfos A list of ActionScheduleInfo.
Returns
  • A pending result.

Protected Methods

protected void init ()

Initialize the manager. Called in UAirship during takeoff.

protected void tearDown ()

Tear down the manager. Called in UAirship during land.