public static class

ActionScheduleInfo.Builder

extends Object
java.lang.Object
   ↳ com.urbanairship.automation.ActionScheduleInfo.Builder

Class Overview

Builder class.

Summary

Public Constructors
Builder()
Public Methods
ActionScheduleInfo.Builder addAction(String actionName, JsonSerializable actionValue)
Adds an action.
ActionScheduleInfo.Builder addAllActions(JsonMap actionMap)
Adds a map of actions.
ActionScheduleInfo.Builder addTrigger(Trigger trigger)
Adds a trigger.
ActionScheduleInfo.Builder addTriggers(List<Trigger> triggers)
Adds a list of triggers.
ActionScheduleInfo build()
Builds the ActionScheduleInfo instance.
ActionScheduleInfo.Builder setDelay(ScheduleDelay delay)
Set a schedule delay.
ActionScheduleInfo.Builder setEditGracePeriod(long duration, TimeUnit timeUnit)
Sets the edit grace period after a schedule expires or finishes.
ActionScheduleInfo.Builder setEnd(long end)
Sets the end time in ms.
ActionScheduleInfo.Builder setGroup(String group)
Sets the group.
ActionScheduleInfo.Builder setInterval(long duration, TimeUnit timeUnit)
Sets the execution interval.
ActionScheduleInfo.Builder setLimit(int limit)
Sets the fulfillment limit.
ActionScheduleInfo.Builder setPriority(int priority)
Sets the priority level, in ascending order.
ActionScheduleInfo.Builder setStart(long start)
Sets the start time in ms.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Builder ()

Public Methods

public ActionScheduleInfo.Builder addAction (String actionName, JsonSerializable actionValue)

Adds an action.

Parameters
actionName The action name.
actionValue The action value.
Returns
  • The Builder instance.

public ActionScheduleInfo.Builder addAllActions (JsonMap actionMap)

Adds a map of actions.

Parameters
actionMap A map of action names to action values.
Returns
  • The Builder instance.

public ActionScheduleInfo.Builder addTrigger (Trigger trigger)

Adds a trigger.

Parameters
trigger A trigger instance.
Returns
  • The Builder instance.

public ActionScheduleInfo.Builder addTriggers (List<Trigger> triggers)

Adds a list of triggers.

Parameters
triggers A list of trigger instances.
Returns
  • The Builder instance.

public ActionScheduleInfo build ()

Builds the ActionScheduleInfo instance.

Returns
  • The new ActionScheduleInfo instance.
Throws
IllegalArgumentException if either no actions are set, no triggers or more than TRIGGER_LIMIT triggers are set, or the start time is set after the end time.

public ActionScheduleInfo.Builder setDelay (ScheduleDelay delay)

Set a schedule delay.

Parameters
delay A ScheduleDelay object.
Returns
  • The Builder instance.

public ActionScheduleInfo.Builder setEditGracePeriod (long duration, TimeUnit timeUnit)

Sets the edit grace period after a schedule expires or finishes.

Parameters
duration The grace period.
timeUnit The time unit.
Returns
  • The Builder instance.

public ActionScheduleInfo.Builder setEnd (long end)

Sets the end time in ms.

Parameters
end The end time in ms.
Returns
  • The Builder instance.

public ActionScheduleInfo.Builder setGroup (String group)

Sets the group.

Parameters
group The group.
Returns
  • The Builder instance.

public ActionScheduleInfo.Builder setInterval (long duration, TimeUnit timeUnit)

Sets the execution interval.

Parameters
duration The interval.
timeUnit The time unit.
Returns
  • The Builder instance.

public ActionScheduleInfo.Builder setLimit (int limit)

Sets the fulfillment limit.

Parameters
limit The limit.
Returns
  • The Builder instance.

public ActionScheduleInfo.Builder setPriority (int priority)

Sets the priority level, in ascending order.

Parameters
priority The priority level.
Returns
  • The Builder instance.

public ActionScheduleInfo.Builder setStart (long start)

Sets the start time in ms.

Parameters
start The start time in ms.
Returns
  • The Builder instance.