Examples: getUserPolicySettings method
This agent gets the Setup policy document for /Acme and displays some items.
import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
Document doc = session.getUserPolicySettings(
"Server1/Acme", "/Acme",
Session.POLICYSETTINGS_SETUP);
System.out.println("LocAllCatalogServer = " +
getName(doc.getItemValueString("LocAllCatalogServer")));
System.out.println("LocAllDirectoryServer= " +
getName(doc.getItemValueString("LocAllDirectoryServer")));
System.out.println("LocAllSametimeServer = " +
getName(doc.getItemValueString("LocAllSametimeServer ")));
} catch(Exception e) {
e.printStackTrace();
}
}
String getName(String n) {
if (n == null || n == "" || n.length() == 0) n = "<None>";
return n;
}
}