例: IsSigned, Signer, and Verifier properties

次のエージェントは、署名付きの文書の署名者と検証者を取得します。

import lotus.domino.*;
public class JavaAgent extends AgentBase {
  public void NotesMain() {
    try {
      Session session = getSession();
      AgentContext agentContext = session.getAgentContext();
      // (Your code goes here) 
      DbDirectory dir = session.getDbDirectory(null);
      Database db = dir.openMailDatabase();
      View view = db.getView("($Inbox)");
      Document doc = view.getFirstDocument();
      while (doc != null) {
        System.out.println("[ " + 
             doc.getItemValueString("Subject") + " ]");
        if (doc.isSigned()) {
          System.out.println("¥tSigned by " + 
                 doc.getSigner());
          System.out.println("¥tVerified by " + 
                 doc.getVerifier()); }
        else System.out.println("¥tNot signed");
        doc = view.getNextDocument(doc); }
    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}