Examples: IsCurrentAccessPublicReader property

This agent sees if the user has public reader access to a database.

import lotus.domino.*;

public class JavaAgent extends AgentBase {

  public void NotesMain() {

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

      // (Your code goes here) 
      String server = "Server1/East/Acme";
      String path = "bob\\DatabaseJava";
      Database db = session.getDatabase(server, path);
      if (db.isOpen()) { //Database must be open
        if (db.isCurrentAccessPublicReader())
          System.out.println("You are a public reader");
        else
          System.out.println("You are not a public reader");
      }
      else
        System.out.println("Could not open database");

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