Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
LotusDominoJavaAPI会议的创建和取消_Java_Api_Lotus Domino_Lotus - Fatal编程技术网

LotusDominoJavaAPI会议的创建和取消

LotusDominoJavaAPI会议的创建和取消,java,api,lotus-domino,lotus,Java,Api,Lotus Domino,Lotus,我正在为iNotes 8.5使用LotusDominoJavaAPI。我可以创建一个会议室,为会议请求添加会议室和资源,并从Java程序发送给所有与会者。但是我在取消会议时遇到了一个问题: 当我取消会议时,日历条目将从日历中删除,但会议室和资源将得到释放 以下是我尝试取消的步骤: 备选案文1: 1.使用UNID从数据库中获取notes文档 2.删除文档 备选案文2: 1.使用UNID从数据库中获取notes文档 2.从文档中删除文件室和资源 3.保存文档 4.删除文档 在使用了以上两个选项之后,

我正在为iNotes 8.5使用LotusDominoJavaAPI。我可以创建一个会议室,为会议请求添加会议室和资源,并从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); 
}

我不是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;
    }
}

公共布尔removeResources(文档d)引发异常{if(null!=d.getItemValue(“房间”))d.removeItem(“房间”);if(null!=d.getItemValue(“RequiredResources”))d.removeItem(“RequiredResources”);返回d.save(true);}我已编辑并添加。