繁体   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