View Javadoc

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;
23  import java.util.Properties;
24  
25  import javax.portlet.PortletException;
26  import javax.servlet.ServletConfig;
27  import javax.servlet.http.HttpServletRequest;
28  import javax.servlet.http.HttpServletResponse;
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 uniqueContainerName,
44                       ServletConfig servletConfig,
45                       PortletContainerEnvironment environment,
46                       Properties 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 servletRequest,
67                                HttpServletResponse servletResponse )
68      throws PortletException, IOException, PortletContainerException
69      {
70          PortletContainerFactory.
71          getPortletContainerOriginal().
72          renderPortlet(portletWindow, 
73                        servletRequest, 
74                        servletResponse);
75      }
76  
77      public void processPortletAction(PortletWindow portletWindow,
78                                       HttpServletRequest servletRequest,
79                                       HttpServletResponse servletResponse )
80      throws PortletException, IOException, PortletContainerException
81      {
82          PortletContainerFactory.
83          getPortletContainerOriginal().
84          processPortletAction(portletWindow, 
85                               servletRequest, 
86                               servletResponse);
87      }
88  
89      public void portletLoad(PortletWindow portletWindow,
90                              HttpServletRequest servletRequest,
91                              HttpServletResponse 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 }