Skip to content

Commit

Permalink
Version 2.107
Browse files Browse the repository at this point in the history
  • Loading branch information
szprutamich committed Oct 6, 2020
1 parent f4555b8 commit a2c6cd7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 33 deletions.
2 changes: 1 addition & 1 deletion 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.106</version>
<version>2.107</version>
<packaging>jar</packaging>
<name>Bitbar API v2</name>
<url>https://github.com/bitbar/testdroid-api</url>
Expand Down
15 changes: 13 additions & 2 deletions src/main/java/com/testdroid/api/model/APIConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ public class APIConnection extends APIEntity implements Serializable {

private String host;

private String externalId;

public APIConnection() {
}

public APIConnection(
Long id, LocalDateTime createTime, LocalDateTime endTime, Long deviceSessionId, String password,
String type,
String urlSchema, String host, Integer port, String path) {
String type, String urlSchema, String host, Integer port, String path, String externalId) {
super(id);
this.createTime = TimeConverter.toDate(createTime);
this.endTime = TimeConverter.toDate(endTime);
Expand All @@ -55,6 +56,7 @@ public APIConnection(
this.urlSchema = urlSchema;
this.host = host;
this.url = String.format("%s:%d", host, port);
this.externalId = externalId;
}

public Date getCreateTime() {
Expand Down Expand Up @@ -137,6 +139,14 @@ public void setPath(String path) {
this.path = path;
}

public String getExternalId() {
return externalId;
}

public void setExternalId(String externalId) {
this.externalId = externalId;
}

@Override
protected <T extends APIEntity> void clone(T from) {
APIConnection apiConnection = (APIConnection) from;
Expand All @@ -150,6 +160,7 @@ protected <T extends APIEntity> void clone(T from) {
this.path = apiConnection.path;
this.urlSchema = apiConnection.urlSchema;
this.host = apiConnection.host;
this.externalId = apiConnection.externalId;
}

}
44 changes: 14 additions & 30 deletions src/main/java/com/testdroid/api/model/APIUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,33 +120,17 @@ public String getDisplayName() {

private String registrationIP;

private Boolean originPortal;

public APIUser() {
}

public APIUser(
Long id, String email, String firstName, String lastName, String state, String country,
String city, String code, String address, String phone, String organization, String vatId,
String timeZone, LocalDateTime createTime, LocalDateTime deleteTime, LocalDateTime lastLoginTime,
LocalDateTime lastLaunchedTestTime, Status status) {
Long id, String email, String firstName, String lastName, LocalDateTime createTime, LocalDateTime deleteTime, Status status) {
super(id);
this.email = email;
this.firstName = firstName;
this.lastName = lastName;
this.state = state;
this.country = country;
this.city = city;
this.code = code;
this.address = address;
this.phone = phone;
this.organization = organization;
this.vatId = vatId;
this.timeZone = timeZone;
this.createTime = TimeConverter.toDate(createTime);
this.deleteTime = TimeConverter.toDate(deleteTime);
this.lastLoginTime = TimeConverter.toDate(lastLoginTime);
this.lastLaunchedTestTime = TimeConverter.toDate(lastLaunchedTestTime);
this.status = status;
this.enabled = status == Status.ENABLED;
}
Expand All @@ -157,9 +141,19 @@ public APIUser(
String timeZone, LocalDateTime createTime, LocalDateTime deleteTime, LocalDateTime lastLoginTime,
LocalDateTime lastLaunchedTestTime, Boolean isMainUser, Long mainUserId, String mainUserEmail,
String apiKey, Status status, Long createdById, String createdByEmail, MfaStatus mfaStatus,
String registrationIP, Boolean originPortal) {
this(id, email, firstName, lastName, state, country, city, code, address, phone, organization, vatId,
timeZone, createTime, deleteTime, lastLoginTime, lastLaunchedTestTime, status);
String registrationIP) {
this(id, email, firstName, lastName, createTime, deleteTime, status);
this.state = state;
this.country = country;
this.city = city;
this.code = code;
this.address = address;
this.phone = phone;
this.organization = organization;
this.vatId = vatId;
this.timeZone = timeZone;
this.lastLoginTime = TimeConverter.toDate(lastLoginTime);
this.lastLaunchedTestTime = TimeConverter.toDate(lastLaunchedTestTime);
this.accountId = accountId;
this.isMainUser = isMainUser;
this.mainUserId = mainUserId;
Expand All @@ -169,7 +163,6 @@ public APIUser(
this.createdByEmail = createdByEmail;
this.mfaStatus = mfaStatus;
this.registrationIP = registrationIP;
this.originPortal = originPortal;
this.selfURI = String.format("/users/%s", id);
}

Expand Down Expand Up @@ -442,14 +435,6 @@ public void setRegistrationIP(String registrationIP) {
this.registrationIP = registrationIP;
}

public Boolean getOriginPortal() {
return originPortal;
}

public void setOriginPortal(Boolean originPortal) {
this.originPortal = originPortal;
}

private Map<String, Object> getUpdateUserParams() {
Map<String, Object> map = new HashMap<>();
map.put(ADDRESS, address);
Expand Down Expand Up @@ -583,6 +568,5 @@ protected <T extends APIEntity> void clone(T from) {
this.mfaStatus = apiUser.mfaStatus;
this.mfaQRCodeUrl = apiUser.mfaQRCodeUrl;
this.registrationIP = apiUser.registrationIP;
this.originPortal = apiUser.originPortal;
}
}

0 comments on commit a2c6cd7

Please sign in to comment.