PageRenderTime 44ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 1ms

/jira-project/jira-components/jira-core/src/main/java/com/atlassian/jira/mail/SubscriptionMailQueueMockRequest.java

https://bitbucket.org/ahmed_bilal_360factors/jira7-core
Java | 320 lines | 238 code | 70 blank | 12 comment | 0 complexity | f185691beef1a015094965867416d266 MD5 | raw file
Possible License(s): Apache-2.0
  1. package com.atlassian.jira.mail;
  2. import com.atlassian.jira.component.ComponentAccessor;
  3. import com.atlassian.jira.config.properties.APKeys;
  4. import javax.servlet.AsyncContext;
  5. import javax.servlet.DispatcherType;
  6. import javax.servlet.RequestDispatcher;
  7. import javax.servlet.ServletContext;
  8. import javax.servlet.ServletException;
  9. import javax.servlet.ServletInputStream;
  10. import javax.servlet.ServletRequest;
  11. import javax.servlet.ServletResponse;
  12. import javax.servlet.http.Cookie;
  13. import javax.servlet.http.HttpServletRequest;
  14. import javax.servlet.http.HttpServletResponse;
  15. import javax.servlet.http.HttpSession;
  16. import javax.servlet.http.Part;
  17. import java.io.BufferedReader;
  18. import java.io.IOException;
  19. import java.io.UnsupportedEncodingException;
  20. import java.security.Principal;
  21. import java.util.Collection;
  22. import java.util.Enumeration;
  23. import java.util.Locale;
  24. import java.util.Map;
  25. /**
  26. * Created by IntelliJ IDEA.
  27. * User: MIKE
  28. * Date: Jul 7, 2005
  29. * Time: 10:06:42 PM
  30. * To change this template use File | Settings | File Templates.
  31. */
  32. public class SubscriptionMailQueueMockRequest implements HttpServletRequest {
  33. private String ctx;
  34. public SubscriptionMailQueueMockRequest(String contextPath) {
  35. this.ctx = contextPath;
  36. }
  37. // these two methods are used...
  38. public String getContextPath() {
  39. return this.ctx;
  40. }
  41. public String getRequestURI() {
  42. return ComponentAccessor.getApplicationProperties().getString(APKeys.JIRA_BASEURL);
  43. }
  44. // the rest aren't! :)
  45. public String getAuthType() {
  46. return null; //To change body of implemented methods use File | Settings | File Templates.
  47. }
  48. public Cookie[] getCookies() {
  49. return new Cookie[0]; //To change body of implemented methods use File | Settings | File Templates.
  50. }
  51. public long getDateHeader(String string) {
  52. return 0; //To change body of implemented methods use File | Settings | File Templates.
  53. }
  54. public String getHeader(String string) {
  55. return null; //To change body of implemented methods use File | Settings | File Templates.
  56. }
  57. public Enumeration getHeaders(String string) {
  58. return null; //To change body of implemented methods use File | Settings | File Templates.
  59. }
  60. public Enumeration getHeaderNames() {
  61. return null; //To change body of implemented methods use File | Settings | File Templates.
  62. }
  63. public int getIntHeader(String string) {
  64. return 0; //To change body of implemented methods use File | Settings | File Templates.
  65. }
  66. public String getMethod() {
  67. return null; //To change body of implemented methods use File | Settings | File Templates.
  68. }
  69. public String getPathInfo() {
  70. return null; //To change body of implemented methods use File | Settings | File Templates.
  71. }
  72. public String getPathTranslated() {
  73. return null; //To change body of implemented methods use File | Settings | File Templates.
  74. }
  75. public String getQueryString() {
  76. return null; //To change body of implemented methods use File | Settings | File Templates.
  77. }
  78. public String getRemoteUser() {
  79. return null; //To change body of implemented methods use File | Settings | File Templates.
  80. }
  81. public boolean isUserInRole(String string) {
  82. return false; //To change body of implemented methods use File | Settings | File Templates.
  83. }
  84. public Principal getUserPrincipal() {
  85. return null; //To change body of implemented methods use File | Settings | File Templates.
  86. }
  87. public String getRequestedSessionId() {
  88. return null; //To change body of implemented methods use File | Settings | File Templates.
  89. }
  90. public StringBuffer getRequestURL() {
  91. return null; //To change body of implemented methods use File | Settings | File Templates.
  92. }
  93. public String getServletPath() {
  94. return null; //To change body of implemented methods use File | Settings | File Templates.
  95. }
  96. public HttpSession getSession(boolean b) {
  97. return null; //To change body of implemented methods use File | Settings | File Templates.
  98. }
  99. public HttpSession getSession() {
  100. return null; //To change body of implemented methods use File | Settings | File Templates.
  101. }
  102. public boolean isRequestedSessionIdValid() {
  103. return false; //To change body of implemented methods use File | Settings | File Templates.
  104. }
  105. public boolean isRequestedSessionIdFromCookie() {
  106. return false; //To change body of implemented methods use File | Settings | File Templates.
  107. }
  108. public boolean isRequestedSessionIdFromURL() {
  109. return false; //To change body of implemented methods use File | Settings | File Templates.
  110. }
  111. public boolean isRequestedSessionIdFromUrl() {
  112. return false; //To change body of implemented methods use File | Settings | File Templates.
  113. }
  114. public Object getAttribute(String string) {
  115. return null; //To change body of implemented methods use File | Settings | File Templates.
  116. }
  117. public Enumeration getAttributeNames() {
  118. return null; //To change body of implemented methods use File | Settings | File Templates.
  119. }
  120. public String getCharacterEncoding() {
  121. return null; //To change body of implemented methods use File | Settings | File Templates.
  122. }
  123. public void setCharacterEncoding(String string) throws UnsupportedEncodingException {
  124. //To change body of implemented methods use File | Settings | File Templates.
  125. }
  126. public int getContentLength() {
  127. return 0; //To change body of implemented methods use File | Settings | File Templates.
  128. }
  129. public String getContentType() {
  130. return null; //To change body of implemented methods use File | Settings | File Templates.
  131. }
  132. public ServletInputStream getInputStream() throws IOException {
  133. return null; //To change body of implemented methods use File | Settings | File Templates.
  134. }
  135. public String getParameter(String string) {
  136. return null; //To change body of implemented methods use File | Settings | File Templates.
  137. }
  138. public Enumeration getParameterNames() {
  139. return null; //To change body of implemented methods use File | Settings | File Templates.
  140. }
  141. public String[] getParameterValues(String string) {
  142. return new String[0]; //To change body of implemented methods use File | Settings | File Templates.
  143. }
  144. public Map getParameterMap() {
  145. return null; //To change body of implemented methods use File | Settings | File Templates.
  146. }
  147. public String getProtocol() {
  148. return null; //To change body of implemented methods use File | Settings | File Templates.
  149. }
  150. public String getScheme() {
  151. return null; //To change body of implemented methods use File | Settings | File Templates.
  152. }
  153. public String getServerName() {
  154. return null; //To change body of implemented methods use File | Settings | File Templates.
  155. }
  156. public int getServerPort() {
  157. return 0; //To change body of implemented methods use File | Settings | File Templates.
  158. }
  159. public BufferedReader getReader() throws IOException {
  160. return null; //To change body of implemented methods use File | Settings | File Templates.
  161. }
  162. public String getRemoteAddr() {
  163. return null; //To change body of implemented methods use File | Settings | File Templates.
  164. }
  165. public String getRemoteHost() {
  166. return null; //To change body of implemented methods use File | Settings | File Templates.
  167. }
  168. public void setAttribute(String string, Object object) {
  169. //To change body of implemented methods use File | Settings | File Templates.
  170. }
  171. public void removeAttribute(String string) {
  172. //To change body of implemented methods use File | Settings | File Templates.
  173. }
  174. public Locale getLocale() {
  175. return null; //To change body of implemented methods use File | Settings | File Templates.
  176. }
  177. public Enumeration getLocales() {
  178. return null; //To change body of implemented methods use File | Settings | File Templates.
  179. }
  180. public boolean isSecure() {
  181. return false; //To change body of implemented methods use File | Settings | File Templates.
  182. }
  183. public RequestDispatcher getRequestDispatcher(String string) {
  184. return null; //To change body of implemented methods use File | Settings | File Templates.
  185. }
  186. public String getRealPath(String string) {
  187. return null; //To change body of implemented methods use File | Settings | File Templates.
  188. }
  189. public int getRemotePort() {
  190. return 0;
  191. }
  192. public String getLocalName() {
  193. return null;
  194. }
  195. public String getLocalAddr() {
  196. return null;
  197. }
  198. public int getLocalPort() {
  199. return 0;
  200. }
  201. @Override
  202. public boolean authenticate(final HttpServletResponse response) throws IOException, ServletException {
  203. throw new UnsupportedOperationException("Not implemented");
  204. }
  205. @Override
  206. public void login(final String username, final String password) throws ServletException {
  207. throw new UnsupportedOperationException("Not implemented");
  208. }
  209. @Override
  210. public void logout() throws ServletException {
  211. throw new UnsupportedOperationException("Not implemented");
  212. }
  213. @Override
  214. public Collection<Part> getParts() throws IOException, ServletException {
  215. throw new UnsupportedOperationException("Not implemented");
  216. }
  217. @Override
  218. public Part getPart(final String name) throws IOException, ServletException {
  219. throw new UnsupportedOperationException("Not implemented");
  220. }
  221. @Override
  222. public ServletContext getServletContext() {
  223. throw new UnsupportedOperationException("Not implemented");
  224. }
  225. @Override
  226. public AsyncContext startAsync() throws IllegalStateException {
  227. throw new UnsupportedOperationException("Not implemented");
  228. }
  229. @Override
  230. public AsyncContext startAsync(final ServletRequest servletRequest, final ServletResponse servletResponse)
  231. throws IllegalStateException {
  232. throw new UnsupportedOperationException("Not implemented");
  233. }
  234. @Override
  235. public boolean isAsyncStarted() {
  236. throw new UnsupportedOperationException("Not implemented");
  237. }
  238. @Override
  239. public boolean isAsyncSupported() {
  240. throw new UnsupportedOperationException("Not implemented");
  241. }
  242. @Override
  243. public AsyncContext getAsyncContext() {
  244. throw new UnsupportedOperationException("Not implemented");
  245. }
  246. @Override
  247. public DispatcherType getDispatcherType() {
  248. throw new UnsupportedOperationException("Not implemented");
  249. }
  250. }