rename metadata to entries

This commit is contained in:
danikov 2012-02-16 00:56:00 +00:00
parent 9f4246f587
commit f6efba9f25
4 changed files with 7 additions and 7 deletions

View File

@ -66,7 +66,7 @@ public class Metadata extends ResourceType<Metadata> {
/**
* @see Metadata#getMetadata()
*/
public Builder metadata(Set<MetadataEntry> metadataEntries) {
public Builder entries(Set<MetadataEntry> metadataEntries) {
this.metadataEntries = Sets.newLinkedHashSet(checkNotNull(metadataEntries, "metadataEntries"));
return this;
}
@ -78,7 +78,7 @@ public class Metadata extends ResourceType<Metadata> {
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<Metadata> {
}
public Builder fromMetadata(Metadata in) {
return fromResourceType(in).metadata(in.getMetadataEntries());
return fromResourceType(in).entries(in.getMetadataEntries());
}
/**

View File

@ -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);

View File

@ -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();

View File

@ -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();