VCloud Director 1.5: Adjusting misleading comments and consistently using @XmlReference only for substitution groups

This commit is contained in:
Adam Lowe 2012-03-06 09:21:50 +00:00
parent 6b7f3f1fdd
commit 3ce6051e51
64 changed files with 138 additions and 175 deletions

View File

@ -119,7 +119,7 @@ public class CapacityType<T extends CapacityType<T>> {
}
protected CapacityType() {
// For JAXB and builder use
// for JAXB
}
@XmlElement(name = "Units", required = true)

View File

@ -135,7 +135,7 @@ public class CapacityWithUsage extends CapacityType<CapacityWithUsage>
}
private CapacityWithUsage() {
// For JAXB and builder use
// for JAXB
}
@XmlElement(name = "Used")

View File

@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Collections;
import java.util.Set;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
@ -125,7 +126,7 @@ public class CaptureVAppParams
}
private CaptureVAppParams() {
// For JAXB and builder use
// for JAXB
}
private CaptureVAppParams(Set<? extends Section<?>> sections) {

View File

@ -174,9 +174,18 @@ public class Catalog extends CatalogType<Catalog> {
}
}
<<<<<<< HEAD
public Catalog(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id,
String name, Owner owner, CatalogItems catalogItems, Boolean published) {
super(href, type, links, description, tasksInProgress, id, name, owner, catalogItems, published);
=======
private Catalog(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id,
String name, Entity owner, CatalogItems catalogItems, Boolean published) {
super(href, type, links, description, tasksInProgress, id, name);
this.owner = owner;
this.catalogItems = catalogItems;
this.isPublished = published;
>>>>>>> VCloud Director 1.5: Adjusting misleading comments and consistently using @XmlReference only for substitution groups
}
@SuppressWarnings("unused")

View File

@ -178,7 +178,7 @@ public class CatalogItem extends EntityType<CatalogItem> {
}
private CatalogItem() {
// For JAXB and builder use
// for JAXB
}
@XmlElement(name = "Entity", required = true)

View File

@ -78,7 +78,7 @@ public class CatalogsList {
}
private CatalogsList() {
// For JAXB and builder use
// for JAXB
}
private CatalogsList(Set<Reference> tasks) {

View File

@ -129,7 +129,7 @@ public class CloneMediaParams
}
private CloneMediaParams() {
// For JAXB and builder use
// for JAXB
}

View File

@ -44,10 +44,8 @@ import com.google.common.base.Objects;
*/
@XmlType(name = "CloneVAppParams")
public class CloneVAppParams
extends InstantiateVAppParamsType<CloneVAppParams>
extends InstantiateVAppParamsType<CloneVAppParams> {
{
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
@ -58,10 +56,8 @@ public class CloneVAppParams
public static class Builder extends InstantiateVAppParamsType.Builder<CloneVAppParams> {
public CloneVAppParams build() {
CloneVAppParams cloneVAppParams = new CloneVAppParams();
return cloneVAppParams;
return new CloneVAppParams(description, name, vAppParent, instantiationParams, deploy, powerOn, source, isSourceDelete, linkedClone);
}
/**
@ -97,7 +93,7 @@ public class CloneVAppParams
}
/**
* @see VAppCreationParamsType#getDeploy()
* @see VAppCreationParamsType#isDeploy()
*/
public Builder deploy(Boolean deploy) {
super.deploy(deploy);
@ -105,7 +101,7 @@ public class CloneVAppParams
}
/**
* @see VAppCreationParamsType#getPowerOn()
* @see VAppCreationParamsType#isPowerOn()
*/
public Builder powerOn(Boolean powerOn) {
super.powerOn(powerOn);
@ -121,7 +117,7 @@ public class CloneVAppParams
}
/**
* @see InstantiateVAppParamsType#getIsSourceDelete()
* @see InstantiateVAppParamsType#isSourceDelete()
*/
public Builder isSourceDelete(Boolean isSourceDelete) {
super.isSourceDelete(isSourceDelete);
@ -129,7 +125,7 @@ public class CloneVAppParams
}
/**
* @see InstantiateVAppParamsType#getLinkedClone()
* @see InstantiateVAppParamsType#isLinkedClone()
*/
public Builder linkedClone(Boolean linkedClone) {
super.linkedClone(linkedClone);
@ -146,28 +142,12 @@ public class CloneVAppParams
}
}
private CloneVAppParams(String description, String name, Reference vAppParent, InstantiationParams instantiationParams, Boolean deploy, Boolean powerOn, Reference source, Boolean sourceDelete, Boolean linkedClone) {
super(description, name, vAppParent, instantiationParams, deploy, powerOn, source, sourceDelete, linkedClone);
}
private CloneVAppParams() {
// For JAXB and builder use
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
CloneVAppParams that = CloneVAppParams.class.cast(o);
return super.equals(that);
}
@Override
public int hashCode() {
return super.hashCode() + Objects.hashCode("");
}
@Override
public String toString() {
return Objects.toStringHelper("").toString();
// For JAXB
}
}

View File

@ -111,7 +111,7 @@ public class CloneVAppTemplateParams
}
private CloneVAppTemplateParams() {
// For JAXB and builder use
// for JAXB
}

View File

@ -136,7 +136,7 @@ public class ComposeVAppParams
}
private ComposeVAppParams() {
// For JAXB and builder use
// for JAXB
}

