This agent creates an entry as a subentry to the first entry in
an outline.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();
Outline outline = db.getOutline("DiscOutline");
System.out.println(
"Creating entry ... Some Documents ...");
OutlineEntry entry = outline.createEntry(
"Some Documents",outline.getFirst(),
true,false);
entry.setNamedElement(db, "Database",
OutlineEntry.OUTLINE_CLASS_DATABASE);
entry.setFrameText("NotesView");
entry.setImagesText("Domino\\icons\\abook.gif");
entry.setLabel("Some Documents");
outline.save();
} catch(Exception e) {
e.printStackTrace();
}
}
}