JAVA/CORBA CLASSES


Examples: IsCalendar and isConflict properties
This agent displays whether each view in the current database is a calendar view or a standard outline view, and whether conflict checking is in effect for a calendar view.

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();
     Vector views = db.getViews();
     for (int i=0; i<views.size(); i++) {
       View view = (View)views.elementAt(i);
       String cal = null;
       if (view.isCalendar()) {
         cal = "calendar view";
         if (view.isConflict())
           cal = cal + " with conflict checking";
         else
           cal = cal + " without conflict checking"; }
       else
         cal = "standard outline view";
       System.out.println
       (view.getName() + " is a " + cal); }
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also