JAVA/CORBA CLASSES


Examples: markForDelete method
This agent marks a database for deletion. It is effective if the database is on a server on a cluster with the Cluster Manager running.

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\\MarkForDelete");
     if (db.isOpen())
     {
       db.markForDelete();
       System.out.println("Is in service = " + db.isInService());
       System.out.println("Is pending delete " + db.isPendingDelete());
     }
     else
     {
       System.out.println("Could not open Test\\MarkForDelete");
     }

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

See Also