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  public class LiferayServletContextAdapter extends ExternalContext {
49  
50      public LiferayServletContextAdapter(ServletContext servletContext) {
51          _servletContext = servletContext;
52      }
53  
54      public Map getApplicationMap() {
55          if (_applicationMap == null) {
56              _applicationMap = new LiferayApplicationMap(_servletContext);
57          }
58  
59          return _applicationMap;
60      }
61  
62      public String getAuthType() {
63          return null;
64      }
65  
66      public Object getContext() {
67          return null;
68      }
69  
70      public void dispatch(String string) throws IOException {
71      }
72  
73      public String encodeActionURL(String string) {
74          return null;
75      }
76  
77      public String encodeNamespace(String string) {
78          return null;
79      }
80  
81      public String encodeResourceURL(String string) {
82          return null;
83      }
84  
85      public String getInitParameter(String string) {
86          return null;
87      }
88  
89      public Map getInitParameterMap() {
90          return null;
91      }
92  
93      public void log(String string) {
94      }
95  
96      public void log(String string, Throwable throwable) {
97      }
98  
99      public void redirect(String string) throws IOException {
100     }
101 
102     public String getRemoteUser() {
103         return null;
104     }
105 
106     public Object getRequest() {
107         return null;
108     }
109 
110     public String getRequestContextPath() {
111         return null;
112     }
113 
114     public Map getRequestCookieMap() {
115         return null;
116     }
117 
118     public Map getRequestHeaderMap() {
119         return null;
120     }
121 
122     public Map getRequestHeaderValuesMap() {
123         return null;
124     }
125 
126     public Locale getRequestLocale() {
127         return null;
128     }
129 
130     public Iterator getRequestLocales() {
131         return null;
132     }
133 
134     public Map getRequestMap() {
135         return null;
136     }
137 
138     public Map getRequestParameterMap() {
139         return null;
140     }
141 
142     public Iterator getRequestParameterNames() {
143         return null;
144     }
145 
146     public Map getRequestParameterValuesMap() {
147         return null;
148     }
149 
150     public String getRequestPathInfo() {
151         return null;
152     }
153 
154     public String getRequestServletPath() {
155         return null;
156     }
157 
158     public URL getResource(String string) throws MalformedURLException {
159         return null;
160     }
161 
162     public InputStream getResourceAsStream(String string) {
163         return null;
164     }
165 
166     public Set getResourcePaths(String string) {
167         return null;
168     }
169 
170     public Object getResponse() {
171         return null;
172     }
173 
174     public Object getSession(boolean b) {
175         return null;
176     }
177 
178     public Map getSessionMap() {
179         return null;
180     }
181 
182     public boolean isUserInRole(String string) {
183         return false;
184     }
185 
186     public Principal getUserPrincipal() {
187         return null;
188     }
189 
190     private ServletContext _servletContext;
191     private LiferayApplicationMap _applicationMap;
192 
193 }