JAVA/CORBA CLASSES


Examples: IsProtectReaders property
This agent toggles protection for the readers field.

import lotus.domino.*;
public class JavaAgent extends AgentBase {
 public void NotesMain() {
   try {
     Session session = getSession();
     AgentContext agentContext = session.getAgentContext();
     // (Your code goes here)
     Database db = agentContext.getCurrentDatabase();
     View view = db.getView("By Category");
     if (view.isProtectReaders()) {
       view.setProtectReaders(false);
       System.out.println
       ("Protect readers is not set"); }
     else {
       view.setProtectReaders(true);
       System.out.println
       ("Protect readers is set"); }
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also