1

有没有一种可行的方法来删除 Lotus Notes 数据库中设置的所有复制选项(使用 java)?

我尝试了以下方法:

我更改了复制设置(添加公式、“高级”选项卡中的启用/禁用标志等)。

然后我调用了代码:

Replication replication = currentDb.getReplicationInfo();
ReplicationEntry any2AnyEntry = replication.getEntry("-", "-");
ReplicationEntry any2ThisSrvEntry = replication.getEntry("-", currentDb.getServer());
....

如果一个条目不为空,我调用someReplicationEntry.remove();,然后我调用replication.save();

但是,当我在 Notes 客户端中检查复制选项时,会发现与以前相同的设置。

如何将复制选项重置为刚刚创建的 Notes 数据库的状态?有办法吗?(尝试replication.reset()保存,但没有成功)。

谢谢你。

4

1 回答 1

0

不要在 remove() 之后调用 replication.save(),因为您只是再次创建文档。

此处详述的示例代码:

http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_EXAMPLES_REMOVE_METHOD_RE_JAVA.html

于 2012-05-24T06:35:51.467 回答