openstack-swift extensibility

This commit is contained in:
Andrew Donald Kennedy 2012-08-12 12:43:55 +01:00
parent b3121b7889
commit 70fc6f5c52
3 changed files with 6 additions and 6 deletions

View File

@ -47,7 +47,7 @@ public interface AccountApi {
/**
* @see #listContainers(ListContainersOptions)
*/
Set<ContainerMetadata> listContainers();
Set<? extends ContainerMetadata> listContainers();
/**
* retrieve a list of existing storage containers ordered by name. The sort order for the name is
@ -57,6 +57,6 @@ public interface AccountApi {
* @param options
* @return a list of existing storage containers ordered by name.
*/
Set<ContainerMetadata> listContainers(ListContainersOptions options);
Set<? extends ContainerMetadata> listContainers(ListContainersOptions options);
}

View File

@ -59,7 +59,7 @@ public interface AccountAsyncApi {
@HEAD
@ResponseParser(ParseAccountMetadataResponseFromHeaders.class)
@Path("/")
ListenableFuture<AccountMetadata> getAccountMetadata();
ListenableFuture<? extends AccountMetadata> getAccountMetadata();
/**
* @see AccountApi#listContainers()
@ -69,7 +69,7 @@ public interface AccountAsyncApi {
@QueryParams(keys = "format", values = "json")
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
@Path("/")
ListenableFuture<Set<ContainerMetadata>> listContainers();
ListenableFuture<? extends Set<? extends ContainerMetadata>> listContainers();
/**
* @see AccountApi#listContainers(ListContainersOptions)
@ -79,5 +79,5 @@ public interface AccountAsyncApi {
@QueryParams(keys = "format", values = "json")
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
@Path("/")
ListenableFuture<Set<ContainerMetadata>> listContainers(ListContainersOptions options);
ListenableFuture<? extends Set<? extends ContainerMetadata>> listContainers(ListContainersOptions options);
}

View File

@ -49,7 +49,7 @@ public class AccountApiLiveTest extends BaseSwiftApiLiveTest {
public void testListContainers() throws Exception {
for (String regionId : swiftContext.getApi().getConfiguredRegions()) {
AccountApi api = swiftContext.getApi().getAccountApiForRegion(regionId);
Set<ContainerMetadata> response = api.listContainers();
Set<? extends ContainerMetadata> response = api.listContainers();
assertNotNull(response);
for (ContainerMetadata container : response) {
assertNotNull(container.getName());