JAVA/CORBA CLASSES


Examples: IsFolder property
This agent displays whether each view object in the current database is a view or a folder.

import lotus.domino.*;
import java.util.Vector;
public class JavaAgent extends AgentBase {
 public void NotesMain() {
   try {
     Session session = getSession();
     AgentContext agentContext = session.getAgentContext();
     // (Your code goes here)
     Database db = agentContext.getCurrentDatabase();
     Vector views = db.getViews();
     for (int i=0; i<views.size(); i++) {
       View view = (View)views.elementAt(i);
       String f = null;
       if (view.isFolder())
         f = "folder";
       else
         f = "view";
       System.out.println
       (view.getName() + " is a " + f);
          }
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also