JAVA/CORBA CLASSES


Examples: getPrevSibling method
This agent gets all the top-level entries from 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();
     View view = db.getView("By Category");
     view.setAutoUpdate(false);
     ViewNavigator nav = view.createViewNav();
     ViewEntry entry = nav.getLast();
     int n = 0;
     do { entry = nav.getCurrent(); }
       while (nav.gotoParent());
     while (entry != null) {
       System.out.println("Last category minus " + n + "
       has " +
       entry.getDescendantCount() + " descendants");
       n++;
       entry = nav.getPrevSibling(); }
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also