Examples: addCertifierToAddressBook method
This agent adds a record for cert2.id to the Domino® Directory on AceOne.
import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
Registration reg = session.createRegistration();
reg.setRegistrationServer("AceOne");
reg.setStoreIDInAddressBook(true);
if (reg.addCertifierToAddressBook(
"d:\\NotesAdministrator\\cert2.id", // certifier file
"AceHardware", // certifier password
"", // location field
"")) // comment field
{ System.out.println("Add certifier succeeded"); }
else { System.out.println("Add certifier failed"); }
} catch(NotesException e) {
System.out.println(e.id + " " + e.text);
e.printStackTrace();
}
}
}