JAVA/CORBA クラス


例:getNextSibling メソッドと getParent メソッド
次のエージェントは、アウトライン内の最上位レベルのエントリを取得します。

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();
Outline outline = db.getOutline("DiscOutline");
System.out.println("*** " + outline.getName() + " ***");
System.out.println("TOP-LEVEL ENTRIES");
OutlineEntry entry = outline.getFirst();
while (entry != null) {
System.out.println(entry.getLabel());
entry = outline.getNextSibling(entry);
}
} catch(Exception e) {
e.printStackTrace();
}
}
}

関連項目