Examples: registerNewCertifier method
This agent registers AceHardwareSE/AceHardwareCertifier as cert3.id using cert.id.
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.setCertifierIDFile("d:\\NotesAdministrator\\cert.id");
DateTime dt = session.createDateTime("Today");
dt.setNow();
dt.adjustYear(1);
reg.setExpiration(dt);
reg.setIDType(Registration.ID_HIERARCHICAL);
reg.setMinPasswordLength(5); // password strength
reg.setNorthAmerican(true);
reg.setOrgUnit("AceHardwareSE");
reg.setRegistrationLog("log.nsf");
reg.setUpdateAddressBook(true);
reg.setStoreIDInAddressBook(true);
if (reg.registerNewCertifier("AceHardwareCertifier", // certifier name
"d:\\NotesAdministrator\\cert3.id", // file to be created
"Ace Hardware SE Certifier")) // Domino Directory title field
{ System.out.println("Registration succeeded"); }
else { System.out.println("Registration failed"); }
} catch(NotesException e) {
System.out.println(e.id + " " + e.text);
e.printStackTrace();
}
}
}