Examples: IsAdminNames property
This agent toggles IsAdminNames 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.setAdminNames(!acl.isAdminNames());
acl.save();
System.out.println("IsAdminNames = " + acl.isAdminNames());
}
} catch(Exception e) {
e.printStackTrace();
}
}
}