Proxy.ReminderROpublic static interface Proxy.Reminder extends Proxy.ReminderRO
node.reminder - read-write. For creating and modifying reminders:
def reminder = node.reminder
if (!reminder)
c.statusInfo = "node has no reminder"
else
c.statusInfo = "node has a reminder: $reminder"
def inAMinute = new Date(System.currentTimeMillis() + 60*1000)
node.reminder.createOrReplace(inAMinute, "WEEK", 2)
if (node.map.file) {
node.reminder.setScript("loadUri(new URI('${node.map.file.toURI()}#${node.id}'))")
}
// a click on the node opens time management dialog
node.link.text = 'menuitem:_$TimeListAction$0'
| Modifier and Type | Method | Description |
|---|---|---|
void |
createOrReplace(Date remindAt,
String periodUnit,
Integer period) |
Creates a periodic reminder.
|
void |
remove() |
removes a reminder from a node.
|
void |
setScript(String scriptSource) |
optional: a Groovy script to execute when the reminder fires.
|
getPeriod, getPeriodUnit, getRemindAt, getScriptvoid createOrReplace(Date remindAt, String periodUnit, Integer period)
node.reminder.createOrReplace(new Date() + 1, "WEEK", 2)
remindAt - The timestamp when the reminder fires first.periodUnit - one of ["MINUTE", "HOUR", "DAY", "WEEK", "MONTH", "YEAR"].period - counts the periodUnits.void setScript(String scriptSource)
scriptSource - the script itself, not a path to a file.NullPointerException - if there is no reminder yet.void remove()