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) DbDirectory dir = session.getDbDirectory(null); boolean found = false; Database db = dir.getFirstDatabase(DbDirectory.DATABASE); while (db != null) { String fn = db.getFileName(); if (fn.equalsIgnoreCase("newdb.nsf")) found = true; db = dir.getNextDatabase(); } if (!found) { System.out.println("Not found, creating newdb.nsf"); dir.createDatabase("newdb.nsf"); } else System.out.println("found, not creating newdb.nsf"); } catch(Exception e) { e.printStackTrace(); } } }
See Also