mirror of https://github.com/apache/jclouds.git
fix Org to use Links
This commit is contained in:
parent
8f7f9e6988
commit
c35794e8c7
|
@ -18,9 +18,9 @@
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.*;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.*;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.*;
|
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.NS;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
@ -49,12 +49,12 @@ public class OrgList {
|
||||||
|
|
||||||
public static class Builder {
|
public static class Builder {
|
||||||
|
|
||||||
private Set<Reference> orgs = Sets.newLinkedHashSet();
|
private Set<Link> orgs = Sets.newLinkedHashSet();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see OrgList#getOrgs
|
* @see OrgList#getOrgs
|
||||||
*/
|
*/
|
||||||
public Builder orgs(Set<Reference> orgs) {
|
public Builder orgs(Set<Link> orgs) {
|
||||||
this.orgs = Sets.newLinkedHashSet(checkNotNull(orgs, "orgs"));
|
this.orgs = Sets.newLinkedHashSet(checkNotNull(orgs, "orgs"));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ public class OrgList {
|
||||||
/**
|
/**
|
||||||
* @see OrgList#getOrgs
|
* @see OrgList#getOrgs
|
||||||
*/
|
*/
|
||||||
public Builder org(Reference org) {
|
public Builder addOrg(Link org) {
|
||||||
orgs.add(checkNotNull(org, "org"));
|
orgs.add(checkNotNull(org, "org"));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -80,14 +80,14 @@ public class OrgList {
|
||||||
// For JAXB and builder use
|
// For JAXB and builder use
|
||||||
}
|
}
|
||||||
|
|
||||||
private OrgList(Set<Reference> orgs) {
|
private OrgList(Set<Link> orgs) {
|
||||||
this.orgs = ImmutableSet.copyOf(orgs);
|
this.orgs = ImmutableSet.copyOf(orgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlElement(namespace = NS, name = "Org")
|
@XmlElement(namespace = NS, name = "Org")
|
||||||
private Set<Reference> orgs = Sets.newLinkedHashSet();
|
private Set<Link> orgs = Sets.newLinkedHashSet();
|
||||||
|
|
||||||
public Set<Reference> getOrgs() {
|
public Set<Link> getOrgs() {
|
||||||
return ImmutableSet.copyOf(orgs);
|
return ImmutableSet.copyOf(orgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ public class OrgList {
|
||||||
if (o == null || getClass() != o.getClass())
|
if (o == null || getClass() != o.getClass())
|
||||||
return false;
|
return false;
|
||||||
OrgList that = OrgList.class.cast(o);
|
OrgList that = OrgList.class.cast(o);
|
||||||
return equal(this.orgs, that.orgs);
|
return equal(orgs, that.orgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue