1
votes

The approach i am currently following is as below.

  • I am getting the session from Webservicebase class.
  • I am accessing the database from session.openmaildatabase.
  • I am creating a document from database.createDocument method.
  • I am setting all the properties of the document.I got the properties by creating a recurring meeting in lotus notes.
  • Even after doing this i am not getting the meeting saved as recurring meeting.

can anyone please help how to do this.Any references to related material will also be helpful.Thanks guys.

3

3 Answers

3
votes

Here is a link to the current Lotus Notes C&S schema. It is where all updates have and will continue to be posted.

Depending on what version of Notes you are working with you may be able to use the C&S API. IBM exposed a C&S API in Notes 9.0. The APIs are a framework and set of methods for exposing Domino calendar and scheduling functionality without needing to know all the schema details.

The APIs provide the ability to create, read, update, and remove calendar data in a mailfile using iCalendar. They also allow explicit actions on calendar entries and notices (Accept, Decline, Cancel, etc).

There was also a REST services API published to OpenNTF that utilizes these new APIs. You can get more details on it here.

If you are building on pre-9.0 versions, you will have to rely totally on the published schema and craft all the documents yourself.

2
votes

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.

1
votes

Here is a link to the Notes calendar schema.

From your description above, the most important thing that you seem to be missing is the fact that a repeating meeting in Lotus Notes is represented by a set of documents in a parent-child relationship, not just by a single document.