JAVA/CORBA クラス
例:Categories プロパティ
1. 次のエージェントは、現在のデータベースのカテゴリを出力します。
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();
String title = db.getTitle();
String cat = db.getCategories();
if (cat != "")
System.out.println("Database \"" +
title + "\" has the categories:" + cat);
else
System.out.println("Database \"" +
title + "\" has no categories");
} catch(Exception e) {
e.printStackTrace();
}
}
}
2. 次のエージェントは、現在のデータベースの Categories プロパティを「Examples database」に設定します。
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();
db.setCategories("Examples database");
} catch(Exception e) {
e.printStackTrace();
}
}
}
関連項目
Categories プロパティ
用語集
フィードバック
ヘルプ
または
プロダクトユーザビリティ
ヘルプの使い方
すべてのヘルプ項目
用語集