JAVA/CORBA CLASSES


Examples: IsLink property
This agent gets the path names of all linked databases in the local directory.

import lotus.domino.*;

public class JavaAgent extends AgentBase {

 public void NotesMain() {

   try {
     Session session = getSession();
     AgentContext agentContext = session.getAgentContext();

     // (Your code goes here)
     DbDirectory dbdir = session.getDbDirectory(null);
     String msg = "";
     Database db = dbdir.getFirstDatabase(DbDirectory.DATABASE);
     while (db != null) {
       if (db.isLink()) {
         msg = msg + "\n\t" + db.getFilePath();
       }
       db = dbdir.getNextDatabase();
     }
     if (msg.length() == 0) msg = "\n\tNone";
     System.out.println("Links in local directory" + msg);

   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also