Ejemplo n.º 1
0
 public EventFactory(ServletContext context, URL controllerConfigURL) {
   // load all the event handlers
   try {
     Set<Map.Entry<String, String>> handlerEntries =
         ConfigXMLReader.getControllerConfig(controllerConfigURL).getEventHandlerMap().entrySet();
     if (handlerEntries != null) {
       for (Map.Entry<String, String> handlerEntry : handlerEntries) {
         EventHandler handler = (EventHandler) ObjectType.getInstance(handlerEntry.getValue());
         handler.init(context);
         this.handlers.put(handlerEntry.getKey(), handler);
       }
     }
   } catch (Exception e) {
     Debug.logError(e, module);
     throw new GeneralRuntimeException(e);
   }
 }