Skip to content

Commit cc47be5

Browse files
Merge pull request #572 from szprutamich/master
Version 3.48
2 parents 668b57f + e8f78c6 commit cc47be5

File tree

8 files changed

+119
-58
lines changed

8 files changed

+119
-58
lines changed

pom.xml

Lines changed: 4 additions & 4 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.47.0</version>
6+
<version>3.48.0</version>
77
<packaging>jar</packaging>
88
<name>Bitbar API v2</name>
99
<url>https://github.com/bitbar/testdroid-api</url>
@@ -19,13 +19,13 @@
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.6</org.springframework.boot.spring-boot-dependencies>
22+
<org.springframework.boot.spring-boot-dependencies>3.5.7</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.14.0</org.apache.commons.commons-text.version>
2626
<org.apache.commons.io.version>2.20.0</org.apache.commons.io.version>
27-
<dependency-check-maven.version>12.1.6</dependency-check-maven.version>
28-
<jacoco-maven-plugin.version>0.8.13</jacoco-maven-plugin.version>
27+
<dependency-check-maven.version>12.1.8</dependency-check-maven.version>
28+
<jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>
2929
<org.reflections.version>0.10.2</org.reflections.version>
3030
<okhttp.version>4.12.0</okhttp.version>
3131
<org.apache.maven.plugins.maven-compiler-plugin>3.14.1</org.apache.maven.plugins.maven-compiler-plugin>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ private MappingKey() {
173173
public static final String HTTP_METHOD = "httpMethod";
174174
public static final String ICON = "icon";
175175
public static final String ID = "id";
176+
public static final String IMAGE_CORNER_RADIUS = "imageCornerRadius";
176177
public static final String IMAGE_HEIGHT = "imageHeight";
177178
public static final String IMAGE_LEFT = "imageLeft";
178179
public static final String IMAGE_PREFIX = "imagePrefix";

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,23 @@ public class APIAdminDeviceType extends APIEntity {
1919

2020
private Integer imageWidth;
2121

22+
private Integer imageCornerRadius;
23+
2224
public APIAdminDeviceType() {
2325

2426
}
2527

2628
public APIAdminDeviceType(
2729
Long id, Integer frameExtraWidth, Integer imageHeight, Integer imageLeft, String imagePrefix,
28-
Integer imageTop, Integer imageWidth) {
30+
Integer imageTop, Integer imageWidth, Integer imageCornerRadius) {
2931
super(id);
3032
this.frameExtraWidth = frameExtraWidth;
3133
this.imageHeight = imageHeight;
3234
this.imageLeft = imageLeft;
3335
this.imagePrefix = imagePrefix;
3436
this.imageTop = imageTop;
3537
this.imageWidth = imageWidth;
38+
this.imageCornerRadius = imageCornerRadius;
3639
}
3740

3841
@Override
@@ -45,6 +48,7 @@ protected <T extends APIEntity> void clone(T from) {
4548
this.imagePrefix = deviceType.imagePrefix;
4649
this.imageTop = deviceType.imageTop;
4750
this.imageWidth = deviceType.imageWidth;
51+
this.imageCornerRadius = deviceType.imageCornerRadius;
4852
}
4953

5054
public String getImagePrefix() {
@@ -94,4 +98,12 @@ public Integer getImageWidth() {
9498
public void setImageWidth(Integer imageWidth) {
9599
this.imageWidth = imageWidth;
96100
}
101+
102+
public Integer getImageCornerRadius() {
103+
return imageCornerRadius;
104+
}
105+
106+
public void setImageCornerRadius(Integer imageCornerRadius) {
107+
this.imageCornerRadius = imageCornerRadius;
108+
}
97109
}

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

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ public enum LockReason {
134134

135135
private Integer imageWidth;
136136

137+
private Integer imageCornerRadius;
138+
137139
private String manufacturer;
138140

139141
private Boolean locked;
@@ -187,9 +189,9 @@ public APIDevice() {
187189
public APIDevice(
188190
Long id, String displayName, String manufacturer, String releaseVersion, Integer apiLevel,
189191
Integer creditsPrice, String imagePrefix, Integer imageTop, Integer imageLeft, Integer imageWidth,
190-
Integer imageHeight, Integer frameExtraWidth, OsType osType, Platform platform, Boolean online,
191-
Boolean locked, Boolean enabled, String location, Long accountId, String accountName, Integer onlineDevices,
192-
Integer availableDevices) {
192+
Integer imageHeight, Integer imageCornerRadius, Integer frameExtraWidth, OsType osType, Platform platform,
193+
Boolean online, Boolean locked, Boolean enabled, String location, Long accountId, String accountName,
194+
Integer onlineDevices, Integer availableDevices) {
193195
super(id);
194196
this.displayName = displayName;
195197
this.manufacturer = manufacturer;
@@ -200,6 +202,7 @@ public APIDevice(
200202
this.imageLeft = imageLeft;
201203
this.imageWidth = imageWidth;
202204
this.imageHeight = imageHeight;
205+
this.imageCornerRadius = imageCornerRadius;
203206
this.frameExtraWidth = frameExtraWidth;
204207
this.osType = osType;
205208
this.platform = platform;
@@ -280,6 +283,14 @@ public void setImageHeight(Integer imageHeight) {
280283
this.imageHeight = imageHeight;
281284
}
282285

286+
public Integer getImageCornerRadius() {
287+
return imageCornerRadius;
288+
}
289+
290+
public void setImageCornerRadius(Integer imageCornerRadius) {
291+
this.imageCornerRadius = imageCornerRadius;
292+
}
293+
283294
public Integer getFrameExtraWidth() {
284295
return frameExtraWidth;
285296
}
@@ -482,6 +493,7 @@ protected <T extends APIEntity> void clone(T from) {
482493
this.imagePrefix = apiDevice.imagePrefix;
483494
this.imageTop = apiDevice.imageTop;
484495
this.imageWidth = apiDevice.imageWidth;
496+
this.imageCornerRadius = apiDevice.imageCornerRadius;
485497
this.osType = apiDevice.osType;
486498
this.platform = apiDevice.platform;
487499
this.softwareVersion = apiDevice.softwareVersion;

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

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ public boolean isSettable() {
116116

117117
private Long deviceInstanceId;
118118

119-
private Long deviceLogFirstTimestamp;
120-
121119
private Long duration;
122120

123121
private Date endTime;
@@ -175,10 +173,10 @@ public APIDeviceSession() {
175173
public APIDeviceSession(
176174
Long id, String externalId, String clientSideId, Long userId, String userEmail, Long accountId,
177175
APIDeviceSession.Type type, LocalDateTime createTime, LocalDateTime startTime, LocalDateTime installTime,
178-
LocalDateTime endTime, Long timeLimit, Long deviceLogFirstTimestamp, APIDeviceSession.State state,
179-
Integer testCasePassedCount, Integer testCaseFailedCount, Integer testCaseSkippedCount, Long deviceModelId,
180-
String displayName, String deviceManufacturer, Integer creditsPrice, String imagePrefix, Integer imageTop,
181-
Integer imageLeft, Integer imageWidth, Integer imageHeight, Integer frameExtraWidth,
176+
LocalDateTime endTime, Long timeLimit, APIDeviceSession.State state, Integer testCasePassedCount,
177+
Integer testCaseFailedCount, Integer testCaseSkippedCount, Long deviceModelId, String displayName,
178+
String deviceManufacturer, Integer creditsPrice, String imagePrefix, Integer imageTop, Integer imageLeft,
179+
Integer imageWidth, Integer imageHeight, Integer imageCornerRadius, Integer frameExtraWidth,
182180
APIDevice.OsType osType, APIDevice.Platform platform, Boolean locked, Boolean enabled,
183181
String releaseVersion, Integer apiLevel, ExcludeReason excludeReason, Long deviceInstanceId,
184182
RetryState retryState, Integer autoRetriesLeftCount, Long duration, Long projectId, String projectName,
@@ -196,10 +194,9 @@ public APIDeviceSession(
196194
this.installTime = TimeConverter.toDate(installTime);
197195
this.endTime = TimeConverter.toDate(endTime);
198196
this.device = new APIDevice(deviceModelId, displayName, deviceManufacturer, releaseVersion,
199-
apiLevel, creditsPrice, imagePrefix, imageTop, imageLeft, imageWidth, imageHeight, frameExtraWidth,
200-
osType, platform, null, locked, enabled, location, null, null, null, null);
197+
apiLevel, creditsPrice, imagePrefix, imageTop, imageLeft, imageWidth, imageHeight, imageCornerRadius,
198+
frameExtraWidth, osType, platform, null, locked, enabled, location, null, null, null, null);
201199
this.timeLimit = timeLimit;
202-
this.deviceLogFirstTimestamp = deviceLogFirstTimestamp;
203200
this.state = state;
204201
this.excludeReason = excludeReason != null ? excludeReason.getDisplayName() : null;
205202
this.testCaseAllCount = testCasePassedCount + testCaseFailedCount + testCaseSkippedCount;
@@ -304,14 +301,6 @@ public void setInstallTime(Date installTime) {
304301
this.installTime = installTime;
305302
}
306303

307-
public Long getDeviceLogFirstTimestamp() {
308-
return deviceLogFirstTimestamp;
309-
}
310-
311-
public void setDeviceLogFirstTimestamp(Long deviceLogFirstTimestamp) {
312-
this.deviceLogFirstTimestamp = deviceLogFirstTimestamp;
313-
}
314-
315304
public State getState() {
316305
return state;
317306
}
@@ -552,7 +541,6 @@ protected <T extends APIEntity> void clone(T from) {
552541
this.type = apiDeviceSession.type;
553542
this.device = apiDeviceSession.device;
554543
this.timeLimit = apiDeviceSession.timeLimit;
555-
this.deviceLogFirstTimestamp = apiDeviceSession.deviceLogFirstTimestamp;
556544
this.state = apiDeviceSession.state;
557545
this.testCaseAllCount = apiDeviceSession.testCaseAllCount;
558546
this.testCaseSuccessCount = apiDeviceSession.testCaseSuccessCount;

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

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,34 @@ public enum Type {
2929

3030
private Date createTime;
3131

32-
private String userName;
33-
34-
private Long userId;
32+
private String deviceModelName;
3533

3634
private Long duration;
3735

36+
private String osVersion;
37+
38+
private Long startedById;
39+
40+
private String startedByName;
41+
3842
private APIDeviceSessionUsage.Type type;
3943

40-
private String deviceModelName;
44+
private Long userId;
4145

42-
private String osVersion;
46+
private String userName;
4347

4448
public APIDeviceSessionUsage() {
4549

4650
}
4751

4852
public APIDeviceSessionUsage(
49-
LocalDateTime createTime, String userName, Long userId, Long duration,
50-
APIDeviceSessionUsage.Type type, String deviceModelName, String osVersion) {
53+
LocalDateTime createTime, String userName, Long userId, String startedByName, Long startedById,
54+
Long duration, APIDeviceSessionUsage.Type type, String deviceModelName, String osVersion) {
5155
this.createTime = TimeConverter.toDate(createTime);
5256
this.userName = userName;
5357
this.userId = userId;
58+
this.startedByName = startedByName;
59+
this.startedById = startedById;
5460
this.duration = duration;
5561
this.type = type;
5662
this.deviceModelName = deviceModelName;
@@ -69,6 +75,8 @@ protected <T extends APIEntity> void clone(T from) {
6975
this.type = original.type;
7076
this.deviceModelName = original.deviceModelName;
7177
this.osVersion = original.osVersion;
78+
this.startedByName = original.startedByName;
79+
this.startedById = original.startedById;
7280
}
7381

7482
public Date getCreateTime() {
@@ -126,4 +134,20 @@ public String getOsVersion() {
126134
public void setOsVersion(String osVersion) {
127135
this.osVersion = osVersion;
128136
}
137+
138+
public String getStartedByName() {
139+
return startedByName;
140+
}
141+
142+
public void setStartedByName(String startedByName) {
143+
this.startedByName = startedByName;
144+
}
145+
146+
public Long getStartedById() {
147+
return startedById;
148+
}
149+
150+
public void setStartedById(Long startedById) {
151+
this.startedById = startedById;
152+
}
129153
}

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

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,36 +13,58 @@
1313
@JsonIgnoreProperties(value = {ID, SELF_URI})
1414
public class APIDeviceSessionUserUsage extends APIEntity {
1515

16-
private String userName;
17-
18-
private Long userId;
16+
private long devices;
1917

2018
private Long duration;
2119

20+
private long osVersions;
21+
22+
private double sessionShare;
23+
2224
private long sessions;
2325

24-
private long devices;
26+
private Long userId;
2527

26-
private long osVersions;
28+
private String userName;
2729

28-
private double sessionShare;
30+
private Long startedById;
31+
32+
private String startedByName;
2933

3034
public APIDeviceSessionUserUsage() {
3135

3236
}
3337

3438
public APIDeviceSessionUserUsage(
35-
Long userId, String userName, Long duration, long sessions, long devices, long osVersions,
36-
double sessionShare) {
39+
Long userId, String userName, Long startedById, String startedByName, Long duration,
40+
long sessions, long devices, long osVersions, double sessionShare) {
3741
this.userId = userId;
3842
this.userName = userName;
43+
this.startedById = startedById;
44+
this.startedByName = startedByName;
3945
this.duration = duration;
4046
this.sessions = sessions;
4147
this.devices = devices;
4248
this.osVersions = osVersions;
4349
this.sessionShare = sessionShare;
4450
}
4551

52+
@Override
53+
@JsonIgnore
54+
protected <T extends APIEntity> void clone(T from) {
55+
APIDeviceSessionUserUsage original = (APIDeviceSessionUserUsage) from;
56+
cloneBase(from);
57+
this.userId = original.userId;
58+
this.userName = original.userName;
59+
this.duration = original.duration;
60+
this.sessions = original.sessions;
61+
this.devices = original.devices;
62+
this.osVersions = original.osVersions;
63+
this.sessionShare = original.sessionShare;
64+
this.startedByName = original.startedByName;
65+
this.startedById = original.startedById;
66+
}
67+
4668
public String getUserName() {
4769
return userName;
4870
}
@@ -99,17 +121,19 @@ public void setSessionShare(double sessionShare) {
99121
this.sessionShare = sessionShare;
100122
}
101123

102-
@Override
103-
@JsonIgnore
104-
protected <T extends APIEntity> void clone(T from) {
105-
APIDeviceSessionUserUsage original = (APIDeviceSessionUserUsage) from;
106-
cloneBase(from);
107-
this.userId = original.userId;
108-
this.userName = original.userName;
109-
this.duration = original.duration;
110-
this.sessions = original.sessions;
111-
this.devices = original.devices;
112-
this.osVersions = original.osVersions;
113-
this.sessionShare = original.sessionShare;
124+
public Long getStartedById() {
125+
return startedById;
126+
}
127+
128+
public void setStartedById(Long startedById) {
129+
this.startedById = startedById;
130+
}
131+
132+
public String getStartedByName() {
133+
return startedByName;
134+
}
135+
136+
public void setStartedByName(String startedByName) {
137+
this.startedByName = startedByName;
114138
}
115139
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ public APIDeviceUsage() {
2121
public APIDeviceUsage(
2222
Long id, String displayName, String manufacturer, String releaseVersion,
2323
Integer apiLevel, Integer creditsPrice, String imagePrefix, Integer imageTop, Integer imageLeft,
24-
Integer imageWidth, Integer imageHeight, Integer frameExtraWidth, APIDevice.OsType osType,
25-
APIDevice.Platform platform, Boolean online, Boolean locked, Boolean enabled, String location,
26-
Long totalDeviceSessions, Long failedDeviceSessions) {
24+
Integer imageWidth, Integer imageHeight, Integer imageCornerRadius, Integer frameExtraWidth,
25+
APIDevice.OsType osType, APIDevice.Platform platform, Boolean online, Boolean locked, Boolean enabled,
26+
String location, Long totalDeviceSessions, Long failedDeviceSessions) {
2727
super(id);
2828
this.device = new APIDevice(id, displayName, manufacturer, releaseVersion, apiLevel,
29-
creditsPrice, imagePrefix, imageTop, imageLeft, imageWidth, imageHeight, frameExtraWidth, osType,
30-
platform, online, locked, enabled, location, null, null, null, null);
29+
creditsPrice, imagePrefix, imageTop, imageLeft, imageWidth, imageHeight, imageCornerRadius,
30+
frameExtraWidth, osType, platform, online, locked, enabled, location, null, null, null, null);
3131
this.totalDeviceSessions = totalDeviceSessions;
3232
this.failedDeviceSessions = failedDeviceSessions;
3333
}

0 commit comments

Comments
 (0)