JAVA/CORBA CLASSES


Examples: FolderReferencesEnabled property
This agent toggles the FolderReferencesEnabled property.

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 msg;
     if (db.getFolderReferencesEnabled()) {
       db.setFolderReferencesEnabled(false);
       msg = "Folder references disabled"; }
     else {
       db.setFolderReferencesEnabled(true);
       msg = "Folder references enabled"; }
     System.out.println(msg);
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also