Q

Recurring meeting in Domino using Java API

I have to create a recurring meeting in Domino using Java API. The following is the code snippet I used. Is it required to give all of the instance dates to "CalendarDateTime" and "RepeatInstanceDates?" I am supplied with RRULE (vCalendar spec), so should I find out all of the instance dates by parsing this RRULE?
DbDirectory DbDir = 
m_Session.getDbDirectory(null); 
Database db = 
DbDir.openDatabase(m_strMailFileURL);
View appView = 
db.getView("Meetings");  
ViewEntryCollection entryColl =
 appView.getAllEntries();
// Create New document
Document newDoc = 
db.createDocument();
DocumentCollection dcl  = 
db.getAllDocuments();
   
   
newDoc.appendItemValue
("Form","Appointment");
   
   
newDoc.appendItemValue
("Chair",m_Session.getUserName()); 
//Mandatory Field
newDoc.appendItemValue
("AltChair",m_Session.getUserName());
newDoc.appendItemValue
("$PublicAccess","1");
newDoc.appendItemValue
("STARTDATETIME",getDateValueVector
("11/22/2004 09:00:00 
AM"));
newDoc.appendItemValue
("EndDateTime",getDateValueVector
("11/22/2004 10:00:00 
AM"));
newDoc.appendItemValue
("CalendarDateTime",
getDateValueVector("11/22/2004 
09:00:00 AM;11/23/2004 09:00:00 AM"));
newDoc.appendItemValue("RepeatDates",
getDateValueVector("11/22/2004 09:00:00 
AM;11/23/2004 09:00:00 AM"));
newDoc.appendItemValue
("RepeatInstanceDates",
getDateValueVector("11/22/2004 
09:00:00 AM;11/23/2004 09:00:00 AM"));
newDoc.appendItemValue
("RepeatEndDates",getDateValueVector
("11/22/2004 
10:00:00 AM;11/23/2004 10:00:00 AM"));
newDoc.appendItemValue("Subject",
"NewApp");
newDoc.appendItemValue
("StartTimeZone",new String
("Z=-3005$DO=0$ZX=35
$ZN=India"));
newDoc.appendItemValue
("EndTimeZone" ,new String
("Z=-3005$DO=0$ZX=35
$ZN=India"));
newDoc.appendItemValue
("AppointmentType","0");
newDoc.appendItemValue
("MeetingType", "1");
newDoc.appendItemValue
("RepeatUnit","D");
newDoc.appendItemValue
("RepeatHow","U");
newDoc.appendItemValue
("RepeatUntil",getDateValueVector("11/23/2004"));
newDoc.appendItemValue
("RepeatForUnit","D");
newDoc.appendItemValue
("RepeatWeekends","D");
newDoc.appendItemValue
("Repeats","1");

newDoc.appendItemValue
("RepeatStartDate",
getDateValueVector("11/22/2004 
09:00:00 AM"));
newDoc.appendItemValue
("RepeatEndDate",
getDateValueVector
("11/23/2004 10:00:00 
AM"));
newDoc.appendItemValue
("lastDate",getDateValueVector
("11/23/2004 10:00:00 
AM"));
newDoc.appendItemValue
("RepeatInterval","1");
newDoc.appendItemValue
("$NoPurge",getDateValueVector
("11/23/2004 10:00:00 
AM"));
newDoc.appendItemValue
("RepeatAdjust","");
newDoc.appendItemValue
("RepeatFromEnd","");
newDoc.appendItemValue
("RepeatFor","2");
newDoc.appendItemValue
("_ViewIcon",160);
newDoc.appendItemValue
("OrgTable","CO");
newDoc.appendItemValue
("$HFFlags","1");
newDoc.appendItemValue
("SchedulerSwitcher","1");
newDoc.appendItemValue
("SequenceNum",1);
newDoc.appendItemValue
("UpdateSeq",1);
.
.
.
getDateValueVector() will 
return a vector of DateTime objects..
Since you are using a document rather than the UI document, you will have to populate the field with every instance. It looks like you have a handle on the format of the RRULE, if not, information can be found at http://www.shuchow.com/vCalAddendum.html.

A better way to approach this is to compose an "Appointment" document from the workspace object. This opens a UI version of the document. Then you only need to populate the repeat start and end fields and the repeat format values and save the document –- the built in calendar code will create the correct response documents. To save and send invites without a prompt, set tmpAction equal to "6".

Do you have comments on this Ask the Expert question and response? Let us know.

This was first published in November 2004

Dig Deeper

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close