Examples: NameObject property (ACLEntry - Java)

This agent prints the name of every ACL entry with Manager access.

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();
      System.out.println
      ("Managers for \"" + db.getTitle() + "\"");
      ACLEntry entry = acl.getFirstEntry();
      Name n;
      do {
        if (entry.getLevel() == ACL.LEVEL_MANAGER) {
          n = entry.getNameObject();
          System.out.println("    " + 
             n.getCommon()); }}
      while ((entry = acl.getNextEntry(entry)) != null);
    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}