Examples: getAllUnreadEntries method
This agent displays number of unread entries in the view before and after marking them all read.
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();
View view = db.getView("All");
ViewEntryCollection vec = view.getAllUnreadEntries();
System.out.println("View has " +
vec.getCount() + " unread entries");
view.markAllRead();
view.refresh();
vec = view.getAllUnreadEntries();
System.out.println("View has " +
vec.getCount() + " unread entries after markAllRead");
} catch(Exception e) {
e.printStackTrace();
}
}
}