1 7 package org.exoplatform.services.wsrp.producer.impl.helpers; 8 9 import java.io.BufferedReader ; 10 import java.io.IOException ; 11 import java.io.UnsupportedEncodingException ; 12 import java.security.Principal ; 13 import java.util.Collection ; 14 import java.util.Collections ; 15 import java.util.Enumeration ; 16 import java.util.HashMap ; 17 import java.util.Iterator ; 18 import java.util.Locale ; 19 import java.util.Map ; 20 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 31 public class WSRPHttpServletRequest implements HttpServletRequest { 32 33 private HttpSession session; 34 private Map parameters; 35 private Map attributes; 36 37 public WSRPHttpServletRequest(HttpSession session){ 38 this.session = session; 39 this.parameters = new HashMap (); 40 this.attributes = new HashMap (); 41 } 42 43 public String getAuthType() { 44 return null; 45 } 46 47 public Cookie [] getCookies() { 48 return null; 49 } 50 51 public long getDateHeader(String arg0) { 52 return 0; 53 } 54 55 public String getHeader(String arg0) { 56 return null; 57 } 58 59 public Enumeration getHeaders(String arg0) { 60 return null; 61 } 62 63 public Enumeration getHeaderNames() { 64 return null; 65 } 66 67 public int getIntHeader(String arg0) { 68 return 0; 69 } 70 71 public String getMethod() { 72 return null; 73 } 74 75 public String getPathInfo() { 76 return null; 77 } 78 79 public String getPathTranslated() { 80 return null; 81 } 82 83 public String getContextPath() { 84 return null; 85 } 86 87 public String getQueryString() { 88 return null; 89 } 90 91 public String getRemoteUser() { 92 return null; 93 } 94 95 public boolean isUserInRole(String arg0) { 96 return false; 97 } 98 99 public Principal getUserPrincipal() { 100 return null; 101 } 102 103 public String getRequestedSessionId() { 104 return null; 105 } 106 107 public String getRequestURI() { 108 return null; 109 } 110 111 public StringBuffer getRequestURL() { 112 return null; 113 } 114 115 public String getServletPath() { 116 return null; 117 } 118 119 public HttpSession getSession(boolean arg0) { 120 return session; 121 } 122 123 public HttpSession getSession() { 124 return getSession(true); 125 } 126 127 public boolean isRequestedSessionIdValid() { 128 return false; 129 } 130 131 public boolean isRequestedSessionIdFromCookie() { 132 return false; 133 } 134 135 public boolean isRequestedSessionIdFromURL() { 136 return false; 137 } 138 139 public Object getAttribute(String arg0) { 140 return attributes.get(arg0); 141 } 142 143 public Enumeration getAttributeNames() { 144 return Collections.enumeration(attributes.keySet()); 145 } 146 147 public String getCharacterEncoding() { 148 return null; 149 } 150 151 public void setCharacterEncoding(String arg0) throws UnsupportedEncodingException { 152 } 153 154 public int getContentLength() { 155 return 0; 156 } 157 158 public String getContentType() { 159 return null; 160 } 161 162 public ServletInputStream getInputStream() throws IOException { 163 return null; 164 } 165 166 public String getParameter(String arg0) { 167 return (String ) parameters.get(arg0); 168 } 169 170 public Enumeration getParameterNames() { 171 return Collections.enumeration(parameters.keySet()); 172 } 173 174 public String [] getParameterValues(String arg0) { 175 Collection c = parameters.values(); 176 String [] array = new String [c.size()]; 177 int i = 0; 178 for (Iterator iter = c.iterator(); iter.hasNext(); i++) { 179 array[i] = (String ) iter.next(); 180 } 181 return array; 182 } 183 184 public Map getParameterMap() { 185 return Collections.unmodifiableMap(parameters); 186 } 187 188 public String getProtocol() { 189 return null; 190 } 191 192 public String getScheme() { 193 return null; 194 } 195 196 public String getServerName() { 197 return null; 198 } 199 200 public int getServerPort() { 201 return 0; 202 } 203 204 public BufferedReader getReader() throws IOException { 205 return null; 206 } 207 208 public String getRemoteAddr() { 209 return null; 210 } 211 212 public String getRemoteHost() { 213 return null; 214 } 215 216 public void setAttribute(String arg0, Object arg1) { 217 attributes.put(arg0, arg1); 218 } 219 220 public void removeAttribute(String arg0) { 221 attributes.remove(arg0); 222 } 223 224 public Locale getLocale() { 225 return null; 226 } 227 228 public Enumeration getLocales() { 229 return null; 230 } 231 232 public boolean isSecure() { 233 return false; 234 } 235 236 public RequestDispatcher getRequestDispatcher(String arg0) { 237 return null; 238 } 239 240 public int getLocalPort(){ 242 return 0; 243 } 244 245 public String getLocalAddr(){ 246 return "local adress"; 247 } 248 249 public String getLocalName(){ 250 return "Local name"; 251 } 252 253 public int getRemotePort(){ 254 return 0; 255 } 256 257 public void setParameter(String string, String string2) { 258 parameters.put(string, string2); 259 } 260 261 public String getRealPath(String arg0) { 263 return null; 264 } 265 266 public boolean isRequestedSessionIdFromUrl() { 267 return false; 268 } 269 270 271 272 } 273 | Popular Tags |