JAVA/CORBA CLASSES


Examples: TemplateName property
This agent gets the template name of discuss4.ntf in the local Notes directory.

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 title = db.getTitle();
     String template = db.getTemplateName();
     if (template != "")
       System.out.println("Database \"" + title +
       "\" has the template name " + template);
     else
       System.out.println("Database \"" + title +
       "\" is not a template");
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also