Examples: IsConfigurationDirectory property

This agent displays the Configuration Directory databases known to the current session.

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) 
      Vector books = session.getAddressBooks();
      for (int i = 0; i < books.size(); i++) {
        Database db = (Database)books.elementAt(i);
        // Database must be open
        try {
          db.open();
        }
        catch(NotesException ne) {
          System.out.println("Could not open " + db.getFilePath());
          continue;
        }
        if (db.isConfigurationDirectory())
          System.out.println(
            db.getTitle() + " is a Configuration Directory");
        else
          System.out.println(
            db.getTitle() + " is not a Configuration Directory");
      }

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