1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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.InputStream;
26  
27  import java.net.URL;
28  
29  import java.security.Principal;
30  
31  import java.util.Iterator;
32  import java.util.Locale;
33  import java.util.Map;
34  import java.util.Set;
35  
36  import javax.faces.context.ExternalContext;
37  
38  import javax.servlet.ServletContext;
39  
40  /**
41   * <a href="LiferayServletContextAdapter.java.html"><b><i>View Source</i></b>
42   * </a>
43   *
44   * @author Neil Griffin
45   */
46  public class LiferayServletContextAdapter extends ExternalContext {
47  
48      public LiferayServletContextAdapter(ServletContext servletContext) {
49          _servletContext = servletContext;
50      }
51  
52      public Map<String, Object> getApplicationMap() {
53          if (_applicationMap == null) {
54              _applicationMap = new LiferayApplicationMap(_servletContext);
55          }
56  
57          return _applicationMap;
58      }
59  
60      public String getAuthType() {
61          return null;
62      }
63  
64      public Object getContext() {
65          return null;
66      }
67  
68      public void dispatch(String string) {
69      }
70  
71      public String encodeActionURL(String string) {
72          return null;
73      }
74  
75      public String encodeNamespace(String string) {
76          return null;
77      }
78  
79      public String encodeResourceURL(String string) {
80          return null;
81      }
82  
83      public String getInitParameter(String string) {
84          return null;
85      }
86  
87      public Map<String, String> getInitParameterMap() {
88          return null;
89      }
90  
91      public void log(String string) {
92      }
93  
94      public void log(String string, Throwable throwable) {
95      }
96  
97      public void redirect(String string) {
98      }
99  
100     public String getRemoteUser() {
101         return null;
102     }
103 
104     public Object getRequest() {
105         return null;
106     }
107 
108     public String getRequestContextPath() {
109         return null;
110     }
111 
112     public Map<String, Object> getRequestCookieMap() {
113         return null;
114     }
115 
116     public Map<String, String> getRequestHeaderMap() {
117         return null;
118     }
119 
120     public Map<String, String[]> getRequestHeaderValuesMap() {
121         return null;
122     }
123 
124     public Locale getRequestLocale() {
125         return null;
126     }
127 
128     public Iterator<Locale> getRequestLocales() {
129         return null;
130     }
131 
132     public Map<String, Object> getRequestMap() {
133         return null;
134     }
135 
136     public Map<String, String> getRequestParameterMap() {
137         return null;
138     }
139 
140     public Iterator<String> getRequestParameterNames() {
141         return null;
142     }
143 
144     public Map<String, String[]> getRequestParameterValuesMap() {
145         return null;
146     }
147 
148     public String getRequestPathInfo() {
149         return null;
150     }
151 
152     public String getRequestServletPath() {
153         return null;
154     }
155 
156     public URL getResource(String string) {
157         return null;
158     }
159 
160     public InputStream getResourceAsStream(String string) {
161         return null;
162     }
163 
164     public Set<String> getResourcePaths(String string) {
165         return null;
166     }
167 
168     public Object getResponse() {
169         return null;
170     }
171 
172     public Object getSession(boolean b) {
173         return null;
174     }
175 
176     public Map<String, Object> getSessionMap() {
177         return null;
178     }
179 
180     public boolean isUserInRole(String string) {
181         return false;
182     }
183 
184     public Principal getUserPrincipal() {
185         return null;
186     }
187 
188     private ServletContext _servletContext;
189     private LiferayApplicationMap _applicationMap;
190 
191 }