1 16 19 20 package org.apache.pluto.portalImpl.core; 21 22 import org.apache.pluto.PortletContainer; 23 import org.apache.pluto.portalImpl.services.config.Config; 24 25 29 public class PortletContainerFactory 30 { 31 32 public static final String ENTRANCE_IMPL = "portletcontainer.entrance.impl"; 33 public static final String ENTRANCE_WRAPPER_IMPL = "portletcontainer.entrance.wrapper.impl"; 34 35 private static PortletContainer portletContainer; 36 private static PortletContainer portletContainerWrapper; 37 38 static 39 { 40 try { 41 portletContainer = (PortletContainer)Class.forName( 42 Config.getParameters().getString(ENTRANCE_IMPL)).newInstance(); 43 portletContainerWrapper = (PortletContainer)Class.forName( 44 Config.getParameters().getString(ENTRANCE_WRAPPER_IMPL)).newInstance(); 45 } 46 catch (java.lang.IllegalAccessException e) 47 { 48 System.err.println("PortletContainerFactory.static constructor"); 49 e.printStackTrace(System.err); 50 } 51 catch (java.lang.InstantiationException e) 52 { 53 System.err.println("PortletContainerFactory.static constructor"); 54 e.printStackTrace(System.err); 55 } 56 catch (java.lang.ClassNotFoundException e) 57 { 58 System.err.println("PortletContainerFactory.static constructor"); 59 e.printStackTrace(System.err); 60 } 61 } 62 63 static PortletContainer getPortletContainerOriginal() 64 { 65 return portletContainer; 66 } 67 68 public static PortletContainer getPortletContainer() 69 { 70 return portletContainerWrapper; 71 } 72 } 73 | Popular Tags |