001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.util.bridges.jsf.sun;
016    
017    import java.io.InputStream;
018    
019    import java.net.URL;
020    
021    import java.security.Principal;
022    
023    import java.util.Iterator;
024    import java.util.Locale;
025    import java.util.Map;
026    import java.util.Set;
027    
028    import javax.faces.context.ExternalContext;
029    
030    import javax.servlet.ServletContext;
031    
032    /**
033     * @author Neil Griffin
034     */
035    public class LiferayServletContextAdapter extends ExternalContext {
036    
037            public LiferayServletContextAdapter(ServletContext servletContext) {
038                    _servletContext = servletContext;
039            }
040    
041            @Override
042            public void dispatch(String string) {
043            }
044    
045            @Override
046            public String encodeActionURL(String string) {
047                    return null;
048            }
049    
050            @Override
051            public String encodeNamespace(String string) {
052                    return null;
053            }
054    
055            @Override
056            public String encodeResourceURL(String string) {
057                    return null;
058            }
059    
060            @Override
061            public Map<String, Object> getApplicationMap() {
062                    if (_applicationMap == null) {
063                            _applicationMap = new LiferayApplicationMap(_servletContext);
064                    }
065    
066                    return _applicationMap;
067            }
068    
069            @Override
070            public String getAuthType() {
071                    return null;
072            }
073    
074            @Override
075            public Object getContext() {
076                    return null;
077            }
078    
079            @Override
080            public String getInitParameter(String string) {
081                    return null;
082            }
083    
084            @Override
085            public Map<String, String> getInitParameterMap() {
086                    return null;
087            }
088    
089            @Override
090            public String getRemoteUser() {
091                    return null;
092            }
093    
094            @Override
095            public Object getRequest() {
096                    return null;
097            }
098    
099            @Override
100            public String getRequestContextPath() {
101                    return null;
102            }
103    
104            @Override
105            public Map<String, Object> getRequestCookieMap() {
106                    return null;
107            }
108    
109            @Override
110            public Map<String, String> getRequestHeaderMap() {
111                    return null;
112            }
113    
114            @Override
115            public Map<String, String[]> getRequestHeaderValuesMap() {
116                    return null;
117            }
118    
119            @Override
120            public Locale getRequestLocale() {
121                    return null;
122            }
123    
124            @Override
125            public Iterator<Locale> getRequestLocales() {
126                    return null;
127            }
128    
129            @Override
130            public Map<String, Object> getRequestMap() {
131                    return null;
132            }
133    
134            @Override
135            public Map<String, String> getRequestParameterMap() {
136                    return null;
137            }
138    
139            @Override
140            public Iterator<String> getRequestParameterNames() {
141                    return null;
142            }
143    
144            @Override
145            public Map<String, String[]> getRequestParameterValuesMap() {
146                    return null;
147            }
148    
149            @Override
150            public String getRequestPathInfo() {
151                    return null;
152            }
153    
154            @Override
155            public String getRequestServletPath() {
156                    return null;
157            }
158    
159            @Override
160            public URL getResource(String string) {
161                    return null;
162            }
163    
164            @Override
165            public InputStream getResourceAsStream(String string) {
166                    return null;
167            }
168    
169            @Override
170            public Set<String> getResourcePaths(String string) {
171                    return null;
172            }
173    
174            @Override
175            public Object getResponse() {
176                    return null;
177            }
178    
179            @Override
180            public Object getSession(boolean b) {
181                    return null;
182            }
183    
184            @Override
185            public Map<String, Object> getSessionMap() {
186                    return null;
187            }
188    
189            @Override
190            public Principal getUserPrincipal() {
191                    return null;
192            }
193    
194            @Override
195            public boolean isUserInRole(String string) {
196                    return false;
197            }
198    
199            @Override
200            public void log(String string) {
201            }
202    
203            @Override
204            public void log(String string, Throwable throwable) {
205            }
206    
207            @Override
208            public void redirect(String string) {
209            }
210    
211            private LiferayApplicationMap _applicationMap;
212            private ServletContext _servletContext;
213    
214    }