JAVA/CORBA クラス


例:removeColumn メソッド
次のエージェントは、ビューの最後の列を削除します。

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("By Category");
     ViewColumn col = view.getColumn(view.getColumnCount());
     System.out.println("Removing the following column");
     System.out.println("\tPosition:" + col.getPosition());
     System.out.println("\tTitle:" + col.getTitle());
     System.out.println("\tFormula:" + col.getFormula());
     view.removeColumn(view.getColumnCount());

   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

関連項目