JAVA/CORBA CLASSES


Examples: getLast and getPrev methods
This agent gets the entries in an outline last to first.

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("*** " + outline.getName() + " ***");
     System.out.println("ALL ENTRIES LAST TO FIRST");
     OutlineEntry entry = outline.getLast();
     while (entry != null) {
       System.out.println(entry.getLabel());
       entry = outline.getPrev(entry);
       }
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also