【问题标题】:Lotus Domino Java API meeting creation and cancellationLotus Domino Java API 会议创建和取消
【发布时间】:2013-11-19 00:38:50
【问题描述】:

我正在为 iNotes 8.5 使用 Lotus Domino Java API。我能够创建会议并为会议请求添加会议室、资源,并从我的 Java 程序发送给所有与会者。但是我在取消会议时遇到了问题:

当我取消会议时,日历条目将从日历中删除,但房间和资源正在释放。

这是我要取消的操作: 选项1: 1.使用UNID从数据库中获取notes文档 2.删除文档

选项-2: 1. 使用UNID从数据库中获取notes文档 2.从文档中删除房间和资源 3.保存文件 4. 删除文件

使用上述两个选项后,我仍然看到资源没有被释放。有人可以帮助我解决此问题的解决方案或想法吗?

由于我无法以编程方式释放房间和资源,因此每次取消会议时我都需要手动释放房间。

我正在使用的代码:

public boolean removeResources(Document d) throws Exception 
{ 
     if(null!= d.getItemValue("Room")) 
         d.removeItem("Room");
     if(null!= d.getItemValue("RequiredResources")) 
         d.removeItem("RequiredResources");
     return d.save(true); 
}

【问题讨论】:

  • public boolean removeResources(Document d) throws Exception { if(null!= d.getItemValue("Room")) d.removeItem("Room"); if(null!= d.getItemValue("RequiredResources")) d.removeItem("RequiredResources");返回 d.save(true); }
  • 我已经编辑并添加了。

标签: java api lotus-domino lotus


【解决方案1】:

我不是 Domino 中 C&E 系统的专家,但如果您需要在您正在编写的方法中从文档中删除字段,请尝试以下操作:

public boolean removeResources(Document d) throws NotesException 
{ 
    boolean bUpdated = false;
    if(d.hasItem("Room")) {
        d.removeItem("Room");
        bUpdated=true;
    }

    if(d.hasItem("RequiredResources")) {
        d.removeItem("RequiredResources");
        bUpdated=true;
    }

    if (bUpdated) {
        // something changed, so commit to document (d)
        if (d.save(true)) {
            return true;
        } else {
            return false;
        } 
    }else {
        // no changes therefore no resources were in the document, so return true anyway
        return true;
    }
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-02-10
    • 1970-01-01
    • 1970-01-01
    • 2011-06-04
    • 2020-07-26
    • 1970-01-01
    • 2012-06-26
    • 1970-01-01
    相关资源
    最近更新 更多