Examples: Aliases property (Form class)

This agent prints all the aliases for the form specified as the agent comment.

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) 
      Agent agent = agentContext.getCurrentAgent();
      Database db = agentContext.getCurrentDatabase();
      Form form = db.getForm(agent.getComment());
      Vector alias = form.getAliases();
      if (alias.size() != 0) {
        System.out.println
        ("Aliases for " + agent.getComment());
        for (int j=0; j<alias.size(); j++)
          System.out.println
          ("  " + alias.elementAt(j)); }
      else
        System.out.println
        ("No aliases for " + agent.getComment());
    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}