View Javadoc

1   /*
2    * Copyright 2000-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  package org.apache.portals.bridges.php;
17  
18  import java.util.Enumeration;
19  
20  import javax.servlet.ServletConfig;
21  import javax.servlet.ServletContext;
22  import javax.portlet.PortletConfig;
23  
24  /***
25  * ServletConfigImpl Wrapper around PortletConfig
26  * 
27  * @author <a href="mailto:rogerrut@apache.org">Roger Ruttimann</a>
28  * @version $Id: ServletConfigImpl.java 187920 2004-11-11 02:17:56 +0100 (Thu, 11 Nov 2004) rogerrut $
29  */
30  class ServletConfigImpl implements ServletConfig
31  {
32      private PortletConfig config;
33      private ServletContext context = null;
34      public ServletConfigImpl(PortletConfig config)
35      {
36          this.config = config;
37      }
38      public String getInitParameter(String arg0)
39      {
40          return config.getInitParameter(arg0);
41      }
42      public Enumeration getInitParameterNames()
43      {
44          return config.getInitParameterNames();
45      }
46      public synchronized ServletContext getServletContext()
47      {
48          
49          return context;
50      }
51      public String getServletName()
52      {
53          return config.getPortletName();
54      }
55      public String toString()
56      {
57          return config.toString();
58      }
59  }