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(); DocumentCollection dc = db.getAllDocuments(); Document doc = dc.getFirstDocument(); while (doc != null) { RichTextItem body = (RichTextItem)doc.getFirstItem("Body"); System.out.println(doc.getItemValueString("Subject")); System.out.println(body.getFormattedText(false, 0, 0) + "\n"); doc = dc.getNextDocument(); } } catch(NotesException e) { System.out.println(e.id + " " + e.text); e.printStackTrace(); } } }
See Also