diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorConstants.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorConstants.java index fa71a182f3..c094600788 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorConstants.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorConstants.java @@ -26,6 +26,6 @@ package org.jclouds.vcloud.director.v1_5; public class VCloudDirectorConstants { /** The XML namespace used by the clients. */ - public static final String XMLNS = "http://www.vmware.com/vcloud/v1.5"; + public static final String VCLOUD_1_5_NS = "http://www.vmware.com/vcloud/v1.5"; } diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/EntityType.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/EntityType.java index af1f468ff6..0568885c8f 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/EntityType.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/EntityType.java @@ -157,9 +157,9 @@ public class EntityType> extends ResourceType { } } - @XmlElement(namespace = XMLNS, name = "Description") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "Description") private String description; - @XmlElement(namespace = XMLNS, name = "TasksInProgress") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "TasksInProgress") private TasksInProgress tasksInProgress; @XmlAttribute private String id; @@ -211,19 +211,6 @@ public class EntityType> extends ResourceType { this.id = id; } - /** - * Returns the unique UUID string for this entity. - * - * Once we have an entity, the {@link #getId()} field is better suited to retrieving the - * id than {@link #getHref()}. - * - * @see ReferenceType#getUuid() - */ - @Override - public String getUuid() { - return Iterables.getLast(Splitter.on(":").split(id)); - } - /** * Contains the name of the the entity. */ diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Error.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Error.java index 22b31a6cbf..97a8c6b2d6 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Error.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Error.java @@ -40,7 +40,7 @@ import com.google.common.base.Objects; * * @author grkvlt@apache.org */ -@XmlRootElement(namespace = XMLNS, name = "Error") +@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "Error") @XmlAccessorType(XmlAccessType.FIELD) public class Error { diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Metadata.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Metadata.java index 90b38cd312..14ce1b3065 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Metadata.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Metadata.java @@ -44,7 +44,7 @@ import com.google.common.collect.Sets; * * @author danikov */ -@XmlRootElement(namespace = XMLNS, name = "Metadata") +@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "Metadata") public class Metadata extends ResourceType { public static final String MEDIA_TYPE = VCloudDirectorMediaType.METADATA; @@ -137,7 +137,7 @@ public class Metadata extends ResourceType { this.metadata = ImmutableSet.copyOf(metadataEntries); } - @XmlElement(namespace = XMLNS, name = "MetadataEntry") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "MetadataEntry") private Set metadata = Sets.newLinkedHashSet(); public Set getMetadata() { diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/MetadataEntry.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/MetadataEntry.java index d46e5d26c4..202b8dd9a5 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/MetadataEntry.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/MetadataEntry.java @@ -43,7 +43,7 @@ import com.google.common.collect.Sets; * * @author danikov */ -@XmlRootElement(namespace = XMLNS, name = "MetadataEntry") +@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "MetadataEntry") public class MetadataEntry extends ResourceType { public static final String MEDIA_TYPE = VCloudDirectorMediaType.METADATA_ENTRY; @@ -138,9 +138,9 @@ public class MetadataEntry extends ResourceType { this.value = checkNotNull(value, "value"); } - @XmlElement(namespace = XMLNS, name = "Key") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "Key") private String key; - @XmlElement(namespace = XMLNS, name = "Value") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "Value") private String value; /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Org.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Org.java index ff7f257071..5fb59b9753 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Org.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Org.java @@ -45,7 +45,7 @@ import com.google.common.collect.Sets; * * @author Adrian Cole */ -@XmlRootElement(namespace = XMLNS, name = "Org") +@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "Org") public class Org extends EntityType { public static final String MEDIA_TYPE = VCloudDirectorMediaType.ORG; @@ -174,7 +174,7 @@ public class Org extends EntityType { this.fullName = fullName; } - @XmlElement(namespace = XMLNS, name = "FullName") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "FullName") private String fullName; /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/OrgList.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/OrgList.java index 20492aca2b..bc9f6abd98 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/OrgList.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/OrgList.java @@ -38,7 +38,7 @@ import com.google.common.collect.Sets; * * @author Adrian Cole */ -@XmlRootElement(namespace = XMLNS, name = "OrgList") +@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "OrgList") public class OrgList { public static final String MEDIA_TYPE = VCloudDirectorMediaType.ORG_LIST; @@ -88,7 +88,7 @@ public class OrgList { this.orgs = ImmutableSet.copyOf(orgs); } - @XmlElement(namespace = XMLNS, name = "Org") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "Org") private Set orgs = Sets.newLinkedHashSet(); public Set getOrgs() { diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ReferenceType.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ReferenceType.java index b1e59ce4d4..8e3f022ba9 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ReferenceType.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ReferenceType.java @@ -158,15 +158,6 @@ public class ReferenceType> implements URISupplier { this.id = id; } - /** - * Returns the unique UUID string for this reference. - * - * @see ResourceType#getUuid() - */ - public String getUuid() { - return Iterables.getLast(Splitter.on("/").split(href.getPath())); - } - /** * Contains the name of the the entity. * diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ResourceType.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ResourceType.java index 67c6a47dcc..c12cef9699 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ResourceType.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ResourceType.java @@ -112,7 +112,7 @@ public class ResourceType> implements URISupplier { private URI href; @XmlAttribute private String type; - @XmlElement(namespace = XMLNS, name = "Link") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "Link") private Set links = Sets.newLinkedHashSet(); protected ResourceType(URI href) { @@ -148,15 +148,6 @@ public class ResourceType> implements URISupplier { return getHref(); } - /** - * Returns the unique UUID string for this resource. - * - * @see ReferenceType#getUuid() - */ - public String getUuid() { - return Iterables.getLast(Splitter.on("/").split(href.getPath())); - } - /** * Contains the type of the the entity. * diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Session.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Session.java index 1ec2a852fb..ea3d7192b9 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Session.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Session.java @@ -44,7 +44,7 @@ import com.google.common.collect.Sets; * * @author Adrian Cole */ -@XmlRootElement(namespace = XMLNS, name = "Session") +@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "Session") @XmlAccessorType(XmlAccessType.FIELD) public class Session { @@ -124,7 +124,7 @@ public class Session { this.links = ImmutableSet.copyOf(links); } - @XmlElement(namespace = XMLNS, name = "Link") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "Link") private Set links = Sets.newLinkedHashSet(); @XmlAttribute private String user; diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Task.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Task.java index 342474312e..11d79f6143 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Task.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Task.java @@ -45,7 +45,7 @@ import com.google.common.collect.Sets; * * @author grkvlt@apache.org */ -@XmlRootElement(namespace = XMLNS, name = "Task") +@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "Task") public class Task extends EntityType { public static final String MEDIA_TYPE = VCloudDirectorMediaType.TASK; @@ -286,17 +286,17 @@ public class Task extends EntityType { super(href, name); } - @XmlElement(namespace = XMLNS, name = "Error") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "Error") private Error error; - @XmlElement(namespace = XMLNS, name = "Organization") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "Organization") private Reference org; - @XmlElement(namespace = XMLNS, name = "Progress") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "Progress") private Integer progress; - @XmlElement(namespace = XMLNS, name = "Owner") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "Owner") private Reference owner; - @XmlElement(namespace = XMLNS, name = "User") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "User") private Reference user; - @XmlElement(namespace = XMLNS, name = "Params") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "Params") private Object params; @XmlAttribute private String status; diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/TasksInProgress.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/TasksInProgress.java index 2881f74c85..c377a98dfb 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/TasksInProgress.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/TasksInProgress.java @@ -37,7 +37,7 @@ import com.google.common.collect.Sets; /** * @author grkvlt@apache.org */ -@XmlRootElement(namespace = XMLNS, name = "TasksInProgress") +@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "TasksInProgress") @XmlAccessorType(XmlAccessType.FIELD) public class TasksInProgress { @@ -86,7 +86,7 @@ public class TasksInProgress { this.tasks = ImmutableSet.copyOf(tasks); } - @XmlElement(namespace = XMLNS, name = "Task") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "Task") private Set tasks = Sets.newLinkedHashSet(); public Set getTasks() { diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/TasksList.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/TasksList.java index 5ae39756cf..7ffd1550d5 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/TasksList.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/TasksList.java @@ -40,7 +40,7 @@ import com.google.common.collect.Sets; * * @author Adrian Cole */ -@XmlRootElement(namespace = XMLNS, name = "TasksList") +@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "TasksList") public class TasksList extends EntityType { public static final String MEDIA_TYPE = VCloudDirectorMediaType.TASKS_LIST; @@ -177,7 +177,7 @@ public class TasksList extends EntityType { this.tasks = ImmutableSet.copyOf(tasks); } - @XmlElement(namespace = XMLNS, name = "Task") + @XmlElement(namespace = VCLOUD_1_5_NS, name = "Task") private Set tasks = Sets.newLinkedHashSet(); public Set getTasks() {