簡體   English   中英

如何在Domino Designer中使用Java創建Lotus Notes會議

[英]how to create a lotus notes meeting using java in domino designer

嗨,我正在嘗試使用java.lotus筆記創建會議。我能夠向接收者發送會議邀請。但是當我發送會議時,主席和接收者可用的選項是相同的。(諸如accept,decline之類的選項)。但是主席和接受者的選擇應該有所不同,誰能告訴我該怎么做?

public DocumentKey save(final Session session, final Database db, boolean send,
        String moveToFolder) throws NotesException, Io Exception {
    //setBody(null);
    Document doc = null;
    RichTextItem rti = null;
    try {
        doc = db.createDocument();
        db.getView(ServiceConstants.MEETINGS);
        // Here i am setting all the properties for that document.
        // I cant post that code as it has
        // over 100 properties, so more than 100 lines of code

        rti = doc.createRichTextItem(ServiceConstants.BODY);
        rti.appendText(getBody());
        if ((attachment != null) && (attachment.length > 0)) {
            for (int i = 0; i < attachment.length; i++) {
                attachment[i].save(rti);
            }
        }
        doc.save(true, true, true);
        if (send) {
            doc.send();
        }
        if (!isBlank(moveToFolder)) {
            doc.putInFolder(moveToFolder, true);
        }
        setKey(new DocumentKey(doc.getNoteID()));
    } finally {
        Helper.cleanupIfNeeded(rti);
        Helper.cleanupIfNeeded(doc);
    }
    return getKey();
}

要成功安排會議,您需要遵循日歷和安排架構

簡而言之:必須在主席的郵件文件中創建會議,並且邀請必須是對該主文檔的響應(doc.MakeResponse(...))並通過郵件發送。 “ ApptUnid”項將它們捆綁在一起。

閱讀鏈接中的文檔,這非常好

如果使用的是Notes / Domino 9.0或更高版本,則應考慮使用lotus.domino.NotesCalendar接口及其相關接口。 這些相對較新的界面使您可以使用iCalendar格式創建,讀取和更新日歷條目。

這是一些示例代碼:

// Get the NotesCalendar object from the database
NotesCalendar notesCalendar = session.getCalendar(database);
if ( notesCalendar == null ) {
    throw new Exception("Cannot open calendar.");
}

// Create a meeting in iCalendar format
String ical = iCalendarMeeting();

// Create the meeting on the Notes calendar
NotesCalendarEntry entry = notesCalendar.createEntry(ical);

此代碼從數據庫實例創建NotesCalendar實例。 然后,它以iCalendar格式獲取會議的表示形式(未顯示iCalendarMeeting方法)。 最后,它調用NotesCalendar.createEntry()創建會議。 createEntry方法將會議放在組織者的日歷上,並向所有與會者發送邀請。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM