JAVA/CORBA CLASSES


Examples: IsInService property
This agent toggles whether a database is in service.

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 = session.getDatabase
       ("Cathy/Otus", "Test\\TestMarkForDelete");
     if (db.isOpen()) {
       if (db.isInService()) {
         db.setInService(false);
         System.out.println("Not in service.");
       }
       else {
         db.setInService(true);
         System.out.println("In service.");
       }
     }
     else
       System.out.println("Could not open database.");

   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also