例: FileName property

次のエージェントは、現在のデータベースのタイトルと名前を出力します。

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();
      String title = db.getTitle();
      String name = db.getFileName();
      System.out.println("Database ¥"" + title +
      "¥" has the file name " + name);
    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}