1 5 6 package org.exoplatform.services.wsrp.consumer.impl; 7 8 9 import java.util.Iterator ; 10 import java.util.Map ; 11 import java.util.HashMap ; 12 import org.exoplatform.services.wsrp.consumer.*; 13 import org.exoplatform.services.wsrp.exceptions.WSRPException; 14 15 21 22 public class PortletDriverRegistryImpl implements PortletDriverRegistry { 23 24 private Map portletDrivers = new HashMap (); 25 26 public PortletDriverRegistryImpl() { 27 } 28 29 public PortletDriver getPortletDriver(WSRPPortlet portlet) throws WSRPException { 30 PortletDriver driver = null; 31 if ((driver = (PortletDriver) portletDrivers.get(portlet.getPortletKey().toString())) == null) { 32 driver = new PortletDriverImpl(portlet); 33 portletDrivers.put(portlet.getPortletKey().toString(), driver); 34 } 35 return driver; 36 } 37 38 public Iterator getAllPortletDrivers() { 39 return portletDrivers.values().iterator(); 40 } 41 42 } | Popular Tags |