View File

@ -99,7 +99,7 @@ public class ComputeCapacity {
}
private ComputeCapacity() {
// For JAXB and builder use
// for JAXB
}

View File

@ -98,7 +98,7 @@ public class FilesList {
}
private FilesList() {
// For JAXB and builder use
// for JAXB
}
private FilesList(List<File> files) {

View File

@ -128,7 +128,7 @@ public class FirewallService extends NetworkServiceType<FirewallService> {
}
private FirewallService() {
// For JAXB and builder use
// for JAXB
}
@XmlElement(name = "DefaultAction")

View File

@ -341,7 +341,7 @@ public class GuestCustomizationSection extends SectionType<GuestCustomizationSec
}
private GuestCustomizationSection() {
// For JAXB and builder use
// for JAXB
}

View File

@ -137,7 +137,7 @@ public class InstantiateVAppParams
}
protected InstantiateVAppParams() {
// For JAXB and builder use
// for JAXB
}
@Override

View File

@ -171,7 +171,7 @@ public class InstantiateVAppParamsType<T extends InstantiateVAppParamsType<T>>
}
}
public InstantiateVAppParamsType(String description, String name, Reference vAppParent, InstantiationParams instantiationParams,
protected InstantiateVAppParamsType(String description, String name, Reference vAppParent, InstantiationParams instantiationParams,
Boolean deploy, Boolean powerOn, Reference source, Boolean sourceDelete, Boolean linkedClone) {
super(description, name, vAppParent, instantiationParams, deploy, powerOn);
this.source = source;
@ -180,16 +180,16 @@ public class InstantiateVAppParamsType<T extends InstantiateVAppParamsType<T>>
}
protected InstantiateVAppParamsType() {
// For JAXB and builder use
// for JAXB
}
@XmlElement(name = "Source", required = true)
protected Reference source;
private Reference source;
@XmlElement(name = "IsSourceDelete")
protected Boolean isSourceDelete;
private Boolean isSourceDelete;
@XmlAttribute
protected Boolean linkedClone;
private Boolean linkedClone;
/**
* Gets the value of the source property.

View File

@ -148,7 +148,7 @@ public class InstantiateVAppTemplateParams
}
private InstantiateVAppTemplateParams() {
// For JAXB and builder use
// for JAXB
}

View File

@ -98,7 +98,7 @@ public class InstantiationParams {
}
private InstantiationParams() {
// For JAXB and builder use
// for JAXB
}
private InstantiationParams(Set<? extends SectionType<?>> sections) {

View File

@ -53,7 +53,7 @@ public class IpAddresses {
* @see IpAddresses#getIpAddresses()
*/
public Builder ipAddresses(Set<String> ipAddresses) {
this.ipAddresses.addAll(checkNotNull(ipAddresses, "ipAddresses"));
this.ipAddresses = Sets.newLinkedHashSet(checkNotNull(ipAddresses, "ipAddresses"));
return this;
}
@ -75,7 +75,7 @@ public class IpAddresses {
}
private IpAddresses() {
// For JAXB and builder use
// for JAXB
}
private IpAddresses(Set<String> orgs) {

View File

@ -72,7 +72,7 @@ public class IpRange {
}
private IpRange() {
// For JAXB and builder use
// for JAXB
}
private IpRange(String startAddress, String endAddress) {

View File

@ -22,9 +22,9 @@ import static com.google.common.base.Objects.equal;
import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.google.common.base.Objects;
@ -76,14 +76,14 @@ public class IpRanges {
}
private IpRanges() {
// For JAXB and builder use
// for JAXB
}
private IpRanges(Set<IpRange> ipRanges) {
this.ipRanges = ImmutableSet.copyOf(ipRanges);
}
@XmlElementRef
@XmlElement(name = "IpRange")
private Set<IpRange> ipRanges = Sets.newLinkedHashSet();
public Set<IpRange> getIpRanges() {

View File

@ -132,7 +132,7 @@ public class IpScope {
}
private IpScope() {
// For JAXB and builder use
// For JAXB
}
public IpScope(boolean inherited, String gateway, String netmask, String dns1, String dns2, String dnsSuffix,

View File

@ -133,7 +133,7 @@ public class IpsecVpnRemotePeer extends IpsecVpnManagedPeerType<IpsecVpnRemotePe
}
private IpsecVpnRemotePeer() {
// For JAXB and builder use
// for JAXB
}
@XmlElement(name = "VcdUrl", required = true)

View File

@ -64,7 +64,7 @@ import com.google.common.collect.Lists;
"ipsecVpnTunnels"
})
public class IpsecVpnService extends NetworkServiceType<IpsecVpnService> {
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
@ -128,7 +128,7 @@ public class IpsecVpnService extends NetworkServiceType<IpsecVpnService> {
}
private IpsecVpnService() {
// For JAXB and builder use
// for JAXB
}
@XmlElement(name = "ExternalIpAddress")
@ -172,24 +172,27 @@ public class IpsecVpnService extends NetworkServiceType<IpsecVpnService> {
if (o == null || getClass() != o.getClass())
return false;
IpsecVpnService that = IpsecVpnService.class.cast(o);
return equal(externalIpAddress, that.externalIpAddress) &&
return super.equals(that) &&
equal(externalIpAddress, that.externalIpAddress) &&
equal(publicIpAddress, that.publicIpAddress) &&
equal(ipsecVpnTunnels, that.ipsecVpnTunnels);
}
@Override
public int hashCode() {
return Objects.hashCode(externalIpAddress,
return Objects.hashCode(
super.hashCode(),
externalIpAddress,
publicIpAddress,
ipsecVpnTunnels);
}
@Override
public String toString() {
return Objects.toStringHelper("")
protected Objects.ToStringHelper string() {
return super.string()
.add("externalIpAddress", externalIpAddress)
.add("publicIpAddress", publicIpAddress)
.add("ipsecVpnTunnels", ipsecVpnTunnels).toString();
.add("ipsecVpnTunnels", ipsecVpnTunnels);
}
}

View File

@ -63,6 +63,6 @@ public class IpsecVpnThirdPartyPeer extends IpsecVpnUnmanagedPeerType<IpsecVpnTh
}
private IpsecVpnThirdPartyPeer() {
// For JAXB and builder use
// for JAXB
}
}

View File

@ -74,11 +74,8 @@ import com.google.common.base.Objects;
"isOperational",
"errorDetails"
})
public class IpsecVpnTunnel
public class IpsecVpnTunnel {
{
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
@ -91,7 +88,7 @@ public class IpsecVpnTunnel
private String name;
private String description;
private IpsecVpnPeerType ipsecVpnPeer;
private IpsecVpnPeerType<?> ipsecVpnPeer;
private String peerIpAddress;
private String peerNetworkAddress;
private String peerNetworkMask;
@ -121,7 +118,7 @@ public class IpsecVpnTunnel
/**
* @see IpsecVpnTunnel#getIpsecVpnPeer()
*/
public Builder ipsecVpnPeer(IpsecVpnPeerType ipsecVpnPeer) {
public Builder ipsecVpnPeer(IpsecVpnPeerType<?> ipsecVpnPeer) {
this.ipsecVpnPeer = ipsecVpnPeer;
return this;
}
@ -221,7 +218,7 @@ public class IpsecVpnTunnel
}
}
private IpsecVpnTunnel(String name, String description, IpsecVpnPeerType ipsecVpnPeer, String peerIpAddress,
private IpsecVpnTunnel(String name, String description, IpsecVpnPeerType<?> ipsecVpnPeer, String peerIpAddress,
String peerNetworkAddress, String peerNetworkMask, String sharedSecret, String encryptionProtocol, int mtu, boolean enabled, Boolean operational, String errorDetails) {
this.name = name;
this.description = description;
@ -238,7 +235,7 @@ public class IpsecVpnTunnel
}
private IpsecVpnTunnel() {
// For JAXB and builder use
// for JAXB
}
@XmlElement(name = "Name", required = true)
@ -246,7 +243,7 @@ public class IpsecVpnTunnel
@XmlElement(name = "Description")
protected String description;
@XmlElementRef
protected IpsecVpnPeerType ipsecVpnPeer;
protected IpsecVpnPeerType<?> ipsecVpnPeer;
@XmlElement(name = "PeerIpAddress", required = true)
protected String peerIpAddress;
@XmlElement(name = "PeerNetworkAddress", required = true)
@ -268,9 +265,6 @@ public class IpsecVpnTunnel
/**
* Gets the value of the name property.
*
* @return possible object is
* {@link String }
*/
public String getName() {
return name;
@ -278,9 +272,6 @@ public class IpsecVpnTunnel
/**
* Gets the value of the description property.
*
* @return possible object is
* {@link String }
*/
public String getDescription() {
return description;
@ -289,15 +280,12 @@ public class IpsecVpnTunnel
/**
* Details about the peer network.
*/
public IpsecVpnPeerType getIpsecVpnPeer() {
public IpsecVpnPeerType<?> getIpsecVpnPeer() {
return ipsecVpnPeer;
}
/**
* Gets the value of the peerIpAddress property.
*
* @return possible object is
* {@link String }
*/
public String getPeerIpAddress() {
return peerIpAddress;
@ -305,9 +293,6 @@ public class IpsecVpnTunnel
/**
* Gets the value of the peerNetworkAddress property.
*
* @return possible object is
* {@link String }
*/
public String getPeerNetworkAddress() {
return peerNetworkAddress;
@ -315,9 +300,6 @@ public class IpsecVpnTunnel
/**
* Gets the value of the peerNetworkMask property.
*
* @return possible object is
* {@link String }
*/
public String getPeerNetworkMask() {
return peerNetworkMask;
@ -325,9 +307,6 @@ public class IpsecVpnTunnel
/**
* Gets the value of the sharedSecret property.
*
* @return possible object is
* {@link String }
*/
public String getSharedSecret() {
return sharedSecret;
@ -335,9 +314,6 @@ public class IpsecVpnTunnel
/**
* Gets the value of the encryptionProtocol property.
*
* @return possible object is
* {@link String }
*/
public String getEncryptionProtocol() {
return encryptionProtocol;
@ -359,9 +335,6 @@ public class IpsecVpnTunnel
/**
* Gets the value of the isOperational property.
*
* @return possible object is
* {@link Boolean }
*/
public Boolean isOperational() {
return isOperational;
@ -369,9 +342,6 @@ public class IpsecVpnTunnel
/**
* Gets the value of the errorDetails property.
*
* @return possible object is
* {@link String }
*/
public String getErrorDetails() {
return errorDetails;

View File

@ -140,7 +140,7 @@ public class MetadataEntry extends ResourceType<MetadataEntry> {
}
private MetadataEntry() {
// For JAXB and builder use
// for JAXB
}
public MetadataEntry(URI href, String type, Set<Link> links, String key, String value) {

View File

@ -141,7 +141,7 @@ public class NatRule {
}
private NatRule() {
// For JAXB and builder use
// for JAXB
}
@XmlElement(name = "Description")

View File

@ -154,7 +154,7 @@ public class NatVmRule {
}
private NatVmRule() {
// For JAXB and builder use
// for JAXB
}

View File

@ -97,7 +97,7 @@ public class NetworkAssignment
}
private NetworkAssignment() {
// For JAXB and builder use
// for JAXB
}

View File

@ -132,7 +132,7 @@ public class NetworkConfiguration {
}
private NetworkConfiguration() {
// For JAXB and builder use
// for JAXB
}
@XmlElement(name = "IpScope")

View File

@ -180,7 +180,7 @@ public class NetworkConnection {
}
private NetworkConnection() {
// For JAXB and builder use
// for JAXB
}

View File

@ -260,7 +260,8 @@ public class NetworkConnectionSection extends SectionType<NetworkConnectionSecti
@Override
public int hashCode() {
return Objects.hashCode(primaryNetworkConnectionIndex,
return Objects.hashCode(super.hashCode(),
primaryNetworkConnectionIndex,
networkConnections,
links,
href,

View File

@ -23,7 +23,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Collections;
import java.util.Set;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
@ -49,12 +49,12 @@ public class NetworkFeatures {
public static class Builder {
private Set<NetworkServiceType> services = Sets.newLinkedHashSet();
private Set<NetworkServiceType<?>> services = Sets.newLinkedHashSet();
/**
* @see NetworkFeatures#getNetworkServices()
*/
public Builder services(Set<NetworkServiceType> services) {
public Builder services(Set<? extends NetworkServiceType<?>> services) {
this.services = Sets.newLinkedHashSet(checkNotNull(services, "services"));
return this;
}
@ -62,7 +62,7 @@ public class NetworkFeatures {
/**
* @see NetworkFeatures#getNetworkServices()
*/
public Builder service(NetworkServiceType service) {
public Builder service(NetworkServiceType<?> service) {
services.add(checkNotNull(service, "service"));
return this;
}
@ -77,21 +77,21 @@ public class NetworkFeatures {
}
private NetworkFeatures() {
// For JAXB and builder use
// for JAXB
}
public NetworkFeatures(Set<NetworkServiceType> services) {
public NetworkFeatures(Set<? extends NetworkServiceType<?>> services) {
this.services = ImmutableSet.copyOf(services);
}
@XmlElementRef
private Set<NetworkServiceType> services = Sets.newLinkedHashSet();
private Set<? extends NetworkServiceType<?>> services = Sets.newLinkedHashSet();
/**
* @return a Network service. May be any of DhcpService, NatService, IpsecVpnService,
* DhcpService, or StaticRoutingService.
*/
public Set<NetworkServiceType> getNetworkServices() {
public Set<? extends NetworkServiceType<?>> getNetworkServices() {
return Collections.unmodifiableSet(services);
}

View File

@ -28,6 +28,7 @@ import com.google.common.base.Objects;
/**
* Represents a network service
*
* @author danikov
* @author Adam Lowe
*/
@XmlSeeAlso({
@ -38,17 +39,10 @@ import com.google.common.base.Objects;
StaticRoutingService.class,
NatService.class
})
public class NetworkServiceType<T extends NetworkServiceType<T>> {
public abstract class NetworkServiceType<T extends NetworkServiceType<T>> {
public abstract Builder<T> toBuilder();
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromNetworkServiceType(this);
}
public static class Builder<T extends NetworkServiceType<T>> {
public static abstract class Builder<T extends NetworkServiceType<T>> {
protected boolean isEnabled;
/**
@ -59,9 +53,7 @@ public class NetworkServiceType<T extends NetworkServiceType<T>> {
return this;
}
public NetworkServiceType<T> build() {
return new NetworkServiceType<T>(isEnabled);
}
public abstract NetworkServiceType<T> build();
public Builder<T> fromNetworkServiceType(NetworkServiceType<T> in) {
return enabled(in.isEnabled());
@ -73,7 +65,7 @@ public class NetworkServiceType<T extends NetworkServiceType<T>> {
}
protected NetworkServiceType() {
// For JAXB and builder use
// for JAXB
}
@XmlElement(name = "IsEnabled")

View File

@ -152,7 +152,7 @@ public class NetworkType<T extends NetworkType<T>> extends EntityType<T> {
}
protected NetworkType() {
// For JAXB and builder use
// for JAXB
}
@XmlElement(name = "Configuration")

View File

@ -183,7 +183,7 @@ public class Org extends EntityType<Org> {
}
private Org() {
// For JAXB and builder use
// for JAXB
}
public Org(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id, String name, String fullName, Boolean enabled) {

View File

@ -80,7 +80,7 @@ public class OrgList {
}
private OrgList() {
// For JAXB and builder use
// for JAXB
}
private OrgList(Set<Reference> orgs) {

View File

@ -136,7 +136,7 @@ public class Owner
@SuppressWarnings("unused")
private Owner() {
// For JAXB and builder use
// for JAXB
}
public Owner(URI href, String type, Set<Link> links, Reference user) {

View File

@ -111,7 +111,7 @@ public class ParamsType<T extends ParamsType<T>> {
}
protected ParamsType() {
// For JAXB and builder use
// for JAXB
}

View File

@ -139,7 +139,7 @@ public class ProductSectionList
}
private ProductSectionList() {
// For JAXB and builder use
// for JAXB
}
private ProductSectionList(Set<ProductSection> productSections) {

View File

@ -23,6 +23,7 @@ import static com.google.common.base.Objects.equal;
import java.net.URI;
import java.util.Map;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSeeAlso;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
@ -38,6 +39,10 @@ import com.google.common.base.Objects.ToStringHelper;
*
* @author grkvlt@apache.org
*/
@XmlSeeAlso({
CatalogReference.class,
Reference.class
})
public class ReferenceType<T extends ReferenceType<T>> implements URISupplier {
public static <T extends ReferenceType<T>> Builder<T> builder() {

View File

@ -96,7 +96,7 @@ public class ResourceEntities {
}
private ResourceEntities() {
// For JAXB and builder use
// for JAXB
}
private ResourceEntities(Set<Reference> resourceEntity) {

View File

@ -62,7 +62,7 @@ public class RouterInfo {
}
private RouterInfo() {
// For JAXB and builder use
// for JAXB
}
private RouterInfo(String externalIp) {

View File

@ -110,7 +110,7 @@ public class Session {
}
private Session() {
// For JAXB and builder use
// for JAXB
}
private Session(String user, String org, URI href, Set<Link> links) {

View File

@ -144,7 +144,7 @@ public class SourcedCompositionItemParam {
}
private SourcedCompositionItemParam() {
// For JAXB and builder use
// for JAXB
}
@XmlElement(name = "Source", required = true)

View File

@ -126,7 +126,7 @@ public class StaticRoute {
}
private StaticRoute() {
// For JAXB and builder use
// for JAXB
}
private StaticRoute(String _interface) {

View File

@ -104,7 +104,7 @@ public class StaticRoutingService extends NetworkServiceType<StaticRoutingServic
}
private StaticRoutingService() {
// For JAXB and builder use
// for JAXB
}
@XmlElement(name = "StaticRoute")

View File

@ -97,7 +97,7 @@ public class SupportedHardwareVersions {
}
private SupportedHardwareVersions() {
// For JAXB and builder use
// for JAXB
}
private SupportedHardwareVersions(Set<String> supportedHardwareVersions) {

View File

@ -76,7 +76,7 @@ public class SyslogServerSettings {
}
private SyslogServerSettings() {
// For JAXB and builder use
// for JAXB
}
@XmlElement(name = "SyslogServerIp1")

View File

@ -295,7 +295,7 @@ public class Task extends EntityType<Task> {
}
private Task() {
// For JAXB and builder use
// for JAXB
}

View File

@ -75,7 +75,7 @@ public class TasksInProgress {
}
private TasksInProgress() {
// For JAXB and builder use
// for JAXB
}
private TasksInProgress(Collection<Task> tasks) {

View File

@ -161,7 +161,7 @@ public class TasksList extends EntityType<TasksList> {
}
protected TasksList() {
// For JAXB and builder use
// for JAXB
}
public TasksList(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id, String name, Set<Task> tasks) {

View File

@ -172,7 +172,7 @@ public class VAppCreationParamsType<T extends VAppCreationParamsType<T>>
}
protected VAppCreationParamsType() {
// For JAXB and builder use
// for JAXB
}
/**

View File

@ -254,9 +254,9 @@ public class VAppTemplate extends ResourceEntityType<VAppTemplate> {
}
}
@XmlElementRef
@XmlElement(name = "Owner")
protected Owner owner;
@XmlElementRef
@XmlElement(name = "Children")
protected VAppTemplateChildren children = VAppTemplateChildren.builder().build();
@XmlElementRef
protected Set<? extends SectionType<?>> sections = Sets.newLinkedHashSet();

View File

@ -22,7 +22,8 @@ import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_OVF_NS;
import java.util.Set;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
@ -116,7 +117,7 @@ public class DiskSection extends SectionType<DiskSection> {
}
@XmlElementRef
@XmlElement(name = "Disk")
private Set<Disk> disks;
private DiskSection(@Nullable String info, @Nullable Boolean required, Iterable<Disk> disks) {

View File

@ -77,7 +77,7 @@ public class CatalogReferences extends QueryResultReferences<CatalogReference> {
}
/**
* @see CatalogReference#getName()
* @see CatalogReferences#getName()
*/
@Override
public Builder name(String name) {
@ -86,7 +86,7 @@ public class CatalogReferences extends QueryResultReferences<CatalogReference> {
}
/**
* @see CatalogReference#getPage()
* @see CatalogReferences#getPage()
*/
@Override
public Builder page(Integer page) {
@ -95,7 +95,7 @@ public class CatalogReferences extends QueryResultReferences<CatalogReference> {
}
/**
* @see CatalogReference#getPageSize()
* @see CatalogReferences#getPageSize()
*/
@Override
public Builder pageSize(Integer pageSize) {
@ -104,7 +104,7 @@ public class CatalogReferences extends QueryResultReferences<CatalogReference> {
}
/**
* @see CatalogReference#getTotal()
* @see CatalogReferences#getTotal()
*/
@Override
public Builder total(Long total) {
@ -113,7 +113,7 @@ public class CatalogReferences extends QueryResultReferences<CatalogReference> {
}
/**
* @see CatalogReference#getHref()
* @see CatalogReferences#getHref()
*/
@Override
public Builder href(URI href) {
@ -131,7 +131,7 @@ public class CatalogReferences extends QueryResultReferences<CatalogReference> {
}
/**
* @see CatalogReference#getLinks()
* @see CatalogReferences#getLinks()
*/
@Override
public Builder links(Set<Link> links) {
@ -140,7 +140,7 @@ public class CatalogReferences extends QueryResultReferences<CatalogReference> {
}
/**
* @see CatalogReference#getLinks()
* @see CatalogReferences#getLinks()
*/
@Override
public Builder link(Link link) {
@ -163,6 +163,6 @@ public class CatalogReferences extends QueryResultReferences<CatalogReference> {
}
protected CatalogReferences() {
// For JAXB and builder use
// for JAXB
}
}

View File

@ -161,7 +161,7 @@ public class ContainerType<T extends ContainerType<T>> extends ResourceType<T> {
}
protected ContainerType() {
// For JAXB and builder use
// for JAXB
}
/**

View File

@ -71,7 +71,7 @@ public class QueryList extends ContainerType<QueryList> {
}
private QueryList() {
// For JAXB and builder use
// for JAXB
}
@Override

View File

@ -252,7 +252,7 @@ public class QueryResultCatalogRecord extends QueryResultRecordType<QueryResultC
}
private QueryResultCatalogRecord() {
// For JAXB and builder use
// for JAXB
}

View File

@ -221,7 +221,7 @@ public class QueryResultNetworkRecord extends QueryResultRecordType<QueryResultN
}
private QueryResultNetworkRecord() {
// For JAXB and builder use
// Qfor JAXB
}
@XmlAttribute

View File

@ -43,7 +43,10 @@ import com.google.common.collect.Sets;
*
* @author grkvlt@apache.org
*/
@XmlSeeAlso({QueryResultCatalogRecord.class, QueryResultNetworkRecord.class})
@XmlSeeAlso({
QueryResultCatalogRecord.class,
QueryResultNetworkRecord.class}
)
public class QueryResultRecordType<T extends QueryResultRecordType<T>> {
public static <T extends QueryResultRecordType<T>> Builder<T> builder() {

View File

@ -172,13 +172,11 @@ public class QueryResultReferences<T extends ReferenceType<T>> extends Container
}
protected QueryResultReferences() {
// For JAXB and builder use
// for JAXB
}
// NOTE add other types as they are used. probably not the best way to do this.
@XmlElementRefs({
@XmlElementRef(type = CatalogReference.class)
})
@XmlElementRef
private Set<T> references = Sets.newLinkedHashSet();
/**

View File

@ -395,7 +395,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx
.build())
.parentNetwork(Reference.builder().href(URI.create("http://vcloud.example.com/api/v1.0/network/54")).type("application/vnd.vmware.vcloud.network+xml").name("Internet").build())
.fenceMode("natRouted")
.features(NetworkFeatures.builder().services(ImmutableSet.<NetworkServiceType>of(firewallService, natService)).build())
.features(NetworkFeatures.builder().services(ImmutableSet.of(firewallService, natService)).build())
.build();
return NetworkConfigSection.builder()