Examples: IsAdminReaderAuthor property

This agent toggles IsAdminReaderAuthor for the current database.

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();
      ACL acl = db.getACL();
      if (acl.getAdministrationServer().equals(""))
        System.out.println("No admin server - can't change");
      else {
        acl.setAdminReaderAuthor(!acl.isAdminReaderAuthor());
        acl.save();
        System.out.println("IsAdminReaderAuthor = " + 
          acl.isAdminReaderAuthor());
      }

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