JAVA/CORBA CLASSES


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 =
          session.getAgentContext();
     // (Your code goes here)
     Database db = agentContext.getCurrentDatabase();
     ACL acl = db.getACL();
     if (acl.isUniformAccess())
       System.out.println("Uniform access is in effect");
     else
       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) {
     e.printStackTrace();
   }
 }
}