Examples: IsHidden, IsHiddenFromNotes, IsHiddenFromWeb, HideFormula, UseHideFormula, and KeepSelectionFocus properties
This agent sets a hide formula for all the entries in an outline and does not keep selection focus. The setHidden method, which is commented out, has the same effect as setHiddenFromNotes plus setHiddenFromWeb.
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");
OutlineEntry tmpentry;
OutlineEntry entry = outline.getFirst();
while (entry != null) {
System.out.println(entry.getAlias());
//entry.setHidden(false);
entry.setHiddenFromNotes(false);
entry.setHiddenFromWeb(false);
entry.setUseHideFormula(true);
entry.setHideFormula("@UserName = \"Snoopy\"");
entry.setKeepSelectionFocus(false);
outline.save();
tmpentry = outline.getNext(entry);
entry.recycle();
entry = tmpentry;
}
} catch(Exception e) {
e.printStackTrace();
}
}
}