From f6efba9f25fdf41286aa3bf64d38ddfa2c201a4d Mon Sep 17 00:00:00 2001 From: danikov Date: Thu, 16 Feb 2012 00:56:00 +0000 Subject: [PATCH] rename metadata to entries --- .../org/jclouds/vcloud/director/v1_5/domain/Metadata.java | 6 +++--- .../director/v1_5/features/CatalogClientExpectTest.java | 4 ++-- .../director/v1_5/features/NetworkClientExpectTest.java | 2 +- .../vcloud/director/v1_5/features/OrgClientExpectTest.java | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Metadata.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Metadata.java index 11fab28010..dbe22982b9 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Metadata.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Metadata.java @@ -66,7 +66,7 @@ public class Metadata extends ResourceType { /** * @see Metadata#getMetadata() */ - public Builder metadata(Set metadataEntries) { + public Builder entries(Set metadataEntries) { this.metadataEntries = Sets.newLinkedHashSet(checkNotNull(metadataEntries, "metadataEntries")); return this; } @@ -78,7 +78,7 @@ public class Metadata extends ResourceType { metadataEntries.add(checkNotNull(metadataEntry, "metadataEntry")); return this; } - + @Override public Metadata build() { Metadata metadata = new Metadata(href, metadataEntries); @@ -124,7 +124,7 @@ public class Metadata extends ResourceType { } public Builder fromMetadata(Metadata in) { - return fromResourceType(in).metadata(in.getMetadataEntries()); + return fromResourceType(in).entries(in.getMetadataEntries()); } /** diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/CatalogClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/CatalogClientExpectTest.java index 5a192b3b8f..9bf2121484 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/CatalogClientExpectTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/CatalogClientExpectTest.java @@ -146,7 +146,7 @@ public class CatalogClientExpectTest extends BaseVCloudDirectorRestClientExpectT .type("application/vnd.vmware.vcloud.catalog+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/catalog/7212e451-76e1-4631-b2de-ba1dfd8080e4")) .build()) - .metadata(ImmutableSet.of(metadataEntry())) + .entries(ImmutableSet.of(metadataEntry())) .build(); assertEquals(client.getCatalogClient().getCatalogMetadata(catalogRef), expected); @@ -298,7 +298,7 @@ public class CatalogClientExpectTest extends BaseVCloudDirectorRestClientExpectT .type("application/vnd.vmware.vcloud.catalogItem+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/catalogItem/a36fdac9-b8c2-43e2-9a4c-2ffaf3ee13df")) .build()) - .metadata(ImmutableSet.of(itemMetadataEntry())) + .entries(ImmutableSet.of(itemMetadataEntry())) .build(); assertEquals(client.getCatalogClient().getCatalogItemMetadata(catalogItemReference), expected); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/NetworkClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/NetworkClientExpectTest.java index 1ade66a6ca..6b8c76d413 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/NetworkClientExpectTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/NetworkClientExpectTest.java @@ -159,7 +159,7 @@ public class NetworkClientExpectTest extends BaseVCloudDirectorRestClientExpectT .type("application/vnd.vmware.vcloud.network+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/network/55a677cf-ab3f-48ae-b880-fab90421980c")) .build()) - .metadata(ImmutableSet.of(MetadataEntry.builder().entry("key", "value").build())) + .entries(ImmutableSet.of(MetadataEntry.builder().entry("key", "value").build())) .build(); Reference networkRef = Reference.builder().href(networkUri).build(); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/OrgClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/OrgClientExpectTest.java index 5e5b9119f5..541a37134e 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/OrgClientExpectTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/OrgClientExpectTest.java @@ -188,7 +188,7 @@ public class OrgClientExpectTest extends BaseVCloudDirectorRestClientExpectTest .type("application/vnd.vmware.vcloud.org+xml") .href(URI.create("https://vcloudbeta.bluelock.com/api/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0")) .build()) - .metadata(ImmutableSet.of(metadataEntry())) + .entries(ImmutableSet.of(metadataEntry())) .build(); Reference orgRef = Reference.builder().href(orgUri).build();