Examples: Examining and adjusting an access control list

This agent displays whether uniform access is enforced, then accesses each entry in the ACL of the current database and displays its name.

import lotus.domino.*;
public class JavaAgent extends AgentBase {
  public void NotesMain() {
    try {
      Session session = getSession();
      AgentContext agentContext = 
      // (Your code goes here) 
      Database db = agentContext.getCurrentDatabase();
      ACL acl = db.getACL();
      if (acl.isUniformAccess())
        System.out.println("Uniform access is in effect");
        System.out.println("Uniform access is not in effect");
      System.out.println("Names of ACL entries:");
      ACLEntry entry = acl.getFirstEntry();
      do {
        System.out.println("  " + entry.getName()); }
      while ((entry = acl.getNextEntry(entry)) != null);
    } catch(Exception e) {