Skip to content

Commit a79e94f

Browse files
authored
Merge pull request #585 from arturCwiklinsky/master
Version 3.51
2 parents 401c0a6 + b572171 commit a79e94f

10 files changed

Lines changed: 20 additions & 240 deletions

File tree

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.testdroid</groupId>
55
<artifactId>testdroid-api</artifactId>
6-
<version>3.50.0</version>
6+
<version>3.51.0</version>
77
<packaging>jar</packaging>
88
<name>Bitbar API v2</name>
99
<url>https://github.com/bitbar/testdroid-api</url>
@@ -19,7 +19,7 @@
1919
<jacoco-maven-plugin.skip>true</jacoco-maven-plugin.skip>
2020
<!-- disable default deployment -->
2121
<maven.deploy.skip>true</maven.deploy.skip>
22-
<org.springframework.boot.spring-boot-dependencies>3.5.9</org.springframework.boot.spring-boot-dependencies>
22+
<org.springframework.boot.spring-boot-dependencies>3.5.10</org.springframework.boot.spring-boot-dependencies>
2323
<org.apache.commons.collections4.version>4.5.0</org.apache.commons.collections4.version>
2424
<org.apache.commons.commons-rng-simple.version>1.6</org.apache.commons.commons-rng-simple.version>
2525
<org.apache.commons.commons-text.version>1.15.0</org.apache.commons.commons-text.version>

