<p>TheVALARM
calendar component MUST include theACTION
andTRIGGER
properties. TheACTION
property further constrains theVALARM
calendar component in the following ways:</p>
public class VAlarm extends VDescribableBase<VAlarm> implements VDescribable2<VAlarm>, VAttendee<VAlarm>, VDuration<VAlarm>
<p><h2>VALARM</h2> Alarm Component<br> RFC 5545 iCalendar 3.6.6. page 71</p>
<p>The body of the iCalendar object is defined by the following
notation:
<ul>
<li>alarmc
<ul>
<li>"BEGIN" ":" "VALARM" CRLF
<li>(audioprop / dispprop / emailprop)
<li> "END" ":" "VALARM" CRLF
</ul>
<li>audioprop
<ul>
<li>The following are REQUIRED, but MUST NOT occur more than once.
<ul>
<li>ACTION
<li>TRIGGER
</ul>
<li>The following are OPTIONAL, but MUST NOT occur more than once; but if one occurs, so MUST the other.
<ul>
<li>DURATION
<li>REPEAT
</ul>
<li>The following are OPTIONAL, but MUST NOT occur more than once.
<ul>
<li>ATTACH
</ul>
<li>The following are OPTIONAL, and MAY occur more than once.
<ul>
<li>IANA-PROP
<li>X-PROP
</ul>
</ul>
<li>dispprop
<ul>
<li>The following are REQUIRED, but MUST NOT occur more than once.
<ul>
<li>ACTION
<li>DESCRIPTION
<li>TRIGGER
</ul>
<li>The following are OPTIONAL, but MUST NOT occur more than once; but if one occurs, so MUST the other.
<ul>
<li>DURATION
<li>REPEAT
</ul>
<li>The following are OPTIONAL, and MAY occur more than once.
<ul>
<li>IANA-PROP
<li>X-PROP
</ul>
</ul>
<li>emailprop
<ul>
<li>The following are REQUIRED, but MUST NOT occur more than once.
<ul>
<li>ACTION
<li>DESCRIPTION
<li>SUMMARY
<li>TRIGGER
</ul>
<li>The following are REQUIRED, but MAY occur more than once.
<ul>
<li>ATTENDEE
</ul>
<li>The following are OPTIONAL, but MUST NOT occur more than once; but if one occurs, so MUST the other.
<ul>
<li>DURATION
<li>REPEAT
</ul>
<li>The following are OPTIONAL, and MAY occur more than once.
<ul>
<li>ATTACH
<li>X-PROP
</ul>
</ul>
</ul>
<p>Provide a grouping of component properties that define an alarm.</p>
<p>Description: A VALARM
calendar component is a grouping of
component properties that is a reminder or alarm for an event or a
to-do. For example, it may be used to define a reminder for a
pending event or an overdue to-do.</p>
<p>When the action is "AUDIO", the alarm can also include one and
only one ATTACH
property, which MUST point to a sound resource,
which is rendered when the alarm is triggered.</p>
<p>When the action is "DISPLAY", the alarm MUST also include a
DESCRIPTION
property, which contains the text to be displayed
when the alarm is triggered.</p>
<p>When the action is "EMAIL", the alarm MUST include aDESCRIPTION
property, which contains the text to be used as the message body, aSUMMARY
property, which contains the text to be used as the message subject, and one or moreATTENDEE
properties, which contain the email address of attendees to receive the message. It can also include one or moreATTACH
properties, which are intended to be sent as message attachments. When the alarm is triggered, the email message is sent.</p>
<p>TheTRIGGER
property specifies when the alarm will be triggered. TheTRIGGER
property specifies a duration prior to the start of an event or a to-do. TheTRIGGER
edge may be explicitly set to be relative to the "START" or "END" of the event or to-do with the "RELATED" parameter of theTRIGGER
property. TheTRIGGER
property value type can alternatively be set to an absolute calendar date with UTC time.</p>
<p>In an alarm set to trigger on the "START" of an event or to-do, theDTSTART
property MUST be present in the associated event or to-do. In an alarm in aVEVENT
calendar component set to trigger on the "END" of the event, either theDTEND
property MUST be present, or theDTSTART
andDURATION
properties MUST both be present. In an alarm in aVTODO
calendar component set to trigger on the "END" of the to-do, either the "DUE" property MUST be present, or theDTSTART
andDURATION
properties MUST both be present.</p>
<p>The alarm can be defined such that it triggers repeatedly. A definition of an alarm with a repeating trigger MUST include both theDURATION
andREPEAT
properties. TheDURATION
property specifies the delay period, after which the alarm will repeat. TheREPEAT
property specifies the number of additional repetitions that the alarm will be triggered. This repetition count is in addition to the initial triggering of the alarm. Both of these properties MUST be present in order to specify a repeating alarm. If one of these two properties is absent, then the alarm will not repeat beyond the initial trigger.</p>
<p>TheACTION
property is used within theVALARM
calendar component to specify the type of action invoked when the alarm is triggered. TheVALARM
properties provide enough information for a specific action to be invoked. It is typically the responsibility of a "Calendar User Agent" (CUA) to deliver the alarm in the specified fashion. AnACTION
property value of AUDIO specifies an alarm that causes a sound to be played to alert the user; DISPLAY specifies an alarm that causes a text message to be displayed to the user; and EMAIL specifies an alarm that causes an electronic email message to be delivered to one or more email addresses.</p>
<p>In an AUDIO alarm, if the optionalATTACH
property is included, it MUST specify an audio sound resource. The intention is that the sound will be played as the alarm effect. If anATTACH
property is specified that does not refer to a sound resource, or if the specified sound resource cannot be rendered (because its format is unsupported, or because it cannot be retrieved), then the CUA or other entity responsible for playing the sound may choose a fallback action, such as playing a built-in default sound, or playing no sound at all.</p>
<p>In a DISPLAY alarm, the intended alarm effect is for the text
value of the DESCRIPTION
property to be displayed to the user.</p>
<p>In an EMAIL alarm, the intended alarm effect is for an email message to be composed and delivered to all the addresses specified by theATTENDEE
properties in theVALARM
calendar component. TheDESCRIPTION
property of theVALARM
calendar component MUST be used as the body text of the message, and theSUMMARY
property MUST be used as the subject text. AnyATTACH
properties in theVALARM
calendar component SHOULD be sent as attachments to the message.</p>
<p>Note: Implementations should carefully consider whether they accept alarm components from untrusted sources, e.g., when importing calendar objects from external sources. One reasonable policy is to always ignore alarm components that the calendar user has not set herself, or at least ask for confirmation in such a case.</p>
Type | Property and Description |
---|---|
javafx.beans.property.ObjectProperty<Action> |
action
<p>Defines the action to be invoked when an alarm is triggered.<br>
RFC 5545 iCalendar 3.8.6.1 page 132</p>
<p>actionvalue = "AUDIO" / "DISPLAY" / "EMAIL" / iana-token / x-name</p>
|
javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<Attendee>> |
attendees
<p>This property defines an "Attendee" within a calendar component.<br>
RFC 5545 iCalendar 3.8.4.1 page 107</p>
|
javafx.beans.property.ObjectProperty<Description> |
description
<p>This property provides a more complete description of the
calendar component than that provided by the
Summary property.<br>
RFC 5545 iCalendar 3.8.1.5. |
javafx.beans.property.ObjectProperty<DurationProp> |
duration
A property wrapping the
DurationProp value. |
javafx.beans.property.ObjectProperty<RepeatCount> |
repeatCount
<p>This property defines the number of times the alarm should
be repeated, after the initial trigger.<br>
RFC 5545 iCalendar 3.8.6.2 page 133,</p>
|
javafx.beans.property.ObjectProperty<Trigger<?>> |
trigger
<p>This property specifies when an alarm will trigger.<br>
RFC 5545 iCalendar 3.8.6.3 page 133</p>
|
attachmentsProperty, summaryProperty
nonStandardProperty
attachmentsProperty, summaryProperty
Constructor and Description |
---|
VAlarm()
Creates a default VAlarm calendar component with no properties
|
VAlarm(VAlarm source)
Creates a deep copy of a VAlarm calendar component
|
Modifier and Type | Method and Description |
---|---|
javafx.beans.property.ObjectProperty<Action> |
actionProperty()
<p>Defines the action to be invoked when an alarm is triggered.<br>
RFC 5545 iCalendar 3.8.6.1 page 132</p>
<p>actionvalue = "AUDIO" / "DISPLAY" / "EMAIL" / iana-token / x-name</p>
|
javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<Attendee>> |
attendeesProperty()
<p>This property defines an "Attendee" within a calendar component.<br>
RFC 5545 iCalendar 3.8.4.1 page 107</p>
|
javafx.beans.property.ObjectProperty<Description> |
descriptionProperty()
<p>This property provides a more complete description of the
calendar component than that provided by the
Summary property.<br>
RFC 5545 iCalendar 3.8.1.5. |
javafx.beans.property.ObjectProperty<DurationProp> |
durationProperty()
A property wrapping the
DurationProp value. |
java.util.List<java.lang.String> |
errors()
Produces a list of error messages indicating problems with calendar element
VElement.errors() is invoked recursively to return errors of child elements in addition to errors in parent |
Action |
getAction() |
javafx.collections.ObservableList<Attendee> |
getAttendees() |
Description |
getDescription() |
RepeatCount |
getRepeatCount() |
Trigger<?> |
getTrigger() |
boolean |
isValid()
Checks element to determine if necessary properties are set.
|
static VAlarm |
parse(java.lang.String contentLines)
Creates a new VAlarm calendar component by parsing a String of iCalendar content lines
|
javafx.beans.property.ObjectProperty<RepeatCount> |
repeatCountProperty()
<p>This property defines the number of times the alarm should
be repeated, after the initial trigger.<br>
RFC 5545 iCalendar 3.8.6.2 page 133,</p>
|
void |
setAction(Action.ActionType action) |
void |
setAction(Action action) |
void |
setAction(java.lang.String action) |
void |
setAttendees(javafx.collections.ObservableList<Attendee> attendees) |
void |
setRepeatCount(int repeatCount) |
void |
setRepeatCount(RepeatCount repeatCount) |
void |
setRepeatCount(java.lang.String repeatCount) |
void |
setTrigger(java.time.Duration trigger) |
void |
setTrigger(java.lang.String trigger) |
void |
setTrigger(Trigger<?> trigger) |
void |
setTrigger(java.time.ZonedDateTime trigger) |
javafx.beans.property.ObjectProperty<Trigger<?>> |
triggerProperty()
<p>This property specifies when an alarm will trigger.<br>
RFC 5545 iCalendar 3.8.6.3 page 133</p>
|
VAlarm |
withAction(Action.ActionType actionType)
Sets the value of the
actionProperty() by creating a new Action from the Action.ActionType parameter |
VAlarm |
withAction(Action action)
Sets the value of the
actionProperty() |
VAlarm |
withAction(java.lang.String action)
Sets the value of the
actionProperty() by parsing iCalendar content text |
VAlarm |
withRepeatCount(int repeatCount)
Sets the value of the
repeatCountProperty() by creating new RepeatCount from int parameter |
VAlarm |
withRepeatCount(RepeatCount repeatCount)
Sets the value of the
repeatCountProperty() |
VAlarm |
withRepeatCount(java.lang.String repeatCount)
Sets the value of the
repeatCountProperty() by parsing iCalendar content text |
VAlarm |
withTrigger(java.time.Duration trigger)
Sets the value of the
triggerProperty() by creating new Trigger from Duration parameter |
VAlarm |
withTrigger(java.lang.String trigger)
Sets the value of the
triggerProperty() by parsing iCalendar content text |
VAlarm |
withTrigger(Trigger<?> trigger)
Sets the value of the
triggerProperty() |
VAlarm |
withTrigger(java.time.ZonedDateTime trigger)
Sets the value of the
triggerProperty() by creating new Trigger from ZonedDateTime parameter |
attachmentsProperty, getAttachments, getSummary, setAttachments, summaryProperty
getNonStandard, nonStandardProperty, setNonStandard, withNonStandard, withNonStandard, withNonStandard
copyInto, getParent, name, parseContent, parseContent, parseContent, setParent, toString
childrenUnmodifiable, copyIntoCallback, equals, hashCode, orderer, setContentLineGenerator, toContent
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
setDescription, setDescription, withDescription, withDescription
attachmentsProperty, getAttachments, getSummary, setAttachments, setSummary, setSummary, summaryProperty, withAttachments, withAttachments, withAttachments, withSummary, withSummary
parseContent, toContent
childrenUnmodifiable, copyInto
name, parseContent
withAttendees, withAttendees, withAttendees
getDuration, setDuration, setDuration, setDuration, withDuration, withDuration, withDuration
public javafx.beans.property.ObjectProperty<Action> actionProperty
<p>Defines the action to be invoked when an alarm is triggered.<br> RFC 5545 iCalendar 3.8.6.1 page 132</p> <p>actionvalue = "AUDIO" / "DISPLAY" / "EMAIL" / iana-token / x-name</p>
<p>Example: <ul> <li>ACTION:DISPLAY </ul> </p>
getAction()
,
setAction(String)
public javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<Attendee>> attendeesProperty
attendeesProperty
in interface VAttendee<VAlarm>
getAttendees()
,
setAttendees(ObservableList)
public javafx.beans.property.ObjectProperty<Description> descriptionProperty
descriptionProperty
in interface VDescribable2<VAlarm>
getDescription()
public javafx.beans.property.ObjectProperty<DurationProp> durationProperty
durationProperty
in interface VDuration<VAlarm>
public javafx.beans.property.ObjectProperty<RepeatCount> repeatCountProperty
<p>This property defines the number of times the alarm should be repeated, after the initial trigger.<br> RFC 5545 iCalendar 3.8.6.2 page 133,</p>
<p>If the alarm triggers more than once, then this property MUST be specified
along with the DURATION
property.</p>
<p>Example: The following is an example of this property for an alarm that repeats 4 additional times with a 5-minute delay after the initial triggering of the alarm:<br>
REPEAT:4<br> DURATION:PT5M </p>
getRepeatCount()
,
setRepeatCount(RepeatCount)
public javafx.beans.property.ObjectProperty<Trigger<?>> triggerProperty
<p>This property specifies when an alarm will trigger.<br> RFC 5545 iCalendar 3.8.6.3 page 133</p>
<p>Examples: <ul> A trigger set 15 minutes prior to the start of the event or to-do. <li>TRIGGER:-PT15M<br>
A trigger set five minutes after the end of an event or the due date of a to-do. <li>TRIGGER;RELATED=END:PT5M<br>
A trigger set to an absolute DATE-TIME. <li>TRIGGER;VALUE=DATE-TIME:19980101T050000Z </ul> </p>
getTrigger()
,
setTrigger(String)
public VAlarm()
Creates a default VAlarm calendar component with no properties
public VAlarm(VAlarm source)
Creates a deep copy of a VAlarm calendar component
public javafx.beans.property.ObjectProperty<Action> actionProperty()
<p>Defines the action to be invoked when an alarm is triggered.<br> RFC 5545 iCalendar 3.8.6.1 page 132</p> <p>actionvalue = "AUDIO" / "DISPLAY" / "EMAIL" / iana-token / x-name</p>
<p>Example: <ul> <li>ACTION:DISPLAY </ul> </p>
getAction()
,
setAction(String)
public Action getAction()
public void setAction(java.lang.String action)
public void setAction(Action action)
public void setAction(Action.ActionType action)
public VAlarm withAction(Action action)
Sets the value of the actionProperty()
public VAlarm withAction(Action.ActionType actionType)
Sets the value of the actionProperty()
by creating a new Action
from the Action.ActionType
parameter
public VAlarm withAction(java.lang.String action)
Sets the value of the actionProperty()
by parsing iCalendar content text
public javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<Attendee>> attendeesProperty()
VAttendee
<p>This property defines an "Attendee" within a calendar component.<br> RFC 5545 iCalendar 3.8.4.1 page 107</p>
<p>Examples: <ul> <li>ATTENDEE;MEMBER="mailto:DEV-GROUP@example.com":<br> mailto:joecool@example.com <li>ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Jane Doe<br> :mailto:jdoe@example.com </ul> </p>
attendeesProperty
in interface VAttendee<VAlarm>
getAttendees()
,
setAttendees(ObservableList)
public javafx.collections.ObservableList<Attendee> getAttendees()
getAttendees
in interface VAttendee<VAlarm>
public void setAttendees(javafx.collections.ObservableList<Attendee> attendees)
setAttendees
in interface VAttendee<VAlarm>
public javafx.beans.property.ObjectProperty<Description> descriptionProperty()
VDescribable2
<p>This property provides a more complete description of the
calendar component than that provided by the Summary
property.<br>
RFC 5545 iCalendar 3.8.1.5. page 84</p>
<p>Example: <ul> <li>DESCRIPTION:Meeting to provide technical review for "Phoenix"<br> design.\nHappy Face Conference Room. Phoenix design team<br> MUST attend this meeting.\nRSVP to team leader. </ul>
<p>Note: Only VJournal
allows multiple instances of DESCRIPTION</p>
descriptionProperty
in interface VDescribable2<VAlarm>
getDescription()
public Description getDescription()
getDescription
in interface VDescribable2<VAlarm>
public javafx.beans.property.ObjectProperty<DurationProp> durationProperty()
VDuration
A property wrapping the DurationProp
value.
durationProperty
in interface VDuration<VAlarm>
public javafx.beans.property.ObjectProperty<RepeatCount> repeatCountProperty()
<p>This property defines the number of times the alarm should be repeated, after the initial trigger.<br> RFC 5545 iCalendar 3.8.6.2 page 133,</p>
<p>If the alarm triggers more than once, then this property MUST be specified
along with the DURATION
property.</p>
<p>Example: The following is an example of this property for an alarm that repeats 4 additional times with a 5-minute delay after the initial triggering of the alarm:<br>
REPEAT:4<br> DURATION:PT5M </p>
getRepeatCount()
,
setRepeatCount(RepeatCount)
public RepeatCount getRepeatCount()
public void setRepeatCount(RepeatCount repeatCount)
public void setRepeatCount(int repeatCount)
public void setRepeatCount(java.lang.String repeatCount)
public VAlarm withRepeatCount(RepeatCount repeatCount)
Sets the value of the repeatCountProperty()
public VAlarm withRepeatCount(int repeatCount)
Sets the value of the repeatCountProperty()
by creating new RepeatCount
from int parameter
public VAlarm withRepeatCount(java.lang.String repeatCount)
Sets the value of the repeatCountProperty()
by parsing iCalendar content text
public javafx.beans.property.ObjectProperty<Trigger<?>> triggerProperty()
<p>This property specifies when an alarm will trigger.<br> RFC 5545 iCalendar 3.8.6.3 page 133</p>
<p>Examples: <ul> A trigger set 15 minutes prior to the start of the event or to-do. <li>TRIGGER:-PT15M<br>
A trigger set five minutes after the end of an event or the due date of a to-do. <li>TRIGGER;RELATED=END:PT5M<br>
A trigger set to an absolute DATE-TIME. <li>TRIGGER;VALUE=DATE-TIME:19980101T050000Z </ul> </p>
getTrigger()
,
setTrigger(String)
public Trigger<?> getTrigger()
public void setTrigger(java.lang.String trigger)
public void setTrigger(Trigger<?> trigger)
public void setTrigger(java.time.Duration trigger)
public void setTrigger(java.time.ZonedDateTime trigger)
public VAlarm withTrigger(Trigger<?> trigger)
Sets the value of the triggerProperty()
public VAlarm withTrigger(java.time.Duration trigger)
Sets the value of the triggerProperty()
by creating new Trigger
from Duration parameter
public VAlarm withTrigger(java.time.ZonedDateTime trigger)
Sets the value of the triggerProperty()
by creating new Trigger
from ZonedDateTime parameter
public VAlarm withTrigger(java.lang.String trigger)
Sets the value of the triggerProperty()
by parsing iCalendar content text
public java.util.List<java.lang.String> errors()
VElement
Produces a list of error messages indicating problems with calendar element
VElement.errors()
is invoked recursively to return errors of child elements in addition to errors in parent
errors
in interface VElement
errors
in class VParentBase
public boolean isValid()
VElement
Checks element to determine if necessary properties are set.
VElement.isValid()
is invoked recursively to test child elements if element is a parent
public static VAlarm parse(java.lang.String contentLines)
Creates a new VAlarm calendar component by parsing a String of iCalendar content lines
contentLines
- the text to parse, not null