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();
   }
 }
}