mirror of https://github.com/apache/jclouds.git
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
f3167442c9
|
@ -19,6 +19,7 @@
|
|||
package org.jclouds.vcloud.director.v1_5;
|
||||
|
||||
import org.jclouds.rest.annotations.Delegate;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.AdminOrg;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Catalog;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Group;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Media;
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.util.concurrent.TimeUnit;
|
|||
|
||||
import org.jclouds.concurrent.Timeout;
|
||||
import org.jclouds.rest.annotations.Delegate;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.AdminOrg;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Catalog;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Group;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Media;
|
||||
|
|
|
@ -129,14 +129,31 @@ public class VCloudDirectorMediaType {
|
|||
|
||||
public static final String ADMIN_CATALOG = "application/vnd.vmware.admin.catalog+xml";
|
||||
|
||||
public static final String ADMIN_ORGANIZATION = "application/vnd.vmware.admin.organization+xml";
|
||||
public static final String ADMIN_ORG = "application/vnd.vmware.admin.organization+xml";
|
||||
|
||||
public static final String PUBLISH_CATALOG_PARAMS = "application/vnd.vmware.admin.publishCatalogParams+xml";
|
||||
|
||||
public static final String GROUP = "application/vnd.vmware.admin.group+xml";
|
||||
|
||||
public static final String ORG_VAPP_TEMPLATE_LEASE_SETTINGS = "application/vnd.vmware.admin.vAppTemplateLeaseSettings+xml";
|
||||
|
||||
public static final String ORG_LEASE_SETTINGS = "application/vnd.vmware.admin.vAppLeaseSettings+xml";
|
||||
|
||||
public static final String ORG_PASSWORD_POLICY_SETTINGS = "application/vnd.vmware.admin.organizationPasswordPolicySettings+xml";
|
||||
|
||||
public static final String ORG_LDAP_SETTINGS = "application/vnd.vmware.admin.organizationLdapSettings+xml";
|
||||
|
||||
public static final String ORG_GENERAL_SETTINGS = "application/vnd.vmware.admin.organizationGeneralSettings+xml";
|
||||
|
||||
public static final String ORG_EMAIL_SETTINGS = "application/vnd.vmware.admin.organizationEmailSettings+xml";
|
||||
|
||||
public static final String ORG_SETTINGS = "application/vnd.vmware.admin.orgSettings+xml";
|
||||
|
||||
public static final String ADMIN_NETWORK = "application/vnd.vmware.admin.network+xml";
|
||||
|
||||
public static final String ADMIN_ORG_NETWORK = "application/vnd.vmware.admin.orgNetwork+xml";
|
||||
|
||||
/**
|
||||
*
|
||||
* All acceptable media types.
|
||||
*
|
||||
* This list must be updated whenever a new media type constant is added.
|
||||
|
@ -148,11 +165,14 @@ public class VCloudDirectorMediaType {
|
|||
MEDIA, OWNER, VDC, ADMIN_USER, V_APP, V_APP_TEMPLATE,
|
||||
CAPTURE_VAPP_PARAMS, CLONE_V_APP_PARAMS, CLONE_V_APP_TEMPLATE_PARAMS,
|
||||
COMPOSE_VAPP_PARAMS, INSTANTIATE_VAPP_TEMPLATE_PARAMS,
|
||||
UPLOAD_VAPP_TEMPLATE_PARAMS, ADMIN_CATALOG, ADMIN_ORGANIZATION,
|
||||
UPLOAD_VAPP_TEMPLATE_PARAMS, ADMIN_CATALOG, ADMIN_ORG,
|
||||
QUERY_RESULT_RECORDS, QUERY_RESULT_REFERENCES, QUERY_RESULT_ID_RECORDS,
|
||||
CONTROL_ACCESS, VAPP_TEMPLATE, CUSTOMIZATION_SECTION, GUEST_CUSTOMIZATION_SECTION,
|
||||
NETWORK_SECTION, NETWORK_CONFIG_SECTION, NETWORK_CONNECTION_SECTION,
|
||||
CLONE_MEDIA_PARAMS, LEASE_SETTINGS_SECTION, RELOCATE_TEMPLATE, ENVELOPE,
|
||||
PUBLISH_CATALOG_PARAMS, GROUP
|
||||
PUBLISH_CATALOG_PARAMS, GROUP, ORG_VAPP_TEMPLATE_LEASE_SETTINGS,
|
||||
ORG_LEASE_SETTINGS, ORG_PASSWORD_POLICY_SETTINGS, ORG_LDAP_SETTINGS,
|
||||
ORG_GENERAL_SETTINGS, ORG_EMAIL_SETTINGS, ORG_SETTINGS, ADMIN_NETWORK,
|
||||
ADMIN_ORG_NETWORK
|
||||
);
|
||||
}
|
||||
|
|
|
@ -42,11 +42,32 @@ import org.jclouds.vcloud.director.v1_5.VCloudDirectorClient;
|
|||
import org.jclouds.vcloud.director.v1_5.annotations.Login;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Session;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.SessionWithToken;
|
||||
import org.jclouds.vcloud.director.v1_5.features.*;
|
||||
import org.jclouds.vcloud.director.v1_5.features.AdminCatalogAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.AdminCatalogClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.AdminOrgAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.AdminOrgClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.CatalogAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.CatalogClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.GroupAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.GroupClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.MediaAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.MediaClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.MetadataAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.MetadataClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.NetworkAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.NetworkClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.OrgAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.OrgClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.QueryAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.QueryClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.TaskAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.TaskClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.UploadAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.UploadClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.VAppTemplateAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.VAppTemplateClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.VdcAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.VdcClient;
|
||||
import org.jclouds.vcloud.director.v1_5.functions.LoginUserInOrgWithPassword;
|
||||
import org.jclouds.vcloud.director.v1_5.handlers.InvalidateSessionAndRetryOn401AndLogoutOnClose;
|
||||
import org.jclouds.vcloud.director.v1_5.handlers.VCloudDirectorErrorHandler;
|
||||
|
@ -86,6 +107,7 @@ public class VCloudDirectorRestClientModule extends RestClientModule<VCloudDirec
|
|||
.put(MetadataClient.Readable.class, MetadataAsyncClient.Readable.class)
|
||||
.put(MetadataClient.Writeable.class, MetadataAsyncClient.Writable.class)
|
||||
.put(AdminCatalogClient.class, AdminCatalogAsyncClient.class)
|
||||
.put(AdminOrgClient.class, AdminOrgAsyncClient.class)
|
||||
.put(GroupClient.class, GroupAsyncClient.class)
|
||||
.build();
|
||||
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
|
||||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -28,8 +26,6 @@ import javax.xml.bind.annotation.XmlAccessType;
|
|||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -69,7 +65,7 @@ public class AdminCatalog extends CatalogType<AdminCatalog> {
|
|||
public static class Builder extends CatalogType.Builder<AdminCatalog> {
|
||||
|
||||
public AdminCatalog build() {
|
||||
return new AdminCatalog(href, type, links, description, tasksInProgress, id, name, owner, catalogItems, isPublished);
|
||||
return new AdminCatalog(href, type, links, description, tasks, id, name, owner, catalogItems, isPublished);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -132,11 +128,11 @@ public class AdminCatalog extends CatalogType<AdminCatalog> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
this.tasksInProgress = tasksInProgress;
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
super.tasks(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -159,23 +155,22 @@ public class AdminCatalog extends CatalogType<AdminCatalog> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getLinks()
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder links(Set<Link> links) {
|
||||
this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
|
||||
return this;
|
||||
return Builder.class.cast(super.links(links));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getLinks()
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder link(Link link) {
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
return this;
|
||||
return Builder.class.cast(super.link(link));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Builder fromCatalogType(CatalogType<AdminCatalog> in) {
|
||||
return Builder.class.cast(super.fromCatalogType(in));
|
||||
|
@ -190,8 +185,8 @@ public class AdminCatalog extends CatalogType<AdminCatalog> {
|
|||
// For JAXB
|
||||
}
|
||||
|
||||
public AdminCatalog(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id,
|
||||
public AdminCatalog(URI href, String type, Set<Link> links, String description, Set<Task> tasks, String id,
|
||||
String name, Owner owner, CatalogItems catalogItems, Boolean published) {
|
||||
super(href, type, links, description, tasksInProgress, id, name, owner, catalogItems, published);
|
||||
super(href, type, links, description, tasks, id, name, owner, catalogItems, published);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,9 @@ package org.jclouds.vcloud.director.v1_5.domain;
|
|||
|
||||
import static com.google.common.base.Objects.equal;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
@ -145,7 +148,8 @@ public class AdminOrg extends Org {
|
|||
}
|
||||
|
||||
public AdminOrg build() {
|
||||
return new AdminOrg(settings, users, groups, catalogs, vdcs, networks);
|
||||
return new AdminOrg(href, type, links, description, tasks, id,
|
||||
name, fullName, isEnabled, settings, users, groups, catalogs, vdcs, networks);
|
||||
}
|
||||
|
||||
public T fromAdminOrg(AdminOrg in) {
|
||||
|
@ -175,8 +179,11 @@ public class AdminOrg extends Org {
|
|||
// For JAXB
|
||||
}
|
||||
|
||||
protected AdminOrg(OrgSettings settings, UsersList users, GroupsList groups,
|
||||
protected AdminOrg(URI href, String type, Set<Link> links, String description,
|
||||
Set<Task> tasks, String id, String name, String fullName,
|
||||
Boolean enabled, OrgSettings settings, UsersList users, GroupsList groups,
|
||||
CatalogsList catalogs, Vdcs vdcs, Networks networks) {
|
||||
super(href, type, links, description, tasks, id, name, fullName, enabled);
|
||||
this.settings = settings;
|
||||
this.users = users;
|
||||
this.groups = groups;
|
||||
|
|
|
@ -25,6 +25,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ public class Catalog extends CatalogType<Catalog> {
|
|||
|
||||
@Override
|
||||
public Catalog build() {
|
||||
return new Catalog(href, type, links, description, tasksInProgress, id, name, owner, catalogItems, isPublished);
|
||||
return new Catalog(href, type, links, description, tasks, id, name, owner, catalogItems, isPublished);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -120,11 +120,11 @@ public class Catalog extends CatalogType<Catalog> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
this.tasksInProgress = tasksInProgress;
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
super.tasks(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -174,9 +174,9 @@ public class Catalog extends CatalogType<Catalog> {
|
|||
}
|
||||
}
|
||||
|
||||
public Catalog(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id,
|
||||
public Catalog(URI href, String type, Set<Link> links, String description, Set<Task> tasks, String id,
|
||||
String name, Owner owner, CatalogItems catalogItems, Boolean published) {
|
||||
super(href, type, links, description, tasksInProgress, id, name, owner, catalogItems, published);
|
||||
super(href, type, links, description, tasks, id, name, owner, catalogItems, published);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
|
|
|
@ -23,6 +23,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
import java.net.URI;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
|
@ -45,7 +46,6 @@ public class CatalogItem extends EntityType<CatalogItem> {
|
|||
|
||||
public static final String MEDIA_TYPE = VCloudDirectorMediaType.CATALOG_ITEM;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ public class CatalogItem extends EntityType<CatalogItem> {
|
|||
|
||||
@Override
|
||||
public CatalogItem build() {
|
||||
return new CatalogItem(href, type, links, description, tasksInProgress, id, name, entity, properties);
|
||||
return new CatalogItem(href, type, links, description, tasks, id, name, entity, properties);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -117,11 +117,11 @@ public class CatalogItem extends EntityType<CatalogItem> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
this.tasksInProgress = tasksInProgress;
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
super.tasks(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -144,21 +144,19 @@ public class CatalogItem extends EntityType<CatalogItem> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getLinks()
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder links(Set<Link> links) {
|
||||
this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
|
||||
return this;
|
||||
return Builder.class.cast(super.links(links));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getLinks()
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder link(Link link) {
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
return this;
|
||||
return Builder.class.cast(super.link(link));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -171,8 +169,8 @@ public class CatalogItem extends EntityType<CatalogItem> {
|
|||
}
|
||||
}
|
||||
|
||||
private CatalogItem(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id, String name, Reference entity, Set<Property> properties) {
|
||||
super(href, type, links, description, tasksInProgress, id, name);
|
||||
private CatalogItem(URI href, String type, Set<Link> links, String description, Set<Task> tasks, String id, String name, Reference entity, Set<Property> properties) {
|
||||
super(href, type, links, description, tasks, id, name);
|
||||
this.entity = entity;
|
||||
this.properties = ImmutableSet.copyOf(properties);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement(name = "CatalogReference")
|
||||
|
|
|
@ -90,7 +90,7 @@ public class CatalogType<T extends CatalogType<T>> extends EntityType<T> {
|
|||
|
||||
@Override
|
||||
public CatalogType<T> build() {
|
||||
return new CatalogType<T>(href, type, links, description, tasksInProgress, id, name, owner, catalogItems, isPublished);
|
||||
return new CatalogType<T>(href, type, links, description, tasks, id, name, owner, catalogItems, isPublished);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -121,11 +121,11 @@ public class CatalogType<T extends CatalogType<T>> extends EntityType<T> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
super.tasksInProgress(tasksInProgress);
|
||||
public Builder<T> tasks(Set<Task> tasks) {
|
||||
super.tasks(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -176,9 +176,9 @@ public class CatalogType<T extends CatalogType<T>> extends EntityType<T> {
|
|||
}
|
||||
}
|
||||
|
||||
public CatalogType(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id,
|
||||
public CatalogType(URI href, String type, Set<Link> links, String description, Set<Task> tasks, String id,
|
||||
String name, Owner owner, CatalogItems catalogItems, Boolean published) {
|
||||
super(href, type, links, description, tasksInProgress, id, name);
|
||||
super(href, type, links, description, tasks, id, name);
|
||||
this.owner = owner;
|
||||
this.catalogItems = catalogItems;
|
||||
this.isPublished = published;
|
||||
|
|
|
@ -21,9 +21,9 @@ package org.jclouds.vcloud.director.v1_5.domain;
|
|||
import static com.google.common.base.Objects.equal;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
|
@ -68,6 +68,14 @@ public class CatalogsList {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see CatalogsList#getCatalogItems()
|
||||
*/
|
||||
public Builder catalog(Reference catalog) {
|
||||
this.catalogReferences.add(checkNotNull(catalog, "catalog"));
|
||||
return this;
|
||||
}
|
||||
|
||||
public CatalogsList build() {
|
||||
return new CatalogsList(catalogReferences);
|
||||
}
|
||||
|
@ -81,7 +89,7 @@ public class CatalogsList {
|
|||
// for JAXB
|
||||
}
|
||||
|
||||
private CatalogsList(Set<Reference> tasks) {
|
||||
private CatalogsList(Set<Reference> catalogReferences) {
|
||||
this.catalogReferences = ImmutableSet.copyOf(checkNotNull(catalogReferences, "catalogReferences"));
|
||||
}
|
||||
|
||||
|
|
|
@ -21,8 +21,6 @@ package org.jclouds.vcloud.director.v1_5.domain;
|
|||
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
|
||||
/**
|
||||
* Represents parameters for copying a vApp and optionally deleting the source.
|
||||
|
|
|
@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
|
|
|
@ -21,6 +21,9 @@ package org.jclouds.vcloud.director.v1_5.domain;
|
|||
|
||||
import static com.google.common.base.Objects.equal;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
@ -86,6 +89,36 @@ import com.google.common.base.Objects.ToStringHelper;
|
|||
"groupAttributes"
|
||||
})
|
||||
public class CustomOrgLdapSettings {
|
||||
public static final class AuthenticationMechanism {
|
||||
public static final String SIMPLE = "simple";
|
||||
public static final String KERBEROS = "kerberos";
|
||||
public static final String MD5DIGEST = "md5digest";
|
||||
public static final String NTLM = "ntlm";
|
||||
|
||||
/**
|
||||
* All acceptable {@link CustomOrgLdapSettings#getAuthenticationMechanism()} values.
|
||||
* <p/>
|
||||
* This list must be updated whenever a new authentication mechanism is added.
|
||||
*/
|
||||
public static final List<String> ALL = Arrays.asList(
|
||||
SIMPLE, KERBEROS, MD5DIGEST, NTLM
|
||||
);
|
||||
}
|
||||
|
||||
public static final class ConnectorType {
|
||||
public static final String ACTIVE_DIRECTORY = "ACTIVE_DIRECTORY";
|
||||
public static final String OPEN_LDAP = "OPEN_LDAP";
|
||||
|
||||
/**
|
||||
* All acceptable {@link OrgLdapSettings#getLdapMode()} values.
|
||||
* <p/>
|
||||
* This list must be updated whenever a new mode is added.
|
||||
*/
|
||||
public static final List<String> ALL = Arrays.asList(
|
||||
ACTIVE_DIRECTORY, OPEN_LDAP
|
||||
);
|
||||
}
|
||||
|
||||
public static Builder<?> builder() {
|
||||
return new ConcreteBuilder();
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
import java.net.URI;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
|
|
@ -46,7 +46,7 @@ public class Entity extends EntityType<Entity> {
|
|||
|
||||
@Override
|
||||
public Entity build() {
|
||||
return new Entity(href, type, links, description, tasksInProgress, id, name);
|
||||
return new Entity(href, type, links, description, tasks, id, name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,11 +77,11 @@ public class Entity extends EntityType<Entity> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
this.tasksInProgress = tasksInProgress;
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
super.tasks(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -131,8 +131,8 @@ public class Entity extends EntityType<Entity> {
|
|||
}
|
||||
}
|
||||
|
||||
private Entity(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id, String name) {
|
||||
super(href, type, links, description, tasksInProgress, id, name);
|
||||
private Entity(URI href, String type, Set<Link> links, String description, Set<Task> tasks, String id, String name) {
|
||||
super(href, type, links, description, tasks, id, name);
|
||||
}
|
||||
|
||||
private Entity() {
|
||||
|
|
|
@ -22,13 +22,18 @@ import static com.google.common.base.Objects.equal;
|
|||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
/**
|
||||
|
@ -48,7 +53,7 @@ public abstract class EntityType<T extends EntityType<T>> extends ResourceType<T
|
|||
public static abstract class NewBuilder<T extends NewBuilder<T>> extends ResourceType.NewBuilder<T> {
|
||||
|
||||
protected String description;
|
||||
protected TasksInProgress tasksInProgress;
|
||||
protected Set<Task> tasks;
|
||||
protected String name;
|
||||
protected String id;
|
||||
|
||||
|
@ -77,16 +82,16 @@ public abstract class EntityType<T extends EntityType<T>> extends ResourceType<T
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
public T tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
this.tasksInProgress = tasksInProgress;
|
||||
public T tasks(Set<Task> tasks) {
|
||||
this.tasks = tasks;
|
||||
return self();
|
||||
}
|
||||
|
||||
public T fromEntityType(EntityType<?> in) {
|
||||
return fromResourceType(in)
|
||||
.description(in.getDescription()).tasksInProgress(in.getTasksInProgress())
|
||||
.description(in.getDescription()).tasks(in.getTasks())
|
||||
.id(in.getId()).name(in.getName());
|
||||
}
|
||||
}
|
||||
|
@ -94,7 +99,7 @@ public abstract class EntityType<T extends EntityType<T>> extends ResourceType<T
|
|||
public static abstract class Builder<T extends EntityType<T>> extends ResourceType.Builder<T> {
|
||||
|
||||
protected String description;
|
||||
protected TasksInProgress tasksInProgress;
|
||||
protected Set<Task> tasks;
|
||||
protected String name;
|
||||
protected String id;
|
||||
|
||||
|
@ -123,10 +128,21 @@ public abstract class EntityType<T extends EntityType<T>> extends ResourceType<T
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
public Builder<T> tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
this.tasksInProgress = tasksInProgress;
|
||||
public Builder<T> tasks(Set<Task> tasks) {
|
||||
if (checkNotNull(tasks, "tasks").size() > 0)
|
||||
this.tasks = Sets.newLinkedHashSet(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
public Builder<T> task(Task task) {
|
||||
if (tasks == null)
|
||||
tasks = Sets.newLinkedHashSet();
|
||||
this.tasks.add(checkNotNull(task, "task"));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -151,19 +167,19 @@ public abstract class EntityType<T extends EntityType<T>> extends ResourceType<T
|
|||
/**
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Builder<T> links(Set<Link> links) {
|
||||
this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
|
||||
return this;
|
||||
return Builder.class.cast(super.links(links));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Builder<T> link(Link link) {
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
return this;
|
||||
return Builder.class.cast(super.link(link));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -177,24 +193,26 @@ public abstract class EntityType<T extends EntityType<T>> extends ResourceType<T
|
|||
|
||||
public Builder<T> fromEntityType(EntityType<T> in) {
|
||||
return fromResourceType(in)
|
||||
.description(in.getDescription()).tasksInProgress(in.getTasksInProgress())
|
||||
.description(in.getDescription()).tasks(in.getTasks())
|
||||
.id(in.getId()).name(in.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@XmlElement(name = "Description")
|
||||
private String description;
|
||||
@XmlElement(name = "Tasks")
|
||||
private TasksInProgress tasksInProgress;
|
||||
@XmlElementWrapper(name = "Tasks")
|
||||
@XmlElement(name = "Task")
|
||||
private Set<Task> tasks;
|
||||
@XmlAttribute
|
||||
private String id;
|
||||
@XmlAttribute(required = true)
|
||||
private String name;
|
||||
|
||||
public EntityType(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id, String name) {
|
||||
public EntityType(URI href, String type, @Nullable Set<Link> links, String description, @Nullable Set<Task> tasks, String id, String name) {
|
||||
super(href, type, links);
|
||||
this.description = description;
|
||||
this.tasksInProgress = tasksInProgress;
|
||||
// nullable so that jaxb wont persist empty collections
|
||||
this.tasks = tasks != null && tasks.size() == 0 ? null : tasks;
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
|
@ -213,8 +231,8 @@ public abstract class EntityType<T extends EntityType<T>> extends ResourceType<T
|
|||
/**
|
||||
* A list of queued, running, or recently completed tasks associated with this entity.
|
||||
*/
|
||||
public TasksInProgress getTasksInProgress() {
|
||||
return tasksInProgress;
|
||||
public Set<Task> getTasks() {
|
||||
return tasks == null ? ImmutableSet.<Task>of() : Collections.unmodifiableSet(tasks);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -243,7 +261,7 @@ public abstract class EntityType<T extends EntityType<T>> extends ResourceType<T
|
|||
EntityType<?> that = EntityType.class.cast(o);
|
||||
return super.equals(that) &&
|
||||
equal(this.id, that.id) && equal(this.description, that.description) &&
|
||||
equal(this.tasksInProgress, that.tasksInProgress) && equal(this.name, that.name);
|
||||
equal(this.tasks, that.tasks) && equal(this.name, that.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -258,11 +276,11 @@ public abstract class EntityType<T extends EntityType<T>> extends ResourceType<T
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode() + Objects.hashCode(description, tasksInProgress, id, name);
|
||||
return super.hashCode() + Objects.hashCode(description, tasks, id, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToStringHelper string() {
|
||||
return super.string().add("description", description).add("tasksInProgress", tasksInProgress).add("id", id).add("name", name);
|
||||
return super.string().add("description", description).add("tasks", tasks).add("id", id).add("name", name);
|
||||
}
|
||||
}
|
|
@ -20,10 +20,10 @@
|
|||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
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.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
@ -32,7 +32,6 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
|||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -98,7 +97,7 @@ public class File extends EntityType<File> {
|
|||
}
|
||||
|
||||
public File build() {
|
||||
return new File(href, type, links, description, tasksInProgress, id, name, size, bytesTransferred, checksum);
|
||||
return new File(href, type, links, description, tasks, id, name, size, bytesTransferred, checksum);
|
||||
|
||||
}
|
||||
|
||||
|
@ -127,11 +126,11 @@ public class File extends EntityType<File> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
super.tasksInProgress (tasksInProgress);
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
super.tasks (tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -158,7 +157,7 @@ public class File extends EntityType<File> {
|
|||
*/
|
||||
@Override
|
||||
public Builder links(Set<Link> links) {
|
||||
this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
|
||||
super.links(links);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -167,7 +166,7 @@ public class File extends EntityType<File> {
|
|||
*/
|
||||
@Override
|
||||
public Builder link(Link link) {
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
super.link(link);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -185,9 +184,9 @@ public class File extends EntityType<File> {
|
|||
}
|
||||
}
|
||||
|
||||
public File(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id,
|
||||
public File(URI href, String type, Set<Link> links, String description, Set<Task> tasks, String id,
|
||||
String name, Long size, Long bytesTransferred, String checksum) {
|
||||
super(href, type, links, description, tasksInProgress, id, name);
|
||||
super(href, type, links, description, tasks, id, name);
|
||||
this.size = size;
|
||||
this.bytesTransferred = bytesTransferred;
|
||||
this.checksum = checksum;
|
||||
|
|
|
@ -21,8 +21,6 @@ package org.jclouds.vcloud.director.v1_5.domain;
|
|||
|
||||
import static com.google.common.base.Objects.equal;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ package org.jclouds.vcloud.director.v1_5.domain;
|
|||
import static com.google.common.base.Objects.equal;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
|
|
@ -106,7 +106,7 @@ public class Group extends EntityType<Group> {
|
|||
}
|
||||
|
||||
public Group build() {
|
||||
return new Group(href, type, links, description, tasksInProgress, id, name,
|
||||
return new Group(href, type, links, description, tasks, id, name,
|
||||
nameInSource, usersList, role);
|
||||
}
|
||||
|
||||
|
@ -138,11 +138,11 @@ public class Group extends EntityType<Group> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
super.tasksInProgress(tasksInProgress);
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
super.tasks(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -200,9 +200,9 @@ public class Group extends EntityType<Group> {
|
|||
}
|
||||
|
||||
public Group(URI href, String type, Set<Link> links, String description,
|
||||
TasksInProgress tasksInProgress, String id, String name, String nameInSource,
|
||||
Set<Task> tasks, String id, String name, String nameInSource,
|
||||
UsersList usersList, Reference role) {
|
||||
super(href, type, links, description, tasksInProgress, id, name);
|
||||
super(href, type, links, description, tasks, id, name);
|
||||
this.nameInSource = nameInSource;
|
||||
this.usersList = usersList;
|
||||
this.role = role;
|
||||
|
|
|
@ -62,7 +62,7 @@ import com.google.common.collect.ImmutableList;
|
|||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlRootElement(name = "GroupsList")
|
||||
@XmlType(propOrder = {
|
||||
"groupReference"
|
||||
"groups"
|
||||
})
|
||||
public class GroupsList {
|
||||
public static Builder builder() {
|
||||
|
|
|
@ -25,6 +25,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
import java.net.URI;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
|
|
@ -23,6 +23,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,6 +25,7 @@ import java.net.URI;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.net.URI;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
@ -89,7 +90,7 @@ public class Media extends ResourceEntityType<Media> {
|
|||
|
||||
@Override
|
||||
public Media build() {
|
||||
return new Media(href, type, links, description, tasksInProgress, id, name, files, status, owner, imageType, size);
|
||||
return new Media(href, type, links, description, tasks, id, name, files, status, owner, imageType, size);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -138,11 +139,11 @@ public class Media extends ResourceEntityType<Media> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
super.tasksInProgress(tasksInProgress);
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
super.tasks(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -193,9 +194,9 @@ public class Media extends ResourceEntityType<Media> {
|
|||
}
|
||||
|
||||
|
||||
public Media(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id,
|
||||
public Media(URI href, String type, Set<Link> links, String description, Set<Task> tasks, String id,
|
||||
String name, FilesList files, Integer status, Owner owner, String imageType, long size) {
|
||||
super(href, type, links, description, tasksInProgress, id, name, files, status);
|
||||
super(href, type, links, description, tasks, id, name, files, status);
|
||||
this.owner = owner;
|
||||
this.imageType = imageType;
|
||||
this.size = size;
|
||||
|
|
|
@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
import java.net.URI;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.net.URI;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.net.URI;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
|
|
|
@ -22,9 +22,7 @@ package org.jclouds.vcloud.director.v1_5.domain;
|
|||
import static com.google.common.base.Objects.equal;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
|
|
@ -25,6 +25,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
import java.net.URI;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
|
|
@ -25,6 +25,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
import java.net.URI;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
|
|
@ -19,16 +19,15 @@
|
|||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
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.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
@XmlRootElement(name = "NetworkType")
|
||||
public class NetworkType<T extends NetworkType<T>> extends EntityType<T> {
|
||||
|
@ -56,7 +55,7 @@ public class NetworkType<T extends NetworkType<T>> extends EntityType<T> {
|
|||
|
||||
@Override
|
||||
public NetworkType<T> build() {
|
||||
return new NetworkType<T>(href, type, links, description, tasksInProgress, id, name, networkConfiguration);
|
||||
return new NetworkType<T>(href, type, links, description, tasks, id, name, networkConfiguration);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -87,11 +86,11 @@ public class NetworkType<T extends NetworkType<T>> extends EntityType<T> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
this.tasksInProgress = tasksInProgress;
|
||||
public Builder<T> tasks(Set<Task> tasks) {
|
||||
super.tasks(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -118,7 +117,7 @@ public class NetworkType<T extends NetworkType<T>> extends EntityType<T> {
|
|||
*/
|
||||
@Override
|
||||
public Builder<T> links(Set<Link> links) {
|
||||
this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
|
||||
super.links(links);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -127,7 +126,7 @@ public class NetworkType<T extends NetworkType<T>> extends EntityType<T> {
|
|||
*/
|
||||
@Override
|
||||
public Builder<T> link(Link link) {
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
super.link(link);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -145,9 +144,9 @@ public class NetworkType<T extends NetworkType<T>> extends EntityType<T> {
|
|||
}
|
||||
}
|
||||
|
||||
public NetworkType(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress,
|
||||
public NetworkType(URI href, String type, Set<Link> links, String description, Set<Task> tasks,
|
||||
String id, String name, NetworkConfiguration networkConfiguration) {
|
||||
super(href, type, links, description, tasksInProgress, id, name);
|
||||
super(href, type, links, description, tasks, id, name);
|
||||
this.networkConfiguration = networkConfiguration;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import javax.xml.bind.annotation.XmlType;
|
|||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -62,7 +63,7 @@ import com.google.common.collect.ImmutableList;
|
|||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "Networks", propOrder = {
|
||||
"network"
|
||||
"networks"
|
||||
})
|
||||
public class Networks {
|
||||
public static Builder builder() {
|
||||
|
@ -75,7 +76,7 @@ public class Networks {
|
|||
|
||||
public static class Builder {
|
||||
|
||||
private List<Reference> networks;
|
||||
private List<Reference> networks = Lists.newArrayList();
|
||||
|
||||
/**
|
||||
* @see Networks#getNetwork()
|
||||
|
|
|
@ -59,8 +59,8 @@ public class Org extends EntityType<Org> {
|
|||
|
||||
public static abstract class NewBuilder<T extends NewBuilder<T>> extends EntityType.NewBuilder<T> {
|
||||
|
||||
private String fullName;
|
||||
private Boolean isEnabled;
|
||||
protected String fullName;
|
||||
protected Boolean isEnabled;
|
||||
|
||||
/**
|
||||
* @see Org#getFullName()
|
||||
|
@ -80,7 +80,7 @@ public class Org extends EntityType<Org> {
|
|||
|
||||
@Override
|
||||
public Org build() {
|
||||
return new Org(href, type, links, description, tasksInProgress, id, name, fullName, isEnabled);
|
||||
return new Org(href, type, links, description, tasks, id, name, fullName, isEnabled);
|
||||
}
|
||||
|
||||
public T fromOrg(Org in) {
|
||||
|
@ -143,7 +143,7 @@ public class Org extends EntityType<Org> {
|
|||
|
||||
@Override
|
||||
public Org build() {
|
||||
return new Org(href, type, links, description, tasksInProgress, id, name, fullName, isEnabled);
|
||||
return new Org(href, type, links, description, tasks, id, name, fullName, isEnabled);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -174,11 +174,11 @@ public class Org extends EntityType<Org> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
this.tasksInProgress = tasksInProgress;
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
super.tasks(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,9 @@ public class Org extends EntityType<Org> {
|
|||
// for JAXB
|
||||
}
|
||||
|
||||
public Org(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id, String name, String fullName, Boolean enabled) {
|
||||
public Org(URI href, String type, Set<Link> links, String description,
|
||||
Set<Task> tasksInProgress, String id, String name,
|
||||
String fullName, Boolean enabled) {
|
||||
super(href, type, links, description, tasksInProgress, id, name);
|
||||
this.fullName = fullName;
|
||||
isEnabled = enabled;
|
||||
|
|
|
@ -76,7 +76,7 @@ import com.google.common.collect.ImmutableList;
|
|||
"fromEmailAddress",
|
||||
"defaultSubjectPrefix",
|
||||
"isAlertEmailToAllAdmins",
|
||||
"alertEmailTo",
|
||||
"alertEmailsTo",
|
||||
"smtpServerSettings"
|
||||
})
|
||||
public class OrgEmailSettings extends ResourceType<OrgEmailSettings> {
|
||||
|
@ -142,7 +142,7 @@ public class OrgEmailSettings extends ResourceType<OrgEmailSettings> {
|
|||
* @see OrgEmailSettings#getAlertEmailTo()
|
||||
*/
|
||||
public Builder alertEmailsTo(List<String> alertEmailsTo) {
|
||||
this.alertEmailTo = ImmutableList.copyOf(alertEmailsTo);
|
||||
this.alertEmailTo = alertEmailsTo == null ? null : ImmutableList.copyOf(alertEmailsTo);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,8 @@ public class OrgEmailSettings extends ResourceType<OrgEmailSettings> {
|
|||
}
|
||||
|
||||
public OrgEmailSettings build() {
|
||||
return new OrgEmailSettings(isDefaultSmtpServer, isDefaultOrgEmail, fromEmailAddress, defaultSubjectPrefix,
|
||||
return new OrgEmailSettings(href, type, links, isDefaultSmtpServer,
|
||||
isDefaultOrgEmail, fromEmailAddress, defaultSubjectPrefix,
|
||||
isAlertEmailToAllAdmins, alertEmailTo, smtpServerSettings);
|
||||
}
|
||||
|
||||
|
@ -225,9 +226,11 @@ public class OrgEmailSettings extends ResourceType<OrgEmailSettings> {
|
|||
// For JAXB
|
||||
}
|
||||
|
||||
private OrgEmailSettings(boolean isDefaultSmtpServer, boolean isDefaultOrgEmail,
|
||||
private OrgEmailSettings(URI href, String type, Set<Link> links,
|
||||
boolean isDefaultSmtpServer, boolean isDefaultOrgEmail,
|
||||
String fromEmailAddress, String defaultSubjectPrefix, boolean isAlertEmailToAllAdmins,
|
||||
List<String> alertEmailTo, SmtpServerSettings smtpServerSettings) {
|
||||
super(href, type, links);
|
||||
this.isDefaultSmtpServer = isDefaultSmtpServer;
|
||||
this.isDefaultOrgEmail = isDefaultOrgEmail;
|
||||
this.fromEmailAddress = fromEmailAddress;
|
||||
|
@ -323,9 +326,6 @@ public class OrgEmailSettings extends ResourceType<OrgEmailSettings> {
|
|||
*
|
||||
*/
|
||||
public List<String> getAlertEmailsTo() {
|
||||
if (alertEmailsTo == null) {
|
||||
alertEmailsTo = new ArrayList<String>();
|
||||
}
|
||||
return this.alertEmailsTo;
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ import com.google.common.base.Objects.ToStringHelper;
|
|||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlRootElement(name = "OrgGeneralSettings")
|
||||
@XmlRootElement(name = "GeneralOrgSettings")
|
||||
@XmlType(propOrder = {
|
||||
"canPublishCatalogs",
|
||||
"deployedVMQuota",
|
||||
|
|
|
@ -22,11 +22,14 @@ package org.jclouds.vcloud.director.v1_5.domain;
|
|||
import static com.google.common.base.Objects.equal;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
@ -60,12 +63,28 @@ import com.google.common.base.Objects.ToStringHelper;
|
|||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "OrgLdapSettings", propOrder = {
|
||||
"orgLdapMode",
|
||||
@XmlRootElement(name = "OrgLdapSettings")
|
||||
@XmlType(propOrder = {
|
||||
"ldapMode",
|
||||
"customUsersOu",
|
||||
"customOrgLdapSettings"
|
||||
})
|
||||
public class OrgLdapSettings extends ResourceType<OrgLdapSettings> {
|
||||
public static final class LdapMode {
|
||||
public static final String NONE = "NONE";
|
||||
public static final String SYSTEM = "SYSTEM";
|
||||
public static final String CUSTOM = "CUSTOM";
|
||||
|
||||
/**
|
||||
* All acceptable {@link OrgLdapSettings#getLdapMode()} values.
|
||||
* <p/>
|
||||
* This list must be updated whenever a new mode is added.
|
||||
*/
|
||||
public static final List<String> ALL = Arrays.asList(
|
||||
NONE, SYSTEM, CUSTOM
|
||||
);
|
||||
}
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
@ -76,15 +95,15 @@ public class OrgLdapSettings extends ResourceType<OrgLdapSettings> {
|
|||
|
||||
public static class Builder extends ResourceType.Builder<OrgLdapSettings> {
|
||||
|
||||
private String orgLdapMode;
|
||||
private String ldapMode;
|
||||
private String customUsersOu;
|
||||
private CustomOrgLdapSettings customOrgLdapSettings;
|
||||
|
||||
/**
|
||||
* @see OrgLdapSettings#getOrgLdapMode()
|
||||
* @see OrgLdapSettings#getLdapMode()
|
||||
*/
|
||||
public Builder orgLdapMode(String orgLdapMode) {
|
||||
this.orgLdapMode = orgLdapMode;
|
||||
public Builder ldapMode(String ldapMode) {
|
||||
this.ldapMode = ldapMode;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -106,7 +125,7 @@ public class OrgLdapSettings extends ResourceType<OrgLdapSettings> {
|
|||
|
||||
public OrgLdapSettings build() {
|
||||
OrgLdapSettings orgLdapSettings = new OrgLdapSettings(href, type, links,
|
||||
orgLdapMode, customUsersOu, customOrgLdapSettings);
|
||||
ldapMode, customUsersOu, customOrgLdapSettings);
|
||||
return orgLdapSettings;
|
||||
}
|
||||
|
||||
|
@ -154,7 +173,7 @@ public class OrgLdapSettings extends ResourceType<OrgLdapSettings> {
|
|||
}
|
||||
public Builder fromOrgLdapSettings(OrgLdapSettings in) {
|
||||
return fromResourceType(in)
|
||||
.orgLdapMode(in.getOrgLdapMode())
|
||||
.ldapMode(in.getLdapMode())
|
||||
.customUsersOu(in.getCustomUsersOu())
|
||||
.customOrgLdapSettings(in.getCustomOrgLdapSettings());
|
||||
}
|
||||
|
@ -166,9 +185,9 @@ public class OrgLdapSettings extends ResourceType<OrgLdapSettings> {
|
|||
}
|
||||
|
||||
public OrgLdapSettings(URI href, String type, Set<Link> links,
|
||||
String orgLdapMode, String customUsersOu, CustomOrgLdapSettings customOrgLdapSettings) {
|
||||
String ldapMode, String customUsersOu, CustomOrgLdapSettings customOrgLdapSettings) {
|
||||
super(href, type, links);
|
||||
this.orgLdapMode = orgLdapMode;
|
||||
this.ldapMode = ldapMode;
|
||||
this.customUsersOu = customUsersOu;
|
||||
this.customOrgLdapSettings = customOrgLdapSettings;
|
||||
}
|
||||
|
@ -176,7 +195,7 @@ public class OrgLdapSettings extends ResourceType<OrgLdapSettings> {
|
|||
|
||||
|
||||
@XmlElement(name = "OrgLdapMode")
|
||||
protected String orgLdapMode;
|
||||
protected String ldapMode;
|
||||
@XmlElement(name = "CustomUsersOu")
|
||||
protected String customUsersOu;
|
||||
@XmlElement(name = "CustomOrgLdapSettings")
|
||||
|
@ -190,8 +209,8 @@ public class OrgLdapSettings extends ResourceType<OrgLdapSettings> {
|
|||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getOrgLdapMode() {
|
||||
return orgLdapMode;
|
||||
public String getLdapMode() {
|
||||
return ldapMode;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -226,7 +245,7 @@ public class OrgLdapSettings extends ResourceType<OrgLdapSettings> {
|
|||
return false;
|
||||
OrgLdapSettings that = OrgLdapSettings.class.cast(o);
|
||||
return super.equals(that) &&
|
||||
equal(orgLdapMode, that.orgLdapMode) &&
|
||||
equal(ldapMode, that.ldapMode) &&
|
||||
equal(customUsersOu, that.customUsersOu) &&
|
||||
equal(customOrgLdapSettings, that.customOrgLdapSettings);
|
||||
}
|
||||
|
@ -234,7 +253,7 @@ public class OrgLdapSettings extends ResourceType<OrgLdapSettings> {
|
|||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(super.hashCode(),
|
||||
orgLdapMode,
|
||||
ldapMode,
|
||||
customUsersOu,
|
||||
customOrgLdapSettings);
|
||||
}
|
||||
|
@ -242,7 +261,7 @@ public class OrgLdapSettings extends ResourceType<OrgLdapSettings> {
|
|||
@Override
|
||||
public ToStringHelper string() {
|
||||
return super.string()
|
||||
.add("orgLdapMode", orgLdapMode)
|
||||
.add("orgLdapMode", ldapMode)
|
||||
.add("customUsersOu", customUsersOu)
|
||||
.add("customOrgLdapSettings", customOrgLdapSettings);
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ import java.util.Set;
|
|||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
@ -60,7 +61,8 @@ import com.google.common.base.Objects.ToStringHelper;
|
|||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "OrgLeaseSettings", propOrder = {
|
||||
@XmlRootElement(name = "VAppLeaseSettings")
|
||||
@XmlType(propOrder = {
|
||||
"deleteOnStorageLeaseExpiration",
|
||||
"deploymentLeaseSeconds",
|
||||
"storageLeaseSeconds"
|
||||
|
|
|
@ -23,6 +23,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
|
|
|
@ -19,16 +19,15 @@
|
|||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
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.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
@XmlRootElement(name = "OrgNetwork")
|
||||
public class OrgNetwork extends NetworkType<OrgNetwork> {
|
||||
|
@ -66,7 +65,7 @@ public class OrgNetwork extends NetworkType<OrgNetwork> {
|
|||
|
||||
@Override
|
||||
public OrgNetwork build() {
|
||||
return new OrgNetwork(href, type, links, description, tasksInProgress, id, name, networkConfiguration,
|
||||
return new OrgNetwork(href, type, links, description, tasks, id, name, networkConfiguration,
|
||||
networkPool, allowedExternalIpAddresses);
|
||||
}
|
||||
|
||||
|
@ -106,11 +105,11 @@ public class OrgNetwork extends NetworkType<OrgNetwork> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
this.tasksInProgress = tasksInProgress;
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
super.tasks(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -137,7 +136,7 @@ public class OrgNetwork extends NetworkType<OrgNetwork> {
|
|||
*/
|
||||
@Override
|
||||
public Builder links(Set<Link> links) {
|
||||
this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
|
||||
super.links(links);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -146,7 +145,7 @@ public class OrgNetwork extends NetworkType<OrgNetwork> {
|
|||
*/
|
||||
@Override
|
||||
public Builder link(Link link) {
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
super.link(link);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -166,9 +165,9 @@ public class OrgNetwork extends NetworkType<OrgNetwork> {
|
|||
// For JAXB
|
||||
}
|
||||
|
||||
private OrgNetwork(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress,
|
||||
private OrgNetwork(URI href, String type, Set<Link> links, String description, Set<Task> tasks,
|
||||
String id, String name, NetworkConfiguration networkConfiguration, ReferenceType<?> networkPool, IpAddresses allowedExternalIpAddresses) {
|
||||
super(href, type, links, description, tasksInProgress, id, name, networkConfiguration);
|
||||
super(href, type, links, description, tasks, id, name, networkConfiguration);
|
||||
this.networkPool = networkPool;
|
||||
this.allowedExternalIpAddresses = allowedExternalIpAddresses;
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ public class OrgPasswordPolicySettings extends ResourceType<OrgPasswordPolicySet
|
|||
* Gets the value of the invalidLoginsBeforeLockout property.
|
||||
*
|
||||
*/
|
||||
public int getInvalidLoginsBeforeLockout() {
|
||||
public Integer getInvalidLoginsBeforeLockout() {
|
||||
return invalidLoginsBeforeLockout;
|
||||
}
|
||||
|
||||
|
@ -201,7 +201,7 @@ public class OrgPasswordPolicySettings extends ResourceType<OrgPasswordPolicySet
|
|||
* Gets the value of the accountLockoutIntervalMinutes property.
|
||||
*
|
||||
*/
|
||||
public int getAccountLockoutIntervalMinutes() {
|
||||
public Integer getAccountLockoutIntervalMinutes() {
|
||||
return accountLockoutIntervalMinutes;
|
||||
}
|
||||
|
||||
|
|
|
@ -69,12 +69,12 @@ import com.google.common.base.Objects.ToStringHelper;
|
|||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlRootElement(name = "OrgSettings")
|
||||
@XmlType(propOrder = {
|
||||
"orgGeneralSettings",
|
||||
"generalSettings",
|
||||
"vAppLeaseSettings",
|
||||
"vAppTemplateLeaseSettings",
|
||||
"orgLdapSettings",
|
||||
"orgEmailSettings",
|
||||
"orgPasswordPolicySettings"
|
||||
"ldapSettings",
|
||||
"emailSettings",
|
||||
"passwordPolicy"
|
||||
})
|
||||
public class OrgSettings extends ResourceType<OrgSettings> {
|
||||
public static Builder builder() {
|
||||
|
@ -87,18 +87,18 @@ public class OrgSettings extends ResourceType<OrgSettings> {
|
|||
|
||||
public static class Builder extends ResourceType.Builder<OrgSettings> {
|
||||
|
||||
private OrgGeneralSettings orgGeneralSettings;
|
||||
private OrgGeneralSettings generalSettings;
|
||||
private OrgLeaseSettings vAppLeaseSettings;
|
||||
private OrgVAppTemplateLeaseSettings vAppTemplateLeaseSettings;
|
||||
private OrgLdapSettings orgLdapSettings;
|
||||
private OrgEmailSettings orgEmailSettings;
|
||||
private OrgPasswordPolicySettings orgPasswordPolicySettings;
|
||||
private OrgLdapSettings ldapSettings;
|
||||
private OrgEmailSettings emailSettings;
|
||||
private OrgPasswordPolicySettings passwordPolicy;
|
||||
|
||||
/**
|
||||
* @see OrgSettings#getOrgGeneralSettings()
|
||||
* @see OrgSettings#getGeneralSettings()
|
||||
*/
|
||||
public Builder orgGeneralSettings(OrgGeneralSettings orgGeneralSettings) {
|
||||
this.orgGeneralSettings = orgGeneralSettings;
|
||||
public Builder generalSettings(OrgGeneralSettings generalSettings) {
|
||||
this.generalSettings = generalSettings;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -119,32 +119,32 @@ public class OrgSettings extends ResourceType<OrgSettings> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see OrgSettings#getOrgLdapSettings()
|
||||
* @see OrgSettings#getLdapSettings()
|
||||
*/
|
||||
public Builder orgLdapSettings(OrgLdapSettings orgLdapSettings) {
|
||||
this.orgLdapSettings = orgLdapSettings;
|
||||
public Builder ldapSettings(OrgLdapSettings ldapSettings) {
|
||||
this.ldapSettings = ldapSettings;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see OrgSettings#getOrgEmailSettings()
|
||||
* @see OrgSettings#getEmailSettings()
|
||||
*/
|
||||
public Builder orgEmailSettings(OrgEmailSettings orgEmailSettings) {
|
||||
this.orgEmailSettings = orgEmailSettings;
|
||||
public Builder emailSettings(OrgEmailSettings emailSettings) {
|
||||
this.emailSettings = emailSettings;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see OrgSettings#getOrgPasswordPolicySettings()
|
||||
* @see OrgSettings#getPasswordPolicy()
|
||||
*/
|
||||
public Builder orgPasswordPolicySettings(OrgPasswordPolicySettings orgPasswordPolicySettings) {
|
||||
this.orgPasswordPolicySettings = orgPasswordPolicySettings;
|
||||
public Builder passwordPolicy(OrgPasswordPolicySettings passwordPolicy) {
|
||||
this.passwordPolicy = passwordPolicy;
|
||||
return this;
|
||||
}
|
||||
|
||||
public OrgSettings build() {
|
||||
return new OrgSettings(href, type, links, orgGeneralSettings, vAppLeaseSettings,
|
||||
vAppTemplateLeaseSettings, orgLdapSettings, orgEmailSettings, orgPasswordPolicySettings);
|
||||
return new OrgSettings(href, type, links, generalSettings, vAppLeaseSettings,
|
||||
vAppTemplateLeaseSettings, ldapSettings, emailSettings, passwordPolicy);
|
||||
}
|
||||
|
||||
|
||||
|
@ -191,12 +191,12 @@ public class OrgSettings extends ResourceType<OrgSettings> {
|
|||
}
|
||||
public Builder fromOrgSettings(OrgSettings in) {
|
||||
return fromResourceType(in)
|
||||
.orgGeneralSettings(in.getOrgGeneralSettings())
|
||||
.generalSettings(in.getGeneralSettings())
|
||||
.vAppLeaseSettings(in.getVAppLeaseSettings())
|
||||
.vAppTemplateLeaseSettings(in.getVAppTemplateLeaseSettings())
|
||||
.orgLdapSettings(in.getOrgLdapSettings())
|
||||
.orgEmailSettings(in.getOrgEmailSettings())
|
||||
.orgPasswordPolicySettings(in.getOrgPasswordPolicySettings());
|
||||
.ldapSettings(in.getLdapSettings())
|
||||
.emailSettings(in.getEmailSettings())
|
||||
.passwordPolicy(in.getPasswordPolicy());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -206,31 +206,32 @@ public class OrgSettings extends ResourceType<OrgSettings> {
|
|||
}
|
||||
|
||||
public OrgSettings(URI href, String type, Set<Link> links,
|
||||
OrgGeneralSettings orgGeneralSettings,
|
||||
OrgGeneralSettings generalSettings,
|
||||
OrgLeaseSettings vAppLeaseSettings,
|
||||
OrgVAppTemplateLeaseSettings vAppTemplateLeaseSettings,
|
||||
OrgLdapSettings orgLdapSettings, OrgEmailSettings orgEmailSettings,
|
||||
OrgPasswordPolicySettings orgPasswordPolicySettings) {
|
||||
OrgLdapSettings ldapSettings, OrgEmailSettings emailSettings,
|
||||
OrgPasswordPolicySettings passwordPolicy) {
|
||||
super(href, type, links);
|
||||
this.orgGeneralSettings = orgGeneralSettings;
|
||||
this.generalSettings = generalSettings;
|
||||
this.vAppLeaseSettings = vAppLeaseSettings;
|
||||
this.vAppTemplateLeaseSettings = vAppTemplateLeaseSettings;
|
||||
this.orgLdapSettings = orgLdapSettings;
|
||||
this.orgPasswordPolicySettings = orgPasswordPolicySettings;
|
||||
this.ldapSettings = ldapSettings;
|
||||
this.emailSettings = emailSettings;
|
||||
this.passwordPolicy = passwordPolicy;
|
||||
}
|
||||
|
||||
@XmlElement(name = "OrgGeneralSettings")
|
||||
protected OrgGeneralSettings orgGeneralSettings;
|
||||
protected OrgGeneralSettings generalSettings;
|
||||
@XmlElement(name = "VAppLeaseSettings")
|
||||
protected OrgLeaseSettings vAppLeaseSettings;
|
||||
@XmlElement(name = "VAppTemplateLeaseSettings")
|
||||
protected OrgVAppTemplateLeaseSettings vAppTemplateLeaseSettings;
|
||||
@XmlElement(name = "OrgLdapSettings")
|
||||
protected OrgLdapSettings orgLdapSettings;
|
||||
protected OrgLdapSettings ldapSettings;
|
||||
@XmlElement(name = "OrgEmailSettings")
|
||||
protected OrgEmailSettings orgEmailSettings;
|
||||
protected OrgEmailSettings emailSettings;
|
||||
@XmlElement(name = "OrgPasswordPolicySettings")
|
||||
protected OrgPasswordPolicySettings orgPasswordPolicySettings;
|
||||
protected OrgPasswordPolicySettings passwordPolicy;
|
||||
|
||||
/**
|
||||
* Gets the value of the orgGeneralSettings property.
|
||||
|
@ -240,8 +241,8 @@ public class OrgSettings extends ResourceType<OrgSettings> {
|
|||
* {@link OrgGeneralSettings }
|
||||
*
|
||||
*/
|
||||
public OrgGeneralSettings getOrgGeneralSettings() {
|
||||
return orgGeneralSettings;
|
||||
public OrgGeneralSettings getGeneralSettings() {
|
||||
return generalSettings;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -276,8 +277,8 @@ public class OrgSettings extends ResourceType<OrgSettings> {
|
|||
* {@link OrgLdapSettings }
|
||||
*
|
||||
*/
|
||||
public OrgLdapSettings getOrgLdapSettings() {
|
||||
return orgLdapSettings;
|
||||
public OrgLdapSettings getLdapSettings() {
|
||||
return ldapSettings;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -288,8 +289,8 @@ public class OrgSettings extends ResourceType<OrgSettings> {
|
|||
* {@link OrgEmailSettings }
|
||||
*
|
||||
*/
|
||||
public OrgEmailSettings getOrgEmailSettings() {
|
||||
return orgEmailSettings;
|
||||
public OrgEmailSettings getEmailSettings() {
|
||||
return emailSettings;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -300,8 +301,8 @@ public class OrgSettings extends ResourceType<OrgSettings> {
|
|||
* {@link OrgPasswordPolicySettings }
|
||||
*
|
||||
*/
|
||||
public OrgPasswordPolicySettings getOrgPasswordPolicySettings() {
|
||||
return orgPasswordPolicySettings;
|
||||
public OrgPasswordPolicySettings getPasswordPolicy() {
|
||||
return passwordPolicy;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -312,34 +313,34 @@ public class OrgSettings extends ResourceType<OrgSettings> {
|
|||
return false;
|
||||
OrgSettings that = OrgSettings.class.cast(o);
|
||||
return super.equals(that) &&
|
||||
equal(orgGeneralSettings, that.orgGeneralSettings) &&
|
||||
equal(generalSettings, that.generalSettings) &&
|
||||
equal(vAppLeaseSettings, that.vAppLeaseSettings) &&
|
||||
equal(vAppTemplateLeaseSettings, that.vAppTemplateLeaseSettings) &&
|
||||
equal(orgLdapSettings, that.orgLdapSettings) &&
|
||||
equal(orgEmailSettings, that.orgEmailSettings) &&
|
||||
equal(orgPasswordPolicySettings, that.orgPasswordPolicySettings);
|
||||
equal(ldapSettings, that.ldapSettings) &&
|
||||
equal(emailSettings, that.emailSettings) &&
|
||||
equal(passwordPolicy, that.passwordPolicy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(super.hashCode(),
|
||||
orgGeneralSettings,
|
||||
generalSettings,
|
||||
vAppLeaseSettings,
|
||||
vAppTemplateLeaseSettings,
|
||||
orgLdapSettings,
|
||||
orgEmailSettings,
|
||||
orgPasswordPolicySettings);
|
||||
ldapSettings,
|
||||
emailSettings,
|
||||
passwordPolicy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToStringHelper string() {
|
||||
return super.string()
|
||||
.add("orgGeneralSettings", orgGeneralSettings)
|
||||
.add("generalSettings", generalSettings)
|
||||
.add("vAppLeaseSettings", vAppLeaseSettings)
|
||||
.add("vAppTemplateLeaseSettings", vAppTemplateLeaseSettings)
|
||||
.add("orgLdapSettings", orgLdapSettings)
|
||||
.add("orgEmailSettings", orgEmailSettings)
|
||||
.add("orgPasswordPolicySettings", orgPasswordPolicySettings);
|
||||
.add("ldapSettings", ldapSettings)
|
||||
.add("emailSettings", emailSettings)
|
||||
.add("passwordPolicy", passwordPolicy);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,17 +19,18 @@
|
|||
|
||||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.Sets;
|
||||
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.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import java.net.URI;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.google.common.base.Objects.equal;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,6 +25,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
import java.net.URI;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
|
|
@ -111,4 +111,11 @@ public class Reference extends ReferenceType<Reference> {
|
|||
Reference that = Reference.class.cast(o);
|
||||
return super.equals(that);
|
||||
}
|
||||
|
||||
public ReferenceType<?> toAdminReference(String endpoint) {
|
||||
return toBuilder()
|
||||
.type(null)
|
||||
.href(URI.create(getHref().toASCIIString().replace(endpoint, endpoint+"/admin")))
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -22,6 +22,7 @@ import static com.google.common.base.Objects.equal;
|
|||
|
||||
import java.net.URI;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
|
||||
|
@ -43,7 +44,7 @@ import com.google.common.base.Objects.ToStringHelper;
|
|||
CatalogReference.class,
|
||||
Reference.class
|
||||
})
|
||||
public class ReferenceType<T extends ReferenceType<T>> implements URISupplier {
|
||||
public class ReferenceType<T extends ReferenceType<T>> {
|
||||
|
||||
public static <T extends ReferenceType<T>> Builder<T> builder() {
|
||||
return new Builder<T>();
|
||||
|
@ -176,14 +177,6 @@ public class ReferenceType<T extends ReferenceType<T>> implements URISupplier {
|
|||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see URISupplier#getURI()
|
||||
*/
|
||||
@Override
|
||||
public URI getURI() {
|
||||
return getHref();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
|
|
|
@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
|
|
@ -20,16 +20,15 @@
|
|||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
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 com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
/**
|
||||
* Base type that represents a resource entity such as a vApp template or virtual media.
|
||||
|
@ -73,11 +72,11 @@ public abstract class ResourceEntityType<T extends ResourceEntityType<T>> extend
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
this.tasksInProgress = tasksInProgress;
|
||||
public Builder<T> tasks(Set<Task> tasks) {
|
||||
super.tasks(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -100,20 +99,18 @@ public abstract class ResourceEntityType<T extends ResourceEntityType<T>> extend
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getLinks()
|
||||
* @see ResourceEntityType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> links(Set<Link> links) {
|
||||
this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
|
||||
super.links(links);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getLinks()
|
||||
* @see ResourceEntityType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> link(Link link) {
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
super.link(link);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -133,8 +130,8 @@ public abstract class ResourceEntityType<T extends ResourceEntityType<T>> extend
|
|||
@XmlAttribute
|
||||
protected Integer status;
|
||||
|
||||
public ResourceEntityType(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id, String name, FilesList files, Integer status) {
|
||||
super(href, type, links, description, tasksInProgress, id, name);
|
||||
public ResourceEntityType(URI href, String type, Set<Link> links, String description, Set<Task> tasks, String id, String name, FilesList files, Integer status) {
|
||||
super(href, type, links, description, tasks, id, name);
|
||||
this.files = files;
|
||||
this.status = status;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ import java.util.Set;
|
|||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
||||
import org.jclouds.vcloud.director.v1_5.domain.EntityType.NewBuilder;
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
|
@ -46,7 +46,7 @@ import com.google.common.collect.Sets;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public abstract class ResourceType<T extends ResourceType<T>> implements URISupplier {
|
||||
public abstract class ResourceType<T extends ResourceType<T>> {
|
||||
|
||||
public NewBuilder<?> toNewBuilder() {
|
||||
throw new UnsupportedOperationException("New builder not yet implemented for this class");
|
||||
|
@ -57,7 +57,7 @@ public abstract class ResourceType<T extends ResourceType<T>> implements URISupp
|
|||
|
||||
protected URI href;
|
||||
protected String type;
|
||||
protected Set<Link> links = Sets.newLinkedHashSet();
|
||||
protected Set<Link> links;
|
||||
|
||||
/**
|
||||
* @see ResourceType#getHref()
|
||||
|
@ -87,6 +87,8 @@ public abstract class ResourceType<T extends ResourceType<T>> implements URISupp
|
|||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
public T link(Link link) {
|
||||
if (links == null)
|
||||
links = Sets.newLinkedHashSet();
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
return self();
|
||||
}
|
||||
|
@ -104,7 +106,7 @@ public abstract class ResourceType<T extends ResourceType<T>> implements URISupp
|
|||
|
||||
protected URI href;
|
||||
protected String type;
|
||||
protected Set<Link> links = Sets.newLinkedHashSet();
|
||||
protected Set<Link> links;
|
||||
|
||||
/**
|
||||
* @see ResourceType#getHref()
|
||||
|
@ -134,6 +136,8 @@ public abstract class ResourceType<T extends ResourceType<T>> implements URISupp
|
|||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
public Builder<T> link(Link link) {
|
||||
if (links == null)
|
||||
links = Sets.newLinkedHashSet();
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
return this;
|
||||
}
|
||||
|
@ -150,12 +154,13 @@ public abstract class ResourceType<T extends ResourceType<T>> implements URISupp
|
|||
@XmlAttribute
|
||||
private String type;
|
||||
@XmlElement(name = "Link")
|
||||
private Set<Link> links = Sets.newLinkedHashSet();
|
||||
private Set<Link> links;
|
||||
|
||||
protected ResourceType(URI href, String type, Set<Link> links) {
|
||||
protected ResourceType(URI href, String type, @Nullable Set<Link> links) {
|
||||
this.href = href;
|
||||
this.type = type;
|
||||
this.links = ImmutableSet.copyOf(links);
|
||||
// nullable so that jaxb wont persist empty collections
|
||||
this.links = links != null && links.size() == 0 ? null : links;
|
||||
}
|
||||
|
||||
protected ResourceType() {
|
||||
|
@ -179,14 +184,6 @@ public abstract class ResourceType<T extends ResourceType<T>> implements URISupp
|
|||
return href;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see URISupplier#getURI()
|
||||
*/
|
||||
@Override
|
||||
public URI getURI() {
|
||||
return getHref();
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains the type of the the entity.
|
||||
* <p/>
|
||||
|
@ -203,7 +200,7 @@ public abstract class ResourceType<T extends ResourceType<T>> implements URISupp
|
|||
* Set of optional links to an entity or operation associated with this object.
|
||||
*/
|
||||
public Set<Link> getLinks() {
|
||||
return Collections.unmodifiableSet(links);
|
||||
return links == null ? ImmutableSet.<Link>of() : Collections.unmodifiableSet(links);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
import java.net.URI;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
|
|
@ -61,7 +61,7 @@ import com.google.common.base.Objects.ToStringHelper;
|
|||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "SmtpServerSettings", propOrder = {
|
||||
"isUseAuthentication",
|
||||
"useAuthentication",
|
||||
"host",
|
||||
"username",
|
||||
"password"
|
||||
|
@ -200,8 +200,7 @@ public class SmtpServerSettings {
|
|||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
SmtpServerSettings that = SmtpServerSettings.class.cast(o);
|
||||
return super.equals(that) &&
|
||||
equal(useAuthentication, that.useAuthentication) &&
|
||||
return equal(useAuthentication, that.useAuthentication) &&
|
||||
equal(host, that.host) &&
|
||||
equal(username, that.username) &&
|
||||
equal(password, that.password);
|
||||
|
@ -209,8 +208,7 @@ public class SmtpServerSettings {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(super.hashCode(),
|
||||
useAuthentication,
|
||||
return Objects.hashCode(useAuthentication,
|
||||
host,
|
||||
username,
|
||||
password);
|
||||
|
|
|
@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
|
|
@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
import static com.google.common.base.Objects.equal;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
@ -34,7 +34,6 @@ import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
|||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
/**
|
||||
* Represents an asynchronous or long-running task in the vCloud environment.
|
||||
|
@ -43,6 +42,8 @@ import com.google.common.collect.Sets;
|
|||
* <xs:complexType name="TaskType">
|
||||
* </pre>
|
||||
*
|
||||
* TODO: this object and the hierarchy is wrong. it is literally a Task with a Task container. please review class diagram
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlRootElement(name = "Task")
|
||||
|
@ -187,7 +188,7 @@ public class Task extends EntityType<Task> {
|
|||
|
||||
@Override
|
||||
public Task build() {
|
||||
return new Task(href, type, links, description, tasksInProgress, id, name,
|
||||
return new Task(href, type, links, description, tasks, id, name,
|
||||
error, org, progress, owner, user, params, status, operation, operationName, startTime, endTime, expiryTime);
|
||||
}
|
||||
|
||||
|
@ -219,11 +220,11 @@ public class Task extends EntityType<Task> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
this.tasksInProgress = tasksInProgress;
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
super.tasks(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -246,23 +247,22 @@ public class Task extends EntityType<Task> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getLinks()
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder links(Set<Link> links) {
|
||||
this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
|
||||
return this;
|
||||
return Builder.class.cast(super.links(links));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getLinks()
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder link(Link link) {
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
return this;
|
||||
return Builder.class.cast(super.link(link));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Builder fromEntityType(EntityType<Task> in) {
|
||||
return Builder.class.cast(super.fromEntityType(in));
|
||||
|
@ -275,11 +275,11 @@ public class Task extends EntityType<Task> {
|
|||
}
|
||||
}
|
||||
|
||||
public Task(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress,
|
||||
public Task(URI href, String type, Set<Link> links, String description, Set<Task> tasks,
|
||||
String id, String name, Error error, Reference org, Integer progress, Reference owner,
|
||||
Reference user, Object params, String status, String operation, String operationName,
|
||||
Date startTime, Date endTime, Date expiryTime) {
|
||||
super(href, type, links, description, tasksInProgress, id, name);
|
||||
super(href, type, links, description, tasks, id, name);
|
||||
this.error = error;
|
||||
this.org = org;
|
||||
this.progress = progress;
|
||||
|
@ -383,6 +383,7 @@ public class Task extends EntityType<Task> {
|
|||
* <li>aborted - The task was aborted by an administrative action.
|
||||
* </ul>
|
||||
*/
|
||||
// TODO: enum!!!
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
|
|
@ -1,112 +0,0 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds 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 CONDITIOXMLNS 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;
|
||||
|
||||
import static com.google.common.base.Objects.equal;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
/**
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlRootElement(name = "TasksInProgress")
|
||||
public class TasksInProgress {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder toBuilder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
protected Set<Task> tasks = Sets.newLinkedHashSet();
|
||||
|
||||
/**
|
||||
* @see TasksInProgress#getTasks()
|
||||
*/
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
this.tasks = ImmutableSet.copyOf(checkNotNull(tasks, "tasks"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see TasksInProgress#getTasks()
|
||||
*/
|
||||
public Builder task(Task task) {
|
||||
this.tasks.add(checkNotNull(task, "task"));
|
||||
return this;
|
||||
}
|
||||
|
||||
public TasksInProgress build() {
|
||||
return new TasksInProgress(tasks);
|
||||
}
|
||||
|
||||
public Builder fromTasksInProgress(TasksInProgress in) {
|
||||
return tasks(in.getTasks());
|
||||
}
|
||||
}
|
||||
|
||||
private TasksInProgress() {
|
||||
// for JAXB
|
||||
}
|
||||
|
||||
private TasksInProgress(Collection<Task> tasks) {
|
||||
this.tasks = ImmutableSet.copyOf(tasks);
|
||||
}
|
||||
|
||||
@XmlElement(name = "Task")
|
||||
private Set<Task> tasks = Sets.newLinkedHashSet();
|
||||
|
||||
public Set<Task> getTasks() {
|
||||
return Collections.unmodifiableSet(tasks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
TasksInProgress that = TasksInProgress.class.cast(o);
|
||||
return equal(this.tasks, that.tasks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(tasks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper("").add("tasks", tasks).toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -22,12 +22,16 @@ import static com.google.common.base.Objects.equal;
|
|||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
|
@ -35,33 +39,36 @@ import com.google.common.collect.ImmutableSet;
|
|||
import com.google.common.collect.Sets;
|
||||
|
||||
/**
|
||||
* A list of tasks.
|
||||
* Task List
|
||||
*
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@XmlRootElement(name = "TasksList")
|
||||
public class TasksList extends EntityType<TasksList> {
|
||||
|
||||
public static final String MEDIA_TYPE = VCloudDirectorMediaType.TASKS_LIST;
|
||||
|
||||
public class TasksList extends ResourceType<TasksList> implements Set<Task> {
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder toBuilder() {
|
||||
return new Builder();
|
||||
public static class Builder extends ResourceType.Builder<TasksList> {
|
||||
protected String name;
|
||||
|
||||
private Set<Task> tasks;
|
||||
|
||||
/**
|
||||
* @see TasksList#getName()
|
||||
*/
|
||||
public Builder name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public static class Builder extends EntityType.Builder<TasksList> {
|
||||
|
||||
protected Set<Task> tasks = Sets.newLinkedHashSet();
|
||||
|
||||
/**
|
||||
* @see TasksList#getTasks()
|
||||
*/
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
this.tasks = Sets.newLinkedHashSet(checkNotNull(tasks, "tasks"));
|
||||
if (checkNotNull(tasks, "tasks").size() > 0)
|
||||
this.tasks = Sets.newLinkedHashSet(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -69,111 +76,86 @@ public class TasksList extends EntityType<TasksList> {
|
|||
* @see TasksList#getTasks()
|
||||
*/
|
||||
public Builder task(Task task) {
|
||||
if (tasks == null)
|
||||
tasks = Sets.newLinkedHashSet();
|
||||
this.tasks.add(checkNotNull(task, "task"));
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TasksList build() {
|
||||
return new TasksList(href, type, links, description, tasksInProgress, id, name, tasks);
|
||||
return new TasksList(href, type, links, name, tasks);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getName()
|
||||
*/
|
||||
@Override
|
||||
public Builder name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getDescription()
|
||||
*/
|
||||
@Override
|
||||
public Builder description(String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getId()
|
||||
*/
|
||||
@Override
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
this.tasksInProgress = tasksInProgress;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ReferenceType#getHref()
|
||||
* @see ResourceType#getHref()
|
||||
*/
|
||||
@Override
|
||||
public Builder href(URI href) {
|
||||
this.href = href;
|
||||
super.href(href);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ReferenceType#getType()
|
||||
* @see ResourceType#getType()
|
||||
*/
|
||||
@Override
|
||||
public Builder type(String type) {
|
||||
this.type = type;
|
||||
super.type(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getLinks()
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder links(Set<Link> links) {
|
||||
this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
|
||||
return this;
|
||||
return Builder.class.cast(super.links(links));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getLinks()
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder link(Link link) {
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
super.link(link);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder fromEntityType(EntityType<TasksList> in) {
|
||||
return Builder.class.cast(super.fromEntityType(in));
|
||||
public Builder fromTasksList(TasksList in) {
|
||||
return fromResourceType(in).tasks(in);
|
||||
}
|
||||
|
||||
public Builder fromTasksList(TasksList in) {
|
||||
return fromEntityType(in).tasks(in.getTasks());
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Builder fromResourceType(ResourceType<TasksList> in) {
|
||||
return Builder.class.cast(super.fromResourceType(in));
|
||||
}
|
||||
}
|
||||
|
||||
@XmlAttribute(required = true)
|
||||
private String name;
|
||||
@XmlElement(name = "Task")
|
||||
private Set<Task> tasks;
|
||||
|
||||
public TasksList(URI href, String type, @Nullable Set<Link> links, String name, @Nullable Set<Task> tasks) {
|
||||
super(href, type, links);
|
||||
this.tasks = tasks;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
protected TasksList() {
|
||||
// for JAXB
|
||||
// For JAXB
|
||||
}
|
||||
|
||||
public TasksList(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id, String name, Set<Task> tasks) {
|
||||
super(href, type, links, description, tasksInProgress, id, name);
|
||||
this.tasks = ImmutableSet.copyOf(tasks);
|
||||
}
|
||||
|
||||
@XmlElement(name = "Task")
|
||||
private Set<Task> tasks = Sets.newLinkedHashSet();
|
||||
|
||||
public Set<Task> getTasks() {
|
||||
return Collections.unmodifiableSet(tasks);
|
||||
/**
|
||||
* Contains the name of the the entity.
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -183,16 +165,91 @@ public class TasksList extends EntityType<TasksList> {
|
|||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
TasksList that = TasksList.class.cast(o);
|
||||
return super.equals(that) && equal(this.tasks, that.tasks);
|
||||
return super.equals(that) && equal(this.delegate(), that.delegate()) && equal(this.name, that.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode() + Objects.hashCode(tasks);
|
||||
return super.hashCode() + Objects.hashCode(delegate(), name);
|
||||
}
|
||||
|
||||
private Set<Task> delegate() {
|
||||
return tasks == null ? ImmutableSet.<Task>of() : Collections.unmodifiableSet(tasks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToStringHelper string() {
|
||||
return super.string().add("tasks", tasks);
|
||||
return super.string().add("name", name).add("tasks", delegate());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromTasksList(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<Task> iterator() {
|
||||
return delegate().iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return delegate().size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeAll(Collection<?> collection) {
|
||||
return delegate().removeAll(collection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return delegate().isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean contains(Object object) {
|
||||
return delegate().contains(object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean add(Task element) {
|
||||
return delegate().add(element);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean remove(Object object) {
|
||||
return delegate().remove(object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsAll(Collection<?> collection) {
|
||||
return delegate().containsAll(collection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addAll(Collection<? extends Task> collection) {
|
||||
return delegate().addAll(collection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean retainAll(Collection<?> collection) {
|
||||
return delegate().retainAll(collection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
delegate().clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] toArray() {
|
||||
return delegate().toArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T[] toArray(T[] array) {
|
||||
return delegate().toArray(array);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds 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;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
/**
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
public interface URISupplier {
|
||||
|
||||
/**
|
||||
* This returns the {@link URI} for a particular {@link ReferenceType} or {@link ResourceType} object.
|
||||
*
|
||||
* @see ResourceType#getHref()
|
||||
* @see ReferenceType#getHref()
|
||||
*/
|
||||
public URI getURI();
|
||||
|
||||
public static class SingleURI {
|
||||
public static URISupplier fromURI(final URI uri) {
|
||||
return new URISupplier(){
|
||||
@Override
|
||||
public URI getURI() {
|
||||
return uri;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -23,6 +23,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.net.URI;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
@ -269,7 +270,7 @@ public class User
|
|||
|
||||
|
||||
public User build() {
|
||||
return new User(href, type, links, description, tasksInProgress, id,
|
||||
return new User(href, type, links, description, tasks, id,
|
||||
name, fullName, emailAddress, telephone, isEnabled, isLocked,
|
||||
im, nameInSource, isAlertEnabled, alertEmailPrefix, alertEmail,
|
||||
isExternal, isDefaultCached, isGroupRole, storedVmQuota, deployedVmQuota,
|
||||
|
@ -287,11 +288,11 @@ public class User
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
this.tasksInProgress = tasksInProgress;
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
super.tasks(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -397,12 +398,12 @@ public class User
|
|||
@XmlElement(name = "GroupReferences")
|
||||
protected Object /* GroupsList */ groupReferences;
|
||||
|
||||
public User(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id,
|
||||
public User(URI href, String type, Set<Link> links, String description, Set<Task> tasks, String id,
|
||||
String name, String fullName, String emailAddress, String telephone, Boolean enabled, Boolean locked,
|
||||
String im, String nameInSource, Boolean alertEnabled, String alertEmailPrefix, String alertEmail,
|
||||
Boolean external, Boolean defaultCached, Boolean groupRole, Integer storedVmQuota, Integer deployedVmQuota,
|
||||
Reference role, String password, Object groupReferences) {
|
||||
super(href, type, links, description, tasksInProgress, id, name);
|
||||
super(href, type, links, description, tasks, id, name);
|
||||
this.fullName = fullName;
|
||||
this.emailAddress = emailAddress;
|
||||
this.telephone = telephone;
|
||||
|
|
|
@ -33,6 +33,7 @@ import javax.xml.bind.annotation.XmlType;
|
|||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -62,7 +63,7 @@ import com.google.common.collect.ImmutableList;
|
|||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlRootElement(name = "UsersList")
|
||||
@XmlType(propOrder = {
|
||||
"userReference"
|
||||
"users"
|
||||
})
|
||||
public class UsersList {
|
||||
public static Builder builder() {
|
||||
|
@ -74,7 +75,7 @@ public class UsersList {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private List<Reference> users;
|
||||
private List<Reference> users = Lists.newArrayList();
|
||||
|
||||
/**
|
||||
* @see UsersList#getUsers()
|
||||
|
|
|
@ -24,6 +24,7 @@ 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.XmlType;
|
||||
|
|
|
@ -25,6 +25,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
import java.net.URI;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementRef;
|
||||
|
@ -144,7 +145,7 @@ public class VAppTemplate extends ResourceEntityType<VAppTemplate> {
|
|||
|
||||
@Override
|
||||
public VAppTemplate build() {
|
||||
return new VAppTemplate(href, type, links, description, tasksInProgress, id, name, files, status, owner, children, sections, vAppScopedLocalId, ovfDescriptorUploaded, goldMaster);
|
||||
return new VAppTemplate(href, type, links, description, tasks, id, name, files, status, owner, children, sections, vAppScopedLocalId, ovfDescriptorUploaded, goldMaster);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -209,11 +210,11 @@ public class VAppTemplate extends ResourceEntityType<VAppTemplate> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
super.tasksInProgress(tasksInProgress);
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
super.tasks(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -267,10 +268,10 @@ public class VAppTemplate extends ResourceEntityType<VAppTemplate> {
|
|||
@XmlAttribute
|
||||
protected Boolean goldMaster;
|
||||
|
||||
private VAppTemplate(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress,
|
||||
private VAppTemplate(URI href, String type, Set<Link> links, String description, Set<Task> tasks,
|
||||
String id, String name, FilesList files, Integer status, Owner owner, Set<VAppTemplate> children,
|
||||
Set<? extends SectionType<?>> sections, String vAppScopedLocalId, Boolean ovfDescriptorUploaded, Boolean goldMaster) {
|
||||
super(href, type, links, description, tasksInProgress, id, name, files, status);
|
||||
super(href, type, links, description, tasks, id, name, files, status);
|
||||
this.owner = owner;
|
||||
this.children = VAppTemplateChildren.builder().vms(children).build();
|
||||
this.sections = ImmutableSet.copyOf(sections);
|
||||
|
|
|
@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
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.XmlRootElement;
|
||||
|
@ -31,7 +31,6 @@ import javax.xml.bind.annotation.XmlSeeAlso;
|
|||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -198,7 +197,7 @@ public class Vdc
|
|||
|
||||
public Vdc build() {
|
||||
return new Vdc(
|
||||
href, type, links, description, tasksInProgress, id, name, allocationModel, storageCapacity,
|
||||
href, type, links, description, tasks, id, name, allocationModel, storageCapacity,
|
||||
computeCapacity, resourceEntities, availableNetworks, capabilities, nicQuota, networkQuota,
|
||||
vmQuota, isEnabled, status);
|
||||
}
|
||||
|
@ -229,11 +228,11 @@ public class Vdc
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasksInProgress()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasksInProgress(TasksInProgress tasksInProgress) {
|
||||
this.tasksInProgress = tasksInProgress;
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
super.tasks(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -260,7 +259,7 @@ public class Vdc
|
|||
*/
|
||||
@Override
|
||||
public Builder links(Set<Link> links) {
|
||||
this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
|
||||
super.links(links);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -269,11 +268,10 @@ public class Vdc
|
|||
*/
|
||||
@Override
|
||||
public Builder link(Link link) {
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
super.link(link);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Builder fromEntityType(EntityType<Vdc> in) {
|
||||
return Builder.class.cast(super.fromEntityType(in));
|
||||
|
@ -295,8 +293,8 @@ public class Vdc
|
|||
}
|
||||
}
|
||||
|
||||
public Vdc(URI href, String type, Set<Link> links, String description, TasksInProgress tasksInProgress, String id, String name, String allocationModel, CapacityWithUsage storageCapacity, ComputeCapacity computeCapacity, ResourceEntities resourceEntities, AvailableNetworks availableNetworks, Capabilities capabilities, int nicQuota, int networkQuota, Integer vmQuota, Boolean enabled, Integer status) {
|
||||
super(href, type, links, description, tasksInProgress, id, name);
|
||||
public Vdc(URI href, String type, Set<Link> links, String description, Set<Task> tasks, String id, String name, String allocationModel, CapacityWithUsage storageCapacity, ComputeCapacity computeCapacity, ResourceEntities resourceEntities, AvailableNetworks availableNetworks, Capabilities capabilities, int nicQuota, int networkQuota, Integer vmQuota, Boolean enabled, Integer status) {
|
||||
super(href, type, links, description, tasks, id, name);
|
||||
this.allocationModel = allocationModel;
|
||||
this.storageCapacity = storageCapacity;
|
||||
this.computeCapacity = computeCapacity;
|
||||
|
|
|
@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
@ -33,6 +34,7 @@ import javax.xml.bind.annotation.XmlType;
|
|||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -75,7 +77,7 @@ public class Vdcs {
|
|||
|
||||
public static class Builder {
|
||||
|
||||
private List<Reference> vdcs;
|
||||
private List<Reference> vdcs = Lists.newArrayList();
|
||||
|
||||
/**
|
||||
* @see Vdcs#getVdc()
|
||||
|
|
|
@ -25,7 +25,10 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.*;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -23,3 +23,4 @@ import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_CI
|
|||
|
||||
import javax.xml.bind.annotation.XmlNsForm;
|
||||
import javax.xml.bind.annotation.XmlSchema;
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
package org.jclouds.vcloud.director.v1_5.domain.ovf;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
|
|
|
@ -21,6 +21,7 @@ package org.jclouds.vcloud.director.v1_5.domain.ovf;
|
|||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
|
|
|
@ -22,6 +22,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_OVF_NS;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
|
|
|
@ -22,6 +22,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_OVF_NS;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
|
|
|
@ -30,3 +30,4 @@ import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_OV
|
|||
import javax.xml.bind.annotation.XmlNs;
|
||||
import javax.xml.bind.annotation.XmlNsForm;
|
||||
import javax.xml.bind.annotation.XmlSchema;
|
||||
|
||||
|
|
|
@ -30,3 +30,4 @@ import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_OV
|
|||
import javax.xml.bind.annotation.XmlNs;
|
||||
import javax.xml.bind.annotation.XmlNsForm;
|
||||
import javax.xml.bind.annotation.XmlSchema;
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.net.URI;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.jclouds.vcloud.director.v1_5.domain.CatalogReference;
|
||||
|
|
|
@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.net.URI;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Link;
|
||||
|
|
|
@ -25,6 +25,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
import java.net.URI;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
|
|
|
@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.net.URI;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Link;
|
||||
|
|
|
@ -23,6 +23,7 @@ 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.XmlSchemaType;
|
||||
|
|
|
@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.net.URI;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElementRef;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
|
|
|
@ -24,11 +24,10 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
|
||||
import java.net.URI;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElementRef;
|
||||
import javax.xml.bind.annotation.XmlElementRefs;
|
||||
|
||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.CatalogReference;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Link;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ReferenceType;
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ package org.jclouds.vcloud.director.v1_5.domain.query;
|
|||
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_CIM_NS;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_OVF_NS;
|
||||
|
||||
import javax.xml.bind.annotation.XmlNs;
|
||||
import javax.xml.bind.annotation.XmlNsForm;
|
||||
import javax.xml.bind.annotation.XmlSchema;
|
||||
|
||||
|
|
|
@ -31,3 +31,4 @@ import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_OV
|
|||
import javax.xml.bind.annotation.XmlNs;
|
||||
import javax.xml.bind.annotation.XmlNsForm;
|
||||
import javax.xml.bind.annotation.XmlSchema;
|
||||
|
||||
|
|
|
@ -50,6 +50,18 @@ import com.google.common.util.concurrent.ListenableFuture;
|
|||
@RequestFilters(AddVCloudAuthorizationToRequest.class)
|
||||
public interface AdminCatalogAsyncClient extends CatalogAsyncClient {
|
||||
|
||||
/**
|
||||
* @see AdminClient#createCatalog(URI, AdminCatalog)
|
||||
*/
|
||||
@POST
|
||||
@Path("/catalogs")
|
||||
@Consumes(VCloudDirectorMediaType.ADMIN_CATALOG)
|
||||
@Produces(VCloudDirectorMediaType.ADMIN_CATALOG)
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<AdminCatalog> createCatalog(@EndpointParam URI orgRef,
|
||||
@BinderParam(BindToXMLPayload.class) AdminCatalog catalog);
|
||||
|
||||
/**
|
||||
* @see AdminClient#getCatalog(URI)
|
||||
*/
|
||||
|
|
|
@ -35,6 +35,19 @@ import org.jclouds.vcloud.director.v1_5.domain.PublishCatalogParams;
|
|||
@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS)
|
||||
public interface AdminCatalogClient extends CatalogClient {
|
||||
|
||||
|
||||
/**
|
||||
* Creates a catalog in an organization. The catalog will always be created in unpublished state.
|
||||
*
|
||||
* <pre>
|
||||
* POST /admin/org/{id}/catalogs
|
||||
* </pre>
|
||||
*
|
||||
* @param orgRef the reference for the org
|
||||
* @return contains a , which will point to the running asynchronous creation operation.
|
||||
*/
|
||||
AdminCatalog createCatalog(URI orgRef, AdminCatalog catalog);
|
||||
|
||||
/**
|
||||
* Retrieves a catalog.
|
||||
*
|
||||
|
|
|
@ -18,46 +18,203 @@
|
|||
*/
|
||||
package org.jclouds.vcloud.director.v1_5.features;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
|
||||
import org.jclouds.rest.annotations.BinderParam;
|
||||
import org.jclouds.rest.annotations.EndpointParam;
|
||||
import org.jclouds.rest.annotations.ExceptionParser;
|
||||
import org.jclouds.rest.annotations.JAXBResponseParser;
|
||||
import org.jclouds.rest.annotations.RequestFilters;
|
||||
import org.jclouds.rest.binders.BindToXMLPayload;
|
||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.AdminOrg;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgEmailSettings;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgGeneralSettings;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgLdapSettings;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgLeaseSettings;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgPasswordPolicySettings;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgSettings;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgVAppTemplateLeaseSettings;
|
||||
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
||||
import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
|
||||
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
|
||||
/**
|
||||
* @see GroupClient
|
||||
* @author danikov
|
||||
*/
|
||||
@RequestFilters(AddVCloudAuthorizationToRequest.class)
|
||||
public interface AdminOrgAsyncClient {
|
||||
public interface AdminOrgAsyncClient extends OrgAsyncClient {
|
||||
|
||||
// GET /admin/org/{id}
|
||||
/**
|
||||
* @see AdminOrgClient#getOrg(URI)
|
||||
*/
|
||||
@GET
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<AdminOrg> getOrg(
|
||||
@EndpointParam URI orgRef);
|
||||
|
||||
// POST /admin/org/{id}/catalogs
|
||||
/**
|
||||
* @see AdminOrgClient#getSettings(URI)
|
||||
*/
|
||||
@GET
|
||||
@Path("/settings")
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<OrgSettings> getSettings(
|
||||
@EndpointParam URI orgRef);
|
||||
|
||||
// POST /admin/org/{id}/groups
|
||||
/**
|
||||
* @see AdminOrgClient#updateSettings(URI, OrgSettings)
|
||||
*/
|
||||
@PUT
|
||||
@Path("/settings")
|
||||
@Consumes(VCloudDirectorMediaType.ORG_SETTINGS)
|
||||
@Produces(VCloudDirectorMediaType.ORG_SETTINGS)
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<OrgSettings> updateSettings(
|
||||
@EndpointParam URI orgRef,
|
||||
@BinderParam(BindToXMLPayload.class) OrgSettings settings);
|
||||
|
||||
// GET /admin/org/{id}/settings
|
||||
/**
|
||||
* @see AdminOrgClient#getEmailSettings(URI)
|
||||
*/
|
||||
@GET
|
||||
@Path("/settings/email")
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<OrgEmailSettings> getEmailSettings(
|
||||
@EndpointParam URI orgRef);
|
||||
|
||||
// PUT /admin/org/{id}/settings
|
||||
/**
|
||||
* @see AdminOrgClient#updateEmailSettings(URI, OrgEmailSettings)
|
||||
*/
|
||||
@PUT
|
||||
@Path("/settings/email")
|
||||
@Consumes(VCloudDirectorMediaType.ORG_EMAIL_SETTINGS)
|
||||
@Produces(VCloudDirectorMediaType.ORG_EMAIL_SETTINGS)
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<OrgEmailSettings> updateEmailSettings(
|
||||
@EndpointParam URI orgRef,
|
||||
@BinderParam(BindToXMLPayload.class) OrgEmailSettings settings);
|
||||
|
||||
// GET /admin/org/{id}/settings/email
|
||||
/**
|
||||
* @see AdminOrgClient#getGeneralSettings(URI)
|
||||
*/
|
||||
@GET
|
||||
@Path("/settings/general")
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<OrgGeneralSettings> getGeneralSettings(
|
||||
@EndpointParam URI orgRef);
|
||||
|
||||
// PUT /admin/org/{id}/settings/email
|
||||
/**
|
||||
* @see AdminOrgClient#updateGeneralSettings(URI, OrgGeneralSettings)
|
||||
*/
|
||||
@PUT
|
||||
@Path("/settings/general")
|
||||
@Consumes(VCloudDirectorMediaType.ORG_GENERAL_SETTINGS)
|
||||
@Produces(VCloudDirectorMediaType.ORG_GENERAL_SETTINGS)
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<OrgGeneralSettings> updateGeneralSettings(
|
||||
@EndpointParam URI orgRef,
|
||||
@BinderParam(BindToXMLPayload.class) OrgGeneralSettings settings);
|
||||
|
||||
// GET /admin/org/{id}/settings/general
|
||||
/**
|
||||
* @see AdminOrgClient#getPasswordPolicy(URI)
|
||||
*/
|
||||
@GET
|
||||
@Path("/settings/ldap")
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<OrgLdapSettings> getLdapSettings(@EndpointParam URI orgRef);
|
||||
|
||||
// PUT /admin/org/{id}/settings/general
|
||||
/**
|
||||
* @see AdminOrgClient#getPasswordPolicy(URI)
|
||||
*/
|
||||
@GET
|
||||
@Path("/settings/passwordPolicy")
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<OrgPasswordPolicySettings> getPasswordPolicy(
|
||||
@EndpointParam URI orgRef);
|
||||
|
||||
// GET /admin/org/{id}/settings/ldap
|
||||
/**
|
||||
* @see AdminOrgClient#updatePasswordPolicy(URI, OrgPasswordPolicySettings)
|
||||
*/
|
||||
@PUT
|
||||
@Path("/settings/passwordPolicy")
|
||||
@Consumes(VCloudDirectorMediaType.ORG_PASSWORD_POLICY_SETTINGS)
|
||||
@Produces(VCloudDirectorMediaType.ORG_PASSWORD_POLICY_SETTINGS)
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<OrgPasswordPolicySettings> updatePasswordPolicy(
|
||||
@EndpointParam URI orgRef,
|
||||
@BinderParam(BindToXMLPayload.class) OrgPasswordPolicySettings settings);
|
||||
|
||||
// GET /admin/org/{id}/settings/passwordPolicy
|
||||
/**
|
||||
* @see AdminOrgClient#getVAppLeaseSettings(URI)
|
||||
*/
|
||||
@GET
|
||||
@Path("/settings/vAppLeaseSettings")
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<OrgLeaseSettings> getVAppLeaseSettings(
|
||||
@EndpointParam URI orgRef);
|
||||
|
||||
// PUT /admin/org/{id}/settings/passwordPolicy
|
||||
/**
|
||||
* @see AdminOrgClient#updateVAppLeaseSettings(URI, OrgVAppLeaseSettings)
|
||||
*/
|
||||
@PUT
|
||||
@Path("/settings/vAppLeaseSettings")
|
||||
@Consumes(VCloudDirectorMediaType.ORG_LEASE_SETTINGS)
|
||||
@Produces(VCloudDirectorMediaType.ORG_LEASE_SETTINGS)
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<OrgLeaseSettings> updateVAppLeaseSettings(
|
||||
@EndpointParam URI orgRef,
|
||||
@BinderParam(BindToXMLPayload.class) OrgLeaseSettings settings);
|
||||
|
||||
// GET /admin/org/{id}/settings/vAppLeaseSettings
|
||||
/**
|
||||
* @see AdminOrgClient#getVAppTemplateLeaseSettings(URI)
|
||||
*/
|
||||
@GET
|
||||
@Path("/settings/vAppTemplateLeaseSettings")
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<OrgVAppTemplateLeaseSettings> getVAppTemplateLeaseSettings(
|
||||
@EndpointParam URI orgRef);
|
||||
|
||||
// PUT /admin/org/{id}/settings/vAppLeaseSettings
|
||||
|
||||
// GET /admin/org/{id}/settings/vAppTemplateLeaseSettings
|
||||
|
||||
// PUT /admin/org/{id}/settings/vAppTemplateLeaseSettings
|
||||
/**
|
||||
* @see AdminOrgClient#updateVAppTemplateLeaseSettings(URI, OrgVAppTemplateLeaseSettings)
|
||||
*/
|
||||
@PUT
|
||||
@Path("/settings/vAppTemplateLeaseSettings")
|
||||
@Consumes(VCloudDirectorMediaType.ORG_VAPP_TEMPLATE_LEASE_SETTINGS)
|
||||
@Produces(VCloudDirectorMediaType.ORG_VAPP_TEMPLATE_LEASE_SETTINGS)
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<OrgVAppTemplateLeaseSettings> updateVAppTemplateLeaseSettings(
|
||||
@EndpointParam URI orgRef,
|
||||
@BinderParam(BindToXMLPayload.class) OrgVAppTemplateLeaseSettings settings);
|
||||
|
||||
}
|
||||
|
|
|
@ -18,9 +18,19 @@
|
|||
*/
|
||||
package org.jclouds.vcloud.director.v1_5.features;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.jclouds.concurrent.Timeout;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.AdminOrg;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Group;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgEmailSettings;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgGeneralSettings;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgLdapSettings;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgLeaseSettings;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgPasswordPolicySettings;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgSettings;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgVAppTemplateLeaseSettings;
|
||||
|
||||
/**
|
||||
* Provides synchronous access to {@link Group} objects.
|
||||
|
@ -29,38 +39,181 @@ import org.jclouds.concurrent.Timeout;
|
|||
* @author danikov
|
||||
*/
|
||||
@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS)
|
||||
public interface AdminOrgClient {
|
||||
public interface AdminOrgClient extends OrgClient {
|
||||
|
||||
// GET /admin/org/{id}
|
||||
/**
|
||||
* Retrieves an admin view of an organization.
|
||||
* The organization might be enabled or disabled.
|
||||
* If enabled, the organization allows login and all other operations.
|
||||
*
|
||||
* <pre>
|
||||
* GET /admin/org/{id}
|
||||
* </pre>
|
||||
*
|
||||
* @param orgRef the reference for the admin org
|
||||
* @return the admin org
|
||||
*/
|
||||
AdminOrg getOrg(URI orgRef);
|
||||
|
||||
// POST /admin/org/{id}/catalogs
|
||||
/**
|
||||
* Gets organizational settings for this organization.
|
||||
*
|
||||
* <pre>
|
||||
* GET /admin/org/{id}/settings
|
||||
* </pre>
|
||||
*
|
||||
* @param orgRef the reference for the admin org
|
||||
* @return the settings
|
||||
*/
|
||||
OrgSettings getSettings(URI orgRef);
|
||||
|
||||
// POST /admin/org/{id}/groups
|
||||
/**
|
||||
* Updates organizational settings for this organization.
|
||||
*
|
||||
* <pre>
|
||||
* PUT /admin/org/{id}/settings
|
||||
* </pre>
|
||||
* @param orgRef the reference for the admin org
|
||||
* @param newSettings the requested updated settings
|
||||
* @return the resultant settings
|
||||
*/
|
||||
OrgSettings updateSettings(URI orgRef, OrgSettings newSettings);
|
||||
|
||||
// GET /admin/org/{id}/settings
|
||||
/**
|
||||
* Retrieves email settings for an organization.
|
||||
*
|
||||
* <pre>
|
||||
* GET /admin/org/{id}/settings/email
|
||||
* </pre>
|
||||
*
|
||||
* @param orgRef the reference for the admin org
|
||||
* @return the email settings
|
||||
*/
|
||||
OrgEmailSettings getEmailSettings(URI orgRef);
|
||||
|
||||
// PUT /admin/org/{id}/settings
|
||||
/**
|
||||
* Updates email policy settings for organization.
|
||||
*
|
||||
* <pre>
|
||||
* PUT /admin/org/{id}/settings/email
|
||||
* </pre>
|
||||
* @param orgRef the reference for the admin org
|
||||
* @param newSettings the requested updated settings
|
||||
* @return the resultant settings
|
||||
*/
|
||||
OrgEmailSettings updateEmailSettings(URI orgRef,
|
||||
OrgEmailSettings newSettings);
|
||||
|
||||
// GET /admin/org/{id}/settings/email
|
||||
/**
|
||||
* Gets general organization settings.
|
||||
*
|
||||
* <pre>
|
||||
* GET /admin/org/{id}/settings/general
|
||||
* </pre>
|
||||
*
|
||||
* @param orgRef the reference for the admin org
|
||||
* @return the lease settings
|
||||
*/
|
||||
OrgGeneralSettings getGeneralSettings(URI orgRef);
|
||||
|
||||
// PUT /admin/org/{id}/settings/email
|
||||
/**
|
||||
* Updates general organization settings.
|
||||
*
|
||||
* <pre>
|
||||
* PUT /admin/org/{id}/settings/general
|
||||
* </pre>
|
||||
* @param orgRef the reference for the admin org
|
||||
* @param newSettings the requested updated settings
|
||||
* @return the resultant settings
|
||||
*/
|
||||
OrgGeneralSettings updateGeneralSettings(URI orgRef,
|
||||
OrgGeneralSettings newSettings);
|
||||
|
||||
// GET /admin/org/{id}/settings/general
|
||||
/**
|
||||
* Retrieves LDAP settings for an organization.
|
||||
*
|
||||
* <pre>
|
||||
* GET /admin/org/{id}/settings/ldap
|
||||
* </pre>
|
||||
*
|
||||
* @param orgRef the reference for the admin org
|
||||
* @return the ldap settings
|
||||
*/
|
||||
OrgLdapSettings getLdapSettings(URI orgRef);
|
||||
|
||||
// PUT /admin/org/{id}/settings/general
|
||||
/**
|
||||
* Retrieves password policy settings for an organization.
|
||||
*
|
||||
* <pre>
|
||||
* GET /admin/org/{id}/settings/passwordPolicy
|
||||
* </pre>
|
||||
*
|
||||
* @param orgRef the reference for the admin org
|
||||
* @return the lease settings
|
||||
*/
|
||||
OrgPasswordPolicySettings getPasswordPolicy(URI orgRef);
|
||||
|
||||
// GET /admin/org/{id}/settings/ldap
|
||||
/**
|
||||
* Updates password policy settings for organization.
|
||||
*
|
||||
* <pre>
|
||||
* PUT /admin/org/{id}/settings/passwordPolicy
|
||||
* </pre>
|
||||
* @param orgRef the reference for the admin org
|
||||
* @param newSettings the requested updated settings
|
||||
* @return the resultant settings
|
||||
*/
|
||||
OrgPasswordPolicySettings updatePasswordPolicy(URI orgRef,
|
||||
OrgPasswordPolicySettings newSettings);
|
||||
|
||||
// GET /admin/org/{id}/settings/passwordPolicy
|
||||
/**
|
||||
* Gets organization resource cleanup settings on the level of vApp.
|
||||
*
|
||||
* <pre>
|
||||
* GET /admin/org/{id}/settings/vAppLeaseSettings
|
||||
* </pre>
|
||||
*
|
||||
* @param orgRef the reference for the admin org
|
||||
* @return the lease settings
|
||||
*/
|
||||
OrgLeaseSettings getVAppLeaseSettings(URI orgRef);
|
||||
|
||||
// PUT /admin/org/{id}/settings/passwordPolicy
|
||||
/**
|
||||
* Updates organization resource cleanup settings on the level of vApp.
|
||||
*
|
||||
* <pre>
|
||||
* PUT /admin/org/{id}/settings/vAppLeaseSettings
|
||||
* </pre>
|
||||
* @param orgRef the reference for the admin org
|
||||
* @param newSettings the requested updated settings
|
||||
* @return the resultant settings
|
||||
*/
|
||||
OrgLeaseSettings updateVAppLeaseSettings(URI orgRef,
|
||||
OrgLeaseSettings newSettings);
|
||||
|
||||
// GET /admin/org/{id}/settings/vAppLeaseSettings
|
||||
/**
|
||||
* Retrieves expiration and storage policy for vApp templates in an organization.
|
||||
*
|
||||
* <pre>
|
||||
* GET /admin/org/{id}/settings/vAppTemplateLeaseSettings
|
||||
* </pre>
|
||||
*
|
||||
* @param orgRef the reference for the admin org
|
||||
* @return the lease settings
|
||||
*/
|
||||
OrgVAppTemplateLeaseSettings getVAppTemplateLeaseSettings(URI orgRef);
|
||||
|
||||
// PUT /admin/org/{id}/settings/vAppLeaseSettings
|
||||
|
||||
// GET /admin/org/{id}/settings/vAppTemplateLeaseSettings
|
||||
|
||||
// PUT /admin/org/{id}/settings/vAppTemplateLeaseSettings
|
||||
/**
|
||||
* Updates vApp template policy settings for organization.
|
||||
*
|
||||
* <pre>
|
||||
* PUT /admin/org/{id}/settings/vAppTemplateLeaseSettings
|
||||
* </pre>
|
||||
* @param orgRef the reference for the admin org
|
||||
* @param newSettings the requested updated settings
|
||||
* @return the resultant settings
|
||||
*/
|
||||
OrgVAppTemplateLeaseSettings updateVAppTemplateLeaseSettings(URI orgRef,
|
||||
OrgVAppTemplateLeaseSettings newSettings);
|
||||
|
||||
}
|
||||
|
|
|
@ -23,10 +23,6 @@ import java.net.URI;
|
|||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
|
||||
import org.jclouds.rest.annotations.EndpointParam;
|
||||
import org.jclouds.rest.annotations.ExceptionParser;
|
||||
import org.jclouds.rest.annotations.JAXBResponseParser;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Produces;
|
||||
|
||||
|
@ -35,7 +31,6 @@ import org.jclouds.rest.annotations.EndpointParam;
|
|||
import org.jclouds.rest.annotations.ExceptionParser;
|
||||
import org.jclouds.rest.annotations.JAXBResponseParser;
|
||||
import org.jclouds.rest.annotations.RequestFilters;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Group;
|
||||
import org.jclouds.rest.binders.BindToXMLPayload;
|
||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Group;
|
||||
|
@ -68,7 +63,7 @@ public interface GroupAsyncClient {
|
|||
@Produces(VCloudDirectorMediaType.GROUP)
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<Group> updateCatalog(@EndpointParam URI groupRef,
|
||||
ListenableFuture<Group> updateGroup(@EndpointParam URI groupRef,
|
||||
@BinderParam(BindToXMLPayload.class) Group group);
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.net.URI;
|
|||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
|
@ -35,6 +36,7 @@ import org.jclouds.rest.annotations.JAXBResponseParser;
|
|||
import org.jclouds.rest.annotations.RequestFilters;
|
||||
import org.jclouds.rest.binders.BindToXMLPayload;
|
||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.CloneMediaParams;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Media;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Owner;
|
||||
|
@ -60,6 +62,29 @@ public interface MediaAsyncClient {
|
|||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<Media> getMedia(@EndpointParam URI uri);
|
||||
|
||||
/**
|
||||
* @see MediaClient#createMedia(URI, Media)
|
||||
*/
|
||||
@POST
|
||||
@Consumes(VCloudDirectorMediaType.MEDIA)
|
||||
@Produces(VCloudDirectorMediaType.MEDIA)
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<Media> createMedia(@EndpointParam URI link,
|
||||
@BinderParam(BindToXMLPayload.class) Media media);
|
||||
|
||||
|
||||
/**
|
||||
* @see MediaClient#cloneMedia(URI, CloneMediaParams)
|
||||
*/
|
||||
@POST
|
||||
@Consumes(VCloudDirectorMediaType.MEDIA)
|
||||
@Produces(VCloudDirectorMediaType.CLONE_MEDIA_PARAMS)
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<Media> cloneMedia(@EndpointParam URI cloneLink,
|
||||
@BinderParam(BindToXMLPayload.class) CloneMediaParams params);
|
||||
|
||||
/**
|
||||
* @see MediaClient#updateMedia(URI, Media))
|
||||
*/
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.util.concurrent.TimeUnit;
|
|||
|
||||
import org.jclouds.concurrent.Timeout;
|
||||
import org.jclouds.rest.annotations.Delegate;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.CloneMediaParams;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Media;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Owner;
|
||||
|
@ -46,6 +47,22 @@ public interface MediaClient {
|
|||
*/
|
||||
Media getMedia(URI mediaUri);
|
||||
|
||||
/**
|
||||
* Creates a media (and present upload link for the floppy/iso file).
|
||||
*
|
||||
* @return The response will return a link to transfer site to be able to continue with uploading the media.
|
||||
*/
|
||||
Media createMedia(URI uploadLink, Media media);
|
||||
|
||||
/**
|
||||
* Clones a media into new one.
|
||||
* The status of the returned media is UNRESOLVED(0) until the task for cloning finish.
|
||||
*
|
||||
* @return a Media resource which will contain a task.
|
||||
* The user should monitor the contained task status in order to check when it is completed.
|
||||
*/
|
||||
Media cloneMedia(URI cloneLink, CloneMediaParams params);
|
||||
|
||||
/**
|
||||
* Updates the name/description of a media.
|
||||
*
|
||||
|
|
|
@ -39,7 +39,6 @@ import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
|||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.MetadataValue;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Task;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.URISupplier;
|
||||
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
||||
import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ public interface OrgAsyncClient {
|
|||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<Org> getOrg(@EndpointParam URI orgUri);
|
||||
ListenableFuture<? extends Org> getOrg(@EndpointParam URI orgUri);
|
||||
|
||||
/**
|
||||
* @return asynchronous access to {@link Metadata.Readable} features
|
||||
|
|
|
@ -31,7 +31,6 @@ import org.jclouds.rest.annotations.JAXBResponseParser;
|
|||
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.domain.URISupplier;
|
||||
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
||||
import org.jclouds.vcloud.director.v1_5.functions.OrgReferenceToTaskListEndpoint;
|
||||
import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
|
||||
|
|
|
@ -18,38 +18,27 @@
|
|||
*/
|
||||
package org.jclouds.vcloud.director.v1_5.features;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
|
||||
import javax.ws.rs.PUT;
|
||||
|
||||
import org.jclouds.rest.annotations.ExceptionParser;
|
||||
import org.jclouds.io.Payload;
|
||||
import org.jclouds.rest.annotations.EndpointParam;
|
||||
import org.jclouds.rest.annotations.RequestFilters;
|
||||
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
||||
import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
|
||||
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
|
||||
/**
|
||||
|
||||
*
|
||||
* @see UploadClient
|
||||
* @author danikov
|
||||
*/
|
||||
@RequestFilters(AddVCloudAuthorizationToRequest.class)
|
||||
public interface UploadAsyncClient { // TODO: implement these operations correctly
|
||||
|
||||
public interface UploadAsyncClient {
|
||||
/**
|
||||
* @see UploadClient#uploadFile(URI, File)
|
||||
* @see UploadClient#put
|
||||
*/
|
||||
@PUT
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<Object> uploadFile(URI uri, File file);
|
||||
|
||||
/**
|
||||
* @see UploadClient#uploadBigFile(URI, File)
|
||||
*/
|
||||
@PUT
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<Object> uploadBigFile(URI target, File file);
|
||||
|
||||
ListenableFuture<Void> upload(@EndpointParam URI location, Payload payload);
|
||||
}
|
||||
|
|
|
@ -18,31 +18,25 @@
|
|||
*/
|
||||
package org.jclouds.vcloud.director.v1_5.features;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.jclouds.concurrent.Timeout;
|
||||
import org.jclouds.io.Payload;
|
||||
|
||||
/**
|
||||
* Provides synchronous access to Upload.
|
||||
* <p/>
|
||||
*
|
||||
* @see UploadAsyncClient
|
||||
* @see <a href= "http://support.theenterprisecloud.com/kb/default.asp?id=984&Lang=1&SID=" />
|
||||
* @author danikov
|
||||
*/
|
||||
@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS)
|
||||
public interface UploadClient {
|
||||
|
||||
/**
|
||||
* Uploads a file.
|
||||
* @return eTag
|
||||
*/
|
||||
void uploadFile(URI uri, File file);
|
||||
|
||||
/**
|
||||
* Uploads a file using ranged PUTs.
|
||||
*/
|
||||
void uploadBigFile(URI uri, File file);
|
||||
void upload(URI location, Payload payload);
|
||||
|
||||
}
|
||||
|
|
|
@ -18,7 +18,20 @@
|
|||
*/
|
||||
package org.jclouds.vcloud.director.v1_5.features;
|
||||
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.*;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.CUSTOMIZATION_SECTION;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.ENVELOPE;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.GUEST_CUSTOMIZATION_SECTION;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.LEASE_SETTINGS_SECTION;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.METADATA;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.METADATA_ENTRY;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.NETWORK_CONFIG_SECTION;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.NETWORK_CONNECTION_SECTION;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.NETWORK_SECTION;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.OWNER;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.PRODUCT_SECTION_LIST;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.RELOCATE_TEMPLATE;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.TASK;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.VAPP_TEMPLATE;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
|
@ -39,7 +52,18 @@ import org.jclouds.rest.annotations.ExceptionParser;
|
|||
import org.jclouds.rest.annotations.JAXBResponseParser;
|
||||
import org.jclouds.rest.annotations.RequestFilters;
|
||||
import org.jclouds.rest.binders.BindToXMLPayload;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.*;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.CustomizationSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.LeaseSettingsSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.MetadataValue;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.NetworkConfigSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.NetworkConnectionSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Owner;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ProductSectionList;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.RelocateParams;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Task;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.VAppTemplate;
|
||||
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
||||
import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
|
||||
|
||||
|
|
|
@ -24,7 +24,18 @@ import java.util.concurrent.TimeUnit;
|
|||
import org.jclouds.concurrent.Timeout;
|
||||
import org.jclouds.ovf.Envelope;
|
||||
import org.jclouds.ovf.NetworkSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.*;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.CustomizationSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.LeaseSettingsSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.MetadataValue;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.NetworkConfigSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.NetworkConnectionSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Owner;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ProductSectionList;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.RelocateParams;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Task;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.VAppTemplate;
|
||||
|
||||
/**
|
||||
* Provides synchronous access to {@link org.jclouds.vcloud.director.v1_5.domain.VAppTemplate} objects.
|
||||
|
|
|
@ -34,7 +34,18 @@ import org.jclouds.rest.annotations.JAXBResponseParser;
|
|||
import org.jclouds.rest.annotations.RequestFilters;
|
||||
import org.jclouds.rest.binders.BindToXMLPayload;
|
||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.*;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.CaptureVAppParams;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.CloneMediaParams;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.CloneVAppParams;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.CloneVAppTemplateParams;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ComposeVAppParams;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.InstantiateVAppParamsType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Media;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.UploadVAppTemplateParams;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.VApp;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.VAppTemplate;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Vdc;
|
||||
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
||||
import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue