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 = session.getDatabase ("Cathy/Otus", "Test\\MarkForDelete"); if (db.isOpen()) { if (db.isPendingDelete()) { System.out.println("Database pending delete"); } else { Document doc = db.createDocument(); doc.replaceItemValue("Subject", "Test one"); doc.replaceItemValue("Form", "Main Topic"); doc.save(true, true); System.out.println("Document created"); } } else { System.out.println("Could not open Test\\MarkForDelete"); } } catch(Exception e) { e.printStackTrace(); } } }
See Also