Examples: IsCurrentAccessPublicWriter property

This agent sees if the user has public writer 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.isCurrentAccessPublicWriter())
          System.out.println("You are a public writer");
        else
          System.out.println("You are not a public writer");
      }
      else
        System.out.println("Could not open database");

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