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) // Get current database Database db = agentContext.getCurrentDatabase(); // Export to file String filename = "c:\\dxl\\exporteddb.dxl"; Stream stream = session.createStream(); if (stream.open(filename)) { stream.truncate(); // Any existing file is erased DxlExporter exporter = session.createDxlExporter(); exporter.setOutputDOCTYPE(false); System.out.println("Exported " + stream.writeText(exporter.exportDxl(db)) + " bytes to " + filename); } else System.out.println("Cannot open " + filename); } catch(Exception e) { e.printStackTrace(); } } }
See Also