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");
          System.out.println("You are not a public writer");
        System.out.println("Could not open database");

    } catch(Exception e) {