From e1479e991e2c6000a7300c6b06c1c55c19884d8a Mon Sep 17 00:00:00 2001 From: "krzysztof.moscichowski" Date: Tue, 29 Mar 2022 10:10:33 +0200 Subject: [PATCH] Version 2.140 --- pom.xml | 2 +- .../java/com/testdroid/api/APIEntity.java | 1 - .../model/APIAccountConcurrencyStatus.java | 12 ++-- .../com/testdroid/api/model/APIDevice.java | 1 - .../testdroid/api/model/APIDeviceSession.java | 4 +- .../testdroid/api/model/APIMarketShare.java | 67 ------------------- .../api/util/TypeReferenceFactory.java | 3 +- 7 files changed, 8 insertions(+), 82 deletions(-) delete mode 100644 src/main/java/com/testdroid/api/model/APIMarketShare.java diff --git a/pom.xml b/pom.xml index 515cadcd..5c917145 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.testdroid testdroid-api - 2.139 + 2.140 jar Bitbar API v2 https://github.com/bitbar/testdroid-api diff --git a/src/main/java/com/testdroid/api/APIEntity.java b/src/main/java/com/testdroid/api/APIEntity.java index f59e779e..04d50050 100644 --- a/src/main/java/com/testdroid/api/APIEntity.java +++ b/src/main/java/com/testdroid/api/APIEntity.java @@ -73,7 +73,6 @@ APILabelGroup.class, APILicense.class, APIList.class, - APIMarketShare.class, APIMaintenance.class, APINotification.class, APINotificationPlan.class, diff --git a/src/main/java/com/testdroid/api/model/APIAccountConcurrencyStatus.java b/src/main/java/com/testdroid/api/model/APIAccountConcurrencyStatus.java index a1369f25..9247c8a8 100644 --- a/src/main/java/com/testdroid/api/model/APIAccountConcurrencyStatus.java +++ b/src/main/java/com/testdroid/api/model/APIAccountConcurrencyStatus.java @@ -2,10 +2,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.testdroid.api.APIEntity; -import org.apache.commons.lang3.StringUtils; import javax.xml.bind.annotation.XmlRootElement; -import java.util.Arrays; import java.util.List; import static java.lang.Boolean.FALSE; @@ -37,9 +35,8 @@ public Integer getAccountConcurrency() { return accountConcurrency; } - public APIAccountConcurrencyStatus setAccountConcurrency(Integer accountConcurrency) { + public void setAccountConcurrency(Integer accountConcurrency) { this.accountConcurrency = accountConcurrency; - return this; } public Long getRunningSessions() { @@ -66,17 +63,16 @@ public List getUsedBy() { return usedBy; } - public APIAccountConcurrencyStatus setUnlimitedConcurrency(Boolean unlimitedConcurrency) { + public void setUnlimitedConcurrency(Boolean unlimitedConcurrency) { this.unlimitedConcurrency = unlimitedConcurrency; - return this; } public APIAccountConcurrencyStatus( - Long accountId, String mainUserEmail, String userEmails, Long waitingSessions, Long runningSessions) { + Long accountId, String mainUserEmail, List usedBy, Long waitingSessions, Long runningSessions) { super(accountId); this.runningSessions = runningSessions; this.waitingSessions = waitingSessions; - this.usedBy = Arrays.asList(StringUtils.split(userEmails, ",")); + this.usedBy = usedBy; this.sessions = runningSessions + waitingSessions; this.mainUserEmail = mainUserEmail; this.unlimitedConcurrency = FALSE; diff --git a/src/main/java/com/testdroid/api/model/APIDevice.java b/src/main/java/com/testdroid/api/model/APIDevice.java index 73044f94..ef03e481 100644 --- a/src/main/java/com/testdroid/api/model/APIDevice.java +++ b/src/main/java/com/testdroid/api/model/APIDevice.java @@ -43,7 +43,6 @@ public enum Platform { ANDROID(OsType.ANDROID), WINDOWS(OsType.DESKTOP, "Windows"), MAC(OsType.DESKTOP, "macOS"), - MACOS(OsType.DESKTOP, "oldMac"), // TODO: remove in 2.140 LINUX(OsType.DESKTOP, "Linux"), UNDEFINED(OsType.UNDEFINED); diff --git a/src/main/java/com/testdroid/api/model/APIDeviceSession.java b/src/main/java/com/testdroid/api/model/APIDeviceSession.java index cbbf6c25..d5fb1b17 100644 --- a/src/main/java/com/testdroid/api/model/APIDeviceSession.java +++ b/src/main/java/com/testdroid/api/model/APIDeviceSession.java @@ -167,7 +167,7 @@ public APIDeviceSession( Integer testCasePassedCount, Integer testCaseFailedCount, Integer testCaseSkippedCount, Boolean billable, Long deviceModelId, String displayName, String deviceManufacturer, Integer creditsPrice, String imagePrefix, Integer imageTop, Integer imageLeft, Integer imageWidth, Integer imageHeight, Integer frameExtraWidth, - APIDevice.OsType osType, APIDevice.Platform platform ,Boolean enabled, + APIDevice.OsType osType, APIDevice.Platform platform, Boolean locked, Boolean enabled, String releaseVersion, Integer apiLevel, ExcludeReason excludeReason, Long deviceInstanceId, RetryState retryState, Integer autoRetriesLeftCount, Long deviceTime, Long duration, Long projectId, String projectName, Long testRunId, String testRunName, Float successRatio, String name, @@ -184,7 +184,7 @@ public APIDeviceSession( this.endTime = TimeConverter.toDate(endTime); this.device = new APIDevice(deviceModelId, displayName, deviceManufacturer, releaseVersion, apiLevel, creditsPrice, imagePrefix, imageTop, imageLeft, imageWidth, imageHeight, frameExtraWidth, - osType, platform, null, null, enabled, null, null); + osType, platform, null, locked, enabled, null, null); this.timeLimit = timeLimit; this.deviceLogFirstTimestamp = deviceLogFirstTimestamp; this.state = state; diff --git a/src/main/java/com/testdroid/api/model/APIMarketShare.java b/src/main/java/com/testdroid/api/model/APIMarketShare.java deleted file mode 100644 index 70ffcc81..00000000 --- a/src/main/java/com/testdroid/api/model/APIMarketShare.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.testdroid.api.model; - -import com.testdroid.api.APIEntity; - -import javax.xml.bind.annotation.XmlType; - -/** - * @author MichaƂ Szpruta - */ -public class APIMarketShare extends APIEntity { - - @XmlType(namespace = "APIMarketShare") - public enum Type { - ANDROID_VERSION, - IOS_VERSION, - OPEN_GL_VERSION - } - - private String name; - - private Type type; - - private Float value; - - public APIMarketShare() { - } - - public APIMarketShare(Long id, Type type, String name, Float value) { - super(id); - this.type = type; - this.name = name; - this.value = value; - } - - public Type getType() { - return type; - } - - public void setType(Type type) { - this.type = type; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Float getValue() { - return value; - } - - public void setValue(Float value) { - this.value = value; - } - - @Override - protected void clone(T from) { - APIMarketShare apiMarketShare = (APIMarketShare) from; - cloneBase(from); - this.type = apiMarketShare.type; - this.name = apiMarketShare.name; - this.value = apiMarketShare.value; - } -} diff --git a/src/main/java/com/testdroid/api/util/TypeReferenceFactory.java b/src/main/java/com/testdroid/api/util/TypeReferenceFactory.java index 2cb995bd..20dd408e 100644 --- a/src/main/java/com/testdroid/api/util/TypeReferenceFactory.java +++ b/src/main/java/com/testdroid/api/util/TypeReferenceFactory.java @@ -61,7 +61,6 @@ public class TypeReferenceFactory { LIST_MAP.put(APIFramework.class, new TypeReference>() {}); LIST_MAP.put(APILabelGroup.class, new TypeReference>() {}); LIST_MAP.put(APILicense.class, new TypeReference>() {}); - LIST_MAP.put(APIMarketShare.class, new TypeReference>() {}); LIST_MAP.put(APINotification.class, new TypeReference>() {}); LIST_MAP.put(APINotificationPlan.class, new TypeReference>() {}); LIST_MAP.put(APIProject.class, new TypeReference>() {}); @@ -133,7 +132,6 @@ public class TypeReferenceFactory { MAP.put(APILabelGroup.class, new TypeReference() {}); MAP.put(APILicense.class, new TypeReference() {}); MAP.put(APIMaintenance.class, new TypeReference() {}); - MAP.put(APIMarketShare.class, new TypeReference() {}); MAP.put(APIMessage.class, new TypeReference() {}); MAP.put(APINotification.class, new TypeReference() {}); MAP.put(APINotificationPlan.class, new TypeReference() {}); @@ -171,6 +169,7 @@ public static TypeReference> getListTypeRef(Cla return (TypeReference>) LIST_MAP.get(clazz); } + @SuppressWarnings("unchecked") public static TypeReference> getSimpleListTypeRef(Class clazz) { return (TypeReference>) SIMPLE_LIST_MAP.get(clazz); }