1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.search.backend.smo.internal;
20
21 import java.util.List;
22
23 import org.apache.maven.search.api.Record;
24 import org.apache.maven.search.api.SearchRequest;
25 import org.apache.maven.search.api.support.SearchResponseSupport;
26 import org.apache.maven.search.backend.smo.SmoSearchResponse;
27
28 import static java.util.Objects.requireNonNull;
29
30 public class SmoSearchResponseImpl extends SearchResponseSupport implements SmoSearchResponse {
31 private final String searchUri;
32
33 private final String rawJsonResponse;
34
35 public SmoSearchResponseImpl(
36 SearchRequest searchRequest, int totalHits, List<Record> page, String searchUri, String rawJsonResponse) {
37 super(searchRequest, totalHits, page);
38 this.searchUri = requireNonNull(searchUri);
39 this.rawJsonResponse = requireNonNull(rawJsonResponse);
40 }
41
42 @Override
43 public String getSearchUri() {
44 return searchUri;
45 }
46
47 @Override
48 public String getRawJsonResponse() {
49 return rawJsonResponse;
50 }
51 }