View Javadoc
1   /*
2    * Copyright (c) 2002-2017, Mairie de Paris
3    * All rights reserved.
4    *
5    * Redistribution and use in source and binary forms, with or without
6    * modification, are permitted provided that the following conditions
7    * are met:
8    *
9    *  1. Redistributions of source code must retain the above copyright notice
10   *     and the following disclaimer.
11   *
12   *  2. Redistributions in binary form must reproduce the above copyright notice
13   *     and the following disclaimer in the documentation and/or other materials
14   *     provided with the distribution.
15   *
16   *  3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
17   *     contributors may be used to endorse or promote products derived from
18   *     this software without specific prior written permission.
19   *
20   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23   * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
24   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27   * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28   * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30   * POSSIBILITY OF SUCH DAMAGE.
31   *
32   * License 1.0
33   */
34  package fr.paris.lutece.plugins.mylutece.modules.external.service;
35  
36  import java.io.BufferedReader;
37  import java.io.IOException;
38  import java.io.UnsupportedEncodingException;
39  
40  import java.security.Principal;
41  
42  import java.util.Enumeration;
43  import java.util.Locale;
44  import java.util.Map;
45  
46  import javax.servlet.RequestDispatcher;
47  import javax.servlet.ServletInputStream;
48  import javax.servlet.http.Cookie;
49  import javax.servlet.http.HttpServletRequest;
50  import javax.servlet.http.HttpSession;
51  
52  
53  /**
54   * Fake HttpServletRequest implementation.
55   * This is used for remote authentication where we must provide an HttpServletRequest
56   * TODO: external applications should propagate HttpServletRequest to Lutece
57   */
58  public class RemoteServletRequest implements HttpServletRequest
59  {
60      public String getAuthType(  )
61      {
62          // TODO Auto-generated method stub
63          return null;
64      }
65  
66      public String getContextPath(  )
67      {
68          // TODO Auto-generated method stub
69          return null;
70      }
71  
72      public Cookie[] getCookies(  )
73      {
74          // TODO Auto-generated method stub
75          return null;
76      }
77  
78      public long getDateHeader( String name )
79      {
80          // TODO Auto-generated method stub
81          return 0;
82      }
83  
84      public String getHeader( String name )
85      {
86          // TODO Auto-generated method stub
87          return null;
88      }
89  
90      public Enumeration getHeaderNames(  )
91      {
92          // TODO Auto-generated method stub
93          return null;
94      }
95  
96      public Enumeration getHeaders( String name )
97      {
98          // TODO Auto-generated method stub
99          return null;
100     }
101 
102     public int getIntHeader( String name )
103     {
104         // TODO Auto-generated method stub
105         return 0;
106     }
107 
108     public String getMethod(  )
109     {
110         // TODO Auto-generated method stub
111         return null;
112     }
113 
114     public String getPathInfo(  )
115     {
116         // TODO Auto-generated method stub
117         return null;
118     }
119 
120     public String getPathTranslated(  )
121     {
122         // TODO Auto-generated method stub
123         return null;
124     }
125 
126     public String getQueryString(  )
127     {
128         // TODO Auto-generated method stub
129         return null;
130     }
131 
132     public String getRemoteUser(  )
133     {
134         // TODO Auto-generated method stub
135         return null;
136     }
137 
138     public String getRequestURI(  )
139     {
140         // TODO Auto-generated method stub
141         return null;
142     }
143 
144     public StringBuffer getRequestURL(  )
145     {
146         // TODO Auto-generated method stub
147         return null;
148     }
149 
150     public String getRequestedSessionId(  )
151     {
152         // TODO Auto-generated method stub
153         return null;
154     }
155 
156     public String getServletPath(  )
157     {
158         // TODO Auto-generated method stub
159         return null;
160     }
161 
162     public HttpSession getSession(  )
163     {
164         // TODO Auto-generated method stub
165         return null;
166     }
167 
168     public HttpSession getSession( boolean create )
169     {
170         // TODO Auto-generated method stub
171         return null;
172     }
173 
174     public Principal getUserPrincipal(  )
175     {
176         // TODO Auto-generated method stub
177         return null;
178     }
179 
180     public boolean isRequestedSessionIdFromCookie(  )
181     {
182         // TODO Auto-generated method stub
183         return false;
184     }
185 
186     public boolean isRequestedSessionIdFromURL(  )
187     {
188         // TODO Auto-generated method stub
189         return false;
190     }
191 
192     public boolean isRequestedSessionIdFromUrl(  )
193     {
194         // TODO Auto-generated method stub
195         return false;
196     }
197 
198     public boolean isRequestedSessionIdValid(  )
199     {
200         // TODO Auto-generated method stub
201         return false;
202     }
203 
204     public boolean isUserInRole( String role )
205     {
206         // TODO Auto-generated method stub
207         return false;
208     }
209 
210     public Object getAttribute( String name )
211     {
212         // TODO Auto-generated method stub
213         return null;
214     }
215 
216     public Enumeration getAttributeNames(  )
217     {
218         // TODO Auto-generated method stub
219         return null;
220     }
221 
222     public String getCharacterEncoding(  )
223     {
224         // TODO Auto-generated method stub
225         return null;
226     }
227 
228     public int getContentLength(  )
229     {
230         // TODO Auto-generated method stub
231         return 0;
232     }
233 
234     public String getContentType(  )
235     {
236         // TODO Auto-generated method stub
237         return null;
238     }
239 
240     public ServletInputStream getInputStream(  ) throws IOException
241     {
242         // TODO Auto-generated method stub
243         return null;
244     }
245 
246     public String getLocalAddr(  )
247     {
248         // TODO Auto-generated method stub
249         return null;
250     }
251 
252     public String getLocalName(  )
253     {
254         // TODO Auto-generated method stub
255         return null;
256     }
257 
258     public int getLocalPort(  )
259     {
260         // TODO Auto-generated method stub
261         return 0;
262     }
263 
264     public Locale getLocale(  )
265     {
266         // TODO Auto-generated method stub
267         return Locale.FRENCH;
268     }
269 
270     public Enumeration getLocales(  )
271     {
272         // TODO Auto-generated method stub
273         return null;
274     }
275 
276     public String getParameter( String name )
277     {
278         // TODO Auto-generated method stub
279         return null;
280     }
281 
282     public Map getParameterMap(  )
283     {
284         // TODO Auto-generated method stub
285         return null;
286     }
287 
288     public Enumeration getParameterNames(  )
289     {
290         // TODO Auto-generated method stub
291         return null;
292     }
293 
294     public String[] getParameterValues( String name )
295     {
296         // TODO Auto-generated method stub
297         return null;
298     }
299 
300     public String getProtocol(  )
301     {
302         // TODO Auto-generated method stub
303         return null;
304     }
305 
306     public BufferedReader getReader(  ) throws IOException
307     {
308         // TODO Auto-generated method stub
309         return null;
310     }
311 
312     public String getRealPath( String path )
313     {
314         // TODO Auto-generated method stub
315         return null;
316     }
317 
318     public String getRemoteAddr(  )
319     {
320         // TODO Auto-generated method stub
321         return null;
322     }
323 
324     public String getRemoteHost(  )
325     {
326         // TODO Auto-generated method stub
327         return null;
328     }
329 
330     public int getRemotePort(  )
331     {
332         // TODO Auto-generated method stub
333         return 0;
334     }
335 
336     public RequestDispatcher getRequestDispatcher( String path )
337     {
338         // TODO Auto-generated method stub
339         return null;
340     }
341 
342     public String getScheme(  )
343     {
344         // TODO Auto-generated method stub
345         return null;
346     }
347 
348     public String getServerName(  )
349     {
350         // TODO Auto-generated method stub
351         return null;
352     }
353 
354     public int getServerPort(  )
355     {
356         // TODO Auto-generated method stub
357         return 0;
358     }
359 
360     public boolean isSecure(  )
361     {
362         // TODO Auto-generated method stub
363         return false;
364     }
365 
366     public void removeAttribute( String name )
367     {
368         // TODO Auto-generated method stub
369     }
370 
371     public void setAttribute( String name, Object o )
372     {
373         // TODO Auto-generated method stub
374     }
375 
376     public void setCharacterEncoding( String env ) throws UnsupportedEncodingException
377     {
378         // TODO Auto-generated method stub
379     }
380 }