b9af50301e2d587350c79dacb2829fd0d3d58120
[sdnc/apps.git] /
1 /*
2  *  ============LICENSE_START===================================================
3  * Copyright (c) 2018 Amdocs
4  * ============================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *        http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  * ============LICENSE_END=====================================================
17  */
18 package org.onap.sdnc.apps.pomba.networkdiscovery.unittest.service;
19
20 import java.io.BufferedReader;
21 import java.io.IOException;
22 import java.io.UnsupportedEncodingException;
23 import java.security.Principal;
24 import java.util.Collection;
25 import java.util.Enumeration;
26 import java.util.Locale;
27 import java.util.Map;
28 import javax.servlet.AsyncContext;
29 import javax.servlet.DispatcherType;
30 import javax.servlet.RequestDispatcher;
31 import javax.servlet.ServletContext;
32 import javax.servlet.ServletException;
33 import javax.servlet.ServletInputStream;
34 import javax.servlet.ServletRequest;
35 import javax.servlet.ServletResponse;
36 import javax.servlet.http.Cookie;
37 import javax.servlet.http.HttpServletRequest;
38 import javax.servlet.http.HttpServletResponse;
39 import javax.servlet.http.HttpSession;
40 import javax.servlet.http.HttpUpgradeHandler;
41 import javax.servlet.http.Part;
42
43 public class TestHttpServletRequest implements HttpServletRequest {
44     @Override
45     public String getHeader(String name) {
46         return null;
47     }
48
49     @Override
50     public String getRemoteAddr() {
51         return "localhost";
52     }
53
54     @Override
55     public String getServerName() {
56         return "localhost";
57     }
58
59     @Override
60     public String getRequestURI() {
61         return "/test";
62     }
63
64
65     @Override
66     public Object getAttribute(String name) {
67         // TODO Implement getAttribute
68         throw new UnsupportedOperationException("getAttribute");
69     }
70
71     @Override
72     public Enumeration<String> getAttributeNames() {
73         // TODO Implement getAttributeNames
74         throw new UnsupportedOperationException("getAttributeNames");
75     }
76
77     @Override
78     public String getCharacterEncoding() {
79         // TODO Implement getCharacterEncoding
80         throw new UnsupportedOperationException("getCharacterEncoding");
81     }
82
83     @Override
84     public void setCharacterEncoding(String env) throws UnsupportedEncodingException {
85         // TODO Implement setCharacterEncoding
86         throw new UnsupportedOperationException("setCharacterEncoding");
87     }
88
89     @Override
90     public int getContentLength() {
91         // TODO Implement getContentLength
92         throw new UnsupportedOperationException("getContentLength");
93     }
94
95     @Override
96     public long getContentLengthLong() {
97         // TODO Implement getContentLengthLong
98         throw new UnsupportedOperationException("getContentLengthLong");
99     }
100
101     @Override
102     public String getContentType() {
103         // TODO Implement getContentType
104         throw new UnsupportedOperationException("getContentType");
105     }
106
107     @Override
108     public ServletInputStream getInputStream() throws IOException {
109         // TODO Implement getInputStream
110         throw new UnsupportedOperationException("getInputStream");
111     }
112
113     @Override
114     public String getParameter(String name) {
115         // TODO Implement getParameter
116         throw new UnsupportedOperationException("getParameter");
117     }
118
119     @Override
120     public Enumeration<String> getParameterNames() {
121         // TODO Implement getParameterNames
122         throw new UnsupportedOperationException("getParameterNames");
123     }
124
125     @Override
126     public String[] getParameterValues(String name) {
127         // TODO Implement getParameterValues
128         throw new UnsupportedOperationException("getParameterValues");
129     }
130
131     @Override
132     public Map<String, String[]> getParameterMap() {
133         // TODO Implement getParameterMap
134         throw new UnsupportedOperationException("getParameterMap");
135     }
136
137     @Override
138     public String getProtocol() {
139         // TODO Implement getProtocol
140         throw new UnsupportedOperationException("getProtocol");
141     }
142
143     @Override
144     public String getScheme() {
145         // TODO Implement getScheme
146         throw new UnsupportedOperationException("getScheme");
147     }
148
149     @Override
150     public int getServerPort() {
151         // TODO Implement getServerPort
152         throw new UnsupportedOperationException("getServerPort");
153     }
154
155     @Override
156     public BufferedReader getReader() throws IOException {
157         // TODO Implement getReader
158         throw new UnsupportedOperationException("getReader");
159     }
160
161     @Override
162     public String getRemoteHost() {
163         // TODO Implement getRemoteHost
164         throw new UnsupportedOperationException("getRemoteHost");
165     }
166
167     @Override
168     public void setAttribute(String name, Object obj) {
169         // TODO Implement setAttribute
170         throw new UnsupportedOperationException("setAttribute");
171     }
172
173     @Override
174     public void removeAttribute(String name) {
175         // TODO Implement removeAttribute
176         throw new UnsupportedOperationException("removeAttribute");
177     }
178
179     @Override
180     public Locale getLocale() {
181         // TODO Implement getLocale
182         throw new UnsupportedOperationException("getLocale");
183     }
184
185     @Override
186     public Enumeration<Locale> getLocales() {
187         // TODO Implement getLocales
188         throw new UnsupportedOperationException("getLocales");
189     }
190
191     @Override
192     public boolean isSecure() {
193         // TODO Implement isSecure
194         throw new UnsupportedOperationException("isSecure");
195     }
196
197     @Override
198     public RequestDispatcher getRequestDispatcher(String path) {
199         // TODO Implement getRequestDispatcher
200         throw new UnsupportedOperationException("getRequestDispatcher");
201     }
202
203     @Override
204     public String getRealPath(String path) {
205         // TODO Implement getRealPath
206         throw new UnsupportedOperationException("getRealPath");
207     }
208
209     @Override
210     public int getRemotePort() {
211         // TODO Implement getRemotePort
212         throw new UnsupportedOperationException("getRemotePort");
213     }
214
215     @Override
216     public String getLocalName() {
217         // TODO Implement getLocalName
218         throw new UnsupportedOperationException("getLocalName");
219     }
220
221     @Override
222     public String getLocalAddr() {
223         // TODO Implement getLocalAddr
224         throw new UnsupportedOperationException("getLocalAddr");
225     }
226
227     @Override
228     public int getLocalPort() {
229         // TODO Implement getLocalPort
230         throw new UnsupportedOperationException("getLocalPort");
231     }
232
233     @Override
234     public ServletContext getServletContext() {
235         // TODO Implement getServletContext
236         throw new UnsupportedOperationException("getServletContext");
237     }
238
239     @Override
240     public AsyncContext startAsync() throws IllegalStateException {
241         // TODO Implement startAsync
242         throw new UnsupportedOperationException("startAsync");
243     }
244
245     @Override
246     public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse)
247             throws IllegalStateException {
248         // TODO Implement startAsync
249         throw new UnsupportedOperationException("startAsync");
250     }
251
252     @Override
253     public boolean isAsyncStarted() {
254         // TODO Implement isAsyncStarted
255         throw new UnsupportedOperationException("isAsyncStarted");
256     }
257
258     @Override
259     public boolean isAsyncSupported() {
260         // TODO Implement isAsyncSupported
261         throw new UnsupportedOperationException("isAsyncSupported");
262     }
263
264     @Override
265     public AsyncContext getAsyncContext() {
266         // TODO Implement getAsyncContext
267         throw new UnsupportedOperationException("getAsyncContext");
268     }
269
270     @Override
271     public DispatcherType getDispatcherType() {
272         // TODO Implement getDispatcherType
273         throw new UnsupportedOperationException("getDispatcherType");
274     }
275
276     @Override
277     public String getAuthType() {
278         // TODO Implement getAuthType
279         throw new UnsupportedOperationException("getAuthType");
280     }
281
282     @Override
283     public Cookie[] getCookies() {
284         // TODO Implement getCookies
285         throw new UnsupportedOperationException("getCookies");
286     }
287
288     @Override
289     public long getDateHeader(String name) {
290         // TODO Implement getDateHeader
291         throw new UnsupportedOperationException("getDateHeader");
292     }
293
294     @Override
295     public Enumeration<String> getHeaders(String name) {
296         // TODO Implement getHeaders
297         throw new UnsupportedOperationException("getHeaders");
298     }
299
300     @Override
301     public Enumeration<String> getHeaderNames() {
302         // TODO Implement getHeaderNames
303         throw new UnsupportedOperationException("getHeaderNames");
304     }
305
306     @Override
307     public int getIntHeader(String name) {
308         // TODO Implement getIntHeader
309         throw new UnsupportedOperationException("getIntHeader");
310     }
311
312     @Override
313     public String getMethod() {
314         // TODO Implement getMethod
315         throw new UnsupportedOperationException("getMethod");
316     }
317
318     @Override
319     public String getPathInfo() {
320         // TODO Implement getPathInfo
321         throw new UnsupportedOperationException("getPathInfo");
322     }
323
324     @Override
325     public String getPathTranslated() {
326         // TODO Implement getPathTranslated
327         throw new UnsupportedOperationException("getPathTranslated");
328     }
329
330     @Override
331     public String getContextPath() {
332         // TODO Implement getContextPath
333         throw new UnsupportedOperationException("getContextPath");
334     }
335
336     @Override
337     public String getQueryString() {
338         // TODO Implement getQueryString
339         throw new UnsupportedOperationException("getQueryString");
340     }
341
342     @Override
343     public String getRemoteUser() {
344         // TODO Implement getRemoteUser
345         throw new UnsupportedOperationException("getRemoteUser");
346     }
347
348     @Override
349     public boolean isUserInRole(String role) {
350         // TODO Implement isUserInRole
351         throw new UnsupportedOperationException("isUserInRole");
352     }
353
354     @Override
355     public Principal getUserPrincipal() {
356         // TODO Implement getUserPrincipal
357         throw new UnsupportedOperationException("getUserPrincipal");
358     }
359
360     @Override
361     public String getRequestedSessionId() {
362         // TODO Implement getRequestedSessionId
363         throw new UnsupportedOperationException("getRequestedSessionId");
364     }
365
366     @Override
367     public StringBuffer getRequestURL() {
368         // TODO Implement getRequestURL
369         throw new UnsupportedOperationException("getRequestURL");
370     }
371
372     @Override
373     public String getServletPath() {
374         // TODO Implement getServletPath
375         throw new UnsupportedOperationException("getServletPath");
376     }
377
378     @Override
379     public HttpSession getSession(boolean create) {
380         // TODO Implement getSession
381         throw new UnsupportedOperationException("getSession");
382     }
383
384     @Override
385     public HttpSession getSession() {
386         // TODO Implement getSession
387         throw new UnsupportedOperationException("getSession");
388     }
389
390     @Override
391     public String changeSessionId() {
392         // TODO Implement changeSessionId
393         throw new UnsupportedOperationException("changeSessionId");
394     }
395
396     @Override
397     public boolean isRequestedSessionIdValid() {
398         // TODO Implement isRequestedSessionIdValid
399         throw new UnsupportedOperationException("isRequestedSessionIdValid");
400     }
401
402     @Override
403     public boolean isRequestedSessionIdFromCookie() {
404         // TODO Implement isRequestedSessionIdFromCookie
405         throw new UnsupportedOperationException("isRequestedSessionIdFromCookie");
406     }
407
408     @Override
409     public boolean isRequestedSessionIdFromURL() {
410         // TODO Implement isRequestedSessionIdFromURL
411         throw new UnsupportedOperationException("isRequestedSessionIdFromURL");
412     }
413
414     @Override
415     public boolean isRequestedSessionIdFromUrl() {
416         // TODO Implement isRequestedSessionIdFromUrl
417         throw new UnsupportedOperationException("isRequestedSessionIdFromUrl");
418     }
419
420     @Override
421     public boolean authenticate(HttpServletResponse response) throws IOException, ServletException {
422         // TODO Implement authenticate
423         throw new UnsupportedOperationException("authenticate");
424     }
425
426     @Override
427     public void login(String username, String password) throws ServletException {
428         // TODO Implement login
429         throw new UnsupportedOperationException("login");
430     }
431
432     @Override
433     public void logout() throws ServletException {
434         // TODO Implement logout
435         throw new UnsupportedOperationException("logout");
436     }
437
438     @Override
439     public Collection<Part> getParts() throws IOException, ServletException {
440         // TODO Implement getParts
441         throw new UnsupportedOperationException("getParts");
442     }
443
444     @Override
445     public Part getPart(String name) throws IOException, ServletException {
446         // TODO Implement getPart
447         throw new UnsupportedOperationException("getPart");
448     }
449
450     @Override
451     public <T extends HttpUpgradeHandler> T upgrade(Class<T> httpUpgradeHandlerClass)
452             throws IOException, ServletException {
453         // TODO Implement upgrade
454         throw new UnsupportedOperationException("upgrade");
455     }
456     /////////////////////////////////////////////////////////////////////////////
457     // Constants
458     /////////////////////////////////////////////////////////////////////////////
459
460     /////////////////////////////////////////////////////////////////////////////
461     // Class variables
462     /////////////////////////////////////////////////////////////////////////////
463
464     /////////////////////////////////////////////////////////////////////////////
465     // Instance variables
466     /////////////////////////////////////////////////////////////////////////////
467
468     /////////////////////////////////////////////////////////////////////////////
469     // Constructors
470     /////////////////////////////////////////////////////////////////////////////
471
472     /////////////////////////////////////////////////////////////////////////////
473     // Public methods
474     /////////////////////////////////////////////////////////////////////////////
475
476     /////////////////////////////////////////////////////////////////////////////
477     // [interface name] implementation
478     /////////////////////////////////////////////////////////////////////////////
479
480     /////////////////////////////////////////////////////////////////////////////
481     // [super class] override methods
482     /////////////////////////////////////////////////////////////////////////////
483
484     /////////////////////////////////////////////////////////////////////////////
485     // Package protected methods
486     /////////////////////////////////////////////////////////////////////////////
487
488     /////////////////////////////////////////////////////////////////////////////
489     // Protected methods
490     /////////////////////////////////////////////////////////////////////////////
491
492     /////////////////////////////////////////////////////////////////////////////
493     // Private methods
494     /////////////////////////////////////////////////////////////////////////////
495
496     /////////////////////////////////////////////////////////////////////////////
497     // Inner classes
498     /////////////////////////////////////////////////////////////////////////////
499 }