Issue 440: moved jclouds-aws to aws-common

This commit is contained in:
Adrian Cole 2011-01-06 16:48:51 -08:00
parent c73b424a0f
commit 71fc2792f3
44 changed files with 87 additions and 107 deletions

View File

@ -43,8 +43,8 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.jclouds</groupId> <groupId>org.jclouds.common</groupId>
<artifactId>jclouds-aws</artifactId> <artifactId>aws-common</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>jar</type> <type>jar</type>
</dependency> </dependency>

View File

@ -45,8 +45,8 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.jclouds</groupId> <groupId>org.jclouds.common</groupId>
<artifactId>jclouds-aws</artifactId> <artifactId>aws-common</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>jar</type> <type>jar</type>
</dependency> </dependency>

View File

@ -45,7 +45,7 @@ import com.google.common.collect.ImmutableSet;
@Test(groups = "unit") @Test(groups = "unit")
public class RegionAndIdToImageTest { public class RegionAndIdToImageTest {
@SuppressWarnings({ "unchecked", "rawtypes" }) @SuppressWarnings("unchecked")
@Test @Test
public void testApply() { public void testApply() {
@ -54,8 +54,7 @@ public class RegionAndIdToImageTest {
AMIClient client = createMock(AMIClient.class); AMIClient client = createMock(AMIClient.class);
org.jclouds.ec2.domain.Image ec2Image = createMock(org.jclouds.ec2.domain.Image.class); org.jclouds.ec2.domain.Image ec2Image = createMock(org.jclouds.ec2.domain.Image.class);
Image image = createNiceMock(Image.class); Image image = createNiceMock(Image.class);
Set<? extends org.jclouds.ec2.domain.Image> images = ImmutableSet Set<? extends org.jclouds.ec2.domain.Image> images = ImmutableSet.<org.jclouds.ec2.domain.Image> of(ec2Image);
.<org.jclouds.ec2.domain.Image> of(ec2Image);
expect(caller.getAMIServices()).andReturn(client).atLeastOnce(); expect(caller.getAMIServices()).andReturn(client).atLeastOnce();
expect(client.describeImagesInRegion("region", imageIds("ami"))).andReturn((Set) images); expect(client.describeImagesInRegion("region", imageIds("ami"))).andReturn((Set) images);
@ -77,7 +76,7 @@ public class RegionAndIdToImageTest {
} }
@SuppressWarnings({ "unchecked", "rawtypes" }) @SuppressWarnings("unchecked")
@Test @Test
public void testApplyNotFound() { public void testApplyNotFound() {
@ -86,8 +85,7 @@ public class RegionAndIdToImageTest {
AMIClient client = createMock(AMIClient.class); AMIClient client = createMock(AMIClient.class);
org.jclouds.ec2.domain.Image ec2Image = createMock(org.jclouds.ec2.domain.Image.class); org.jclouds.ec2.domain.Image ec2Image = createMock(org.jclouds.ec2.domain.Image.class);
Image image = createNiceMock(Image.class); Image image = createNiceMock(Image.class);
Set<? extends org.jclouds.ec2.domain.Image> images = ImmutableSet Set<? extends org.jclouds.ec2.domain.Image> images = ImmutableSet.<org.jclouds.ec2.domain.Image> of(ec2Image);
.<org.jclouds.ec2.domain.Image> of(ec2Image);
expect(caller.getAMIServices()).andReturn(client).atLeastOnce(); expect(caller.getAMIServices()).andReturn(client).atLeastOnce();
expect(client.describeImagesInRegion("region", imageIds("ami"))).andReturn((Set) images); expect(client.describeImagesInRegion("region", imageIds("ami"))).andReturn((Set) images);
@ -109,7 +107,7 @@ public class RegionAndIdToImageTest {
} }
@SuppressWarnings({ "unchecked", "rawtypes" }) @SuppressWarnings("unchecked")
@Test @Test
public void testApplyNoSuchElementException() { public void testApplyNoSuchElementException() {
@ -118,8 +116,7 @@ public class RegionAndIdToImageTest {
AMIClient client = createMock(AMIClient.class); AMIClient client = createMock(AMIClient.class);
org.jclouds.ec2.domain.Image ec2Image = createMock(org.jclouds.ec2.domain.Image.class); org.jclouds.ec2.domain.Image ec2Image = createMock(org.jclouds.ec2.domain.Image.class);
Image image = createNiceMock(Image.class); Image image = createNiceMock(Image.class);
Set<? extends org.jclouds.ec2.domain.Image> images = ImmutableSet Set<? extends org.jclouds.ec2.domain.Image> images = ImmutableSet.<org.jclouds.ec2.domain.Image> of(ec2Image);
.<org.jclouds.ec2.domain.Image> of(ec2Image);
expect(caller.getAMIServices()).andReturn(client).atLeastOnce(); expect(caller.getAMIServices()).andReturn(client).atLeastOnce();
expect(client.describeImagesInRegion("region", imageIds("ami"))).andReturn((Set) images); expect(client.describeImagesInRegion("region", imageIds("ami"))).andReturn((Set) images);

View File

@ -92,7 +92,7 @@ public class EC2RunNodesAndAddToSetStrategyTest {
return null; return null;
} }
@SuppressWarnings({ "unchecked", "rawtypes" }) @SuppressWarnings("unchecked")
private void assertRegionAndZoneForLocation(Location location, String region, String zone) { private void assertRegionAndZoneForLocation(Location location, String region, String zone) {
String imageId = "ami1"; String imageId = "ami1";
String instanceCreatedId = "instance1"; String instanceCreatedId = "instance1";

View File

@ -49,10 +49,9 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.jclouds</groupId> <groupId>org.jclouds.common</groupId>
<artifactId>jclouds-aws</artifactId> <artifactId>aws-common</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>jar</type>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jclouds</groupId> <groupId>org.jclouds</groupId>

View File

@ -49,8 +49,8 @@
<version>0.3</version> <version>0.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jclouds</groupId> <groupId>org.jclouds.common</groupId>
<artifactId>jclouds-aws</artifactId> <artifactId>aws-common</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>jar</type> <type>jar</type>
</dependency> </dependency>

View File

@ -43,10 +43,9 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.jclouds</groupId> <groupId>org.jclouds.common</groupId>
<artifactId>jclouds-aws</artifactId> <artifactId>aws-common</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>jar</type>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jclouds</groupId> <groupId>org.jclouds</groupId>

View File

@ -43,10 +43,9 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.jclouds</groupId> <groupId>org.jclouds.common</groupId>
<artifactId>jclouds-aws</artifactId> <artifactId>aws-common</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>jar</type>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jclouds</groupId> <groupId>org.jclouds</groupId>

View File

@ -26,19 +26,20 @@
<groupId>org.jclouds</groupId> <groupId>org.jclouds</groupId>
<artifactId>jclouds-project</artifactId> <artifactId>jclouds-project</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<relativePath>../project/pom.xml</relativePath> <relativePath>../../project/pom.xml</relativePath>
</parent> </parent>
<artifactId>jclouds-aws</artifactId> <groupId>org.jclouds.common</groupId>
<artifactId>aws-common</artifactId>
<name>jclouds Amazon AWS Components Core</name> <name>jclouds Amazon AWS Components Core</name>
<description>jclouds Core components to access Amazon AWS</description> <description>jclouds Core components to access Amazon AWS</description>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>org.jclouds</groupId>
<artifactId>jclouds-core</artifactId> <artifactId>jclouds-core</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>org.jclouds</groupId>
<artifactId>jclouds-core</artifactId> <artifactId>jclouds-core</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>test-jar</type> <type>test-jar</type>

View File

@ -28,11 +28,11 @@ import java.util.Map;
import org.jclouds.PropertiesBuilder; import org.jclouds.PropertiesBuilder;
import org.jclouds.date.TimeStamp; import org.jclouds.date.TimeStamp;
import org.jclouds.logging.config.NullLoggingModule; import org.jclouds.logging.config.NullLoggingModule;
import org.jclouds.rest.BaseRestClientTest.MockModule;
import org.jclouds.rest.RequestSigner; import org.jclouds.rest.RequestSigner;
import org.jclouds.rest.RestContextBuilder; import org.jclouds.rest.RestContextBuilder;
import org.jclouds.rest.RestContextFactory; import org.jclouds.rest.RestContextFactory;
import org.jclouds.rest.RestContextSpec; import org.jclouds.rest.RestContextSpec;
import org.jclouds.rest.BaseRestClientTest.MockModule;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@ -49,31 +49,31 @@ import com.google.inject.name.Names;
// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire // NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
@Test(groups = "unit", testName = "FormSignerTest") @Test(groups = "unit", testName = "FormSignerTest")
public class FormSignerTest { public class FormSignerTest {
@SuppressWarnings({ "unchecked", "rawtypes" }) @SuppressWarnings("unchecked")
public static final RestContextSpec<Map, List> DUMMY_SPEC = new RestContextSpec<Map, List>("provider", "endpoint", public static final RestContextSpec<Map, List> DUMMY_SPEC = new RestContextSpec<Map, List>("provider", "endpoint",
"apiVersion", "identity", "credential", Map.class, List.class, PropertiesBuilder.class, "apiVersion", "identity", "credential", Map.class, List.class, PropertiesBuilder.class,
(Class) RestContextBuilder.class, ImmutableList.<Module> of(new MockModule(), new NullLoggingModule(), (Class) RestContextBuilder.class, ImmutableList.<Module> of(new MockModule(), new NullLoggingModule(),
new AbstractModule() { new AbstractModule() {
@Override @Override
protected void configure() { protected void configure() {
bind(RequestSigner.class).to(FormSigner.class); bind(RequestSigner.class).to(FormSigner.class);
bind(String.class).annotatedWith(Names.named(PROPERTY_HEADER_TAG)).toInstance("amz"); bind(String.class).annotatedWith(Names.named(PROPERTY_HEADER_TAG)).toInstance("amz");
bind(String.class).annotatedWith(TimeStamp.class).toInstance("2009-11-08T15:54:08.897Z"); bind(String.class).annotatedWith(TimeStamp.class).toInstance("2009-11-08T15:54:08.897Z");
} }
})); }));
@Test @Test
void testBuildCanonicalizedString() { void testBuildCanonicalizedString() {
FormSigner filter = RestContextFactory.createContextBuilder(DUMMY_SPEC).buildInjector() FormSigner filter = RestContextFactory.createContextBuilder(DUMMY_SPEC).buildInjector().getInstance(
.getInstance(FormSigner.class); FormSigner.class);
assertEquals( assertEquals(
filter.buildCanonicalizedString(new ImmutableMultimap.Builder<String, String>() filter.buildCanonicalizedString(new ImmutableMultimap.Builder<String, String>().put("AWSAccessKeyId",
.put("AWSAccessKeyId", "foo").put("Action", "DescribeImages").put("Expires", "2008-02-10T12:00:00Z") "foo").put("Action", "DescribeImages").put("Expires", "2008-02-10T12:00:00Z").put("ImageId.1",
.put("ImageId.1", "ami-2bb65342").put("SignatureMethod", "HmacSHA256").put("SignatureVersion", "2") "ami-2bb65342").put("SignatureMethod", "HmacSHA256").put("SignatureVersion", "2").put(
.put("Version", "2010-06-15").build()), "Version", "2010-06-15").build()),
"AWSAccessKeyId=foo&Action=DescribeImages&Expires=2008-02-10T12%3A00%3A00Z&ImageId.1=ami-2bb65342&SignatureMethod=HmacSHA256&SignatureVersion=2&Version=2010-06-15"); "AWSAccessKeyId=foo&Action=DescribeImages&Expires=2008-02-10T12%3A00%3A00Z&ImageId.1=ami-2bb65342&SignatureMethod=HmacSHA256&SignatureVersion=2&Version=2010-06-15");
} }
} }

View File

@ -24,10 +24,10 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.jclouds</groupId> <groupId>org.jclouds</groupId>
<artifactId>jclouds-aws-demos-project</artifactId> <artifactId>demos-project</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>jclouds-aws-demo-createandlistbuckets</artifactId> <artifactId>createandlistbuckets</artifactId>
<name>jclouds S3 sample that creates a bucket then lists all owned buckets</name> <name>jclouds S3 sample that creates a bucket then lists all owned buckets</name>
<description>jclouds S3 sample that creates a bucket then lists all owned buckets</description> <description>jclouds S3 sample that creates a bucket then lists all owned buckets</description>
<dependencies> <dependencies>

View File

@ -25,10 +25,10 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.jclouds</groupId> <groupId>org.jclouds</groupId>
<artifactId>jclouds-aws-demos-project</artifactId> <artifactId>demos-project</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>jclouds-aws-demo-createlamp</artifactId> <artifactId>createlamp</artifactId>
<name>jclouds ec2 sample that creates an instance and all you need to access it</name> <name>jclouds ec2 sample that creates an instance and all you need to access it</name>
<description>jclouds ec2 sample that creates an instance and all you need to access it</description> <description>jclouds ec2 sample that creates an instance and all you need to access it</description>
<dependencies> <dependencies>

View File

@ -83,8 +83,8 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>org.jclouds.provider</groupId>
<artifactId>jclouds-aws</artifactId> <artifactId>aws-s3</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -81,8 +81,8 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>org.jclouds.provider</groupId>
<artifactId>jclouds-aws</artifactId> <artifactId>aws-s3</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -24,10 +24,10 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.jclouds</groupId> <groupId>org.jclouds</groupId>
<artifactId>jclouds-aws-demos-project</artifactId> <artifactId>demos-project</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>jclouds-aws-demo-googleappengine</artifactId> <artifactId>googleappengine</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<name>JClouds Sample for Google App Engine</name> <name>JClouds Sample for Google App Engine</name>
<description>JClouds Sample for Google App Engine</description> <description>JClouds Sample for Google App Engine</description>
@ -38,7 +38,7 @@
extraction of appengine-java-sdk extraction of appengine-java-sdk
--> -->
<appengine.home>YOUR_APPENGINE_HOME</appengine.home> <appengine.home>YOUR_APPENGINE_HOME</appengine.home>
<appengine.applicationid>jclouds-aws-demo</appengine.applicationid> <appengine.applicationid>aws-common-demo</appengine.applicationid>
<devappserver.address>localhost</devappserver.address> <devappserver.address>localhost</devappserver.address>
<devappserver.port>8088</devappserver.port> <devappserver.port>8088</devappserver.port>
</properties> </properties>

View File

@ -22,10 +22,10 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.jclouds</groupId> <groupId>org.jclouds</groupId>
<artifactId>jclouds-aws-project</artifactId> <artifactId>aws-common-project</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>jclouds-aws-perftest</artifactId> <artifactId>aws-common-perftest</artifactId>
<name>jclouds Performance test verses Amazon SDK implementation</name> <name>jclouds Performance test verses Amazon SDK implementation</name>
<description>Performance test verses Amazon SDK implementation</description> <description>Performance test verses Amazon SDK implementation</description>
<properties> <properties>
@ -77,8 +77,8 @@
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>org.jclouds.api</groupId>
<artifactId>jclouds-aws</artifactId> <artifactId>s3</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>test-jar</type> <type>test-jar</type>
<scope>test</scope> <scope>test</scope>

View File

@ -24,7 +24,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.jclouds</groupId> <groupId>org.jclouds</groupId>
<artifactId>jclouds-aws-demos-project</artifactId> <artifactId>demos-project</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>jclouds-speedtest-sqs</artifactId> <artifactId>jclouds-speedtest-sqs</artifactId>

View File

@ -35,6 +35,7 @@
<module>assemblies</module> <module>assemblies</module>
<module>archetypes</module> <module>archetypes</module>
<module>core</module> <module>core</module>
<module>common</module>
<module>compute</module> <module>compute</module>
<module>loadbalancer</module> <module>loadbalancer</module>
<module>apis</module> <module>apis</module>
@ -44,7 +45,6 @@
<module>extensions</module> <module>extensions</module>
<module>tools</module> <module>tools</module>
<module>scriptbuilder</module> <module>scriptbuilder</module>
<module>aws</module>
<module>azure</module> <module>azure</module>
<module>atmos</module> <module>atmos</module>
<module>rackspace</module> <module>rackspace</module>

View File

@ -43,8 +43,8 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.jclouds</groupId> <groupId>org.jclouds.common</groupId>
<artifactId>jclouds-aws</artifactId> <artifactId>aws-common</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -80,9 +80,9 @@ import com.google.common.util.concurrent.ListenableFuture;
/** /**
* Provides asynchronous access to Cloud Files via their REST API. * Provides asynchronous access to Cloud Files via their REST API.
* <p/> * <p/>
* All commands return a ListenableFuture of the result from Cloud Files. Any * All commands return a ListenableFuture of the result from Cloud Files. Any exceptions incurred
* exceptions incurred during processing will be wrapped in an * during processing will be wrapped in an {@link ExecutionException} as documented in
* {@link ExecutionException} as documented in {@link ListenableFuture#get()}. * {@link ListenableFuture#get()}.
* *
* @see CloudFilesClient * @see CloudFilesClient
* @see <a href="http://www.rackspacecloud.com/cf-devguide-20090812.pdf" /> * @see <a href="http://www.rackspacecloud.com/cf-devguide-20090812.pdf" />
@ -110,18 +110,15 @@ public interface CloudFilesAsyncClient {
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/") @Path("/")
ListenableFuture<? extends Set<ContainerMetadata>> listContainers( ListenableFuture<? extends Set<ContainerMetadata>> listContainers(ListContainerOptions... options);
ListContainerOptions... options);
/** /**
* @see CloudFilesClient#setObjectInfo * @see CloudFilesClient#setObjectInfo
*/ */
@POST @POST
@Path("/{container}/{name}") @Path("/{container}/{name}")
ListenableFuture<Boolean> setObjectInfo( ListenableFuture<Boolean> setObjectInfo(@PathParam("container") String container, @PathParam("name") String name,
@PathParam("container") String container, @BinderParam(BindMapToHeadersWithPrefix.class) Map<String, String> userMetadata);
@PathParam("name") String name,
@BinderParam(BindMapToHeadersWithPrefix.class) Map<String, String> userMetadata);
/** /**
* @see CloudFilesClient#listCDNContainers * @see CloudFilesClient#listCDNContainers
@ -131,8 +128,7 @@ public interface CloudFilesAsyncClient {
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/") @Path("/")
@Endpoint(CloudFilesCDN.class) @Endpoint(CloudFilesCDN.class)
ListenableFuture<? extends Set<ContainerCDNMetadata>> listCDNContainers( ListenableFuture<? extends Set<ContainerCDNMetadata>> listCDNContainers(ListCdnContainerOptions... options);
ListCdnContainerOptions... options);
// TODO: Container name is not included in CDN HEAD response headers, so we // TODO: Container name is not included in CDN HEAD response headers, so we
// cannot populate it // cannot populate it
@ -145,8 +141,7 @@ public interface CloudFilesAsyncClient {
@ExceptionParser(ThrowContainerNotFoundOn404.class) @ExceptionParser(ThrowContainerNotFoundOn404.class)
@Path("/{container}") @Path("/{container}")
@Endpoint(CloudFilesCDN.class) @Endpoint(CloudFilesCDN.class)
ListenableFuture<ContainerCDNMetadata> getCDNMetadata( ListenableFuture<ContainerCDNMetadata> getCDNMetadata(@PathParam("container") String container);
@PathParam("container") String container);
/** /**
* @see CloudFilesClient#enableCDN(String, long); * @see CloudFilesClient#enableCDN(String, long);
@ -157,7 +152,7 @@ public interface CloudFilesAsyncClient {
@ResponseParser(ParseCdnUriFromHeaders.class) @ResponseParser(ParseCdnUriFromHeaders.class)
@Endpoint(CloudFilesCDN.class) @Endpoint(CloudFilesCDN.class)
ListenableFuture<URI> enableCDN(@PathParam("container") String container, ListenableFuture<URI> enableCDN(@PathParam("container") String container,
@HeaderParam(CloudFilesHeaders.CDN_TTL) long ttl); @HeaderParam(CloudFilesHeaders.CDN_TTL) long ttl);
/** /**
* @see CloudFilesClient#enableCDN(String) * @see CloudFilesClient#enableCDN(String)
@ -177,7 +172,7 @@ public interface CloudFilesAsyncClient {
@ResponseParser(ParseCdnUriFromHeaders.class) @ResponseParser(ParseCdnUriFromHeaders.class)
@Endpoint(CloudFilesCDN.class) @Endpoint(CloudFilesCDN.class)
ListenableFuture<URI> updateCDN(@PathParam("container") String container, ListenableFuture<URI> updateCDN(@PathParam("container") String container,
@HeaderParam(CloudFilesHeaders.CDN_TTL) long ttl); @HeaderParam(CloudFilesHeaders.CDN_TTL) long ttl);
/** /**
* @see CloudFilesClient#disableCDN * @see CloudFilesClient#disableCDN
@ -193,8 +188,7 @@ public interface CloudFilesAsyncClient {
*/ */
@PUT @PUT
@Path("/{container}") @Path("/{container}")
ListenableFuture<Boolean> createContainer( ListenableFuture<Boolean> createContainer(@PathParam("container") String container);
@PathParam("container") String container);
/** /**
* @see CloudFilesClient#deleteContainerIfEmpty * @see CloudFilesClient#deleteContainerIfEmpty
@ -202,8 +196,7 @@ public interface CloudFilesAsyncClient {
@DELETE @DELETE
@ExceptionParser(ReturnTrueOn404FalseOn409.class) @ExceptionParser(ReturnTrueOn404FalseOn409.class)
@Path("/{container}") @Path("/{container}")
ListenableFuture<Boolean> deleteContainerIfEmpty( ListenableFuture<Boolean> deleteContainerIfEmpty(@PathParam("container") String container);
@PathParam("container") String container);
/** /**
* @see CloudFilesClient#listObjects * @see CloudFilesClient#listObjects
@ -212,9 +205,8 @@ public interface CloudFilesAsyncClient {
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@ResponseParser(ParseObjectInfoListFromJsonResponse.class) @ResponseParser(ParseObjectInfoListFromJsonResponse.class)
@Path("/{container}") @Path("/{container}")
ListenableFuture<PageSet<ObjectInfo>> listObjects( ListenableFuture<PageSet<ObjectInfo>> listObjects(@PathParam("container") String container,
@PathParam("container") String container, ListContainerOptions... options);
ListContainerOptions... options);
/** /**
* @see CloudFilesClient#containerExists * @see CloudFilesClient#containerExists
@ -222,8 +214,7 @@ public interface CloudFilesAsyncClient {
@HEAD @HEAD
@Path("/{container}") @Path("/{container}")
@ExceptionParser(ReturnFalseOnContainerNotFound.class) @ExceptionParser(ReturnFalseOnContainerNotFound.class)
ListenableFuture<Boolean> containerExists( ListenableFuture<Boolean> containerExists(@PathParam("container") String container);
@PathParam("container") String container);
/** /**
* @see CloudFilesClient#putObject * @see CloudFilesClient#putObject
@ -232,8 +223,8 @@ public interface CloudFilesAsyncClient {
@Path("/{container}/{name}") @Path("/{container}/{name}")
@ResponseParser(ParseETagHeader.class) @ResponseParser(ParseETagHeader.class)
ListenableFuture<String> putObject( ListenableFuture<String> putObject(
@PathParam("container") String container, @PathParam("container") String container,
@PathParam("name") @ParamParser(ObjectName.class) @BinderParam(BindCFObjectMetadataToRequest.class) CFObject object); @PathParam("name") @ParamParser(ObjectName.class) @BinderParam(BindCFObjectMetadataToRequest.class) CFObject object);
/** /**
* @see CloudFilesClient#getObject * @see CloudFilesClient#getObject
@ -242,9 +233,8 @@ public interface CloudFilesAsyncClient {
@ResponseParser(ParseObjectFromHeadersAndHttpContent.class) @ResponseParser(ParseObjectFromHeadersAndHttpContent.class)
@ExceptionParser(ReturnNullOnKeyNotFound.class) @ExceptionParser(ReturnNullOnKeyNotFound.class)
@Path("/{container}/{name}") @Path("/{container}/{name}")
ListenableFuture<CFObject> getObject( ListenableFuture<CFObject> getObject(@PathParam("container") String container, @PathParam("name") String name,
@PathParam("container") String container, GetOptions... options);
@PathParam("name") String name, GetOptions... options);
/** /**
* @see CloudFilesClient#getObjectInfo * @see CloudFilesClient#getObjectInfo
@ -253,9 +243,8 @@ public interface CloudFilesAsyncClient {
@ResponseParser(ParseObjectInfoFromHeaders.class) @ResponseParser(ParseObjectInfoFromHeaders.class)
@ExceptionParser(ReturnNullOnKeyNotFound.class) @ExceptionParser(ReturnNullOnKeyNotFound.class)
@Path("/{container}/{name}") @Path("/{container}/{name}")
ListenableFuture<MutableObjectInfoWithMetadata> getObjectInfo( ListenableFuture<MutableObjectInfoWithMetadata> getObjectInfo(@PathParam("container") String container,
@PathParam("container") String container, @PathParam("name") String name);
@PathParam("name") String name);
/** /**
* @see CloudFilesClient#objectExists * @see CloudFilesClient#objectExists
@ -263,9 +252,7 @@ public interface CloudFilesAsyncClient {
@HEAD @HEAD
@ExceptionParser(ReturnFalseOnKeyNotFound.class) @ExceptionParser(ReturnFalseOnKeyNotFound.class)
@Path("/{container}/{name}") @Path("/{container}/{name}")
ListenableFuture<Boolean> objectExists( ListenableFuture<Boolean> objectExists(@PathParam("container") String container, @PathParam("name") String name);
@PathParam("container") String container,
@PathParam("name") String name);
/** /**
* @see CloudFilesClient#removeObject * @see CloudFilesClient#removeObject
@ -273,8 +260,6 @@ public interface CloudFilesAsyncClient {
@DELETE @DELETE
@ExceptionParser(ReturnVoidOnNotFoundOr404.class) @ExceptionParser(ReturnVoidOnNotFoundOr404.class)
@Path("/{container}/{name}") @Path("/{container}/{name}")
ListenableFuture<Void> removeObject( ListenableFuture<Void> removeObject(@PathParam("container") String container, @PathParam("name") String name);
@PathParam("container") String container,
@PathParam("name") String name);
} }

View File

@ -75,8 +75,8 @@
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>org.jclouds.provider</groupId>
<artifactId>jclouds-aws</artifactId> <artifactId>aws-s3</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>