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) DocumentCollection dc = agentContext.getUnprocessedDocuments(); if (dc.getCount() > 0) { Document doc = dc.getFirstDocument(); Item item = doc.getFirstItem("Times"); Vector times = item.getValueDateTimeArray(); for (int j=0; j<times.size(); j++) { Object time = times.elementAt(j); if (time.getClass().getName().endsWith("DateTime")) { System.out.println ("Local time = " + ((DateTime)time).getLocalTime()); } else if(time.getClass().getName().endsWith("DateRange")) { System.out.println("Local time start and end = "); System.out.println("\t" + ((DateRange)time).getStartDateTime().getLocalTime()); System.out.println("\t" + ((DateRange)time).getEndDateTime().getLocalTime()); } } } } catch(Exception e) { e.printStackTrace(); } } }
See Also