1 package org.exoplatform.services.portletcontainer.impl; 2 3 import java.util.Collection ; 4 import java.util.Locale ; 5 import java.util.Map ; 6 import java.util.ResourceBundle ; 7 8 import javax.portlet.PortletMode; 9 import javax.portlet.WindowState; 10 import javax.servlet.http.HttpServletRequest ; 11 import javax.servlet.http.HttpServletResponse ; 12 13 import org.apache.commons.logging.Log; 14 import org.exoplatform.services.log.LogService; 15 import org.exoplatform.services.portletcontainer.PortletContainerException; 16 import org.exoplatform.services.portletcontainer.PortletContainerService; 17 import org.exoplatform.services.portletcontainer.pci.ActionInput; 18 import org.exoplatform.services.portletcontainer.pci.ActionOutput; 19 import org.exoplatform.services.portletcontainer.pci.Input; 20 import org.exoplatform.services.portletcontainer.pci.RenderInput; 21 import org.exoplatform.services.portletcontainer.pci.RenderOutput; 22 import org.picocontainer.MutablePicoContainer; 23 import org.picocontainer.Startable; 24 25 29 public class PortletContainerServiceImpl implements PortletContainerService, 30 Startable { 31 32 private Log log; 33 34 private PortletApplicationsHolder holder_; 35 36 private MutablePicoContainer subcontainer_ = null; 37 38 private LogService logService_; 39 40 private PortletContainerDispatcher dispatcher_; 41 42 public PortletContainerServiceImpl(PortletApplicationsHolder holder, 43 PortletContainerDispatcher dispatcher, LogService logService) { 44 logService_ = logService; 45 holder_ = holder; 46 dispatcher_ = dispatcher; 47 this.log = logService_.getLog(getClass()); 48 } 49 50 public void start() { 51 } 52 53 public void stop() { 54 } 55 56 public void setPortletContainerName(String containerName) { 57 dispatcher_.setPortletContainerName(containerName); 58 } 59 60 public void setMajorVersion(int majorVersion) { 61 dispatcher_.setMajorVersion(majorVersion); 62 } 63 64 public void setMinorVersion(int minorVersion) { 65 dispatcher_.setMinorVersion(minorVersion); 66 } 67 68 public void setProperties(Map properties) { 69 dispatcher_.setProperties(properties); 70 } 71 72 public void setSupportedPortletModesWithDescriptions(Collection portletModes) { 73 dispatcher_.setSupportedPortletModesWithDescriptions(portletModes); 74 } 75 76 public void setSupportedWindowStatesWithDescriptions(Collection windowStates) { 77 dispatcher_.setSupportedWindowStatesWithDescriptions(windowStates); 78 } 79 80 public Collection getSupportedPortletModes() { 81 return dispatcher_.getSupportedPortletModes(); 82 } 83 84 public Collection getSupportedWindowStates() { 85 return dispatcher_.getSupportedWindowStates(); 86 } 87 88 public Collection getSupportedPortletModesWithDescriptions() { 89 return dispatcher_.getSupportedPortletModesWithDescriptions(); 90 } 91 92 public Collection getSupportedWindowStatesWithDescriptions() { 93 return dispatcher_.getSupportedWindowStatesWithDescriptions(); 94 } 95 96 public Collection getPortletModes(String portletAppName, String portletName, 97 String markup) { 98 return dispatcher_.getPortletModes(portletAppName, portletName, markup); 99 } 100 101 public boolean isModeSuported(String portletAppName, String portletName, 102 String markup, PortletMode mode) { 103 return dispatcher_ 104 .isModeSuported(portletAppName, portletName, markup, mode); 105 } 106 107 public Collection getWindowStates(String portletApplicationName) { 108 return dispatcher_.getWindowStates(portletApplicationName); 109 } 110 111 public boolean isStateSupported(WindowState state, String portletApplication) { 112 return dispatcher_.isStateSupported(state, portletApplication); 113 } 114 115 public Map getAllPortletMetaData() { 116 return dispatcher_.getAllPortletMetaData(); 117 } 118 119 public ResourceBundle getBundle(HttpServletRequest request, 120 HttpServletResponse response, String portletAppName, String portletName, 121 Locale locale) throws PortletContainerException { 122 return dispatcher_.getBundle(request, response, portletAppName, 123 portletName, locale); 124 } 125 126 public void setPortletPreference(Input input, Map preferences) 127 throws PortletContainerException { 128 dispatcher_.setPortletPreference(input, preferences); 129 } 130 131 public Map getPortletPreference(Input input) { 132 return dispatcher_.getPortletPreference(input); 133 } 134 135 public ActionOutput processAction(HttpServletRequest request, 136 HttpServletResponse response, ActionInput input) 137 throws PortletContainerException { 138 return dispatcher_.processAction(request, response, input); 139 } 140 141 public RenderOutput render(HttpServletRequest request, 142 HttpServletResponse response, RenderInput input) 143 throws PortletContainerException { 144 return dispatcher_.render(request, response, input); 145 } 146 147 } | Popular Tags |