KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > pluto > portalImpl > core > PortletContainerWrapperImpl


1 /*
2  * Copyright 2003,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 /*
17
18  */

19
20 package org.apache.pluto.portalImpl.core;
21
22 import java.io.IOException JavaDoc;
23 import java.util.Properties JavaDoc;
24
25 import javax.portlet.PortletException;
26 import javax.servlet.ServletConfig JavaDoc;
27 import javax.servlet.http.HttpServletRequest JavaDoc;
28 import javax.servlet.http.HttpServletResponse JavaDoc;
29
30 import org.apache.pluto.PortletContainer;
31 import org.apache.pluto.PortletContainerException;
32 import org.apache.pluto.om.window.PortletWindow;
33 import org.apache.pluto.services.PortletContainerEnvironment;
34
35 /**
36  *
37
38  */

39 public class PortletContainerWrapperImpl implements PortletContainer {
40
41     // PortletContainer implementation.
42

43     public void init(String JavaDoc uniqueContainerName,
44                      ServletConfig JavaDoc servletConfig,
45                      PortletContainerEnvironment environment,
46                      Properties JavaDoc properties)
47     throws PortletContainerException
48     {
49         PortletContainerFactory.
50         getPortletContainerOriginal().
51         init(uniqueContainerName,
52              servletConfig,
53              environment,
54              properties);
55     }
56
57     public void shutdown() throws PortletContainerException
58     {
59         PortletContainerFactory.
60         getPortletContainerOriginal().
61         shutdown();
62     }
63
64
65     public void renderPortlet(PortletWindow portletWindow,
66                               HttpServletRequest JavaDoc servletRequest,
67                               HttpServletResponse JavaDoc servletResponse )
68     throws PortletException, IOException JavaDoc, PortletContainerException
69     {
70         PortletContainerFactory.
71         getPortletContainerOriginal().
72         renderPortlet(portletWindow,
73                       servletRequest,
74                       servletResponse);
75     }
76
77     public void processPortletAction(PortletWindow portletWindow,
78                                      HttpServletRequest JavaDoc servletRequest,
79                                      HttpServletResponse JavaDoc servletResponse )
80     throws PortletException, IOException JavaDoc, PortletContainerException
81     {
82         PortletContainerFactory.
83         getPortletContainerOriginal().
84         processPortletAction(portletWindow,
85                              servletRequest,
86                              servletResponse);
87     }
88
89     public void portletLoad(PortletWindow portletWindow,
90                             HttpServletRequest JavaDoc servletRequest,
91                             HttpServletResponse JavaDoc servletResponse )
92     throws PortletException, PortletContainerException
93     {
94         PortletContainerFactory.
95         getPortletContainerOriginal().
96         portletLoad(portletWindow,
97                     servletRequest,
98                     servletResponse);
99     }
100
101     public boolean isInitialized() {
102         return PortletContainerFactory.getPortletContainerOriginal().isInitialized();
103     }
104
105 }
106
Popular Tags