JAVA/CORBA クラス


例:IsProfile プロパティ
次のエージェントは、現在のユーザーの「Author Profile」文書の名前とキーを取得します。

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

関連項目