1 20 package org.enhydra.barracuda.contrib.dbroggisch.examples.controller; 21 22 import org.enhydra.barracuda.core.event.DefaultEventGateway; 23 import org.enhydra.barracuda.core.event.helper.EventConnectorFactory; 24 import org.enhydra.barracuda.contrib.dbroggisch.page.DummyPageHandler; 25 import org.enhydra.barracuda.contrib.dbroggisch.page.PageFactory; 26 import org.apache.log4j.Logger; 27 28 import org.enhydra.barracuda.contrib.dbroggisch.examples.controller.events.*; 29 import org.enhydra.barracuda.contrib.dbroggisch.examples.controller.handlers.*; 30 import org.enhydra.barracuda.contrib.dbroggisch.examples.view.pages.*; 31 32 33 public class ExampleGateway extends DefaultEventGateway { 34 35 private static final Logger logger = Logger.getLogger(ExampleGateway.class.getName()); 36 37 48 public ExampleGateway() { 49 specifyLocalEventInterests(new EventConnectorFactory(RepopulationHandler.class), Repopulation.class); 50 specifyLocalEventInterests(new EventConnectorFactory(RepopulationHandler.class), RenderRepopulation.class); 51 specifyLocalEventInterests(new EventConnectorFactory(FileUploadHandler.class), FileUpload.class); 52 specifyLocalEventInterests(new EventConnectorFactory(FileUploadHandler.class), RenderFileUpload.class); 53 specifyLocalEventInterests(new EventConnectorFactory(PrefixMappingHandler.class), PrefixMapping.class); 54 specifyLocalEventInterests(new EventConnectorFactory(PrefixMappingHandler.class), PrefixMappingAddChild.class); 55 specifyLocalEventInterests(new EventConnectorFactory(PrefixMappingHandler.class), RenderPrefixMapping.class); 56 specifyLocalEventInterests(new EventConnectorFactory(NavigationBarHandler.class), NavigationBar.class); 57 registerPages(); 58 } 59 60 private void registerPages() { 61 PageFactory.addPageEventMapping(Repopulation.class, RepopulationPage.class); 62 PageFactory.addPageEventMapping(LoadPrefixMappingPage.class, PrefixmappingPage.class); 63 PageFactory.addPageEventMapping(FileUpload.class, FileUploadPage.class); 64 specifyLocalEventInterests(new EventConnectorFactory(DummyPageHandler.class), LoadPrefixMappingPage.class); 66 } 67 68 } 69 | Popular Tags |