public static class

InAppMessageScheduleInfo.Builder

extends Object
java.lang.Object
   ↳ com.urbanairship.iam.InAppMessageScheduleInfo.Builder

Class Overview

In-app message schedule info builder.

Summary

Public Methods
InAppMessageScheduleInfo.Builder addTrigger(Trigger trigger)
Adds a trigger.
InAppMessageScheduleInfo.Builder addTriggers(List<Trigger> triggers)
Adds a list of triggers.
InAppMessageScheduleInfo build()
Builds the in-app message schedule.
InAppMessageScheduleInfo.Builder setDelay(ScheduleDelay delay)
Set a schedule delay.
InAppMessageScheduleInfo.Builder setEditGracePeriod(long duration, TimeUnit timeUnit)
Sets the edit grace period after a schedule expires or finishes.
InAppMessageScheduleInfo.Builder setEnd(long end)
Sets the end time in ms.
InAppMessageScheduleInfo.Builder setInterval(long duration, TimeUnit timeUnit)
Sets the display interval.
InAppMessageScheduleInfo.Builder setLimit(int limit)
Sets the display limit.
InAppMessageScheduleInfo.Builder setMessage(InAppMessage message)
Sets the in-app message.
InAppMessageScheduleInfo.Builder setPriority(int priority)
Sets the priority level, in ascending order.
InAppMessageScheduleInfo.Builder setStart(long start)
Sets the start time in ms.
InAppMessageScheduleInfo.Builder setTriggers(List<Trigger> triggers)
Sets the list of triggers.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public InAppMessageScheduleInfo.Builder addTrigger (Trigger trigger)

Adds a trigger.

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

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

Adds a list of triggers.

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

public InAppMessageScheduleInfo build ()

Builds the in-app message schedule.

Returns
  • The new in-app message schedule.
Throws
IllegalArgumentException if the no triggers are set, missing a valid in-app message, TRIGGER_LIMIT triggers are set, or the start time is set after the end time.

public InAppMessageScheduleInfo.Builder setDelay (ScheduleDelay delay)

Set a schedule delay.

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

public InAppMessageScheduleInfo.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 InAppMessageScheduleInfo.Builder setEnd (long end)

Sets the end time in ms.

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

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

Sets the display interval.

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

public InAppMessageScheduleInfo.Builder setLimit (int limit)

Sets the display limit.

Parameters
limit The display limit.
Returns
  • The builder instance.

public InAppMessageScheduleInfo.Builder setMessage (InAppMessage message)

Sets the in-app message.

Parameters
message The in-app message.
Returns
  • The builder instance.

public InAppMessageScheduleInfo.Builder setPriority (int priority)

Sets the priority level, in ascending order.

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

public InAppMessageScheduleInfo.Builder setStart (long start)

Sets the start time in ms.

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

public InAppMessageScheduleInfo.Builder setTriggers (List<Trigger> triggers)

Sets the list of triggers.

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