JAVA/CORBA CLASSES


Examples: IsSigned, Signer, and Verifier properties
This agent gets the signer and verifier for documents that are signed.

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();
   }
 }
}

See Also