JAVA/CORBA CLASSES
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) System.out.println("User name:"); Vector ulist = session.getUserNameList(); Name primary = (Name)ulist.firstElement(); System.out.println("\t" + primary.getCommon()); if (ulist.size() > 1) { Name secondary = (Name)ulist.lastElement(); System.out.println("\t" + secondary.getCommon() + " (alternate)"); } else { System.out.println("\tNo alternate name"); } } catch(Exception e) { e.printStackTrace(); } } }
See Also