-
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 #443 from wicherska/master
Version 2.139
- Loading branch information
Showing
11 changed files
with
187 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.testdroid.api; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
|
||
import javax.xml.bind.annotation.XmlRootElement; | ||
import java.util.List; | ||
|
||
@XmlRootElement | ||
@JsonIgnoreProperties(value = {"id", "selfURI"}) | ||
public class APISimpleList<T extends APIEntity> extends APIEntity { | ||
|
||
private List<T> data; | ||
|
||
public APISimpleList() { | ||
// need for serialization | ||
} | ||
|
||
public APISimpleList(List<T> data) { | ||
this.data = data; | ||
} | ||
|
||
@Override | ||
@JsonIgnore | ||
protected <V extends APIEntity> void clone(V from) { | ||
APISimpleList<T> source = (APISimpleList<T>) from; | ||
cloneBase(from); | ||
this.data = source.data; | ||
} | ||
|
||
public List<T> getData() { | ||
return data; | ||
} | ||
|
||
public void setData(List<T> data) { | ||
this.data = data; | ||
} | ||
} |
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,80 @@ | ||
package com.testdroid.api.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.testdroid.api.APIEntity; | ||
import org.apache.commons.lang3.builder.EqualsBuilder; | ||
import org.apache.commons.lang3.builder.HashCodeBuilder; | ||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
|
||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
@XmlRootElement | ||
@JsonIgnoreProperties(value = {"id", "selfURI"}) | ||
public class APIBrokerHub extends APIEntity { | ||
|
||
private String location; | ||
|
||
private String url; | ||
|
||
public APIBrokerHub() { | ||
// need for serialization/deserialization | ||
} | ||
|
||
public APIBrokerHub(String location, String url) { | ||
this.location = location; | ||
this.url = url; | ||
} | ||
|
||
@Override | ||
protected <T extends APIEntity> void clone(T from) { | ||
APIBrokerHub source = (APIBrokerHub) from; | ||
cloneBase(source); | ||
|
||
this.location = source.location; | ||
this.url = source.url; | ||
} | ||
|
||
public String getLocation() { | ||
return location; | ||
} | ||
|
||
public void setLocation(String location) { | ||
this.location = location; | ||
} | ||
|
||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
public void setUrl(String url) { | ||
this.url = url; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return new ToStringBuilder(this) | ||
.append("location", location) | ||
.append("url", url) | ||
.toString(); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
|
||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
|
||
APIBrokerHub hub = (APIBrokerHub) o; | ||
|
||
return new EqualsBuilder().append(location, hub.location).append(url, hub.url).isEquals(); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return new HashCodeBuilder(17, 37).append(location).append(url).toHashCode(); | ||
} | ||
} |
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
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.