JAVA/CORBA クラス


例:OrgDirectoryPath プロパティ
次のエージェントは、組織ディレクトリが存在する場合、ファイル名の先頭に追加します。

import lotus.domino.*;

public class JavaAgent extends AgentBase {

public void NotesMain() {

try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();

// (Your code goes here)
DbDirectory dir = session.getDbDirectory(null);
String org = session.getOrgDirectoryPath();
String filename = "Events.nsf";
if(!org.equals("") && !org.endsWith("\\"))
org = org + "\\";
Database db = dir.openDatabase(org + filename);

} catch(NotesException e) {
e.printStackTrace();

} catch(Exception e) {
e.printStackTrace();
}
}
}