You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ad...@apache.org on 2014/10/12 05:38:29 UTC
[6/9] Dedupe vcloud api calls and instead expose helper to resolve
ids to hrefs. cleanup pass on javadoc.
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRecord.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRecord.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRecord.java
new file mode 100644
index 0000000..c427d0b
--- /dev/null
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRecord.java
@@ -0,0 +1,218 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.vcloud.director.v1_5.domain.query;
+
+import static com.google.common.base.Objects.equal;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import java.net.URI;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+import org.jclouds.vcloud.director.v1_5.domain.Link;
+
+import com.google.common.base.MoreObjects;
+import com.google.common.base.MoreObjects.ToStringHelper;
+import com.google.common.base.Objects;
+import com.google.common.collect.Sets;
+
+@XmlSeeAlso({
+ QueryResultVAppTemplateRecord.class,
+ QueryResultVAppRecord.class,
+ QueryResultVMRecord.class,
+ QueryResultDatastoreRecord.class,
+ QueryResultCatalogRecord.class,
+ QueryResultNetworkRecord.class,
+ QueryResultRoleRecord.class,
+ QueryResultAdminGroupRecord.class,
+ QueryResultAdminVdcRecord.class,
+ QueryResultAdminUserRecord.class,
+ QueryResultStrandedUserRecord.class,
+ QueryResultMediaRecord.class}
+)
+public class QueryResultRecord {
+
+ public static Builder<?> builder() {
+ return new ConcreteBuilder();
+ }
+
+ public Builder<?> toBuilder() {
+ return builder().fromQueryResultRecordType(this);
+ }
+
+ private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
+ }
+
+ public static class Builder<B extends Builder<B>> {
+
+ private URI href;
+ private String id;
+ private String type;
+ private Set<Link> links = Sets.newLinkedHashSet();
+
+ @SuppressWarnings("unchecked")
+ protected B self() {
+ return (B) this;
+ }
+
+ /**
+ * @see QueryResultRecord#getHref()
+ */
+ public B href(URI href) {
+ this.href = href;
+ return self();
+ }
+
+ /**
+ * @see QueryResultRecord#getId()
+ */
+ public B id(String id) {
+ this.id = id;
+ return self();
+ }
+
+ /**
+ * @see QueryResultRecord#getType()
+ */
+ public B type(String type) {
+ this.type = type;
+ return self();
+ }
+
+ /**
+ * @see QueryResultRecord#getLinks()
+ */
+ public B links(Set<Link> links) {
+ this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
+ return self();
+ }
+
+ /**
+ * @see QueryResultRecord#getLinks()
+ */
+ public B link(Link link) {
+ this.links.add(checkNotNull(link, "link"));
+ return self();
+ }
+
+ public QueryResultRecord build() {
+ return new QueryResultRecord(this);
+ }
+
+ public B fromQueryResultRecordType(QueryResultRecord in) {
+ return href(in.getHref()).id(in.getId()).type(in.getType());
+ }
+ }
+
+ @XmlElement(name = "Link")
+ private Set<Link> links = Sets.newLinkedHashSet();
+ @XmlAttribute
+ private URI href;
+ @XmlAttribute
+ private String id;
+ @XmlAttribute
+ private String type;
+
+ protected QueryResultRecord(Builder<?> builder) {
+ this.links = builder.links;
+ this.href = builder.href;
+ this.id = builder.id;
+ this.type = builder.type;
+ }
+
+ public QueryResultRecord(Set<Link> links, URI href, String id, String type) {
+ this.links = links;
+ this.href = href;
+ this.id = id;
+ this.type = type;
+ }
+
+ public QueryResultRecord(URI href) {
+ this.href = href;
+ }
+
+ protected QueryResultRecord() {
+ // For JAXB
+ }
+
+ /**
+ * Set of optional links to an entity or operation associated with this object.
+ */
+ public Set<Link> getLinks() {
+ return links;
+ }
+
+ /**
+ * Contains the URI to the entity. An object reference, expressed in URL format. Because this URL includes the object identifier
+ * portion of the id attribute value, it uniquely identifies the object, persists for the life of the object, and is never
+ * reused. The value of the href attribute is a reference to a view of the object, and can be used to access a representation of
+ * the object that is valid in a particular context. Although URLs have a well-known syntax and a well-understood interpretation,
+ * a api should treat each href as an opaque string. The rules that govern how the server constructs href strings might change
+ * in future releases.
+ *
+ * @return an opaque reference and should never be parsed
+ */
+ public URI getHref() {
+ return href;
+ }
+
+ /**
+ * The resource identifier, expressed in URN format. The value of this attribute uniquely identifies the resource, persists for
+ * the life of the resource, and is never reused.
+ */
+ public String getId() {
+ return id;
+ }
+ /**
+ * Contains the type of the the entity. The object type, specified as a MIME content type, of the object that the link
+ * references. This attribute is present only for links to objects. It is not present for links to actions.
+ *
+ * @return type definition, type, expressed as an HTTP Content-Type
+ */
+ public String getType() {
+ return type;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
+ QueryResultRecord that = QueryResultRecord.class.cast(o);
+ return equal(this.href, that.href) && equal(this.id, that.id) &&
+ equal(this.type, that.type) && equal(this.links, that.links);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(href, id, type, links);
+ }
+
+ @Override
+ public String toString() {
+ return string().toString();
+ }
+
+ protected ToStringHelper string() {
+ return MoreObjects.toStringHelper("").add("href", href).add("id", id)
+ .add("type", type).add("links", links);
+ }
+}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRecordType.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRecordType.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRecordType.java
deleted file mode 100644
index cf964f7..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRecordType.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.vcloud.director.v1_5.domain.query;
-
-import static com.google.common.base.Objects.equal;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.net.URI;
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlSeeAlso;
-
-import org.jclouds.vcloud.director.v1_5.domain.Link;
-
-import com.google.common.base.MoreObjects;
-import com.google.common.base.MoreObjects.ToStringHelper;
-import com.google.common.base.Objects;
-import com.google.common.collect.Sets;
-
-/**
- * Base type for query result Records. Subtypes define more specific elements.
- *
- * <pre>
- * <complexType name="QueryResultRecordType" />
- * </pre>
- */
-@XmlSeeAlso({
- QueryResultVAppTemplateRecord.class,
- QueryResultVAppRecord.class,
- QueryResultVMRecord.class,
- QueryResultDatastoreRecord.class,
- QueryResultCatalogRecord.class,
- QueryResultNetworkRecord.class,
- QueryResultRoleRecord.class,
- QueryResultAdminGroupRecord.class,
- QueryResultAdminVdcRecord.class,
- QueryResultAdminUserRecord.class,
- QueryResultStrandedUserRecord.class,
- QueryResultMediaRecord.class}
-)
-public class QueryResultRecordType {
-
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- public Builder<?> toBuilder() {
- return builder().fromQueryResultRecordType(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public static class Builder<B extends Builder<B>> {
-
- private URI href;
- private String id;
- private String type;
- private Set<Link> links = Sets.newLinkedHashSet();
-
- @SuppressWarnings("unchecked")
- protected B self() {
- return (B) this;
- }
-
- /**
- * @see QueryResultRecordType#getHref()
- */
- public B href(URI href) {
- this.href = href;
- return self();
- }
-
- /**
- * @see QueryResultRecordType#getId()
- */
- public B id(String id) {
- this.id = id;
- return self();
- }
-
- /**
- * @see QueryResultRecordType#getType()
- */
- public B type(String type) {
- this.type = type;
- return self();
- }
-
- /**
- * @see QueryResultRecordType#getLinks()
- */
- public B links(Set<Link> links) {
- this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
- return self();
- }
-
- /**
- * @see QueryResultRecordType#getLinks()
- */
- public B link(Link link) {
- this.links.add(checkNotNull(link, "link"));
- return self();
- }
-
- public QueryResultRecordType build() {
- return new QueryResultRecordType(this);
- }
-
- public B fromQueryResultRecordType(QueryResultRecordType in) {
- return href(in.getHref()).id(in.getId()).type(in.getType());
- }
- }
-
- @XmlElement(name = "Link")
- private Set<Link> links = Sets.newLinkedHashSet();
- @XmlAttribute
- private URI href;
- @XmlAttribute
- private String id;
- @XmlAttribute
- private String type;
-
- protected QueryResultRecordType(Builder<?> builder) {
- this.links = builder.links;
- this.href = builder.href;
- this.id = builder.id;
- this.type = builder.type;
- }
-
- public QueryResultRecordType(Set<Link> links, URI href, String id, String type) {
- this.links = links;
- this.href = href;
- this.id = id;
- this.type = type;
- }
-
- public QueryResultRecordType(URI href) {
- this.href = href;
- }
-
- protected QueryResultRecordType() {
- // For JAXB
- }
-
- /**
- * Set of optional links to an entity or operation associated with this object.
- */
- public Set<Link> getLinks() {
- return links;
- }
-
- /**
- * Contains the URI to the entity. An object reference, expressed in URL format. Because this URL includes the object identifier
- * portion of the id attribute value, it uniquely identifies the object, persists for the life of the object, and is never
- * reused. The value of the href attribute is a reference to a view of the object, and can be used to access a representation of
- * the object that is valid in a particular context. Although URLs have a well-known syntax and a well-understood interpretation,
- * a api should treat each href as an opaque string. The rules that govern how the server constructs href strings might change
- * in future releases.
- *
- * @return an opaque reference and should never be parsed
- */
- public URI getHref() {
- return href;
- }
-
- /**
- * The resource identifier, expressed in URN format. The value of this attribute uniquely identifies the resource, persists for
- * the life of the resource, and is never reused.
- */
- public String getId() {
- return id;
- }
- /**
- * Contains the type of the the entity. The object type, specified as a MIME content type, of the object that the link
- * references. This attribute is present only for links to objects. It is not present for links to actions.
- *
- * @return type definition, type, expressed as an HTTP Content-Type
- */
- public String getType() {
- return type;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- QueryResultRecordType that = QueryResultRecordType.class.cast(o);
- return equal(this.href, that.href) && equal(this.id, that.id) &&
- equal(this.type, that.type) && equal(this.links, that.links);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(href, id, type, links);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- protected ToStringHelper string() {
- return MoreObjects.toStringHelper("").add("href", href).add("id", id)
- .add("type", type).add("links", links);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRecords.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRecords.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRecords.java
index 7997931..b405dfa 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRecords.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRecords.java
@@ -32,15 +32,8 @@ import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
-/**
- * Represents the results from a vCloud query as records.
- *
- * <pre>
- * <complexType name="QueryResultRecords" />
- * </pre>
- */
@XmlRootElement(name = "QueryResultRecords")
-public class QueryResultRecords extends ContainerType {
+public class QueryResultRecords extends Container {
public static final String MEDIA_TYPE = VCloudDirectorMediaType.QUERY_RESULT_RECORDS;
@@ -56,14 +49,14 @@ public class QueryResultRecords extends ContainerType {
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
}
- public static class Builder<B extends Builder<B>> extends ContainerType.Builder<B> {
+ public static class Builder<B extends Builder<B>> extends Container.Builder<B> {
- private Set<QueryResultRecordType> records = Sets.newLinkedHashSet();
+ private Set<QueryResultRecord> records = Sets.newLinkedHashSet();
/**
* @see QueryResultRecords#getRecords()
*/
- public B records(Set<QueryResultRecordType> records) {
+ public B records(Set<QueryResultRecord> records) {
this.records = Sets.newLinkedHashSet(checkNotNull(records, "records"));
return self();
}
@@ -71,7 +64,7 @@ public class QueryResultRecords extends ContainerType {
/**
* @see QueryResultRecords#getRecords()
*/
- public B record(QueryResultRecordType record) {
+ public B record(QueryResultRecord record) {
this.records.add(checkNotNull(record, "record"));
return self();
}
@@ -96,12 +89,12 @@ public class QueryResultRecords extends ContainerType {
}
@XmlElementRef
- private Set<QueryResultRecordType> records = Sets.newLinkedHashSet();
+ private Set<QueryResultRecord> records = Sets.newLinkedHashSet();
/**
* Set of records representing query results.
*/
- public Set<QueryResultRecordType> getRecords() {
+ public Set<QueryResultRecord> getRecords() {
return Collections.unmodifiableSet(records);
}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultReferences.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultReferences.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultReferences.java
index 49c8db1..aefb1f5 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultReferences.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultReferences.java
@@ -31,14 +31,7 @@ import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
-/**
- * Represents the results from a vCloud query as references.
- *
- * <pre>
- * <complexType name="QueryResultReferences" />
- * </pre>
- */
-public class QueryResultReferences extends ContainerType {
+public class QueryResultReferences extends Container {
public static final String MEDIA_TYPE = VCloudDirectorMediaType.QUERY_RESULT_REFERENCES;
@@ -54,7 +47,7 @@ public class QueryResultReferences extends ContainerType {
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
}
- public static class Builder<B extends Builder<B>> extends ContainerType.Builder<B> {
+ public static class Builder<B extends Builder<B>> extends Container.Builder<B> {
private Set<Reference> references = Sets.newLinkedHashSet();
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRightRecord.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRightRecord.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRightRecord.java
index 2b5df3c..cc3d71b 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRightRecord.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRightRecord.java
@@ -23,10 +23,7 @@ import javax.xml.bind.annotation.XmlAttribute;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects.ToStringHelper;
-/**
- * Represents the results from a Right vCloud query as a record.
- */
-public class QueryResultRightRecord extends QueryResultRecordType {
+public class QueryResultRightRecord extends QueryResultRecord {
public static Builder<?> builder() {
return new ConcreteBuilder();
@@ -40,7 +37,7 @@ public class QueryResultRightRecord extends QueryResultRecordType {
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
}
- public static class Builder<B extends Builder<B>> extends QueryResultRecordType.Builder<B> {
+ public static class Builder<B extends Builder<B>> extends QueryResultRecord.Builder<B> {
private String name;
private String category;
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRoleRecord.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRoleRecord.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRoleRecord.java
index a6e97c2..a596728 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRoleRecord.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultRoleRecord.java
@@ -25,12 +25,9 @@ import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects.ToStringHelper;
-/**
- * Represents the results from a Role vCloud query as a record.
- */
@XmlRootElement(name = "RoleRecord")
@XmlType(name = "QueryResultRoleRecordType")
-public class QueryResultRoleRecord extends QueryResultRecordType {
+public class QueryResultRoleRecord extends QueryResultRecord {
public static Builder<?> builder() {
return new ConcreteBuilder();
@@ -44,7 +41,7 @@ public class QueryResultRoleRecord extends QueryResultRecordType {
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
}
- public static class Builder<B extends Builder<B>> extends QueryResultRecordType.Builder<B> {
+ public static class Builder<B extends Builder<B>> extends QueryResultRecord.Builder<B> {
private String name;
private Boolean isReadOnly;
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultStrandedUserRecord.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultStrandedUserRecord.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultStrandedUserRecord.java
index db0b9a2..142efe8 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultStrandedUserRecord.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultStrandedUserRecord.java
@@ -25,12 +25,9 @@ import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects.ToStringHelper;
-/**
- * Represents the results from a StrandedUser vCloud query as a record.
- */
@XmlRootElement(name = "StrandedUserRecord")
@XmlType(name = "QueryResultStrandedUserRecordType")
-public class QueryResultStrandedUserRecord extends QueryResultRecordType {
+public class QueryResultStrandedUserRecord extends QueryResultRecord {
public static Builder<?> builder() {
return new ConcreteBuilder();
@@ -44,7 +41,7 @@ public class QueryResultStrandedUserRecord extends QueryResultRecordType {
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
}
- public static class Builder<B extends Builder<B>> extends QueryResultRecordType.Builder<B> {
+ public static class Builder<B extends Builder<B>> extends QueryResultRecord.Builder<B> {
private String name;
private String fullName;
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppRecord.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppRecord.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppRecord.java
index 945a635..4d3768b 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppRecord.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppRecord.java
@@ -28,16 +28,9 @@ import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects.ToStringHelper;
-/**
- * Represents the results from a VApp vCloud query as a record.
- *
- * <pre>
- * <complexType name="QueryResultVAppRecordType" />
- * </pre>
- */
@XmlRootElement(name = "VAppRecord")
@XmlType(name = "QueryResultVAppRecordType")
-public class QueryResultVAppRecord extends QueryResultRecordType {
+public class QueryResultVAppRecord extends QueryResultRecord {
public static Builder<?> builder() {
return new ConcreteBuilder();
@@ -51,7 +44,7 @@ public class QueryResultVAppRecord extends QueryResultRecordType {
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
}
- public static class Builder<B extends Builder<B>> extends QueryResultRecordType.Builder<B> {
+ public static class Builder<B extends Builder<B>> extends QueryResultRecord.Builder<B> {
private String name;
private String vdc;
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppTemplateRecord.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppTemplateRecord.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppTemplateRecord.java
index 3652548..3ca74f9 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppTemplateRecord.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppTemplateRecord.java
@@ -27,16 +27,9 @@ import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects.ToStringHelper;
-/**
- * Represents the results from a VAppTemplate vCloud query as a record.
- *
- * <pre>
- * <complexType name="QueryResultVAppTemplateRecordType" />
- * </pre>
- */
@XmlRootElement(name = "VAppTemplateRecord")
@XmlType(name = "QueryResultVAppTemplateRecordType")
-public class QueryResultVAppTemplateRecord extends QueryResultRecordType {
+public class QueryResultVAppTemplateRecord extends QueryResultRecord {
public static Builder<?> builder() {
return new ConcreteBuilder();
@@ -50,7 +43,7 @@ public class QueryResultVAppTemplateRecord extends QueryResultRecordType {
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
}
- public static class Builder<B extends Builder<B>> extends QueryResultRecordType.Builder<B> {
+ public static class Builder<B extends Builder<B>> extends QueryResultRecord.Builder<B> {
private String ownerName;
private String catalogName;
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVMRecord.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVMRecord.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVMRecord.java
index 3273797..deb6567 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVMRecord.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVMRecord.java
@@ -25,16 +25,9 @@ import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects.ToStringHelper;
-/**
- * Represents the results from a VM vCloud query as a record.
- *
- * <pre>
- * <complexType name="QueryResultVMRecordType" />
- * </pre>
- */
@XmlRootElement(name = "VMRecord")
@XmlType(name = "QueryResultVMRecordType")
-public class QueryResultVMRecord extends QueryResultRecordType {
+public class QueryResultVMRecord extends QueryResultRecord {
public static Builder<?> builder() {
return new ConcreteBuilder();
@@ -48,7 +41,7 @@ public class QueryResultVMRecord extends QueryResultRecordType {
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
}
- public static class Builder<B extends Builder<B>> extends QueryResultRecordType.Builder<B> {
+ public static class Builder<B extends Builder<B>> extends QueryResultRecord.Builder<B> {
private String name;
private String containerName;
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/VAppReferences.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/VAppReferences.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/VAppReferences.java
index 22484ba..f0156e5 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/VAppReferences.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/VAppReferences.java
@@ -18,13 +18,6 @@ package org.jclouds.vcloud.director.v1_5.domain.query;
import javax.xml.bind.annotation.XmlRootElement;
-/**
- * Represents the results from a vCloud query as references.
- *
- * <pre>
- * <complexType name="QueryResultReferences" />
- * </pre>
- */
@XmlRootElement(name = "VAppReferences")
public class VAppReferences extends QueryResultReferences {
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/CustomizationSection.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/CustomizationSection.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/CustomizationSection.java
index 3e7ec45..20a69fe 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/CustomizationSection.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/CustomizationSection.java
@@ -36,26 +36,6 @@ import com.google.common.base.Objects;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
-/**
- * Represents a vApp template customization settings section.
- *
- * <pre>
- * <complexType name="CustomizationSection">
- * <complexContent>
- * <extension base="{http://schemas.dmtf.org/ovf/envelope/1}Section_Type">
- * <sequence>
- * <element name="CustomizeOnInstantiate" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
- * <element name="Link" type="{http://www.vmware.com/vcloud/v1.5}LinkType" maxOccurs="unbounded" minOccurs="0"/>
- * <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <attribute name="href" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- * <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <anyAttribute processContents='lax'/>
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- */
@XmlRootElement(name = "CustomizationSection")
public class CustomizationSection extends SectionType {
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/GuestCustomizationSection.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/GuestCustomizationSection.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/GuestCustomizationSection.java
index 71765cb..626adc4 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/GuestCustomizationSection.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/GuestCustomizationSection.java
@@ -37,39 +37,6 @@ import com.google.common.base.Objects;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
-/**
- * Represents a guest customization settings.
- *
- * <pre>
- * <complexType name="GuestCustomizationSection">
- * <complexContent>
- * <extension base="{http://schemas.dmtf.org/ovf/envelope/1}Section_Type">
- * <sequence>
- * <element name="Enabled" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
- * <element name="ChangeSid" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
- * <element name="VirtualMachineId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * <element name="JoinDomainEnabled" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
- * <element name="UseOrgSettings" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
- * <element name="DomainName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * <element name="DomainUserName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * <element name="DomainUserPassword" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * <element name="AdminPasswordEnabled" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
- * <element name="AdminPasswordAuto" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
- * <element name="AdminPassword" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * <element name="ResetPasswordRequired" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
- * <element name="CustomizationScript" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * <element name="ComputerName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * <element name="Link" type="{http://www.vmware.com/vcloud/v1.5}LinkType" maxOccurs="unbounded" minOccurs="0"/>
- * <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <attribute name="href" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- * <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <anyAttribute processContents='lax'/>
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- */
@XmlRootElement(name = "GuestCustomizationSection")
@XmlType(propOrder = {
"enabled",
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/LeaseSettingsSection.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/LeaseSettingsSection.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/LeaseSettingsSection.java
index bfe7e85..a7fad4c 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/LeaseSettingsSection.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/LeaseSettingsSection.java
@@ -38,29 +38,6 @@ import com.google.common.base.Objects;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
-/**
- * Represents the lease settings section for a vApp.
- *
- * <pre>
- * <complexType name="LeaseSettingsSection">
- * <complexContent>
- * <extension base="{http://schemas.dmtf.org/ovf/envelope/1}Section_Type">
- * <sequence>
- * <element name="Link" type="{http://www.vmware.com/vcloud/v1.5}LinkType" maxOccurs="unbounded" minOccurs="0"/>
- * <element name="DeploymentLeaseInSeconds" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
- * <element name="StorageLeaseInSeconds" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
- * <element name="DeploymentLeaseExpiration" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
- * <element name="StorageLeaseExpiration" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
- * <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <attribute name="href" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- * <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <anyAttribute processContents='lax'/>
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- */
@XmlRootElement(name = "LeaseSettingsSection")
@XmlType(name = "LeaseSettingsSectionType")
public class LeaseSettingsSection extends SectionType {
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConfigSection.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConfigSection.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConfigSection.java
index b8e4c7d..3b9527a 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConfigSection.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConfigSection.java
@@ -38,13 +38,6 @@ import com.google.common.base.Objects;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
-/**
- * Represents the network config section of a vApp.
- *
- * <pre>
- * <complexType name="NetworkConfigSection" />
- * </pre>
- */
@XmlRootElement(name = "NetworkConfigSection")
@XmlType(name = "NetworkConfigSectionType")
public class NetworkConfigSection extends SectionType {
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConnectionSection.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConnectionSection.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConnectionSection.java
index 9cdedef..b956820 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConnectionSection.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConnectionSection.java
@@ -39,10 +39,6 @@ import com.google.common.collect.Sets;
/**
* Represents a list of network cards existing in a VM.
- *
- * <pre>
- * <complexType name="NetworkConnectionSectionType" />
- * </pre>
*/
@XmlRootElement(name = "NetworkConnectionSection")
@XmlType(name = "NetworkConnectionSectionType")
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/OperatingSystemSection.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/OperatingSystemSection.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/OperatingSystemSection.java
index cd57d07..9889250 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/OperatingSystemSection.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/OperatingSystemSection.java
@@ -38,9 +38,6 @@ import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
-/**
- * An OperatingSystemSection specifies the operating system installed on a virtual machine.
- */
@XmlRootElement(name = "OperatingSystemSection", namespace = OVF_NS)
@XmlType(name = "OperatingSystemSection_Type")
@XmlSeeAlso({ org.jclouds.dmtf.ovf.OperatingSystemSection.class })
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/RuntimeInfoSection.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/RuntimeInfoSection.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/RuntimeInfoSection.java
index 425e82a..9e0f428 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/RuntimeInfoSection.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/RuntimeInfoSection.java
@@ -32,13 +32,6 @@ import com.google.common.base.Objects;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.Lists;
-/**
- * Runtime information for a specific vm
- *
- * <pre>
- * <complexType name="RuntimeInfoSectionType" />
- * </pre>
- */
@XmlRootElement(name = "RuntimeInfoSection")
@XmlType(name = "RuntimeInfoSectionType")
public class RuntimeInfoSection extends SectionType {
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/VirtualHardwareSection.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/VirtualHardwareSection.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/VirtualHardwareSection.java
index 7b23267..49168f4 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/VirtualHardwareSection.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/VirtualHardwareSection.java
@@ -38,9 +38,6 @@ import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
-/**
- * The virtual hardware required by a virtual machine is specified in VirtualHardwareSection.
- */
@XmlRootElement(name = "VirtualHardwareSection", namespace = OVF_NS)
@XmlType(name = "VirtualHardwareSection_Type")
@XmlSeeAlso({ org.jclouds.dmtf.ovf.VirtualHardwareSection.class })
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Catalog.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Catalog.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Catalog.java
index 5ed756a..b37de68 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Catalog.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Catalog.java
@@ -23,9 +23,6 @@ import java.lang.annotation.Target;
import javax.inject.Qualifier;
-/**
- * Related to a VCloud Catalog.
- */
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = { ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
@Qualifier
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Network.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Network.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Network.java
index dfaaf5d..e50150a 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Network.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Network.java
@@ -23,9 +23,6 @@ import java.lang.annotation.Target;
import javax.inject.Qualifier;
-/**
- * Related to a VCloud Network.
- */
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = { ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
@Qualifier
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Org.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Org.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Org.java
index 11219ce..b63207f 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Org.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Org.java
@@ -23,9 +23,6 @@ import java.lang.annotation.Target;
import javax.inject.Qualifier;
-/**
- * Related to a VCloud express Org.
- */
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = { ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
@Qualifier
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/OrgList.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/OrgList.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/OrgList.java
index 7485ee7..69b5067 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/OrgList.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/OrgList.java
@@ -23,9 +23,6 @@ import java.lang.annotation.Target;
import javax.inject.Qualifier;
-/**
- * Related to a VCloud express Org List.
- */
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = { ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
@Qualifier
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/TasksList.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/TasksList.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/TasksList.java
index 36df1dc..87f8d2d 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/TasksList.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/TasksList.java
@@ -23,9 +23,6 @@ import java.lang.annotation.Target;
import javax.inject.Qualifier;
-/**
- * Related to a VCloud express Task List.
- */
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = { ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
@Qualifier
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/VCloudLogin.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/VCloudLogin.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/VCloudLogin.java
index 63a3353..b23cc0e 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/VCloudLogin.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/VCloudLogin.java
@@ -23,11 +23,6 @@ import java.lang.annotation.Target;
import javax.inject.Qualifier;
-/**
- * Represents a component related to vCloud.
- *
- * @see <a href="https://community.vcloudexpress.terremark.com/en-us/discussion_forums/f/60.aspx" />
- */
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = { ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
@Qualifier
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Vdc.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Vdc.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Vdc.java
index 01046f0..d1811ea 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Vdc.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/endpoints/Vdc.java
@@ -23,9 +23,6 @@ import java.lang.annotation.Target;
import javax.inject.Qualifier;
-/**
- * Related to a VCloud express Catalog.
- */
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = {ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
@Qualifier
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/CatalogApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/CatalogApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/CatalogApi.java
index 004193c..effe33e 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/CatalogApi.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/CatalogApi.java
@@ -29,6 +29,7 @@ import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
+import org.jclouds.javax.annotation.Nullable;
import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.Fallback;
@@ -38,55 +39,18 @@ import org.jclouds.rest.binders.BindToXMLPayload;
import org.jclouds.vcloud.director.v1_5.domain.Catalog;
import org.jclouds.vcloud.director.v1_5.domain.CatalogItem;
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationAndCookieToRequest;
-import org.jclouds.vcloud.director.v1_5.functions.URNToHref;
@RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class)
public interface CatalogApi {
- /**
- * Retrieves a catalog.
- *
- * <pre>
- * GET /catalog/{id}
- * </pre>
- *
- * @param catalogUrn
- * the reference for the catalog
- * @return a catalog
- */
- @GET
- @Consumes
- @JAXBResponseParser
- @Fallback(NullOnNotFoundOr404.class)
- Catalog get(@EndpointParam(parser = URNToHref.class) String catalogUrn);
-
+ /** Returns the catalog or null if not found. */
@GET
@Consumes
@JAXBResponseParser
@Fallback(NullOnNotFoundOr404.class)
+ @Nullable
Catalog get(@EndpointParam URI catalogHref);
- /**
- * Creates a catalog item in a catalog.
- *
- * <pre>
- * POST /catalog/{id}/catalogItems
- * </pre>
- *
- * @param catalogUrn
- * the URI of the catalog
- * @param catalogItem
- * the catalog item to add
- * @return the added catalog item
- */
- @POST
- @Path("/catalogItems")
- @Consumes(CATALOG_ITEM)
- @Produces(CATALOG_ITEM)
- @JAXBResponseParser
- CatalogItem addItem(@EndpointParam(parser = URNToHref.class) String catalogUrn,
- @BinderParam(BindToXMLPayload.class) CatalogItem catalogItem);
-
@POST
@Path("/catalogItems")
@Consumes(CATALOG_ITEM)
@@ -94,49 +58,13 @@ public interface CatalogApi {
@JAXBResponseParser
CatalogItem addItem(@EndpointParam URI catalogHref, @BinderParam(BindToXMLPayload.class) CatalogItem catalogItem);
- /**
- * Retrieves a catalog item.
- *
- * <pre>
- * GET /catalogItem/{id}
- * </pre>
- *
- * @param catalogItemUrn
- * the reference for the catalog item
- * @return the catalog item
- */
- @GET
- @Consumes
- @JAXBResponseParser
- @Fallback(NullOnNotFoundOr404.class)
- CatalogItem getItem(@EndpointParam(parser = URNToHref.class) String catalogItemUrn);
-
+ /** Returns the item or null if not found. */
@GET
@Consumes
@JAXBResponseParser
@Fallback(NullOnNotFoundOr404.class)
CatalogItem getItem(@EndpointParam URI catalogItemHref);
- /**
- * Modifies a catalog item.
- *
- * <pre>
- * PUT /catalogItem/{id}
- * </pre>
- *
- * @param catalogItemUrn
- * the reference for the catalog item
- * @param catalogItem
- * the catalog item
- * @return the edited catalog item
- */
- @PUT
- @Consumes(CATALOG_ITEM)
- @Produces(CATALOG_ITEM)
- @JAXBResponseParser
- CatalogItem editItem(@EndpointParam(parser = URNToHref.class) String catalogItemUrn,
- @BinderParam(BindToXMLPayload.class) CatalogItem catalogItem);
-
@PUT
@Consumes(CATALOG_ITEM)
@Produces(CATALOG_ITEM)
@@ -144,21 +72,6 @@ public interface CatalogApi {
CatalogItem editItem(@EndpointParam URI catalogItemHref,
@BinderParam(BindToXMLPayload.class) CatalogItem catalogItem);
- /**
- * Deletes a catalog item.
- *
- * <pre>
- * DELETE /catalogItem/{id}
- * </pre>
- *
- * @param catalogItemUrn
- * the reference for the catalog item
- */
- @DELETE
- @Consumes
- @JAXBResponseParser
- void removeItem(@EndpointParam(parser = URNToHref.class) String catalogItemUrn);
-
@DELETE
@Consumes
@JAXBResponseParser
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MediaApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MediaApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MediaApi.java
index a8a3c0c..259a3a5 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MediaApi.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MediaApi.java
@@ -31,6 +31,7 @@ import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
+import org.jclouds.javax.annotation.Nullable;
import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.Fallback;
@@ -42,26 +43,16 @@ import org.jclouds.vcloud.director.v1_5.domain.Owner;
import org.jclouds.vcloud.director.v1_5.domain.Task;
import org.jclouds.vcloud.director.v1_5.domain.params.CloneMediaParams;
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationAndCookieToRequest;
-import org.jclouds.vcloud.director.v1_5.functions.URNToHref;
@RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class)
public interface MediaApi {
- /**
- * Retrieves a media.
- *
- * @return the media or null if not found
- */
- @GET
- @Consumes
- @JAXBResponseParser
- @Fallback(NullOnNotFoundOr404.class)
- Media get(@EndpointParam(parser = URNToHref.class) String mediaUrn);
-
+ /** Returns the media or null if not found. */
@GET
@Consumes
@JAXBResponseParser
@Fallback(NullOnNotFoundOr404.class)
+ @Nullable
Media get(@EndpointParam URI mediaHref);
/**
@@ -81,57 +72,23 @@ public interface MediaApi {
@Consumes(MEDIA)
@Produces(CLONE_MEDIA_PARAMS)
@JAXBResponseParser
- Media clone(@EndpointParam URI mediaHref,
- @BinderParam(BindToXMLPayload.class) CloneMediaParams params);
-
- /**
- * Updates the name/description of a media.
- *
- * @return a task. This operation is asynchronous and the user should monitor the returned task
- * status in order to check when it is completed.
- */
- @PUT
- @Consumes(TASK)
- @Produces(MEDIA)
- @JAXBResponseParser
- Task edit(@EndpointParam(parser = URNToHref.class) String mediaUrn,
- @BinderParam(BindToXMLPayload.class) Media media);
+ Media clone(@EndpointParam URI mediaHref, @BinderParam(BindToXMLPayload.class) CloneMediaParams params);
+ /** Updates the name/description of a media. */
@PUT
@Consumes(TASK)
@Produces(MEDIA)
@JAXBResponseParser
Task edit(@EndpointParam URI mediaHref, @BinderParam(BindToXMLPayload.class) Media media);
- /**
- * Deletes a media.
- */
- @DELETE
- @Consumes(TASK)
- @JAXBResponseParser
- Task remove(@EndpointParam(parser = URNToHref.class) String mediaUrn);
-
@DELETE
@Consumes(TASK)
@JAXBResponseParser
Task remove(@EndpointParam URI mediaHref);
- /**
- * Retrieves an owner.
- *
- * @return the owner or null if not found
- */
- @GET
- @Path("/owner")
- @Consumes
- @JAXBResponseParser
- @Fallback(NullOnNotFoundOr404.class)
- Owner getOwner(@EndpointParam(parser = URNToHref.class) String mediaUrn);
-
@GET
@Path("/owner")
@Consumes
@JAXBResponseParser
- @Fallback(NullOnNotFoundOr404.class)
Owner getOwner(@EndpointParam URI mediaHref);
}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MetadataApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MetadataApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MetadataApi.java
index 3a7896c..ca8ae2e 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MetadataApi.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MetadataApi.java
@@ -32,6 +32,7 @@ import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
+import org.jclouds.javax.annotation.Nullable;
import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.Fallback;
import org.jclouds.rest.annotations.JAXBResponseParser;
@@ -46,36 +47,26 @@ import org.jclouds.vcloud.director.v1_5.functions.RegexValueParser;
@RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class)
public interface MetadataApi {
- /**
- * Retrieves an list of metadata
- *
- * @return a list of metadata
- */
+
+ /** Returns the metadata or null if the associated resource was not found. */
@GET
@Path("/metadata")
@Consumes
@JAXBResponseParser
@Fallback(NullOnNotFoundOr404.class)
+ @Nullable
Metadata get();
- /**
- * Retrieves a metadata value
- *
- * @return the metadata value, or null if not found
- */
+ /** Returns the metadata value or null if the {@code key} was not found. */
@GET
@Path("/metadata/{key}")
@Consumes
@ResponseParser(RegexValueParser.class)
@Fallback(NullOnNotFoundOr404.class)
+ @Nullable
String get(@PathParam("key") String key);
- /**
- * Merges the metadata for a media with the information provided.
- *
- * @return a task. This operation is asynchronous and the user should monitor the returned task status in order to
- * check when it is completed.
- */
+ /** Merges the metadata for a media with the information provided. */
@POST
@Path("/metadata")
@Consumes(TASK)
@@ -83,13 +74,7 @@ public interface MetadataApi {
@JAXBResponseParser
Task putAll(@BinderParam(BindMapAsMetadata.class) Map<String, String> metadata);
- /**
- * Sets the metadata for the particular key for the media to the value provided. Note: this will replace any existing
- * metadata information
- *
- * @return a task. This operation is asynchronous and the user should monitor the returned task status in order to
- * check when it is completed.
- */
+ /** Replace the metadata value for the specified {@code key}. */
@PUT
@Path("/metadata/{key}")
@Consumes(TASK)
@@ -97,12 +82,6 @@ public interface MetadataApi {
@JAXBResponseParser
Task put(@PathParam("key") String key, @BinderParam(BindStringAsMetadataValue.class) String metadataValue);
- /**
- * Deletes a metadata entry.
- *
- * @return a task. This operation is asynchronous and the user should monitor the returned task status in order to
- * check when it is completed.
- */
@DELETE
@Path("/metadata/{key}")
@Consumes(TASK)
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/NetworkApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/NetworkApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/NetworkApi.java
index 116df53..f8e9c1e 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/NetworkApi.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/NetworkApi.java
@@ -23,31 +23,22 @@ import java.net.URI;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
+import org.jclouds.javax.annotation.Nullable;
import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.Fallback;
import org.jclouds.rest.annotations.JAXBResponseParser;
import org.jclouds.rest.annotations.RequestFilters;
import org.jclouds.vcloud.director.v1_5.domain.network.Network;
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationAndCookieToRequest;
-import org.jclouds.vcloud.director.v1_5.functions.URNToHref;
@RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class)
public interface NetworkApi {
- /**
- * Retrieves a network.
- *
- * @return the network or null if not found
- */
- @GET
- @Consumes
- @JAXBResponseParser
- @Fallback(NullOnNotFoundOr404.class)
- Network get(@EndpointParam(parser = URNToHref.class) String networkUrn);
-
+ /** Returns the network or null if not found. */
@GET
@Consumes
@JAXBResponseParser
@Fallback(NullOnNotFoundOr404.class)
+ @Nullable
Network get(@EndpointParam URI networkHref);
}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/OrgApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/OrgApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/OrgApi.java
index 54a7fab..e48e18b 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/OrgApi.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/OrgApi.java
@@ -24,6 +24,7 @@ import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
+import org.jclouds.javax.annotation.Nullable;
import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.Fallback;
import org.jclouds.rest.annotations.JAXBResponseParser;
@@ -31,44 +32,21 @@ import org.jclouds.rest.annotations.RequestFilters;
import org.jclouds.vcloud.director.v1_5.domain.org.Org;
import org.jclouds.vcloud.director.v1_5.domain.org.OrgList;
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationAndCookieToRequest;
-import org.jclouds.vcloud.director.v1_5.functions.URNToHref;
@RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class)
public interface OrgApi {
- /**
- * Retrieves a list of organizations.
- *
- * <pre>
- * GET / org
- * </pre>
- *
- * @return a list of organizations
- */
@GET
@Path("/org/")
@Consumes
@JAXBResponseParser
OrgList list();
- /**
- * Retrieves an organization.
- *
- * <pre>
- * GET /org/{id}
- * </pre>
- *
- * @return the org or null if not found
- */
- @GET
- @Consumes
- @JAXBResponseParser
- @Fallback(NullOnNotFoundOr404.class)
- Org get(@EndpointParam(parser = URNToHref.class) String orgUrn);
-
+ /** Returns the org or null if not found. */
@GET
@Consumes
@JAXBResponseParser
@Fallback(NullOnNotFoundOr404.class)
+ @Nullable
Org get(@EndpointParam URI orgHref);
}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryApi.java
index 8c9ed91..c1a5582 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryApi.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryApi.java
@@ -34,7 +34,7 @@ public interface QueryApi {
// TODO Add a typed object for filter syntax, or at least a fluent builder
/**
- * Retrieves a list of entities by using REST API general QueryHandler.
+ * Retrieves a list of entities.
*
* If filter is provided it will be applied to the corresponding result set.
* Format determines the elements representation - references or records.
@@ -64,11 +64,7 @@ public interface QueryApi {
@QueryParam("format") String format, @QueryParam("type") String type, @QueryParam("filter") String filter);
/**
- * Retrieves a list of {@link Catalog}s by using REST API general QueryHandler.
- *
- * <pre>
- * GET /catalogs/query
- * </pre>
+ * Retrieves a list of {@link Catalog}s.
*
* @see #queryAll(String)
*/
@@ -79,11 +75,7 @@ public interface QueryApi {
QueryResultRecords catalogsQueryAll();
/**
- * Retrieves a list of {@link CatalogReference}s by using REST API general QueryHandler.
- *
- * <pre>
- * GET /catalogs/query?format=references
- * </pre>
+ * Retrieves a list of {@link CatalogReference}s.
*
* @see #queryAll(String)
*/
@@ -95,11 +87,7 @@ public interface QueryApi {
CatalogReferences catalogReferencesQueryAll();
/**
- * Retrieves a list of {@link VAppTemplate}s by using REST API general QueryHandler.
- *
- * <pre>
- * GET /vAppTemplates/query
- * </pre>
+ * Retrieves a list of {@link VAppTemplate}s.
*
* @see #queryAll(String)
*/
@@ -116,11 +104,7 @@ public interface QueryApi {
QueryResultRecords vAppTemplatesQuery(@QueryParam("filter") String filter);
/**
- * Retrieves a list of {@link VApp}s by using REST API general QueryHandler.
- *
- * <pre>
- * GET /vApps/query
- * </pre>
+ * Retrieves a list of {@link VApp}s.
*
* @see #queryAll(String)
*/
@@ -137,11 +121,7 @@ public interface QueryApi {
QueryResultRecords vAppsQuery(@QueryParam("filter") String filter);
/**
- * Retrieves a list of {@link Vm}s by using REST API general QueryHandler.
- *
- * <pre>
- * GET /vms/query
- * </pre>
+ * Retrieves a list of {@link Vm}s.
*
* @see #queryAll(String)
*/
@@ -158,11 +138,7 @@ public interface QueryApi {
QueryResultRecords vmsQuery(@QueryParam("filter") String filter);
/**
- * Retrieves a list of {@link Media}s by using REST API general QueryHandler.
- *
- * <pre>
- * GET /mediaList/query
- * </pre>
+ * Retrieves a list of {@link Media}s.
*
* @see #queryAll(String)
*/
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/TaskApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/TaskApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/TaskApi.java
index a5b98f2..efba9ce 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/TaskApi.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/TaskApi.java
@@ -25,6 +25,7 @@ import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
+import org.jclouds.javax.annotation.Nullable;
import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.Fallback;
import org.jclouds.rest.annotations.JAXBResponseParser;
@@ -32,48 +33,30 @@ import org.jclouds.rest.annotations.RequestFilters;
import org.jclouds.vcloud.director.v1_5.domain.Task;
import org.jclouds.vcloud.director.v1_5.domain.TasksList;
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationAndCookieToRequest;
-import org.jclouds.vcloud.director.v1_5.functions.URNToHref;
@RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class)
public interface TaskApi {
/**
- * Retrieves a list of tasks.
- *
- * <pre>
- * GET /tasksList/{id}
- * </pre>
- *
- * @param tasksListUrn
+ * Returns the task list or null if not found.
+ *
+ * @param tasksListHref
* from {@link Org#getLinks()} where {@link Link#getType} is
* {@link VCloudDirectorMediaType#TASKS_LIST}
- * @return a list of tasks
*/
@GET
@Consumes
@JAXBResponseParser
@Fallback(NullOnNotFoundOr404.class)
+ @Nullable
TasksList getTasksList(@EndpointParam URI tasksListHref);
- /**
- * Retrieves a task.
- *
- * <pre>
- * GET /task/{id}
- * </pre>
- *
- * @return the task or null if not found
- */
- @GET
- @Consumes
- @JAXBResponseParser
- @Fallback(NullOnNotFoundOr404.class)
- Task get(@EndpointParam(parser = URNToHref.class) String taskUrn);
-
+ /** Returns the task or null if not found. */
@GET
@Consumes
@JAXBResponseParser
@Fallback(NullOnNotFoundOr404.class)
+ @Nullable
Task get(@EndpointParam URI taskURI);
@POST
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/a58cf0c6/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppApi.java
index 250b50a..8d08640 100644
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppApi.java
+++ b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppApi.java
@@ -41,6 +41,7 @@ import javax.ws.rs.Produces;
import org.jclouds.dmtf.ovf.NetworkSection;
import org.jclouds.dmtf.ovf.StartupSection;
+import org.jclouds.javax.annotation.Nullable;
import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.Fallback;
@@ -58,546 +59,16 @@ import org.jclouds.vcloud.director.v1_5.domain.params.UndeployVAppParams;
import org.jclouds.vcloud.director.v1_5.domain.section.LeaseSettingsSection;
import org.jclouds.vcloud.director.v1_5.domain.section.NetworkConfigSection;
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationAndCookieToRequest;
-import org.jclouds.vcloud.director.v1_5.functions.URNToHref;
@RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class)
public interface VAppApi {
- /**
- * @see VAppApi#get(String)
- */
- @GET
- @Consumes(VAPP)
- @JAXBResponseParser
- @Fallback(NullOnNotFoundOr404.class)
- VApp get(@EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Modifies the name/description of a {@link VApp}.
- *
- * <pre>
- * PUT /vApp/{id}
- * </pre>
- *
- * @since 0.9
- */
- @PUT
- @Produces(VAPP)
- @Consumes(TASK)
- @JAXBResponseParser
- Task edit(@EndpointParam(parser = URNToHref.class) String vAppUrn,
- @BinderParam(BindToXMLPayload.class) VApp vApp);
-
- /**
- * Deletes a {@link VApp}.
- *
- * <pre>
- * DELETE /vApp/{id}
- * </pre>
- *
- * @since 0.9
- */
- @DELETE
- @Consumes(TASK)
- @JAXBResponseParser
- Task remove(@EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Modifies the control access of a {@link VApp}.
- *
- * <pre>
- * POST /vApp/{id}/action/controlAccess
- * </pre>
- *
- * @since 0.9
- */
- @POST
- @Path("/action/controlAccess")
- @Produces(CONTROL_ACCESS)
- @Consumes(CONTROL_ACCESS)
- @JAXBResponseParser
- ControlAccessParams editControlAccess(@EndpointParam(parser = URNToHref.class) String vAppUrn,
- @BinderParam(BindToXMLPayload.class) ControlAccessParams params);
-
- /**
- * Deploys a {@link VApp}.
- *
- * Deployment means allocation of all resource for a vApp/VM like CPU and memory from a vDC
- * resource pool. Deploying a vApp automatically deploys all of the virtual machines it contains.
- * As of version 1.5 the operation supports force customization passed with
- * {@link DeployVAppParamsType#setForceCustomization(Boolean)} parameter.
- *
- * <pre>
- * POST /vApp/{id}/action/deploy
- * </pre>
- *
- * @since 0.9
- */
- @POST
- @Path("/action/deploy")
- @Produces(DEPLOY_VAPP_PARAMS)
- @Consumes(TASK)
- @JAXBResponseParser
- Task deploy(@EndpointParam(parser = URNToHref.class) String vAppUrn,
- @BinderParam(BindToXMLPayload.class) DeployVAppParams params);
-
- /**
- * Discard suspended state of a {@link VApp}.
- *
- * Discarding suspended state of a vApp automatically discarded suspended states of all of the
- * virtual machines it contains.
- *
- * <pre>
- * POST /vApp/{id}/action/discardSuspendedState
- * </pre>
- *
- * @since 0.9
- */
- @POST
- @Path("/action/discardSuspendedState")
- @Consumes(TASK)
- @JAXBResponseParser
- Task discardSuspendedState(@EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Place the {@link VApp} into maintenance mode.
- *
- * While in maintenance mode, a system admin can operate on the vApp as usual, but end users are
- * restricted to read-only operations. Any user-initiated tasks running when the vApp enters
- * maintenance mode will continue.
- *
- * <pre>
- * POST /vApp/{id}/action/enterMaintenanceMode
- * </pre>
- *
- * @since 1.5
- */
- @POST
- @Path("/action/enterMaintenanceMode")
- @Consumes
- @JAXBResponseParser
- void enterMaintenanceMode(@EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Take the {@link VApp} out of maintenance mode.
- *
- * <pre>
- * POST /vApp/{id}/action/exitMaintenanceMode
- * </pre>
- *
- * @since 1.5
- */
- @POST
- @Path("/action/exitMaintenanceMode")
- @Consumes
- @JAXBResponseParser
- void exitMaintenanceMode(@EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Recompose a {@link VApp} by removing its own VMs and/or adding new ones from other vApps or
- * vApp templates.
- *
- * To remove VMs you should put their references in elements. The way you add VMs is the same as
- * described in compose vApp operation
- * {@link VdcApi#composeVApp(String, org.jclouds.vcloud.director.v1_5.domain.ComposeVAppParams)}.
- * The status of vApp will be in
- * {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED} until the
- * recompose task is finished.
- *
- * <pre>
- * POST /vApp/{id}/action/recomposeVApp
- * </pre>
- *
- * @since 1.0
- */
- @POST
- @Path("/action/recomposeVApp")
- @Produces(RECOMPOSE_VAPP_PARAMS)
- @Consumes(TASK)
- @JAXBResponseParser
- Task recompose(@EndpointParam(parser = URNToHref.class) String vAppUrn,
- @BinderParam(BindToXMLPayload.class) RecomposeVAppParams params);
-
- /**
- * Undeploy a {@link VApp}.
- *
- * Undeployment means deallocation of all resources for a vApp/VM like CPU and memory from a vDC
- * resource pool. Undeploying a vApp automatically undeploys all of the virtual machines it
- * contains.
- *
- * <pre>
- * POST /vApp/{id}/action/undeploy
- * </pre>
- *
- * @since 0.9
- */
- @POST
- @Path("/action/undeploy")
- @Produces(UNDEPLOY_VAPP_PARAMS)
- @Consumes(TASK)
- @JAXBResponseParser
- Task undeploy(@EndpointParam(parser = URNToHref.class) String vAppUrn,
- @BinderParam(BindToXMLPayload.class) UndeployVAppParams params);
-
- /**
- * Retrieves the control access information for a {@link VApp}.
- *
- * The vApp could be shared to everyone or could be shared to specific user, by editing the
- * control access values.
- *
- * <pre>
- * GET /vApp/{id}/controlAccess
- * </pre>
- *
- * @since 0.9
- */
- // TODO: revise
- @GET
- @Path("/controlAccess")
- @Consumes(CONTROL_ACCESS)
- @JAXBResponseParser
- @Fallback(NullOnNotFoundOr404.class)
- ControlAccessParams getAccessControl(@EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Powers off a {@link VApp}.
- *
- * If the operation is used over a vApp then all VMs are powered off. This operation is allowed
- * only when the vApp/VM is powered on.
- *
- * <pre>
- * POST /vApp/{id}/power/action/powerOff
- * </pre>
- *
- * @since 0.9
- */
- @POST
- @Path("/power/action/powerOff")
- @Consumes(TASK)
- @JAXBResponseParser
- Task powerOff(@EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Powers on a {@link VApp}.
- *
- * If the operation is used over a vApp then all VMs are powered on. This operation is allowed
- * only when the vApp/VM is powered off.
- *
- * <pre>
- * POST /vApp/{id}/power/action/powerOn
- * </pre>
- *
- * @since 0.9
- */
- @POST
- @Path("/power/action/powerOn")
- @Consumes(TASK)
- @JAXBResponseParser
- Task powerOn(@EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Reboots a {@link VApp}.
- *
- * The vApp/VM should be started in order to reboot it.
- *
- * <pre>
- * POST /vApp/{id}/power/action/reboot
- * </pre>
- *
- * @since 0.9
- */
- @POST
- @Path("/power/action/reboot")
- @Consumes(TASK)
- @JAXBResponseParser
- Task reboot(@EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Resets a {@link VApp}.
- *
- * If the operation is used over a vApp then all VMs are reset. This operation is allowed only
- * when the vApp/VM is powered on.
- *
- * <pre>
- * POST /vApp/{id}/power/action/reset
- * </pre>
- *
- * @since 0.9
- */
- @POST
- @Path("/power/action/reset")
- @Consumes(TASK)
- @JAXBResponseParser
- Task reset(@EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Shuts down a {@link VApp}.
- *
- * If the operation is used over a vApp then all VMs are shutdown. This operation is allowed only
- * when the vApp/VM is powered on.
- *
- * <pre>
- * POST /vApp/{id}/power/action/shutdown
- * </pre>
- *
- * @since 0.9
- */
- @POST
- @Path("/power/action/shutdown")
- @Consumes(TASK)
- @JAXBResponseParser
- Task shutdown(@EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Suspends a {@link VApp}.
- *
- * If the operation is used over a vApp then all VMs are suspended. This operation is allowed
- * only when the vApp/VM is powered on.
- *
- * <pre>
- * POST /vApp/{id}/power/action/suspend
- * </pre>
- *
- * @since 0.9
- */
- @POST
- @Path("/power/action/suspend")
- @Consumes(TASK)
- @JAXBResponseParser
- Task suspend(@EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Retrieves the lease settings section of a {@link VApp}.
- *
- * <pre>
- * GET /vApp/{id}/leaseSettingsSection
- * </pre>
- *
- * @since 0.9
- */
- @GET
- @Path("/leaseSettingsSection")
- @Consumes
- @JAXBResponseParser
- @Fallback(NullOnNotFoundOr404.class)
- LeaseSettingsSection getLeaseSettingsSection(
- @EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Modifies the lease settings section of a {@link VApp}.
- *
- * <pre>
- * PUT /vApp/{id}/leaseSettingsSection
- * </pre>
- *
- * @since 0.9
- */
- @PUT
- @Path("/leaseSettingsSection")
- @Produces(LEASE_SETTINGS_SECTION)
- @Consumes(TASK)
- @JAXBResponseParser
- Task editLeaseSettingsSection(@EndpointParam(parser = URNToHref.class) String vAppUrn,
- @BinderParam(BindToXMLPayload.class) LeaseSettingsSection section);
-
- /**
- * Retrieves the network config section of a {@link VApp}.
- *
- * <pre>
- * GET /vApp/{id}/networkConfigSection
- * </pre>
- *
- * @since 0.9
- */
- @GET
- @Path("/networkConfigSection")
- @Consumes
- @JAXBResponseParser
- @Fallback(NullOnNotFoundOr404.class)
- NetworkConfigSection getNetworkConfigSection(
- @EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Modifies the network config section of a {@link VApp}.
- *
- * <pre>
- * PUT /vApp/{id}/networkConfigSection
- * </pre>
- *
- * @since 0.9
- */
- @PUT
- @Path("/networkConfigSection")
- @Produces(NETWORK_CONFIG_SECTION)
- @Consumes(TASK)
- @JAXBResponseParser
- Task editNetworkConfigSection(@EndpointParam(parser = URNToHref.class) String vAppUrn,
- @BinderParam(BindToXMLPayload.class) NetworkConfigSection section);
-
- /**
- * Retrieves the network section of a {@link VApp}.
- *
- * <pre>
- * GET /vApp/{id}/networkSection
- * </pre>
- *
- * @since 0.9
- */
- @GET
- @Path("/networkSection")
- @Consumes
- @JAXBResponseParser
- @Fallback(NullOnNotFoundOr404.class)
- NetworkSection getNetworkSection(@EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Retrieves the owner of a {@link VApp}.
- *
- * <pre>
- * GET /vApp/{id}/owner
- * </pre>
- *
- * @since 1.5
- */
- @GET
- @Path("/owner")
- @Consumes
- @JAXBResponseParser
- @Fallback(NullOnNotFoundOr404.class)
- Owner getOwner(@EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Changes {@link VApp} owner.
- *
- * <pre>
- * PUT /vApp/{id}/owner
- * </pre>
- *
- * @since 1.5
- */
- @PUT
- @Path("/owner")
- @Produces(OWNER)
- @Consumes(TASK)
- @JAXBResponseParser
- void editOwner(@EndpointParam(parser = URNToHref.class) String vAppUrn,
- @BinderParam(BindToXMLPayload.class) Owner owner);
-
- /**
- * Retrieves {@link VApp} product sections.
- *
- * <pre>
- * GET /vApp/{id}/productSections
- * </pre>
- *
- * @since 1.5
- */
- @GET
- @Path("/productSections")
- @Consumes
- @JAXBResponseParser
- @Fallback(NullOnNotFoundOr404.class)
- ProductSectionList getProductSections(@EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Modifies the product section information of a {@link VApp}.
- *
- * <pre>
- * PUT /vApp/{id}/productSections
- * </pre>
- *
- * @since 1.5
- */
- @PUT
- @Path("/productSections")
- @Produces(PRODUCT_SECTION_LIST)
- @Consumes(TASK)
- @JAXBResponseParser
- Task editProductSections(@EndpointParam(parser = URNToHref.class) String vAppUrn,
- @BinderParam(BindToXMLPayload.class) ProductSectionList sectionList);
-
- /**
- * Retrieves the startup section of a {@link VApp}.
- *
- * <pre>
- * GET /vApp/{id}/startupSection
- * </pre>
- *
- * @since 0.9
- */
- @GET
- @Path("/startupSection")
- @Consumes
- @JAXBResponseParser
- @Fallback(NullOnNotFoundOr404.class)
- StartupSection getStartupSection(@EndpointParam(parser = URNToHref.class) String vAppUrn);
-
- /**
- * Modifies the startup section of a {@link VApp}.
- *
- * <pre>
- * PUT /vApp/{id}/startupSection
- * </pre>
- *
- * @since 0.9
- */
- @PUT
- @Path("/startupSection")
- @Produces(STARTUP_SECTION)
- @Consumes(TASK)
- @JAXBResponseParser
- Task editStartupSection(@EndpointParam(parser = URNToHref.class) String vAppUrn,
- @BinderParam(BindToXMLPayload.class) StartupSection section);
-
- /**
- * Retrieves a {@link VApp}.
- *
- * The {@link VApp} could be in one of these statuses:
- * <ul>
- * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#FAILED_CREATION
- * FAILED_CREATION(-1)} - Transient entity state, e.g., model object is addd but the
- * corresponding VC backing does not exist yet. This is further sub-categorized in the respective
- * entities.
- * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED
- * UNRESOLVED(0)} - Entity is whole, e.g., VM creation is complete and all the required model
- * objects and VC backings are created.
- * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#RESOLVED
- * RESOLVED(1)} - Entity is resolved.
- * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#DEPLOYED
- * DEPLOYED(2)} - Entity is deployed.
- * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#SUSPENDED
- * SUSPENDED(3)} - All VMs of the vApp are suspended.
- * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_ON
- * POWERED_ON(4)} - All VMs of the vApp are powered on.
- * <li>
- * {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#WAITING_FOR_INPUT
- * WAITING_FOR_INPUT(5)} - VM is pending response on a question.
- * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNKNOWN
- * UNKNOWN(6)} - Entity state could not be retrieved from the inventory, e.g., VM power state is
- * null.
- * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRECOGNIZED
- * UNRECOGNIZED(7)} - Entity state was retrieved from the inventory but could not be mapped to an
- * internal state.
- * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_OFF
- * POWERED_OFF(8)} - All VMs of the vApp are powered off.
- * <li>
- * {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#INCONSISTENT_STATE
- * INCONSISTENT_STATE(9)} - Apply to VM status, if a vm is {@code POWERED_ON}, or
- * {@code WAITING_FOR_INPUT}, but is undeployed, it is in an inconsistent state.
- * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#MIXED MIXED(10)}
- * - vApp status is set to {@code MIXED} when the VMs in the vApp are in different power states
- * </ul>
- *
- * <pre>
- * GET /vApp/{id}
- * </pre>
- *
- * @since 0.9
- */
+ /** Returns the vApp or null if not found. */
@GET
@Consumes(VAPP)
@JAXBResponseParser
@Fallback(NullOnNotFoundOr404.class)
+ @Nullable
VApp get(@EndpointParam URI vAppHref);
/**