简体   繁体   English

如何在Domino Designer中使用Java创建Lotus Notes会议

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

Hi i am trying to create meeting in lotus notes using java.i am able to send a meeting invite to the recipients.But when i send a meeting the options available to the chair and the recipients are the same.(options like accept,decline).But the options for the chair and the recipients should be different.can anyone please tell how to do this? 嗨,我正在尝试使用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();
}

To successfully schedule a meeting, you need to follow the calendaring and scheduling schema 要成功安排会议,您需要遵循日历和安排架构

In short: A meeting has to be created in the chair's mail file and the invitations have to be responses (doc.MakeResponse(...)) to that main document and sent via mail. 简而言之:必须在主席的邮件文件中创建会议,并且邀请必须是对该主文档的响应(doc.MakeResponse(...))并通过邮件发送。 The "ApptUnid"- item ties them all together. “ ApptUnid”项将它们捆绑在一起。

Read the documentation in the link, it is very good 阅读链接中的文档,这非常好

If you are using Notes / Domino 9.0 or greater, you should consider using the lotus.domino.NotesCalendar interface and its related interfaces. 如果使用的是Notes / Domino 9.0或更高版本,则应考虑使用lotus.domino.NotesCalendar接口及其相关接口。 These relatively new interfaces let you create, read and update calendar entries using iCalendar format. 这些相对较新的界面使您可以使用iCalendar格式创建,读取和更新日历条目。

Here's some sample code: 这是一些示例代码:

// 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);

This code creates an instance of NotesCalendar from an instance of Database. 此代码从数据库实例创建NotesCalendar实例。 Then it gets the representation of a meeting in iCalendar format (the iCalendarMeeting method is not shown). 然后,它以iCalendar格式获取会议的表示形式(未显示iCalendarMeeting方法)。 Finally, it calls NotesCalendar.createEntry() to create the meeting. 最后,它调用NotesCalendar.createEntry()创建会议。 The createEntry method places the meeting on the organizer's calender and sends an invitation to all attendees. createEntry方法将会议放在组织者的日历上,并向所有与会者发送邀请。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM