1 9 package org.jboss.portal.bridge; 10 11 import java.io.BufferedReader ; 12 import java.io.IOException ; 13 import java.io.UnsupportedEncodingException ; 14 import java.security.Principal ; 15 import java.util.Enumeration ; 16 import java.util.Locale ; 17 import java.util.Map ; 18 19 import javax.portlet.RenderRequest; 20 import javax.portlet.PortletRequest; 21 import javax.servlet.RequestDispatcher ; 22 import javax.servlet.ServletInputStream ; 23 import javax.servlet.http.Cookie ; 24 import javax.servlet.http.HttpServletRequest ; 25 import javax.servlet.http.HttpSession ; 26 27 import org.jboss.portal.server.PortalRequest; 28 29 33 public class BridgeRequest implements HttpServletRequest 34 { 35 36 protected final PortalRequest preq; 37 protected final PortletRequest req; 38 protected final HttpServletRequest hreq; 39 40 public BridgeRequest( 41 PortalRequest preq, 42 PortletRequest req, 43 HttpServletRequest hreq) 44 { 45 this.preq = preq; 46 this.req = req; 47 this.hreq = hreq; 48 } 49 50 public String getProtocol() 51 { 52 return null; 53 } 54 55 public String getRemoteAddr() 56 { 57 return null; 58 } 59 60 public String getRemoteHost() 61 { 62 return null; 63 } 64 65 public String getRealPath(String s) 66 { 67 return null; 68 } 69 70 public StringBuffer getRequestURL() 71 { 72 return null; 73 } 74 75 public String getPathInfo() 76 { 77 return preq.getPathInfo(); 78 } 79 80 public String getQueryString() 81 { 82 return preq.getQueryString(); 83 } 84 85 public String getServletPath() 86 { 87 return preq.getServletPath(); 88 } 89 90 public String getRequestURI() 91 { 92 return preq.getRequestURI(); 93 } 94 95 public String getPathTranslated() 96 { 97 return preq.getPathTranslated(); 98 } 99 100 public String getScheme() 101 { 102 return req.getScheme(); 103 } 104 105 public String getServerName() 106 { 107 return req.getServerName(); 108 } 109 110 public int getServerPort() 111 { 112 return req.getServerPort(); 113 } 114 115 public Object getAttribute(String name) 116 { 117 return req.getAttribute(name); 118 } 119 120 public Enumeration getAttributeNames() 121 { 122 return req.getAttributeNames(); 123 } 124 125 public void setAttribute(String name, Object value) 126 { 127 req.setAttribute(name, value); 128 } 129 130 public void removeAttribute(String name) 131 { 132 req.removeAttribute(name); 133 } 134 135 public Locale getLocale() 136 { 137 return req.getLocale(); 138 } 139 140 public Enumeration getLocales() 141 { 142 return req.getLocales(); 143 } 144 145 public boolean isSecure() 146 { 147 return req.isSecure(); 148 } 149 150 public String getAuthType() 151 { 152 return req.getAuthType(); 153 } 154 155 public String getContextPath() 156 { 157 return req.getContextPath(); 158 } 159 160 public String getRemoteUser() 161 { 162 return req.getRemoteUser(); 163 } 164 165 public Principal getUserPrincipal() 166 { 167 return req.getUserPrincipal(); 168 } 169 170 public String getRequestedSessionId() 171 { 172 return req.getRequestedSessionId(); 173 } 174 175 public boolean isRequestedSessionIdValid() 176 { 177 return req.isRequestedSessionIdValid(); 178 } 179 180 public String getParameter(String s) 181 { 182 return req.getParameter(s); 183 } 184 185 public Enumeration getParameterNames() 186 { 187 return req.getParameterNames(); 188 } 189 190 public String [] getParameterValues(String s) 191 { 192 return req.getParameterValues(s); 193 } 194 195 public Map getParameterMap() 196 { 197 return req.getParameterMap(); 198 } 199 200 public String getCharacterEncoding() 201 { 202 return null; 203 } 204 205 public void setCharacterEncoding(String s) throws UnsupportedEncodingException 206 { 207 } 208 209 public int getContentLength() 210 { 211 return 0; 212 } 213 214 public String getContentType() 215 { 216 return null; 217 } 218 219 public ServletInputStream getInputStream() throws IOException 220 { 221 return null; 222 } 223 224 public BufferedReader getReader() throws IOException 225 { 226 return null; 227 } 228 229 231 public String getHeader(String name) 232 { 233 return null; 234 } 235 236 public Enumeration getHeaders(String names) 237 { 238 return null; 239 } 240 241 public Enumeration getHeaderNames() 242 { 243 return null; 244 } 245 246 public Cookie [] getCookies() 247 { 248 return new Cookie [0]; 249 } 250 251 public long getDateHeader(String s) 252 { 253 return 0; 254 } 255 256 public int getIntHeader(String s) 257 { 258 return 0; 259 } 260 261 public String getMethod() 262 { 263 return "GET"; 264 } 265 266 public RequestDispatcher getRequestDispatcher(String s) 267 { 268 return hreq.getRequestDispatcher(s); 269 } 270 271 public boolean isUserInRole(String roleName) 272 { 273 return req.isUserInRole(roleName); 274 } 275 276 public HttpSession getSession(boolean create) 277 { 278 return hreq.getSession(create); 279 } 280 281 public HttpSession getSession() 282 { 283 return hreq.getSession(); 284 } 285 286 public boolean isRequestedSessionIdFromCookie() 287 { 288 return false; 289 } 290 291 public boolean isRequestedSessionIdFromURL() 292 { 293 return false; 294 } 295 296 public boolean isRequestedSessionIdFromUrl() 297 { 298 return false; 299 } 300 301 public int getRemotePort() 302 { 303 throw new UnsupportedOperationException (); 304 } 305 306 public String getLocalName() 307 { 308 throw new UnsupportedOperationException (); 309 } 310 311 public String getLocalAddr() 312 { 313 throw new UnsupportedOperationException (); 314 } 315 316 public int getLocalPort() 317 { 318 throw new UnsupportedOperationException (); 319 } 320 } 321 | Popular Tags |