1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.util.bridges.jsf.sun;
24  
25  import java.io.IOException;
26  import java.io.InputStream;
27  
28  import java.net.MalformedURLException;
29  import java.net.URL;
30  
31  import java.security.Principal;
32  
33  import java.util.Iterator;
34  import java.util.Locale;
35  import java.util.Map;
36  import java.util.Set;
37  
38  import javax.faces.context.ExternalContext;
39  
40  import javax.servlet.ServletContext;
41  
42  /**
43   * <a href="LiferayServletContextAdapter.java.html"><b><i>View Source</i></b>
44   * </a>
45   *
46   * @author Neil Griffin
47   *
48   */
49  public class LiferayServletContextAdapter extends ExternalContext {
50  
51      public LiferayServletContextAdapter(ServletContext servletContext) {
52          _servletContext = servletContext;
53      }
54  
55      public Map getApplicationMap() {
56          if (_applicationMap == null) {
57              _applicationMap = new LiferayApplicationMap(_servletContext);
58          }
59  
60          return _applicationMap;
61      }
62  
63      public String getAuthType() {
64          return null;
65      }
66  
67      public Object getContext() {
68          return null;
69      }
70  
71      public void dispatch(String string) throws IOException {
72      }
73  
74      public String encodeActionURL(String string) {
75          return null;
76      }
77  
78      public String encodeNamespace(String string) {
79          return null;
80      }
81  
82      public String encodeResourceURL(String string) {
83          return null;
84      }
85  
86      public String getInitParameter(String string) {
87          return null;
88      }
89  
90      public Map getInitParameterMap() {
91          return null;
92      }
93  
94      public void log(String string) {
95      }
96  
97      public void log(String string, Throwable throwable) {
98      }
99  
100     public void redirect(String string) throws IOException {
101     }
102 
103     public String getRemoteUser() {
104         return null;
105     }
106 
107     public Object getRequest() {
108         return null;
109     }
110 
111     public String getRequestContextPath() {
112         return null;
113     }
114 
115     public Map getRequestCookieMap() {
116         return null;
117     }
118 
119     public Map getRequestHeaderMap() {
120         return null;
121     }
122 
123     public Map getRequestHeaderValuesMap() {
124         return null;
125     }
126 
127     public Locale getRequestLocale() {
128         return null;
129     }
130 
131     public Iterator getRequestLocales() {
132         return null;
133     }
134 
135     public Map getRequestMap() {
136         return null;
137     }
138 
139     public Map getRequestParameterMap() {
140         return null;
141     }
142 
143     public Iterator getRequestParameterNames() {
144         return null;
145     }
146 
147     public Map getRequestParameterValuesMap() {
148         return null;
149     }
150 
151     public String getRequestPathInfo() {
152         return null;
153     }
154 
155     public String getRequestServletPath() {
156         return null;
157     }
158 
159     public URL getResource(String string) throws MalformedURLException {
160         return null;
161     }
162 
163     public InputStream getResourceAsStream(String string) {
164         return null;
165     }
166 
167     public Set getResourcePaths(String string) {
168         return null;
169     }
170 
171     public Object getResponse() {
172         return null;
173     }
174 
175     public Object getSession(boolean b) {
176         return null;
177     }
178 
179     public Map getSessionMap() {
180         return null;
181     }
182 
183     public boolean isUserInRole(String string) {
184         return false;
185     }
186 
187     public Principal getUserPrincipal() {
188         return null;
189     }
190 
191     private ServletContext _servletContext;
192     private LiferayApplicationMap _applicationMap;
193 
194 }