public final class Reminder
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static Duration |
MaxInterval
The maximum time interval that can be set as value of
setTimeInterval(com.mindfusion.common.Duration)
for a Reminder object. |
Constructor and Description |
---|
Reminder()
Initializes a new instance of the
Reminder class. |
Modifier and Type | Method and Description |
---|---|
Reminder |
clone()
Clones this
Reminder object. |
java.lang.String |
getMessage()
Gets the message to display as a reminder.
|
boolean |
getPlaySound()
Gets a value indicating whether to play a sound when the reminder is triggered.
|
java.lang.String |
getSoundFileName()
Gets the name of a sound file to play with this reminder.
|
DateTime |
getTime()
Gets the exact time when to trigger the reminder.
|
Duration |
getTimeInterval()
Gets how much time before the item's scheduled start
time to raise the event that triggers the reminder.
|
ReminderType |
getType()
Gets the type of this reminder.
|
void |
loadFrom(org.w3c.dom.Element element,
XmlSerializationContext context)
Loads reminder data from an XML document.
|
void |
loadFrom(JsonObject obj,
JsonSerializationContext context)
Loads the reminder from a JSON object.
|
void |
saveTo(org.w3c.dom.Element element,
XmlSerializationContext context)
Saves the reminder data to an XML document.
|
void |
saveTo(JsonObject obj,
JsonSerializationContext context)
Saves the reminder as a JSON object.
|
void |
setMessage(java.lang.String value)
Sets the message to display as a reminder.
|
void |
setPlaySound(boolean value)
Sets a value indicating whether to play a sound when the reminder is triggered.
|
void |
setSoundFileName(java.lang.String value)
Sets the name of a sound file to play with this reminder.
|
void |
setTime(DateTime value)
Sets the exact time when to trigger the reminder.
|
void |
setTimeInterval(Duration value)
Sets how much time before the item's scheduled start
time to raise the event that triggers the reminder.
|
void |
setType(ReminderType value)
Sets the type of this reminder.
|
public static final Duration MaxInterval
setTimeInterval(com.mindfusion.common.Duration)
for a Reminder
object.public Reminder()
Reminder
class.public Reminder clone()
Reminder
object.clone
in class java.lang.Object
public void saveTo(org.w3c.dom.Element element, XmlSerializationContext context)
element
- Allows adding data to the XML document.context
- The context object contains the file format revision number
of the schedule being loaded. It also provides methods that
facilitate reading and writing various data types from and
to the XML document.public void loadFrom(org.w3c.dom.Element element, XmlSerializationContext context)
element
- Allows reading data from the XML document.context
- The context object contains the file format revision number
of the schedule being loaded. It also provides methods that
facilitate reading and writing various data types from and
to the XML document.public void saveTo(JsonObject obj, JsonSerializationContext context)
obj
- A JsonObject instance to contain the serialized data.context
- A JsonSerializationContext object providing contextual information about the serialization process and helper serialization methods.public void loadFrom(JsonObject obj, JsonSerializationContext context)
obj
- A JsonObject containing the reminder's data.context
- A JsonSerializationContext object providing contextual information about the serialization process and helper serialization methods.public ReminderType getType()
ReminderType
constants.public void setType(ReminderType value)
value
- One of the ReminderType
constants.public Duration getTimeInterval()
Duration
instance specifying how much time
before event's scheduled time to trigger the reminder.public void setTimeInterval(Duration value)
value
- A Duration
instance specifying how much time
before event's scheduled time to trigger the reminder.public DateTime getTime()
The value of this property is considered only if the Type of the reminder
is set to Exact
.
DateTime
object specifying when the reminder should be triggered.public void setTime(DateTime value)
The value of this property is considered only if the Type of the reminder
is set to Exact
.
value
- A DateTime
object specifying when the reminder should be triggered.public java.lang.String getMessage()
public void setMessage(java.lang.String value)
value
- A string containing the message text.public boolean getPlaySound()
The path to the sound file can be set in the SoundFileName
property.
public void setPlaySound(boolean value)
The path to the sound file can be set in the SoundFileName
property.
value
- true to play the sound file; otherwise, false.public java.lang.String getSoundFileName()
public void setSoundFileName(java.lang.String value)
value
- A string specifying which file to play.