fixing injection error in async client due to inheritence chain

This commit is contained in:
Mike Arnold 2012-03-22 15:26:08 -05:00
parent b95e890f83
commit 541fe98391
3 changed files with 24 additions and 6 deletions

View File

@ -23,6 +23,7 @@ import java.util.Set;
import java.util.concurrent.ExecutionException;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.HEAD;
import javax.ws.rs.HeaderParam;
@ -46,6 +47,8 @@ import org.jclouds.openstack.services.ObjectStore;
import org.jclouds.openstack.swift.CommonSwiftAsyncClient;
import org.jclouds.openstack.swift.Storage;
import org.jclouds.openstack.swift.domain.ContainerMetadata;
import org.jclouds.openstack.swift.functions.ReturnTrueOn404FalseOn409;
import org.jclouds.openstack.swift.options.ListContainerOptions;
import org.jclouds.rest.annotations.Endpoint;
import org.jclouds.rest.annotations.ExceptionParser;
import org.jclouds.rest.annotations.Headers;
@ -91,8 +94,25 @@ public interface HPCloudObjectStorageAsyncClient extends CommonSwiftAsyncClient
ListenableFuture<Boolean> createContainer(@PathParam("container") String container,
CreateContainerOptions... options);
/**
* @see org.jclouds.openstack.swift.CommonSwiftClient#listContainers
*/
@GET
@Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "format", values = "json")
@Path("/")
ListenableFuture<? extends Set<ContainerMetadata>> listContainers(ListContainerOptions... options);
/**
* @see org.jclouds.openstack.swift.CommonSwiftClient#deleteContainerIfEmpty
*/
@DELETE
@ExceptionParser(ReturnTrueOn404FalseOn409.class)
@Path("/{container}")
ListenableFuture<Boolean> deleteContainerIfEmpty(@PathParam("container") String container);
/**
* @see HPCloudObjectStorageClient#listCDNContainers(ListCDNContainerOptions)
* @see HPCloudObjectStorageClient#listCDNContainers(ListCDNContainerOptions...)
*/
@Beta
@GET

View File

@ -38,14 +38,12 @@ import org.jclouds.json.config.GsonModule.DateAdapter;
import org.jclouds.json.config.GsonModule.Iso8601DateAdapter;
import org.jclouds.location.suppliers.ImplicitLocationSupplier;
import org.jclouds.location.suppliers.RegionIdToURISupplier;
import org.jclouds.location.suppliers.implicit.GetRegionIdMatchingProviderURIOrNull;
import org.jclouds.location.suppliers.implicit.OnlyLocationOrFirstRegionOptionallyMatchingRegionId;
import org.jclouds.location.suppliers.implicit.OnlyLocationOrFirstZone;
import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule;
import org.jclouds.openstack.services.ObjectStore;
import org.jclouds.openstack.services.ServiceType;
import org.jclouds.openstack.swift.CommonSwiftAsyncClient;
import org.jclouds.openstack.swift.CommonSwiftClient;
import org.jclouds.openstack.swift.Storage;
import org.jclouds.openstack.swift.config.SwiftObjectModule;
import org.jclouds.openstack.swift.handlers.ParseSwiftErrorFromHttpResponse;
import org.jclouds.rest.ConfiguresRestClient;
@ -110,7 +108,7 @@ public class HPCloudObjectStorageRestClientModule extends
@Provides
@Singleton
@Storage
@ObjectStore
protected Supplier<URI> provideStorageUrl(RegionIdToURISupplier.Factory factory, @ApiVersion String apiVersion) {
return getLastValueInMap(factory.createForApiTypeAndVersion(ServiceType.OBJECT_STORE, apiVersion));
}

View File

@ -28,5 +28,5 @@ public interface HPCloudObjectStorageConstants {
/**
* The CDN Endpoint property
*/
public static final String PROPERTY_CDN_ENDPOINT = "jclouds.hpcloud-objectstorage-lvs.cdn.endpoint";
public static final String PROPERTY_CDN_ENDPOINT = "jclouds.hpcloud-objectstorage.cdn.endpoint";
}