Examples: grantAccess method
This agent grants manager access to the user specified in the agent comment.
import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext =
session.getAgentContext();
// (Your code goes here)
Agent agent = agentContext.getCurrentAgent();
Database db = agentContext.getCurrentDatabase();
db.grantAccess(agent.getComment(),
ACL.LEVEL_MANAGER);
System.out.println(agent.getComment() +
" has been granted manager access");
} catch(Exception e) {
e.printStackTrace();
}
}
}