src/main/java/com/testdroid/api/AbstractAPIClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ private RequestBody buildRequestBody(Object body, Map<String, String> fileExtraP
234234
requestBody = RequestBody.create(IOUtils.toByteArray(inputStream), mediaType);
235235
} else if (body instanceof APIEntity entity) {
236236
requestBody = RequestBody.create(OBJECT_MAPPER.writeValueAsString(entity), APPLICATION_JSON);
237-
} else if (body instanceof RequestBody) {
238-
requestBody = (RequestBody) body;
237+
} else if (body instanceof RequestBody rb) {
238+
requestBody = rb;
239239
} else if (body instanceof Map map) {
240240
requestBody = buildFromMap(map);
241241
} else if (body == null) {

src/main/java/com/testdroid/api/dto/MappingKey.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ private MappingKey() {
3636
public static final String ANDROID_ENABLED = "androidEnabled";
3737
public static final String API_KEY = "apiKey";
3838
public static final String API_LEVEL = "apiLevel";
39-
public static final String ARCHITECTURE = "architecture";
4039
public static final String ARCHIVE_TIME = "archiveTime";
4140
public static final String ARCHIVING_ITEM_COUNT = "archivingItemCount";
4241
public static final String ARCHIVING_STRATEGY = "archivingStrategy";
@@ -48,11 +47,9 @@ private MappingKey() {
4847
public static final String BLUETOOTH_ON = "bluetoothOn";
4948
public static final String BODY = "body";
5049
public static final String BRAINTREE_ID = "braintreeId";
51-
public static final String BROWSER_IDS_ARR = "browserIds[]";
50+
public static final String BROWSERS_MATCHED = "browsersMatched";
5251
public static final String BROWSER_NAME = "browserName";
5352
public static final String BROWSER_VERSION = "browserVersion";
54-
public static final String BUILD_ENABLED = "buildEnabled";
55-
public static final String BUILD_LIMIT = "buildLimit";
5653
public static final String CAN_RUN_FROM_UI = "canRunFromUI";
5754
public static final String CARD_NUMBER = "cardNumber";
5855
public static final String CENT_PRICE = "centPrice";
@@ -181,7 +178,6 @@ private MappingKey() {
181178
public static final String INCLUDE_FRAMEWORKS = "includeFrameworks";
182179
public static final String INIT_STEP = "initStep";
183180
public static final String INPUT_TYPE = "inputType";
184-
public static final String INSTALL_URL = "installUrl";
185181
public static final String INTERNAL_STORAGE = "internalStorage";
186182
public static final String INTERNET_ACCESS = "internetAccess";
187183
public static final String IN_USE = "inUse";

src/main/java/com/testdroid/api/model/APIAdminDevice.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ public ComplexState compute(SubState subState) {
136136

137137
private boolean ownerHasAccountService;
138138

139+
private boolean browsersMatched;
140+
139141
public APIAdminDevice() {
140142
}
141143

@@ -155,7 +157,7 @@ public APIAdminDevice(
155157
String clusterIpAddress, String clusterRegion, String clusterLocation, LocalDateTime lastOnlineTime,
156158
Long accountId, String accountName, LocalDateTime dedicationEndTime, String comment, String location,
157159
Long testTimeLimit, Boolean locked, APIDevice.OsType osType, APIDevice.Platform platform,
158-
Boolean forceRestore) {
160+
Boolean forceRestore, boolean browsersMatched) {
159161
super(id);
160162
this.name = name;
161163
this.manufacturer = manufacturer;
@@ -185,6 +187,7 @@ public APIAdminDevice(
185187
this.osType = osType;
186188
this.platform = platform;
187189
this.forceRestore = forceRestore;
190+
this.browsersMatched = browsersMatched;
188191
}
189192

190193
public String getName() {
@@ -408,6 +411,14 @@ public void setOwnerHasAccountService(boolean ownerHasAccountService) {
408411
this.ownerHasAccountService = ownerHasAccountService;
409412
}
410413

414+
public boolean isBrowsersMatched() {
415+
return browsersMatched;
416+
}
417+
418+
public void setBrowsersMatched(boolean browsersMatched) {
419+
this.browsersMatched = browsersMatched;
420+
}
421+
411422
@Override
412423
@JsonIgnore
413424
protected <T extends APIEntity> void clone(T from) {
@@ -440,5 +451,6 @@ protected <T extends APIEntity> void clone(T from) {
440451
this.platform = adminDevice.platform;
441452
this.forceRestore = adminDevice.forceRestore;
442453
this.ownerHasAccountService = adminDevice.ownerHasAccountService;
454+
this.browsersMatched = adminDevice.browsersMatched;
443455
}
444456
}

src/main/java/com/testdroid/api/model/APIBrowser.java

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,15 @@ public class APIBrowser extends APIEntity {
1515

1616
private APIDevice.OsType osType;
1717

18-
private String architecture;
19-
20-
private String installUrl;
21-
22-
private Boolean install;
23-
2418
public APIBrowser() {
2519
}
2620

27-
public APIBrowser(
28-
Long id, String name, String displayName, String version, APIDevice.OsType osType, String architecture,
29-
String installUrl) {
21+
public APIBrowser(Long id, String name, String displayName, String version, APIDevice.OsType osType) {
3022
super(id);
3123
this.name = name;
3224
this.displayName = displayName;
3325
this.version = version;
3426
this.osType = osType;
35-
this.architecture = architecture;
36-
this.installUrl = installUrl;
3727
}
3828

3929
public String getName() {
@@ -68,30 +58,6 @@ public void setOsType(APIDevice.OsType osType) {
6858
this.osType = osType;
6959
}
7060

71-
public String getInstallUrl() {
72-
return installUrl;
73-
}
74-
75-
public void setInstallUrl(String installUrl) {
76-
this.installUrl = installUrl;
77-
}
78-
79-
public String getArchitecture() {
80-
return architecture;
81-
}
82-
83-
public void setArchitecture(String architecture) {
84-
this.architecture = architecture;
85-
}
86-
87-
public Boolean getInstall() {
88-
return install;
89-
}
90-
91-
public void setInstall(Boolean install) {
92-
this.install = install;
93-
}
94-
9561
@Override
9662
protected <T extends APIEntity> void clone(T from) {
9763
APIBrowser original = (APIBrowser) from;
@@ -100,8 +66,5 @@ protected <T extends APIEntity> void clone(T from) {
10066
this.displayName = original.displayName;
10167
this.version = original.version;
10268
this.osType = original.osType;
103-
this.architecture = original.architecture;
104-
this.installUrl = original.installUrl;
105-
this.install = original.install;
10669
}
10770
}

src/main/java/com/testdroid/api/model/APIDevice.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public enum LockReason {
177177
/**
178178
* @deprecated with support for multi account owners it does not make sense anymore
179179
*/
180-
@Deprecated
180+
@Deprecated(forRemoval = true)
181181
private String mainUserEmail;
182182

183183
private LockReason lockReason;

src/main/java/com/testdroid/api/model/APIUserDeviceTime.java

Lines changed: 0 additions & 101 deletions
This file was deleted.

src/main/java/com/testdroid/api/model/APIUserDeviceTimeSummary.java

Lines changed: 0 additions & 86 deletions
This file was deleted.

src/main/java/com/testdroid/api/util/TypeReferenceFactory.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ private TypeReferenceFactory() {
105105
LIST_MAP.put(APITestRunDataAvailability.class, new TypeReference<APIList<APITestRunDataAvailability>>() {});
106106
LIST_MAP.put(APITestRunParameter.class, new TypeReference<APIList<APITestRunParameter>>() {});
107107
LIST_MAP.put(APIUser.class, new TypeReference<APIList<APIUser>>() {});
108-
LIST_MAP.put(APIUserDeviceTime.class, new TypeReference<APIList<APIUserDeviceTime>>() {});
109-
LIST_MAP.put(APIUserDeviceTimeSummary.class, new TypeReference<APIList<APIUserDeviceTimeSummary>>() {});
110108
LIST_MAP.put(APIUserFile.class, new TypeReference<APIList<APIUserFile>>() {});
111109
LIST_MAP.put(APIUserFileProperty.class, new TypeReference<APIList<APIUserFileProperty>>() {});
112110
LIST_MAP.put(APIUserFileTag.class, new TypeReference<APIList<APIUserFileTag>>() {});
@@ -188,7 +186,6 @@ private TypeReferenceFactory() {
188186
MAP.put(APITestRunDataAvailability.class, new TypeReference<APITestRunDataAvailability>() {});
189187
MAP.put(APITestRunParameter.class, new TypeReference<APITestRunParameter>() {});
190188
MAP.put(APIUser.class, new TypeReference<APIUser>() {});
191-
MAP.put(APIUserDeviceTimeSummary.class, new TypeReference<APIUserDeviceTimeSummary>() {});
192189
MAP.put(APIUserFile.class, new TypeReference<APIUserFile>() {});
193190
MAP.put(APIUserFileProperty.class, new TypeReference<APIUserFileProperty>() {});
194191
MAP.put(APIUserPreference.class, new TypeReference<APIUserPreference>() {});

src/test/java/com/testdroid/api/util/TypeReferenceFactoryTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ public Stream<? extends Arguments> provideArguments(ExtensionContext context) {
8484
APITestRunDataAvailability.class,
8585
APITestRunParameter.class,
8686
APIUser.class,
87-
APIUserDeviceTimeSummary.class,
8887
APIUserFile.class,
8988
APIUserFileProperty.class,
9089
APIUserPreference.class,

0 commit comments

Comments
 (0)