1 9 package org.jboss.portal.portlet; 10 11 import java.util.Map ; 12 13 import javax.portlet.PortletContext; 14 15 import org.jboss.portal.portlet.impl.PortletContextImpl; 16 import org.jboss.portal.portlet.metadata.PortletApplicationMetaData; 17 import org.jboss.portal.server.Application; 18 19 23 public class PortletApplication extends Application 24 { 25 26 private PortletApplicationMetaData portletApplicationMD; 27 private PortletContext portletContext; 28 private String version; 29 private Map portletModes; 30 private Map windowStates; 31 32 public PortletApplication(String name, PortletApplicationMetaData portletApplicationMD) 33 { 34 super(name, portletApplicationMD); 35 this.portletApplicationMD = portletApplicationMD; 36 } 37 38 public void create() throws Exception 39 { 40 version = portletApplicationMD.getVersion(); 41 portletModes = portletApplicationMD.getPortletModes(); 42 windowStates = portletApplicationMD.getWindowStates(); 43 portletContext = new PortletContextImpl(servletContext); 44 } 45 46 public void destroy() 47 { 48 version = null; 49 portletModes = null; 50 windowStates = null; 51 portletContext = null; 52 } 53 54 public String getVersion() 55 { 56 return version; 57 } 58 59 public PortletContext getPortletContext() 60 { 61 return portletContext; 62 } 63 64 public Map getPortletModes() 65 { 66 return portletModes; 67 } 68 69 public Map getWindowStates() 70 { 71 return windowStates; 72 } 73 } 74 | Popular Tags |