KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > portletcontainer > impl > PortletContainerServiceImpl


1 package org.exoplatform.services.portletcontainer.impl;
2
3 import java.util.Collection JavaDoc;
4 import java.util.Locale JavaDoc;
5 import java.util.Map JavaDoc;
6 import java.util.ResourceBundle JavaDoc;
7
8 import javax.portlet.PortletMode;
9 import javax.portlet.WindowState;
10 import javax.servlet.http.HttpServletRequest JavaDoc;
11 import javax.servlet.http.HttpServletResponse JavaDoc;
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 /**
26  * Created by the Exo Development team. Author : Mestrallet Benjamin
27  * benjamin.mestrallet@exoplatform.com
28  */

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 JavaDoc 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 JavaDoc properties) {
69     dispatcher_.setProperties(properties);
70   }
71
72   public void setSupportedPortletModesWithDescriptions(Collection JavaDoc portletModes) {
73     dispatcher_.setSupportedPortletModesWithDescriptions(portletModes);
74   }
75
76   public void setSupportedWindowStatesWithDescriptions(Collection JavaDoc windowStates) {
77     dispatcher_.setSupportedWindowStatesWithDescriptions(windowStates);
78   }
79
80   public Collection JavaDoc getSupportedPortletModes() {
81     return dispatcher_.getSupportedPortletModes();
82   }
83
84   public Collection JavaDoc getSupportedWindowStates() {
85     return dispatcher_.getSupportedWindowStates();
86   }
87
88   public Collection JavaDoc getSupportedPortletModesWithDescriptions() {
89     return dispatcher_.getSupportedPortletModesWithDescriptions();
90   }
91
92   public Collection JavaDoc getSupportedWindowStatesWithDescriptions() {
93     return dispatcher_.getSupportedWindowStatesWithDescriptions();
94   }
95
96   public Collection JavaDoc getPortletModes(String JavaDoc portletAppName, String JavaDoc portletName,
97       String JavaDoc markup) {
98     return dispatcher_.getPortletModes(portletAppName, portletName, markup);
99   }
100
101   public boolean isModeSuported(String JavaDoc portletAppName, String JavaDoc portletName,
102       String JavaDoc markup, PortletMode mode) {
103     return dispatcher_
104         .isModeSuported(portletAppName, portletName, markup, mode);
105   }
106
107   public Collection JavaDoc getWindowStates(String JavaDoc portletApplicationName) {
108     return dispatcher_.getWindowStates(portletApplicationName);
109   }
110
111   public boolean isStateSupported(WindowState state, String JavaDoc portletApplication) {
112     return dispatcher_.isStateSupported(state, portletApplication);
113   }
114
115   public Map JavaDoc getAllPortletMetaData() {
116     return dispatcher_.getAllPortletMetaData();
117   }
118
119   public ResourceBundle JavaDoc getBundle(HttpServletRequest JavaDoc request,
120       HttpServletResponse JavaDoc response, String JavaDoc portletAppName, String JavaDoc portletName,
121       Locale JavaDoc locale) throws PortletContainerException {
122     return dispatcher_.getBundle(request, response, portletAppName,
123         portletName, locale);
124   }
125
126   public void setPortletPreference(Input input, Map JavaDoc preferences)
127       throws PortletContainerException {
128     dispatcher_.setPortletPreference(input, preferences);
129   }
130
131   public Map JavaDoc getPortletPreference(Input input) {
132     return dispatcher_.getPortletPreference(input);
133   }
134
135   public ActionOutput processAction(HttpServletRequest JavaDoc request,
136       HttpServletResponse JavaDoc response, ActionInput input)
137       throws PortletContainerException {
138     return dispatcher_.processAction(request, response, input);
139   }
140
141   public RenderOutput render(HttpServletRequest JavaDoc request,
142       HttpServletResponse JavaDoc response, RenderInput input)
143       throws PortletContainerException {
144     return dispatcher_.render(request, response, input);
145   }
146
147 }
Popular Tags