Skip to content

Commit

Permalink
Merge pull request #446 from lastverb/master
Browse files Browse the repository at this point in the history
Version 2.142
  • Loading branch information
szprutamich authored Apr 27, 2022
2 parents cc65007 + c4171ca commit 3fb746e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
8 changes: 2 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.testdroid</groupId>
<artifactId>testdroid-api</artifactId>
<version>2.141</version>
<version>2.142</version>
<packaging>jar</packaging>
<name>Bitbar API v2</name>
<url>https://github.com/bitbar/testdroid-api</url>
Expand All @@ -12,8 +12,7 @@
<jacoco-maven-plugin.skip>true</jacoco-maven-plugin.skip>
<!-- disable default deployment -->
<maven.deploy.skip>true</maven.deploy.skip>
<org.springframework.boot.spring-boot-dependencies>2.6.2</org.springframework.boot.spring-boot-dependencies>
<log4j.version>2.17.1</log4j.version>
<org.springframework.boot.spring-boot-dependencies>2.6.6</org.springframework.boot.spring-boot-dependencies>
<org.apache.commons.collections4.version>4.4</org.apache.commons.collections4.version>
<org.apache.commons.io.version>2.11.0</org.apache.commons.io.version>
<commons-text.version>1.9</commons-text.version>
Expand Down Expand Up @@ -227,17 +226,14 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/com/testdroid/api/model/APIDeviceSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ public String getDisplayName() {
@XmlType(namespace = "APIDeviceSession")
public enum Type {
AUTOMATIC,
MANUAL, // TODO to be removed with >= 2.142
MANUAL_APP,
MANUAL_WEB,
REMOTE;

public boolean isManual() {
return this == MANUAL || this == MANUAL_APP || this == MANUAL_WEB;
return this == MANUAL_APP || this == MANUAL_WEB;
}
}

Expand Down Expand Up @@ -513,6 +512,11 @@ public APIDeviceSession release() throws APIException {
return client.post(createUri(selfURI, "/release"), null, APIDeviceSession.class);
}

@JsonIgnore
public APIDeviceSession abort() throws APIException {
return client.post(createUri(selfURI, "/abort"), null, APIDeviceSession.class);
}

private String getScreenshotsURI() {
return createUri(selfURI, "/screenshots");
}
Expand Down
14 changes: 13 additions & 1 deletion src/main/java/com/testdroid/api/model/APIService.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public class APIService extends APIEntity {

private String description;

private String features;

private String name;

private Date archiveTime;
Expand Down Expand Up @@ -74,7 +76,7 @@ public APIService() {
public APIService(
Long id, String name, String description, boolean autoRenew, Integer centPrice, Integer includedHours,
Integer pricePerHour, String externalId, String commonId, LocalDateTime archiveTime, LocalDateTime activateTime,
boolean activated, boolean customPlan, ChargeType chargeType, Unit unit) {
boolean activated, boolean customPlan, ChargeType chargeType, Unit unit, String features) {
super(id);
this.name = name;
this.description = description;
Expand All @@ -90,6 +92,7 @@ public APIService(
this.chargeType = chargeType;
this.unit = unit;
this.commonId = commonId;
this.features = features;
}

public boolean isAutoRenew() {
Expand All @@ -114,6 +117,7 @@ protected <T extends APIEntity> void clone(T from) {
cloneBase(from);
this.name = apiService.name;
this.description = apiService.description;
this.features = apiService.features;
this.autoRenew = apiService.autoRenew;
this.centPrice = apiService.centPrice;
this.externalId = apiService.externalId;
Expand Down Expand Up @@ -244,6 +248,14 @@ public void setDefaultConcurrences(Set<Integer> defaultAvailableConcurrences) {
this.defaultConcurrences = defaultAvailableConcurrences;
}

public String getFeatures() {
return features;
}

public void setFeatures(String features) {
this.features = features;
}

@JsonIgnore
@Override
public int hashCode() {
Expand Down

0 comments on commit 3fb746e

Please sign in to comment.