JAVA/CORBA CLASSES


Examples: IsProfile property
This agent gets the name and key for the "Author Profile" document of the current user.

import lotus.domino.*;
import java.util.Vector;
public class JavaAgent extends AgentBase {
 public void NotesMain() {
   try {
     Session session = getSession();
     AgentContext agentContext = session.getAgentContext();
     // (Your code goes here)
     Database db = agentContext.getCurrentDatabase();
     Document doc = db.getProfileDocument
     ("Author Profile", session.getUserName());
     String who = doc.getItemValueString("Who");
     String email = doc.getItemValueString("email");
     if (doc != null && doc.isProfile()) {
       System.out.println(
           "Profile name: " + doc.getNameOfProfile());
       System.out.println("Key: " + doc.getKey());
       }
 
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also