JAVA/CORBA CLASSES


Examples: Name property
This agent prints the names of all the forms in the current database.

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();
     Vector forms = db.getForms();
     System.out.println
     ("\"" + db.getTitle() +
     "\" has " + forms.size() + " forms:");
     for (int i=0; i<forms.size(); i++) {
       Form form = (Form)forms.elementAt(i);
       System.out.println
       ("  " + form.getName()); }
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also