JAVA/CORBA CLASSES
import lotus.domino.*; import java.util.Vector; public class JavaAgent extends AgentBase { public void NotesMain() { try { Session session = getSession(); AgentContext agentContext = session.getAgentContext(); // (Your code goes here) Database db = agentContext.getCurrentDatabase(); Vector agents = db.getAgents(); for (int i = 0; i < agents.size(); i++) { Agent agent = (Agent)agents.elementAt(i); if (agent.getTrigger() == Agent.TRIGGER_SCHEDULED) { if (agent.isActivatable()) agent.setEnabled(true); else agent.setEnabled(false); agent.save(); } } } catch(Exception e) { e.printStackTrace(); } } }
See Also