例: IsAbstract property

次のエージェントは、IsAbstract プロパティの設定を切り替えます。

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();
      Replication replication = db.getReplicationInfo();
      if (replication.isAbstract())
        replication.setAbstract(false);
      else
        replication.setAbstract(true);
      replication.save();
      System.out.println("Abstract = " + 
      replication.isAbstract());
    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}