Class ICalBuilder.Alarm

java.lang.Object
org.bzdev.net.calendar.ICalBuilder.Base
org.bzdev.net.calendar.ICalBuilder.Alarm
Enclosing class:
ICalBuilder

public static class ICalBuilder.Alarm extends ICalBuilder.Base
The iCalendar alarm component class. Please see Section 3.6.6 of RFC 5545 for a description of the iCalendar alarm component.
  • Constructor Details

  • Method Details

    • setSummary

      public void setSummary(String summary, String... parameters)
      Set the summary field for this alarm. The use of this method is optional: defaults will be provided if this method is not used, provided that a summary was provided in the enclosing component. The mandatory argument is typically a short string describing an event and is described in Section 3.8.1.12 of RFC 5545. For an alarm whose action is "DISPLAY", the mandatory DESCRIPTION property is created by choosing the first non-null value from this instance's summary field, this instance's description field, the enclosing component's summary field, and finally the enclosing component's description field in that order. For an email alarm, both the summary and the description are required. If any of these is null, the corresponding fields in the enclosing iCalendar component will be used instead.

      Parameters defined by RFC 5545 for a comment are LANGUAGE and ALTREP.

      Parameters:
      summary - a summary describing this event; null if there is no summary
      parameters - the parameters for this property
    • setDescription

      public void setDescription(String description, String... parameters)
      Set the description for this alarm. The use of this method is optional: defaults will be provided if this method is not used, provided that a summary was provided in the enclosing component. The mandatory argument is a string describing the alarm in more detail than what would appear in a summary. Section 3.8.1.5 of RFC 5545.

      Parameters defined by RFC 5545 for a comment are LANGUAGE and ALTREP.

      Parameters:
      description - a full describing this event; null if there is no description
      parameters - the parameters for this property
    • repeat

      public void repeat(int repeat, int duration) throws IllegalArgumentException
      Set the repeat count and the corresponding duration. The first argument refers to the REPEAT property specified in Section 3.8.6.2 of RFC 5545, and the second argument refers to the DURATION property specified in Section 3.8.2.5 of RFC 5545.
      Parameters:
      repeat - the repetition count
      duration - the duration in minutes
      Throws:
      IllegalArgumentException
    • createContentLines

      protected void createContentLines()
      Description copied from class: ICalBuilder.Base
      Generate content lines. Subclasses that override this method should call super.createContentLines().
      Overrides:
      createContentLines in class ICalBuilder.Base