是否可以通过 Java 代理在 Lotus Web 服务器上动态创建 Internet 站点规则(替换)?
问问题
348 次
2 回答
2
The rules are stored in "normal" Notes documents. That means you can create, edit and delete such rules (=documents) using Java.
How to do this?
Create some Web Site Rules manually like shown here.
Look then in Domino Directory Database for created Web Site Rule documents and discover with Files\Properties which fields are in such documents. Then you know, how the documents have to look like you'll create with Java.
于 2013-05-28T08:10:22.310 回答
1
是的,有可能,但是:由于每个替换规则都需要重新启动 http- 任务,因此无法直接使用文档...
这是代码的一部分。在代理中执行以下操作:
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
Database db = agentContext.getCurrentDatabase();
Document doc = db.createDocument();
doc.replaceItemValue("Form", "WebRule" );
//.... WebRule documents can never stand alone, they have to be "attached" to a
//internetsite as Responses. I forgot about this in the first run.
Document docInternet = db.getDocumentByUNID( "PasteUNIDofInternetSiteDocumentHere" );
doc.makeResponse(docInternet);
//.... Fill the fields that you found out like explained by Knut Herrmann
doc.replaceItemValue( .... );
doc.replaceItemValue( .... );
doc.replaceItemValue( .... );
doc.replaceItemValue( .... );
// for lacy programmers who do not want to set all the hidden fields by themselves
doc.computeWithForm(false, false);
doc.save( true, true, true );
于 2013-05-28T07:38:53.717 回答