JAVA/CORBA CLASSES
import lotus.domino.*; 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(); DocumentCollection dc = db.getAllDocuments(); System.out.println("Database \"" + title + "\" has " + dc.getCount() + " documents"); int n = 0; Document doc = dc.getFirstDocument(); while (doc != null) { n++; System.out.println ("Document # " + n + ": " + doc.getItemValueString("Subject")); doc = dc.getNextDocument(); } } catch(Exception e) { e.printStackTrace(); } } }
See Also