JAVA/CORBA クラス


例:Forms プロパティ
次の例は、現在のデータベースのすべてのフォームの名前を表示します。

import lotus.domino.*;
import java.util.Vector;
public class JavaAgent extends AgentBase {
 public void NotesMain() {
   try {
     Session session = getSession();
     AgentContext agentContext = session.getAgentContext();
     // (Your code goes here)
     Database db = agentContext.getCurrentDatabase();
     String title = db.getTitle();
     Vector forms = db.getForms();
     System.out.println("Agents in database:");
     for (int i=0; i<forms.size(); i++) {
       String name = ((Form)forms.elementAt(i)).getName();
       System.out.println("Form #" + (i+1) + ":" + name); }
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

関連項目