-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #353 from szprutamich/master
Version 2.69
- Loading branch information
Showing
18 changed files
with
509 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package com.testdroid.api.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.testdroid.api.APIEntity; | ||
|
||
import javax.xml.bind.annotation.XmlRootElement; | ||
import javax.xml.bind.annotation.XmlType; | ||
|
||
/** | ||
* @author Michał Szpruta <[email protected]> | ||
*/ | ||
@XmlRootElement | ||
public class APIAccessGroup extends APIEntity { | ||
|
||
@XmlType(namespace = "APIAccessGroup") | ||
public enum Scope { | ||
USER, | ||
ACCOUNT, | ||
GLOBAL | ||
} | ||
|
||
private String name; | ||
|
||
private Long userId; | ||
|
||
private Scope scope; | ||
|
||
public APIAccessGroup() { | ||
} | ||
|
||
public APIAccessGroup(Long id, String name, Scope scope, Long userId) { | ||
super(id); | ||
this.name = name; | ||
this.scope = scope; | ||
this.userId = userId; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public Long getUserId() { | ||
return userId; | ||
} | ||
|
||
public void setUserId(Long userId) { | ||
this.userId = userId; | ||
} | ||
|
||
public Scope getScope() { | ||
return scope; | ||
} | ||
|
||
public void setScope(Scope scope) { | ||
this.scope = scope; | ||
} | ||
|
||
@Override | ||
@JsonIgnore | ||
protected <T extends APIEntity> void clone(T from) { | ||
APIAccessGroup original = (APIAccessGroup) from; | ||
cloneBase(from); | ||
this.name = original.name; | ||
this.userId = original.userId; | ||
this.scope = original.scope; | ||
} | ||
} |
82 changes: 82 additions & 0 deletions
82
src/main/java/com/testdroid/api/model/APIClientSideTestConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
package com.testdroid.api.model; | ||
|
||
import org.apache.commons.lang3.EnumUtils; | ||
|
||
import javax.xml.bind.annotation.XmlRootElement; | ||
import javax.xml.bind.annotation.XmlType; | ||
import java.io.Serializable; | ||
import java.util.Optional; | ||
|
||
/** | ||
* @author Michał Szpruta <[email protected]> | ||
*/ | ||
@XmlRootElement | ||
public class APIClientSideTestConfig implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private String browserName; | ||
|
||
private String platform; | ||
|
||
private String version; | ||
|
||
private Target target; | ||
|
||
@XmlType(namespace = "APIClientSideTestConfig") | ||
public enum Target { | ||
ANDROID, | ||
IOS, | ||
SELENDROID, | ||
SAFARI, | ||
CHROME, | ||
XCUITEST, | ||
DESKTOP; | ||
|
||
public static Optional<Target> fromString(String name) { | ||
return Optional.ofNullable(EnumUtils.getEnum(Target.class, name.toUpperCase())); | ||
} | ||
} | ||
|
||
public APIClientSideTestConfig() { | ||
} | ||
|
||
public APIClientSideTestConfig(Target target, String browserName, String platform, String version) { | ||
this.target = target; | ||
this.browserName = browserName; | ||
this.platform = platform; | ||
this.version = version; | ||
} | ||
|
||
public Target getTarget() { | ||
return target; | ||
} | ||
|
||
public void setTarget(Target target) { | ||
this.target = target; | ||
} | ||
|
||
public String getBrowserName() { | ||
return browserName; | ||
} | ||
|
||
public void setBrowserName(String browserName) { | ||
this.browserName = browserName; | ||
} | ||
|
||
public String getPlatform() { | ||
return platform; | ||
} | ||
|
||
public void setPlatform(String platform) { | ||
this.platform = platform; | ||
} | ||
|
||
public String getVersion() { | ||
return version; | ||
} | ||
|
||
public void setVersion(String version) { | ||
this.version = version; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.