Examples: Roles property (ACL - Java)

This agent displays the name of every role in the current database. For example, it might display [HR Contact], [Supervisor], and [Project Leader].

import lotus.domino.*;
import java.util.Vector;
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();
      Vector roles = acl.getRoles();
      for (int i=0; i<roles.size(); i++)
        System.out.println(roles.elementAt(i));
    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}