Adding a web GUI to the controller


Orca uses Velocity template engine to drive the GUI. Adding a GUI to the controller involves writing template files that will present the different views for the controller and connecting it to the controller logic.

Connecting controller to the GUI

  • In the factory for the controller, you need to specify the portal plugin class that goes with it. The portal plugin class has a method getMainTemplate() that returns the path to the controller's main web template. In the context of the interdomain controller it is /interdomain/main.xml. This is so because of the way we package the controller, evertything under resources/web is copied in the package and then put under the webapp dir in tomcat. So if you make a copy of these files under resources/web/xmlrpc/, your portal plugin should return /xmlrpc/main.vm. (See and
  • In addition to the portal plugin class you will need to define a ManagerObject, a proxy interface to the manager object and an implementation of this interface using local communication. The interdomain controller does all this.
  • Once these are in place, the templates will be able to acquire the proxy object and can talk with the manager object.

BEN InterdomainController (orca.controllers.ben is a good source of examples on how it is done:

package orca.controllers.ben.interdomain;

import orca.manage.extensions.standard.controllers.ControllerPortalPlugin;

* @author anirban
public class InterDomainControllerPortalPlugin extends ControllerPortalPlugin{

   protected String MainTemplate = "/interdomain/main.vm";

   public String getMainTemplate()
       return MainTemplate;

   protected IInterDomainControllerManagementProxy getMyProxy()
       return (IInterDomainControllerManagementProxy) proxy;