File tree 4 files changed +13
-11
lines changed
main/java/ru/mystamps/web/feature/series/importing
test/java/ru/mystamps/web/service
4 files changed +13
-11
lines changed Original file line number Diff line number Diff line change 20
20
import lombok .Getter ;
21
21
import lombok .RequiredArgsConstructor ;
22
22
23
+ import java .util .List ;
24
+
23
25
@ Getter
24
26
@ RequiredArgsConstructor
25
27
public class RawParsedDataDto {
26
28
private final String categoryName ;
27
29
private final String countryName ;
28
- private final String imageUrl ;
30
+ private final List < String > imageUrls ;
29
31
private final String issueDate ;
30
32
private final String quantity ;
31
33
private final String perforated ;
@@ -37,4 +39,12 @@ public class RawParsedDataDto {
37
39
private final String altPrice ;
38
40
private final String altCurrency ;
39
41
private final String condition ;
42
+
43
+ // for backward compatibility
44
+ public String getImageUrl () {
45
+ if (imageUrls == null || imageUrls .isEmpty ()) {
46
+ return null ;
47
+ }
48
+ return imageUrls .get (0 );
49
+ }
40
50
}
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ public void onApplicationEvent(DownloadingSucceeded event) {
88
88
RawParsedDataDto data = new RawParsedDataDto (
89
89
info .getCategoryName (),
90
90
info .getCountryName (),
91
- info .getImageUrl (),
91
+ info .getImageUrls (),
92
92
info .getIssueDate (),
93
93
info .getQuantity (),
94
94
info .getPerforated (),
Original file line number Diff line number Diff line change @@ -46,14 +46,6 @@ public class SeriesInfo {
46
46
private String altPrice ;
47
47
private String altCurrency ;
48
48
private String condition ;
49
-
50
- // for backward compatibility
51
- public String getImageUrl () {
52
- if (imageUrls == null || imageUrls .isEmpty ()) {
53
- return null ;
54
- }
55
- return imageUrls .get (0 );
56
- }
57
49
58
50
/**
59
51
* Check whether any info about a series is available.
Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ public static RawParsedDataDto createRawParsedDataDto() {
280
280
return new RawParsedDataDto (
281
281
Random .categoryName (),
282
282
Random .countryName (),
283
- Random .url (),
283
+ Collections . singletonList ( Random .url () ),
284
284
Random .issueYear ().toString (),
285
285
Random .quantity ().toString (),
286
286
String .valueOf (Random .perforated ()),
You can’t perform that action at this time.
0 commit comments