例: IsIgnoreDeletes property

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

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.isIgnoreDeletes())
        replication.setIgnoreDeletes(false);
      else
        replication.setIgnoreDeletes(true);
      replication.save();
      System.out.println("IgnoreDeletes = " + 
      replication.isIgnoreDeletes());
    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}