JAVA/CORBA CLASSES


Examples: AddressBooks property
This application prints the server name (or "Local"), file name, and title of all the Domino Directories and Personal Address Books known to the current session.

import java.util.*;
import lotus.domino.*;
class addressbooks extends NotesThread
{
 public static void main(String argv[])
   {
       addressbooks t = new addressbooks();
       t.start();
   }
 public void runNotes()
   {
   try
     {
       Session s = NotesFactory.createSession();
       Database db;
       Vector books = s.getAddressBooks();
       Enumeration e = books.elements();
       while (e.hasMoreElements()) {
         db = (Database)e.nextElement();
         String fn = db.getFileName();
         String server;
         if (db.getServer() != null)
           server = db.getServer();
         else
           server = "Local";
         String title = db.getTitle();
         System.out.println(server + " " + fn + " \"" + title +
           "\"");
         }
     }
   catch (Exception e)
     {
       e.printStackTrace();
     }
   }
}

See Also