次のエージェントは cert.id から jyip.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);
if (reg.recertify("d:¥¥NotesAdministrator¥¥jyip.id", // ID file
"AceHardware", // certifier password
"")) // comment field
{ System.out.println("Recertification succeeded"); }
else { System.out.println("Recertification failed"); }
} catch(NotesException e) {
System.out.println(e.id + " " + e.text);
e.printStackTrace();
}
}
}