As both Richard and Bruce have said, the Notes calendar schema is well documented. If you are using N/D 8.5.3 or before, you must understand the schema when creating calendar entries. However, if you are using N/D 9.0 or beyond, you may find it easier to use the Java NotesCalendar, NotesCalendarEntry and NotesCalendarNotice interfaces. These new APIs require some understanding of iCalendar, but working with iCalendar is generally easier than completely understanding the details of the Notes calendar schema.
For example, consider this iCalendar representation of a repeating event:
BEGIN:VCALENDAR
PRODID:-//Lotus Development Corporation//NONSGML Notes 9.0//EN_API_S
BEGIN:VEVENT
DTSTART:20140319T180000Z
DTEND:20140319T200000Z
TRANSP:OPAQUE
RRULE:FREQ=WEEKLY;COUNT=15;BYDAY=WE
SEQUENCE:0
CLASS:PUBLIC
SUMMARY:Track workout
LOCATION:High school track
END:VEVENT
END:VCALENDAR
The first instance of this event start at 18:00 UTC on 19-Mar-2014 (see DTSTART) and ends at 20:00 UTC (see DTEND). The event repeats every Wednesday for 15 weeks (see RRULE).
You can add such an event to a Notes database with a few lines of Java code:
// Get the NotesCalendar object from the database
NotesCalendar notesCalendar = session.getCalendar(database);
if ( notesCalendar == null ) {
throw new Exception("Cannot open calendar.");
}
// Create the meeting on the Notes calendar
NotesCalendarEntry entry = notesCalendar.createEntry(icalendar);
In this code, icalendar
is just a string containing the iCalendar data shown above and the NotesCalendar and NotesCalendarEntry interfaces are from the lotus.domino
package. The createEntry
method adds the event to the calendar. Even better, it automatically sends out invitations to attendees (when present in the iCalendar data) and it takes care of the complexities of repeating events.
For more iCalendar samples, see iCalendar representation of an event. For the iCalendar specification, see RFC5545.