1 20 package org.enhydra.barracuda.contrib.dbroggisch.examples.controller.servlets; 21 22 import java.io.BufferedReader; 23 import java.io.IOException; 24 import java.io.UnsupportedEncodingException; 25 import java.util.Enumeration; 26 import java.util.HashMap; 27 import java.util.Locale; 28 import java.util.Map; 29 import java.security.Principal; 30 import javax.servlet.RequestDispatcher; 31 import javax.servlet.ServletInputStream; 32 import javax.servlet.ServletRequest; 33 import javax.servlet.http.Cookie; 34 import javax.servlet.http.HttpServletRequest; 35 import javax.servlet.http.HttpSession; 36 import com.oreilly.servlet.MultipartRequest; 37 38 39 public class MyMultipartRequest extends MultipartRequest implements HttpServletRequest { 40 HttpServletRequest _req; 41 Map _pMap; 42 public MyMultipartRequest(HttpServletRequest req, String destDir) 43 throws IOException 44 { 45 super(req, destDir); 46 _req = req; 47 } 48 49 51 56 public String getMethod() { 57 return _req.getMethod(); 58 } 59 60 65 public String getAuthType() { 66 return _req.getAuthType(); 67 } 68 69 74 public Cookie[] getCookies() { 75 return _req.getCookies(); 76 } 77 78 84 public long getDateHeader(String param1) { 85 return _req.getDateHeader(param1); 86 } 87 88 94 public String getHeader(String param1) { 95 return _req.getHeader(param1); 96 } 97 98 104 public Enumeration getHeaders(String param1) { 105 return _req.getHeaders(param1); 106 } 107 108 113 public Enumeration getHeaderNames() { 114 return _req.getHeaderNames(); 115 } 116 117 123 public int getIntHeader(String param1) { 124 return _req.getIntHeader(param1); 125 } 126 127 132 public String getPathInfo() { 133 return _req.getPathInfo(); 134 } 135 136 141 public String getPathTranslated() { 142 return _req.getPathTranslated(); 143 } 144 145 150 public String getContextPath() { 151 return _req.getContextPath(); 152 } 153 154 159 public String getQueryString() { 160 return _req.getQueryString(); 161 } 162 163 168 public String getRemoteUser() { 169 return _req.getRemoteUser(); 170 } 171 172 178 public boolean isUserInRole(String param1) { 179 return _req.isUserInRole(param1); 180 } 181 182 187 public Principal getUserPrincipal() { 188 return _req.getUserPrincipal(); 189 } 190 191 196 public String getRequestedSessionId() { 197 return _req.getRequestedSessionId(); 198 } 199 200 205 public String getRequestURI() { 206 return _req.getRequestURI(); 207 } 208 209 214 public StringBuffer getRequestURL() { 215 return _req.getRequestURL(); 216 } 217 218 223 public String getServletPath() { 224 return _req.getServletPath(); 225 } 226 227 233 public HttpSession getSession(boolean param1) { 234 return _req.getSession(param1); 235 } 236 237 242 public HttpSession getSession() { 243 return _req.getSession(); 244 } 245 246 251 public boolean isRequestedSessionIdValid() { 252 return _req.isRequestedSessionIdValid(); 253 } 254 255 260 public boolean isRequestedSessionIdFromCookie() { 261 return _req.isRequestedSessionIdFromCookie(); 262 } 263 264 269 public boolean isRequestedSessionIdFromURL() { 270 return _req.isRequestedSessionIdFromURL(); 271 } 272 273 278 public boolean isRequestedSessionIdFromUrl() { 279 return _req.isRequestedSessionIdFromUrl(); 280 } 281 283 288 public String getCharacterEncoding() { 289 return _req.getCharacterEncoding(); 290 } 291 292 297 public String getProtocol() { 298 return _req.getProtocol(); 299 } 300 301 307 public ServletInputStream getInputStream() throws IOException { 308 return _req.getInputStream(); 309 } 310 311 316 public int getContentLength() { 317 return _req.getContentLength(); 318 } 319 320 325 public String getContentType() { 326 return _req.getContentType(); 327 } 328 329 335 public Object getAttribute(String param1) { 336 return _req.getAttribute(param1); 337 } 338 339 344 public Enumeration getAttributeNames() { 345 return _req.getAttributeNames(); 346 } 347 348 354 public void setCharacterEncoding(String param1) throws UnsupportedEncodingException { 355 _req.setCharacterEncoding(param1); 356 } 357 358 364 public String getParameter(String param1) { 365 return super.getParameter(param1); 366 } 367 368 373 public Enumeration getParameterNames() { 374 return super.getParameterNames(); 375 } 376 377 383 public String[] getParameterValues(String param1) { 384 return super.getParameterValues(param1); 385 } 386 387 392 public Map getParameterMap() { 393 if(_pMap == null) { 394 _pMap = new HashMap(); 395 for(Enumeration enum = super.getParameterNames(); enum.hasMoreElements();) { 396 String name = (String)enum.nextElement(); 397 _pMap.put(name, super.getParameter(name)); 398 } 399 } 400 return _pMap; 401 } 402 403 408 public String getScheme() { 409 return _req.getScheme(); 410 } 411 412 417 public String getServerName() { 418 return _req.getServerName(); 419 } 420 421 426 public int getServerPort() { 427 return _req.getServerPort(); 428 } 429 430 436 public BufferedReader getReader() throws IOException { 437 return _req.getReader(); 438 } 439 440 445 public String getRemoteAddr() { 446 return _req.getRemoteAddr(); 447 } 448 449 454 public String getRemoteHost() { 455 return _req.getRemoteHost(); 456 } 457 458 464 public void setAttribute(String param1, Object param2) { 465 _req.setAttribute(param1, param2); 466 } 467 468 473 public void removeAttribute(String param1) { 474 _req.removeAttribute(param1); 475 } 476 477 482 public Locale getLocale() { 483 return _req.getLocale(); 484 } 485 486 491 public Enumeration getLocales() { 492 return _req.getLocales(); 493 } 494 495 500 public boolean isSecure() { 501 return _req.isSecure(); 502 } 503 504 510 public RequestDispatcher getRequestDispatcher(String param1) { 511 return _req.getRequestDispatcher(param1); 512 } 513 514 520 public String getRealPath(String param1) { 521 return _req.getRealPath(param1); 522 } 523 524 } 525 | Popular Tags |