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