|
5 | 5 | import java.util.List; |
6 | 6 | import java.util.Map; |
7 | 7 | import java.util.stream.Collectors; |
8 | | -import javax.security.auth.Subject; |
9 | 8 | import javax.servlet.http.HttpServletRequest; |
10 | 9 | import javax.servlet.http.HttpServletResponse; |
11 | 10 | import javax.servlet.http.Part; |
@@ -35,25 +34,49 @@ public static Builder createServletContext() { |
35 | 34 | return new Builder(new DataLoaderRegistry()); |
36 | 35 | } |
37 | 36 |
|
| 37 | + /** |
| 38 | + * @deprecated Use |
| 39 | + * <tt>dataFetchingEnvironment.getGraphQlContext().get(HttpServletRequest.class)</tt> instead. |
| 40 | + * Since 13.0.0 |
| 41 | + */ |
38 | 42 | @Override |
| 43 | + @Deprecated |
39 | 44 | public HttpServletRequest getHttpServletRequest() { |
40 | 45 | return httpServletRequest; |
41 | 46 | } |
42 | 47 |
|
| 48 | + /** |
| 49 | + * @deprecated Use |
| 50 | + * <tt>dataFetchingEnvironment.getGraphQlContext().get(HttpServletResponse.class)</tt> |
| 51 | + * instead. Since 13.0.0 |
| 52 | + */ |
43 | 53 | @Override |
| 54 | + @Deprecated |
44 | 55 | public HttpServletResponse getHttpServletResponse() { |
45 | 56 | return httpServletResponse; |
46 | 57 | } |
47 | 58 |
|
| 59 | + /** |
| 60 | + * @deprecated Use |
| 61 | + * <tt>dataFetchingEnvironment.getGraphQlContext().get(HttpServletRequest.class)</tt> instead |
| 62 | + * to get the request and retrieve the file parts yourself. Since 13.0.0 |
| 63 | + */ |
48 | 64 | @Override |
| 65 | + @Deprecated |
49 | 66 | @SneakyThrows |
50 | 67 | public List<Part> getFileParts() { |
51 | 68 | return httpServletRequest.getParts().stream() |
52 | 69 | .filter(part -> part.getContentType() != null) |
53 | 70 | .collect(Collectors.toList()); |
54 | 71 | } |
55 | 72 |
|
| 73 | + /** |
| 74 | + * @deprecated Use |
| 75 | + * <tt>dataFetchingEnvironment.getGraphQlContext().get(HttpServletRequest.class)</tt> instead |
| 76 | + * to get the request and retrieve the parts yourself. Since 13.0.0 |
| 77 | + */ |
56 | 78 | @Override |
| 79 | + @Deprecated |
57 | 80 | @SneakyThrows |
58 | 81 | public Map<String, List<Part>> getParts() { |
59 | 82 | return httpServletRequest.getParts().stream().collect(Collectors.groupingBy(Part::getName)); |
|
0 commit comments