Issue 440: moved atmos to api groupId

This commit is contained in:
Adrian Cole 2011-01-16 13:45:11 -08:00
parent 04aa3f6f94
commit de17424871
90 changed files with 518 additions and 555 deletions

View File

@ -42,7 +42,7 @@ our compute api supports: aws-ec2, gogrid, cloudservers (generic), cloudservers-
to all of these providers to all of these providers
our blobstore api supports: aws-s3, cloudfiles (generic), cloudfiles-us, cloudfiles-uk, our blobstore api supports: aws-s3, cloudfiles (generic), cloudfiles-us, cloudfiles-uk,
azurestorage, atmosonline (generic), synaptic, peer1-storage, azurestorage, atmos (generic), atmosonline, synaptic, peer1-storage,
s3 (generic), walrus(generic), googlestorage, scaleup-storage, s3 (generic), walrus(generic), googlestorage, scaleup-storage,
ecc-s3, swift (generic), transient (in-mem), ecc-s3, swift (generic), transient (in-mem),
filesystem (on-disk) filesystem (on-disk)

View File

@ -65,8 +65,8 @@
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>org.jclouds.api</groupId>
<artifactId>jclouds-atmos</artifactId> <artifactId>atmos</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -23,43 +23,36 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<artifactId>jclouds-project</artifactId>
<groupId>org.jclouds</groupId> <groupId>org.jclouds</groupId>
<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-atmos</artifactId> <groupId>org.jclouds.api</groupId>
<name>jclouds atmosonline components</name> <artifactId>atmos</artifactId>
<name>jclouds atmos components</name>
<properties> <properties>
<test.initializer>org.jclouds.atmosonline.saas.blobstore.integration.AtmosStorageTestInitializer</test.initializer> <test.initializer>org.jclouds.atmos.blobstore.integration.AtmosStorageTestInitializer</test.initializer>
<test.atmosonline.endpoint>https://accesspoint.atmosonline.com</test.atmosonline.endpoint> <test.atmos.endpoint>https://accesspoint.atmos.com</test.atmos.endpoint>
<test.atmosonline.apiversion>1.3.0</test.atmosonline.apiversion> <test.atmos.apiversion>1.3.0</test.atmos.apiversion>
<test.atmosonline.identity>FIXME</test.atmosonline.identity> <test.atmos.identity>FIXME</test.atmos.identity>
<test.atmosonline.credential>FIXME</test.atmosonline.credential> <test.atmos.credential>FIXME</test.atmos.credential>
<test.peer1-storage.endpoint>https://cloudonestorage.peer1.com</test.peer1-storage.endpoint>
<test.peer1-storage.apiversion>1.3.0</test.peer1-storage.apiversion>
<test.peer1-storage.identity>FIXME</test.peer1-storage.identity>
<test.peer1-storage.credential>FIXME</test.peer1-storage.credential>
<test.synaptic.endpoint>https://storage.synaptic.att.com</test.synaptic.endpoint>
<test.synaptic.apiversion>1.3.0</test.synaptic.apiversion>
<test.synaptic.identity>FIXME</test.synaptic.identity>
<test.synaptic.credential>FIXME</test.synaptic.credential>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>org.jclouds</groupId>
<artifactId>jclouds-blobstore</artifactId> <artifactId>jclouds-blobstore</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>org.jclouds</groupId>
<artifactId>jclouds-blobstore</artifactId> <artifactId>jclouds-blobstore</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>test-jar</type> <type>test-jar</type>
<scope>test</scope> <scope>test</scope>
</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>
@ -96,52 +89,20 @@
<configuration> <configuration>
<systemProperties> <systemProperties>
<property> <property>
<name>test.atmosonline.endpoint</name> <name>test.atmos.endpoint</name>
<value>${test.atmosonline.endpoint}</value> <value>${test.atmos.endpoint}</value>
</property> </property>
<property> <property>
<name>test.atmosonline.apiversion</name> <name>test.atmos.apiversion</name>
<value>${test.atmosonline.apiversion}</value> <value>${test.atmos.apiversion}</value>
</property> </property>
<property> <property>
<name>test.atmosonline.identity</name> <name>test.atmos.identity</name>
<value>${test.atmosonline.identity}</value> <value>${test.atmos.identity}</value>
</property> </property>
<property> <property>
<name>test.atmosonline.credential</name> <name>test.atmos.credential</name>
<value>${test.atmosonline.credential}</value> <value>${test.atmos.credential}</value>
</property>
<property>
<name>test.peer1-storage.endpoint</name>
<value>${test.peer1-storage.endpoint}</value>
</property>
<property>
<name>test.peer1-storage.apiversion</name>
<value>${test.peer1-storage.apiversion}</value>
</property>
<property>
<name>test.peer1-storage.identity</name>
<value>${test.peer1-storage.identity}</value>
</property>
<property>
<name>test.peer1-storage.credential</name>
<value>${test.peer1-storage.credential}</value>
</property>
<property>
<name>test.synaptic.endpoint</name>
<value>${test.synaptic.endpoint}</value>
</property>
<property>
<name>test.synaptic.apiversion</name>
<value>${test.synaptic.apiversion}</value>
</property>
<property>
<name>test.synaptic.identity</name>
<value>${test.synaptic.identity}</value>
</property>
<property>
<name>test.synaptic.credential</name>
<value>${test.synaptic.credential}</value>
</property> </property>
<property> <property>
<name>test.initializer</name> <name>test.initializer</name>

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas; package org.jclouds.atmos;
import java.net.URI; import java.net.URI;
@ -32,19 +32,19 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces; import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import org.jclouds.atmosonline.saas.binders.BindMetadataToHeaders; import org.jclouds.atmos.binders.BindMetadataToHeaders;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.atmosonline.saas.domain.BoundedSet; import org.jclouds.atmos.domain.BoundedSet;
import org.jclouds.atmosonline.saas.domain.DirectoryEntry; import org.jclouds.atmos.domain.DirectoryEntry;
import org.jclouds.atmosonline.saas.domain.SystemMetadata; import org.jclouds.atmos.domain.SystemMetadata;
import org.jclouds.atmosonline.saas.domain.UserMetadata; import org.jclouds.atmos.domain.UserMetadata;
import org.jclouds.atmosonline.saas.filters.SignRequest; import org.jclouds.atmos.filters.SignRequest;
import org.jclouds.atmosonline.saas.functions.AtmosObjectName; import org.jclouds.atmos.functions.AtmosObjectName;
import org.jclouds.atmosonline.saas.functions.ParseDirectoryListFromContentAndHeaders; import org.jclouds.atmos.functions.ParseDirectoryListFromContentAndHeaders;
import org.jclouds.atmosonline.saas.functions.ParseObjectFromHeadersAndHttpContent; import org.jclouds.atmos.functions.ParseObjectFromHeadersAndHttpContent;
import org.jclouds.atmosonline.saas.functions.ParseSystemMetadataFromHeaders; import org.jclouds.atmos.functions.ParseSystemMetadataFromHeaders;
import org.jclouds.atmosonline.saas.functions.ReturnEndpointIfAlreadyExists; import org.jclouds.atmos.functions.ReturnEndpointIfAlreadyExists;
import org.jclouds.atmosonline.saas.options.ListOptions; import org.jclouds.atmos.options.ListOptions;
import org.jclouds.blobstore.functions.ThrowContainerNotFoundOn404; import org.jclouds.blobstore.functions.ThrowContainerNotFoundOn404;
import org.jclouds.blobstore.functions.ThrowKeyNotFoundOn404; import org.jclouds.blobstore.functions.ThrowKeyNotFoundOn404;
import org.jclouds.http.options.GetOptions; import org.jclouds.http.options.GetOptions;
@ -65,21 +65,21 @@ import com.google.common.util.concurrent.ListenableFuture;
* Provides asynchronous access to EMC Atmos Online Storage resources via their REST API. * Provides asynchronous access to EMC Atmos Online Storage resources via their REST API.
* <p/> * <p/>
* *
* @see AtmosStorageClient * @see AtmosClient
* @see <a href="https://community.emc.com/community/labs/atmos_online" /> * @see <a href="https://community.emc.com/community/labs/atmos_online" />
* @author Adrian Cole * @author Adrian Cole
*/ */
@RequestFilters(SignRequest.class) @RequestFilters(SignRequest.class)
@SkipEncoding('/') @SkipEncoding('/')
@Path("/rest/namespace") @Path("/rest/namespace")
public interface AtmosStorageAsyncClient { public interface AtmosAsyncClient {
/** /**
* Creates a default implementation of AtmosObject * Creates a default implementation of AtmosObject
*/ */
AtmosObject newObject(); AtmosObject newObject();
/** /**
* @see AtmosStorageClient#listDirectories * @see AtmosClient#listDirectories
*/ */
@GET @GET
@ResponseParser(ParseDirectoryListFromContentAndHeaders.class) @ResponseParser(ParseDirectoryListFromContentAndHeaders.class)
@ -87,7 +87,7 @@ public interface AtmosStorageAsyncClient {
ListenableFuture<BoundedSet<? extends DirectoryEntry>> listDirectories(ListOptions... options); ListenableFuture<BoundedSet<? extends DirectoryEntry>> listDirectories(ListOptions... options);
/** /**
* @see AtmosStorageClient#listDirectory * @see AtmosClient#listDirectory
*/ */
@GET @GET
@Path("/{directoryName}/") @Path("/{directoryName}/")
@ -98,7 +98,7 @@ public interface AtmosStorageAsyncClient {
@PathParam("directoryName") String directoryName, ListOptions... options); @PathParam("directoryName") String directoryName, ListOptions... options);
/** /**
* @see AtmosStorageClient#createDirectory * @see AtmosClient#createDirectory
*/ */
@POST @POST
@Path("/{directoryName}/") @Path("/{directoryName}/")
@ -108,7 +108,7 @@ public interface AtmosStorageAsyncClient {
ListenableFuture<URI> createDirectory(@PathParam("directoryName") String directoryName); ListenableFuture<URI> createDirectory(@PathParam("directoryName") String directoryName);
/** /**
* @see AtmosStorageClient#createFile * @see AtmosClient#createFile
*/ */
@POST @POST
@Path("/{parent}/{name}") @Path("/{parent}/{name}")
@ -118,7 +118,7 @@ public interface AtmosStorageAsyncClient {
@PathParam("name") @ParamParser(AtmosObjectName.class) @BinderParam(BindMetadataToHeaders.class) AtmosObject object); @PathParam("name") @ParamParser(AtmosObjectName.class) @BinderParam(BindMetadataToHeaders.class) AtmosObject object);
/** /**
* @see AtmosStorageClient#updateFile * @see AtmosClient#updateFile
*/ */
@PUT @PUT
@Path("/{parent}/{name}") @Path("/{parent}/{name}")
@ -129,7 +129,7 @@ public interface AtmosStorageAsyncClient {
@PathParam("name") @ParamParser(AtmosObjectName.class) @BinderParam(BindMetadataToHeaders.class) AtmosObject object); @PathParam("name") @ParamParser(AtmosObjectName.class) @BinderParam(BindMetadataToHeaders.class) AtmosObject object);
/** /**
* @see AtmosStorageClient#readFile * @see AtmosClient#readFile
*/ */
@GET @GET
@ResponseParser(ParseObjectFromHeadersAndHttpContent.class) @ResponseParser(ParseObjectFromHeadersAndHttpContent.class)
@ -139,7 +139,7 @@ public interface AtmosStorageAsyncClient {
ListenableFuture<AtmosObject> readFile(@PathParam("path") String path, GetOptions... options); ListenableFuture<AtmosObject> readFile(@PathParam("path") String path, GetOptions... options);
/** /**
* @see AtmosStorageClient#headFile * @see AtmosClient#headFile
*/ */
@HEAD @HEAD
@ResponseParser(ParseObjectFromHeadersAndHttpContent.class) @ResponseParser(ParseObjectFromHeadersAndHttpContent.class)
@ -149,7 +149,7 @@ public interface AtmosStorageAsyncClient {
ListenableFuture<AtmosObject> headFile(@PathParam("path") String path); ListenableFuture<AtmosObject> headFile(@PathParam("path") String path);
/** /**
* @see AtmosStorageClient#getSystemMetadata * @see AtmosClient#getSystemMetadata
*/ */
@HEAD @HEAD
@ResponseParser(ParseSystemMetadataFromHeaders.class) @ResponseParser(ParseSystemMetadataFromHeaders.class)
@ -160,7 +160,7 @@ public interface AtmosStorageAsyncClient {
ListenableFuture<SystemMetadata> getSystemMetadata(@PathParam("path") String path); ListenableFuture<SystemMetadata> getSystemMetadata(@PathParam("path") String path);
/** /**
* @see AtmosStorageClient#getUserMetadata * @see AtmosClient#getUserMetadata
*/ */
@HEAD @HEAD
@ResponseParser(ParseSystemMetadataFromHeaders.class) @ResponseParser(ParseSystemMetadataFromHeaders.class)
@ -171,7 +171,7 @@ public interface AtmosStorageAsyncClient {
ListenableFuture<UserMetadata> getUserMetadata(@PathParam("path") String path); ListenableFuture<UserMetadata> getUserMetadata(@PathParam("path") String path);
/** /**
* @see AtmosStorageClient#deletePath * @see AtmosClient#deletePath
*/ */
@DELETE @DELETE
@ExceptionParser(ReturnVoidOnNotFoundOr404.class) @ExceptionParser(ReturnVoidOnNotFoundOr404.class)
@ -180,7 +180,7 @@ public interface AtmosStorageAsyncClient {
ListenableFuture<Void> deletePath(@PathParam("path") String path); ListenableFuture<Void> deletePath(@PathParam("path") String path);
/** /**
* @see AtmosStorageClient#pathExists * @see AtmosClient#pathExists
*/ */
@HEAD @HEAD
@ExceptionParser(ReturnFalseOnNotFoundOr404.class) @ExceptionParser(ReturnFalseOnNotFoundOr404.class)

View File

@ -17,17 +17,17 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas; package org.jclouds.atmos;
import java.net.URI; import java.net.URI;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.atmosonline.saas.domain.BoundedSet; import org.jclouds.atmos.domain.BoundedSet;
import org.jclouds.atmosonline.saas.domain.DirectoryEntry; import org.jclouds.atmos.domain.DirectoryEntry;
import org.jclouds.atmosonline.saas.domain.SystemMetadata; import org.jclouds.atmos.domain.SystemMetadata;
import org.jclouds.atmosonline.saas.domain.UserMetadata; import org.jclouds.atmos.domain.UserMetadata;
import org.jclouds.atmosonline.saas.options.ListOptions; import org.jclouds.atmos.options.ListOptions;
import org.jclouds.concurrent.Timeout; import org.jclouds.concurrent.Timeout;
import org.jclouds.http.options.GetOptions; import org.jclouds.http.options.GetOptions;
@ -35,12 +35,12 @@ import org.jclouds.http.options.GetOptions;
* Provides access to EMC Atmos Online Storage resources via their REST API. * Provides access to EMC Atmos Online Storage resources via their REST API.
* <p/> * <p/>
* *
* @see AtmosStorageAsyncClient * @see AtmosAsyncClient
* @see <a href="https://community.emc.com/community/labs/atmos_online" /> * @see <a href="https://community.emc.com/community/labs/atmos_online" />
* @author Adrian Cole * @author Adrian Cole
*/ */
@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) @Timeout(duration = 300, timeUnit = TimeUnit.SECONDS)
public interface AtmosStorageClient { public interface AtmosClient {
/** /**
* Creates a default implementation of AtmosObject * Creates a default implementation of AtmosObject
*/ */

View File

@ -17,13 +17,13 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas; package org.jclouds.atmos;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import org.jclouds.atmosonline.saas.blobstore.config.AtmosBlobStoreContextModule; import org.jclouds.atmos.blobstore.config.AtmosBlobStoreContextModule;
import org.jclouds.atmosonline.saas.config.AtmosStorageRestClientModule; import org.jclouds.atmos.config.AtmosRestClientModule;
import org.jclouds.blobstore.BlobStoreContextBuilder; import org.jclouds.blobstore.BlobStoreContextBuilder;
import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule; import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule;
import org.jclouds.logging.jdk.config.JDKLoggingModule; import org.jclouds.logging.jdk.config.JDKLoggingModule;
@ -44,11 +44,11 @@ import com.google.inject.Module;
* @author Adrian Cole, Andrew Newdigate * @author Adrian Cole, Andrew Newdigate
* @see AtmosBlobStoreContext * @see AtmosBlobStoreContext
*/ */
public class AtmosStorageContextBuilder extends public class AtmosContextBuilder extends
BlobStoreContextBuilder<AtmosStorageClient, AtmosStorageAsyncClient> { BlobStoreContextBuilder<AtmosClient, AtmosAsyncClient> {
public AtmosStorageContextBuilder(Properties props) { public AtmosContextBuilder(Properties props) {
super(AtmosStorageClient.class, AtmosStorageAsyncClient.class, props); super(AtmosClient.class, AtmosAsyncClient.class, props);
} }
@Override @Override
@ -58,6 +58,6 @@ public class AtmosStorageContextBuilder extends
@Override @Override
protected void addClientModule(List<Module> modules) { protected void addClientModule(List<Module> modules) {
modules.add(new AtmosStorageRestClientModule()); modules.add(new AtmosRestClientModule());
} }
} }

View File

@ -17,10 +17,10 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas; package org.jclouds.atmos;
import org.jclouds.atmosonline.saas.domain.AtmosStorageError; import org.jclouds.atmos.domain.AtmosError;
import org.jclouds.atmosonline.saas.handlers.ParseAtmosStorageErrorFromXmlContent; import org.jclouds.atmos.handlers.ParseAtmosErrorFromXmlContent;
import org.jclouds.http.HttpCommand; import org.jclouds.http.HttpCommand;
import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponse;
import org.jclouds.http.HttpResponseException; import org.jclouds.http.HttpResponseException;
@ -28,52 +28,52 @@ import org.jclouds.http.HttpResponseException;
/** /**
* Encapsulates an Error from Atmos Storage Services. * Encapsulates an Error from Atmos Storage Services.
* *
* @see AtmosStorageError * @see AtmosError
* @see ParseAtmosStorageErrorFromXmlContent * @see ParseAtmosErrorFromXmlContent
* @author Adrian Cole * @author Adrian Cole
* *
*/ */
public class AtmosStorageResponseException extends HttpResponseException { public class AtmosResponseException extends HttpResponseException {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private AtmosStorageError error; private AtmosError error;
public AtmosStorageResponseException(HttpCommand command, HttpResponse response, public AtmosResponseException(HttpCommand command, HttpResponse response,
AtmosStorageError error) { AtmosError error) {
super(String.format("command %s failed with code %s, error: %s", command.getCurrentRequest() super(String.format("command %s failed with code %s, error: %s", command.getCurrentRequest()
.getRequestLine(), response.getStatusCode(), error.toString()), command, response); .getRequestLine(), response.getStatusCode(), error.toString()), command, response);
this.setError(error); this.setError(error);
} }
public AtmosStorageResponseException(HttpCommand command, HttpResponse response, public AtmosResponseException(HttpCommand command, HttpResponse response,
AtmosStorageError error, Throwable cause) { AtmosError error, Throwable cause) {
super(String.format("command %1$s failed with error: %2$s", command.getCurrentRequest() super(String.format("command %1$s failed with error: %2$s", command.getCurrentRequest()
.getRequestLine(), error.toString()), command, response, cause); .getRequestLine(), error.toString()), command, response, cause);
this.setError(error); this.setError(error);
} }
public AtmosStorageResponseException(String message, HttpCommand command, HttpResponse response, public AtmosResponseException(String message, HttpCommand command, HttpResponse response,
AtmosStorageError error) { AtmosError error) {
super(message, command, response); super(message, command, response);
this.setError(error); this.setError(error);
} }
public AtmosStorageResponseException(String message, HttpCommand command, HttpResponse response, public AtmosResponseException(String message, HttpCommand command, HttpResponse response,
AtmosStorageError error, Throwable cause) { AtmosError error, Throwable cause) {
super(message, command, response, cause); super(message, command, response, cause);
this.setError(error); this.setError(error);
} }
public void setError(AtmosStorageError error) { public void setError(AtmosError error) {
this.error = error; this.error = error;
} }
public AtmosStorageError getError() { public AtmosError getError() {
return error; return error;
} }

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.binders; package org.jclouds.atmos.binders;
import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
@ -25,7 +25,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
import org.jclouds.rest.Binder; import org.jclouds.rest.Binder;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.binders; package org.jclouds.atmos.binders;
import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
@ -26,7 +26,7 @@ import java.util.Map;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.domain.UserMetadata; import org.jclouds.atmos.domain.UserMetadata;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
import org.jclouds.http.utils.ModifyRequest; import org.jclouds.http.utils.ModifyRequest;
import org.jclouds.rest.Binder; import org.jclouds.rest.Binder;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore; package org.jclouds.atmos.blobstore;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
@ -32,18 +32,18 @@ import javax.inject.Provider;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.Constants; import org.jclouds.Constants;
import org.jclouds.atmosonline.saas.AtmosStorageAsyncClient; import org.jclouds.atmos.AtmosAsyncClient;
import org.jclouds.atmosonline.saas.AtmosStorageClient; import org.jclouds.atmos.AtmosClient;
import org.jclouds.atmosonline.saas.blobstore.functions.BlobStoreListOptionsToListOptions; import org.jclouds.atmos.blobstore.functions.BlobStoreListOptionsToListOptions;
import org.jclouds.atmosonline.saas.blobstore.functions.BlobToObject; import org.jclouds.atmos.blobstore.functions.BlobToObject;
import org.jclouds.atmosonline.saas.blobstore.functions.DirectoryEntryListToResourceMetadataList; import org.jclouds.atmos.blobstore.functions.DirectoryEntryListToResourceMetadataList;
import org.jclouds.atmosonline.saas.blobstore.functions.ObjectToBlob; import org.jclouds.atmos.blobstore.functions.ObjectToBlob;
import org.jclouds.atmosonline.saas.blobstore.functions.ObjectToBlobMetadata; import org.jclouds.atmos.blobstore.functions.ObjectToBlobMetadata;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.atmosonline.saas.domain.BoundedSet; import org.jclouds.atmos.domain.BoundedSet;
import org.jclouds.atmosonline.saas.domain.DirectoryEntry; import org.jclouds.atmos.domain.DirectoryEntry;
import org.jclouds.atmosonline.saas.options.ListOptions; import org.jclouds.atmos.options.ListOptions;
import org.jclouds.atmosonline.saas.util.AtmosStorageUtils; import org.jclouds.atmos.util.AtmosUtils;
import org.jclouds.blobstore.BlobStoreContext; import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.BlobMetadata;
@ -68,8 +68,8 @@ import com.google.common.util.concurrent.ListenableFuture;
*/ */
@Singleton @Singleton
public class AtmosAsyncBlobStore extends BaseAsyncBlobStore { public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
private final AtmosStorageAsyncClient async; private final AtmosAsyncClient async;
private final AtmosStorageClient sync; private final AtmosClient sync;
private final ObjectToBlob object2Blob; private final ObjectToBlob object2Blob;
private final ObjectToBlobMetadata object2BlobMd; private final ObjectToBlobMetadata object2BlobMd;
private final BlobToObject blob2Object; private final BlobToObject blob2Object;
@ -82,8 +82,8 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
@Inject @Inject
AtmosAsyncBlobStore(BlobStoreContext context, BlobUtils blobUtils, AtmosAsyncBlobStore(BlobStoreContext context, BlobUtils blobUtils,
@Named(Constants.PROPERTY_USER_THREADS) ExecutorService service, Supplier<Location> defaultLocation, @Named(Constants.PROPERTY_USER_THREADS) ExecutorService service, Supplier<Location> defaultLocation,
@Memoized Supplier<Set<? extends Location>> locations, AtmosStorageAsyncClient async, @Memoized Supplier<Set<? extends Location>> locations, AtmosAsyncClient async,
AtmosStorageClient sync, ObjectToBlob object2Blob, ObjectToBlobMetadata object2BlobMd, AtmosClient sync, ObjectToBlob object2Blob, ObjectToBlobMetadata object2BlobMd,
BlobToObject blob2Object, BlobStoreListOptionsToListOptions container2ContainerListOptions, BlobToObject blob2Object, BlobStoreListOptionsToListOptions container2ContainerListOptions,
DirectoryEntryListToResourceMetadataList container2ResourceList, Crypto crypto, DirectoryEntryListToResourceMetadataList container2ResourceList, Crypto crypto,
BlobToHttpGetOptions blob2ObjectGetOptions, Provider<FetchBlobMetadata> fetchBlobMetadataProvider) { BlobToHttpGetOptions blob2ObjectGetOptions, Provider<FetchBlobMetadata> fetchBlobMetadataProvider) {
@ -102,7 +102,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageAsyncClient#headFile} * This implementation invokes {@link AtmosAsyncClient#headFile}
*/ */
@Override @Override
public ListenableFuture<BlobMetadata> blobMetadata(String container, String key) { public ListenableFuture<BlobMetadata> blobMetadata(String container, String key) {
@ -115,7 +115,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageAsyncClient#createDirectory} * This implementation invokes {@link AtmosAsyncClient#createDirectory}
* <p/> * <p/>
* Note location is ignored * Note location is ignored
*/ */
@ -131,7 +131,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageAsyncClient#createDirectory} * This implementation invokes {@link AtmosAsyncClient#createDirectory}
*/ */
@Override @Override
public ListenableFuture<Void> createDirectory(String container, String directory) { public ListenableFuture<Void> createDirectory(String container, String directory) {
@ -145,8 +145,8 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageAsyncClient#deletePath} followed by * This implementation invokes {@link AtmosAsyncClient#deletePath} followed by
* {@link AtmosStorageAsyncClient#pathExists} until it is true. * {@link AtmosAsyncClient#pathExists} until it is true.
*/ */
protected boolean deleteAndVerifyContainerGone(final String container) { protected boolean deleteAndVerifyContainerGone(final String container) {
sync.deletePath(container + "/"); sync.deletePath(container + "/");
@ -154,7 +154,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageAsyncClient#pathExists} * This implementation invokes {@link AtmosAsyncClient#pathExists}
*/ */
@Override @Override
public ListenableFuture<Boolean> containerExists(String container) { public ListenableFuture<Boolean> containerExists(String container) {
@ -162,7 +162,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageAsyncClient#pathExists} * This implementation invokes {@link AtmosAsyncClient#pathExists}
*/ */
@Override @Override
public ListenableFuture<Boolean> directoryExists(String container, String directory) { public ListenableFuture<Boolean> directoryExists(String container, String directory) {
@ -178,7 +178,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageAsyncClient#pathExists} * This implementation invokes {@link AtmosAsyncClient#pathExists}
* *
* @param container * @param container
* container * container
@ -191,7 +191,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageAsyncClient#readFile} * This implementation invokes {@link AtmosAsyncClient#readFile}
*/ */
@Override @Override
public ListenableFuture<Blob> getBlob(String container, String key, org.jclouds.blobstore.options.GetOptions options) { public ListenableFuture<Blob> getBlob(String container, String key, org.jclouds.blobstore.options.GetOptions options) {
@ -201,7 +201,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageAsyncClient#listDirectories} * This implementation invokes {@link AtmosAsyncClient#listDirectories}
*/ */
@Override @Override
public ListenableFuture<PageSet<? extends StorageMetadata>> list() { public ListenableFuture<PageSet<? extends StorageMetadata>> list() {
@ -209,12 +209,12 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageAsyncClient#listDirectory} * This implementation invokes {@link AtmosAsyncClient#listDirectory}
*/ */
@Override @Override
public ListenableFuture<PageSet<? extends StorageMetadata>> list(String container, public ListenableFuture<PageSet<? extends StorageMetadata>> list(String container,
org.jclouds.blobstore.options.ListContainerOptions options) { org.jclouds.blobstore.options.ListContainerOptions options) {
container = AtmosStorageUtils.adjustContainerIfDirOptionPresent(container, options); container = AtmosUtils.adjustContainerIfDirOptionPresent(container, options);
ListOptions nativeOptions = container2ContainerListOptions.apply(options); ListOptions nativeOptions = container2ContainerListOptions.apply(options);
ListenableFuture<BoundedSet<? extends DirectoryEntry>> returnVal = async.listDirectory(container, nativeOptions); ListenableFuture<BoundedSet<? extends DirectoryEntry>> returnVal = async.listDirectory(container, nativeOptions);
ListenableFuture<PageSet<? extends StorageMetadata>> list = Futures.compose(returnVal, container2ResourceList, ListenableFuture<PageSet<? extends StorageMetadata>> list = Futures.compose(returnVal, container2ResourceList,
@ -224,7 +224,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageAsyncClient#createFile} * This implementation invokes {@link AtmosAsyncClient#createFile}
* <p/> * <p/>
* Since there is no etag support in atmos, we just return the path. * Since there is no etag support in atmos, we just return the path.
*/ */
@ -234,7 +234,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
@Override @Override
public String call() throws Exception { public String call() throws Exception {
return AtmosStorageUtils.putBlob(sync, crypto, blob2Object, container, blob); return AtmosUtils.putBlob(sync, crypto, blob2Object, container, blob);
} }
@ -243,7 +243,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageAsyncClient#deletePath} * This implementation invokes {@link AtmosAsyncClient#deletePath}
*/ */
@Override @Override
public ListenableFuture<Void> removeBlob(String container, String key) { public ListenableFuture<Void> removeBlob(String container, String key) {

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore; package org.jclouds.atmos.blobstore;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.blobstore.util.BlobStoreUtils.cleanRequest; import static org.jclouds.blobstore.util.BlobStoreUtils.cleanRequest;
@ -27,9 +27,9 @@ import java.lang.reflect.Method;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.AtmosStorageAsyncClient; import org.jclouds.atmos.AtmosAsyncClient;
import org.jclouds.atmosonline.saas.blobstore.functions.BlobToObject; import org.jclouds.atmos.blobstore.functions.BlobToObject;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.blobstore.BlobRequestSigner; import org.jclouds.blobstore.BlobRequestSigner;
import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.domain.Blob;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
@ -42,20 +42,20 @@ import org.jclouds.rest.internal.RestAnnotationProcessor;
*/ */
@Singleton @Singleton
public class AtmosBlobRequestSigner implements BlobRequestSigner { public class AtmosBlobRequestSigner implements BlobRequestSigner {
private final RestAnnotationProcessor<AtmosStorageAsyncClient> processor; private final RestAnnotationProcessor<AtmosAsyncClient> processor;
private final BlobToObject blobToObject; private final BlobToObject blobToObject;
private final Method getMethod; private final Method getMethod;
private final Method deleteMethod; private final Method deleteMethod;
private final Method createMethod; private final Method createMethod;
@Inject @Inject
public AtmosBlobRequestSigner(RestAnnotationProcessor<AtmosStorageAsyncClient> processor, BlobToObject blobToObject) public AtmosBlobRequestSigner(RestAnnotationProcessor<AtmosAsyncClient> processor, BlobToObject blobToObject)
throws SecurityException, NoSuchMethodException { throws SecurityException, NoSuchMethodException {
this.processor = checkNotNull(processor, "processor"); this.processor = checkNotNull(processor, "processor");
this.blobToObject = checkNotNull(blobToObject, "blobToObject"); this.blobToObject = checkNotNull(blobToObject, "blobToObject");
this.getMethod = AtmosStorageAsyncClient.class.getMethod("readFile", String.class, GetOptions[].class); this.getMethod = AtmosAsyncClient.class.getMethod("readFile", String.class, GetOptions[].class);
this.deleteMethod = AtmosStorageAsyncClient.class.getMethod("deletePath", String.class); this.deleteMethod = AtmosAsyncClient.class.getMethod("deletePath", String.class);
this.createMethod = AtmosStorageAsyncClient.class.getMethod("createFile", String.class, AtmosObject.class); this.createMethod = AtmosAsyncClient.class.getMethod("createFile", String.class, AtmosObject.class);
} }

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore; package org.jclouds.atmos.blobstore;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
@ -27,15 +27,15 @@ import javax.inject.Inject;
import javax.inject.Provider; import javax.inject.Provider;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.AtmosStorageAsyncClient; import org.jclouds.atmos.AtmosAsyncClient;
import org.jclouds.atmosonline.saas.AtmosStorageClient; import org.jclouds.atmos.AtmosClient;
import org.jclouds.atmosonline.saas.blobstore.functions.BlobStoreListOptionsToListOptions; import org.jclouds.atmos.blobstore.functions.BlobStoreListOptionsToListOptions;
import org.jclouds.atmosonline.saas.blobstore.functions.BlobToObject; import org.jclouds.atmos.blobstore.functions.BlobToObject;
import org.jclouds.atmosonline.saas.blobstore.functions.DirectoryEntryListToResourceMetadataList; import org.jclouds.atmos.blobstore.functions.DirectoryEntryListToResourceMetadataList;
import org.jclouds.atmosonline.saas.blobstore.functions.ObjectToBlob; import org.jclouds.atmos.blobstore.functions.ObjectToBlob;
import org.jclouds.atmosonline.saas.blobstore.functions.ObjectToBlobMetadata; import org.jclouds.atmos.blobstore.functions.ObjectToBlobMetadata;
import org.jclouds.atmosonline.saas.options.ListOptions; import org.jclouds.atmos.options.ListOptions;
import org.jclouds.atmosonline.saas.util.AtmosStorageUtils; import org.jclouds.atmos.util.AtmosUtils;
import org.jclouds.blobstore.BlobStoreContext; import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.BlobMetadata;
@ -57,7 +57,7 @@ import com.google.common.base.Supplier;
*/ */
@Singleton @Singleton
public class AtmosBlobStore extends BaseBlobStore { public class AtmosBlobStore extends BaseBlobStore {
private final AtmosStorageClient sync; private final AtmosClient sync;
private final ObjectToBlob object2Blob; private final ObjectToBlob object2Blob;
private final ObjectToBlobMetadata object2BlobMd; private final ObjectToBlobMetadata object2BlobMd;
private final BlobToObject blob2Object; private final BlobToObject blob2Object;
@ -69,7 +69,7 @@ public class AtmosBlobStore extends BaseBlobStore {
@Inject @Inject
AtmosBlobStore(BlobStoreContext context, BlobUtils blobUtils, Supplier<Location> defaultLocation, AtmosBlobStore(BlobStoreContext context, BlobUtils blobUtils, Supplier<Location> defaultLocation,
@Memoized Supplier<Set<? extends Location>> locations, AtmosStorageClient sync, ObjectToBlob object2Blob, @Memoized Supplier<Set<? extends Location>> locations, AtmosClient sync, ObjectToBlob object2Blob,
ObjectToBlobMetadata object2BlobMd, BlobToObject blob2Object, ObjectToBlobMetadata object2BlobMd, BlobToObject blob2Object,
BlobStoreListOptionsToListOptions container2ContainerListOptions, BlobStoreListOptionsToListOptions container2ContainerListOptions,
DirectoryEntryListToResourceMetadataList container2ResourceList, Crypto crypto, DirectoryEntryListToResourceMetadataList container2ResourceList, Crypto crypto,
@ -88,7 +88,7 @@ public class AtmosBlobStore extends BaseBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageClient#headFile} * This implementation invokes {@link AtmosClient#headFile}
*/ */
@Override @Override
public BlobMetadata blobMetadata(String container, String key) { public BlobMetadata blobMetadata(String container, String key) {
@ -96,8 +96,8 @@ public class AtmosBlobStore extends BaseBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageAsyncClient#deletePath} followed by * This implementation invokes {@link AtmosAsyncClient#deletePath} followed by
* {@link AtmosStorageAsyncClient#pathExists} until it is true. * {@link AtmosAsyncClient#pathExists} until it is true.
*/ */
protected boolean deleteAndVerifyContainerGone(final String container) { protected boolean deleteAndVerifyContainerGone(final String container) {
sync.deletePath(container + "/"); sync.deletePath(container + "/");
@ -105,7 +105,7 @@ public class AtmosBlobStore extends BaseBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageClient#createDirectory} * This implementation invokes {@link AtmosClient#createDirectory}
* *
* @param location * @param location
* currently ignored * currently ignored
@ -119,7 +119,7 @@ public class AtmosBlobStore extends BaseBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageClient#createDirectory} * This implementation invokes {@link AtmosClient#createDirectory}
* *
* @param container * @param container
* directory name * directory name
@ -138,7 +138,7 @@ public class AtmosBlobStore extends BaseBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageClient#pathExists} * This implementation invokes {@link AtmosClient#pathExists}
*/ */
@Override @Override
public boolean containerExists(String container) { public boolean containerExists(String container) {
@ -146,7 +146,7 @@ public class AtmosBlobStore extends BaseBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageClient#pathExists} * This implementation invokes {@link AtmosClient#pathExists}
*/ */
@Override @Override
public boolean directoryExists(String container, String directory) { public boolean directoryExists(String container, String directory) {
@ -154,7 +154,7 @@ public class AtmosBlobStore extends BaseBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageClient#pathExists} * This implementation invokes {@link AtmosClient#pathExists}
* *
* @param container * @param container
* container * container
@ -167,7 +167,7 @@ public class AtmosBlobStore extends BaseBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageClient#readFile} * This implementation invokes {@link AtmosClient#readFile}
*/ */
@Override @Override
public Blob getBlob(String container, String key, org.jclouds.blobstore.options.GetOptions options) { public Blob getBlob(String container, String key, org.jclouds.blobstore.options.GetOptions options) {
@ -176,7 +176,7 @@ public class AtmosBlobStore extends BaseBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageClient#listDirectories} * This implementation invokes {@link AtmosClient#listDirectories}
*/ */
@Override @Override
public PageSet<? extends StorageMetadata> list() { public PageSet<? extends StorageMetadata> list() {
@ -184,12 +184,12 @@ public class AtmosBlobStore extends BaseBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageClient#listDirectory} * This implementation invokes {@link AtmosClient#listDirectory}
*/ */
@Override @Override
public PageSet<? extends StorageMetadata> list(String container, public PageSet<? extends StorageMetadata> list(String container,
org.jclouds.blobstore.options.ListContainerOptions options) { org.jclouds.blobstore.options.ListContainerOptions options) {
container = AtmosStorageUtils.adjustContainerIfDirOptionPresent(container, options); container = AtmosUtils.adjustContainerIfDirOptionPresent(container, options);
ListOptions nativeOptions = container2ContainerListOptions.apply(options); ListOptions nativeOptions = container2ContainerListOptions.apply(options);
// until includeMeta() option works for namespace interface // until includeMeta() option works for namespace interface
PageSet<? extends StorageMetadata> list = container2ResourceList.apply(sync.listDirectory(container, PageSet<? extends StorageMetadata> list = container2ResourceList.apply(sync.listDirectory(container,
@ -198,17 +198,17 @@ public class AtmosBlobStore extends BaseBlobStore {
} }
/** /**
* This implementation invokes {@link AtmosStorageClient#createFile} * This implementation invokes {@link AtmosClient#createFile}
* <p/> * <p/>
* Since there is no etag support in atmos, we just return the path. * Since there is no etag support in atmos, we just return the path.
*/ */
@Override @Override
public String putBlob(final String container, final Blob blob) { public String putBlob(final String container, final Blob blob) {
return AtmosStorageUtils.putBlob(sync, crypto, blob2Object, container, blob); return AtmosUtils.putBlob(sync, crypto, blob2Object, container, blob);
} }
/** /**
* This implementation invokes {@link AtmosStorageClient#deletePath} * This implementation invokes {@link AtmosClient#deletePath}
*/ */
@Override @Override
public void removeBlob(String container, String key) { public void removeBlob(String container, String key) {

View File

@ -17,18 +17,18 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.config; package org.jclouds.atmos.blobstore.config;
import java.util.Set; import java.util.Set;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.AtmosStorageAsyncClient; import org.jclouds.atmos.AtmosAsyncClient;
import org.jclouds.atmosonline.saas.AtmosStorageClient; import org.jclouds.atmos.AtmosClient;
import org.jclouds.atmosonline.saas.blobstore.AtmosAsyncBlobStore; import org.jclouds.atmos.blobstore.AtmosAsyncBlobStore;
import org.jclouds.atmosonline.saas.blobstore.AtmosBlobRequestSigner; import org.jclouds.atmos.blobstore.AtmosBlobRequestSigner;
import org.jclouds.atmosonline.saas.blobstore.AtmosBlobStore; import org.jclouds.atmos.blobstore.AtmosBlobStore;
import org.jclouds.atmosonline.saas.blobstore.strategy.FindMD5InUserMetadata; import org.jclouds.atmos.blobstore.strategy.FindMD5InUserMetadata;
import org.jclouds.blobstore.AsyncBlobStore; import org.jclouds.blobstore.AsyncBlobStore;
import org.jclouds.blobstore.BlobRequestSigner; import org.jclouds.blobstore.BlobRequestSigner;
import org.jclouds.blobstore.BlobStore; import org.jclouds.blobstore.BlobStore;
@ -65,7 +65,7 @@ public class AtmosBlobStoreContextModule extends AbstractModule {
bind(AsyncBlobStore.class).to(AtmosAsyncBlobStore.class).in(Scopes.SINGLETON); bind(AsyncBlobStore.class).to(AtmosAsyncBlobStore.class).in(Scopes.SINGLETON);
bind(BlobStore.class).to(AtmosBlobStore.class).in(Scopes.SINGLETON); bind(BlobStore.class).to(AtmosBlobStore.class).in(Scopes.SINGLETON);
bind(BlobStoreContext.class).to( bind(BlobStoreContext.class).to(
new TypeLiteral<BlobStoreContextImpl<AtmosStorageClient, AtmosStorageAsyncClient>>() { new TypeLiteral<BlobStoreContextImpl<AtmosClient, AtmosAsyncClient>>() {
}).in(Scopes.SINGLETON); }).in(Scopes.SINGLETON);
bind(ContainsValueInListStrategy.class).to(FindMD5InUserMetadata.class); bind(ContainsValueInListStrategy.class).to(FindMD5InUserMetadata.class);
bind(BlobRequestSigner.class).to(AtmosBlobRequestSigner.class); bind(BlobRequestSigner.class).to(AtmosBlobRequestSigner.class);

View File

@ -17,15 +17,15 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.functions; package org.jclouds.atmos.blobstore.functions;
import java.util.Map.Entry; import java.util.Map.Entry;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.atmosonline.saas.domain.UserMetadata; import org.jclouds.atmos.domain.UserMetadata;
import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.BlobMetadata;
import com.google.common.base.Function; import com.google.common.base.Function;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.functions; package org.jclouds.atmos.blobstore.functions;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
@ -32,11 +32,11 @@ import com.google.common.base.Function;
*/ */
@Singleton @Singleton
public class BlobStoreListOptionsToListOptions implements public class BlobStoreListOptionsToListOptions implements
Function<ListContainerOptions, org.jclouds.atmosonline.saas.options.ListOptions> { Function<ListContainerOptions, org.jclouds.atmos.options.ListOptions> {
@Override @Override
public org.jclouds.atmosonline.saas.options.ListOptions apply(ListContainerOptions from) { public org.jclouds.atmos.options.ListOptions apply(ListContainerOptions from) {
checkNotNull(from, "set options to instance NONE instead of passing null"); checkNotNull(from, "set options to instance NONE instead of passing null");
org.jclouds.atmosonline.saas.options.ListOptions httpOptions = new org.jclouds.atmosonline.saas.options.ListOptions(); org.jclouds.atmos.options.ListOptions httpOptions = new org.jclouds.atmos.options.ListOptions();
if (from.getMarker() != null) { if (from.getMarker() != null) {
httpOptions.token(from.getMarker()); httpOptions.token(from.getMarker());
} }

View File

@ -17,12 +17,12 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.functions; package org.jclouds.atmos.blobstore.functions;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.domain.MutableContentMetadata; import org.jclouds.atmos.domain.MutableContentMetadata;
import org.jclouds.atmosonline.saas.domain.internal.DelegatingMutableContentMetadata; import org.jclouds.atmos.domain.internal.DelegatingMutableContentMetadata;
import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.BlobMetadata;
import org.jclouds.blobstore.domain.internal.MutableBlobMetadataImpl; import org.jclouds.blobstore.domain.internal.MutableBlobMetadataImpl;
import org.jclouds.http.HttpUtils; import org.jclouds.http.HttpUtils;

View File

@ -17,14 +17,14 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.functions; package org.jclouds.atmos.blobstore.functions;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.domain.Blob;
import com.google.common.base.Function; import com.google.common.base.Function;

View File

@ -17,12 +17,12 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.functions; package org.jclouds.atmos.blobstore.functions;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.domain.FileType; import org.jclouds.atmos.domain.FileType;
import org.jclouds.atmosonline.saas.domain.SystemMetadata; import org.jclouds.atmos.domain.SystemMetadata;
import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.BlobMetadata;
import com.google.common.base.Function; import com.google.common.base.Function;

View File

@ -17,14 +17,14 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.functions; package org.jclouds.atmos.blobstore.functions;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.domain.BoundedSet; import org.jclouds.atmos.domain.BoundedSet;
import org.jclouds.atmosonline.saas.domain.DirectoryEntry; import org.jclouds.atmos.domain.DirectoryEntry;
import org.jclouds.atmosonline.saas.domain.FileType; import org.jclouds.atmos.domain.FileType;
import org.jclouds.blobstore.domain.PageSet; import org.jclouds.blobstore.domain.PageSet;
import org.jclouds.blobstore.domain.StorageMetadata; import org.jclouds.blobstore.domain.StorageMetadata;
import org.jclouds.blobstore.domain.StorageType; import org.jclouds.blobstore.domain.StorageType;

View File

@ -17,14 +17,14 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.functions; package org.jclouds.atmos.blobstore.functions;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.domain.Blob.Factory; import org.jclouds.blobstore.domain.Blob.Factory;
import org.jclouds.http.HttpUtils; import org.jclouds.http.HttpUtils;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.functions; package org.jclouds.atmos.blobstore.functions;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
@ -26,9 +26,9 @@ import java.util.Map.Entry;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.atmosonline.saas.domain.FileType; import org.jclouds.atmos.domain.FileType;
import org.jclouds.atmosonline.saas.functions.AtmosObjectName; import org.jclouds.atmos.functions.AtmosObjectName;
import org.jclouds.blobstore.domain.MutableBlobMetadata; import org.jclouds.blobstore.domain.MutableBlobMetadata;
import org.jclouds.blobstore.domain.StorageType; import org.jclouds.blobstore.domain.StorageType;
import org.jclouds.blobstore.domain.internal.MutableBlobMetadataImpl; import org.jclouds.blobstore.domain.internal.MutableBlobMetadataImpl;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.strategy; package org.jclouds.atmos.blobstore.strategy;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.concurrent.FutureIterables.awaitCompletion; import static org.jclouds.concurrent.FutureIterables.awaitCompletion;
@ -36,8 +36,8 @@ import javax.inject.Named;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.Constants; import org.jclouds.Constants;
import org.jclouds.atmosonline.saas.AtmosStorageAsyncClient; import org.jclouds.atmos.AtmosAsyncClient;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.BlobMetadata;
import org.jclouds.blobstore.functions.ObjectMD5; import org.jclouds.blobstore.functions.ObjectMD5;
import org.jclouds.blobstore.internal.BlobRuntimeException; import org.jclouds.blobstore.internal.BlobRuntimeException;
@ -63,7 +63,7 @@ public class FindMD5InUserMetadata implements ContainsValueInListStrategy {
protected Logger logger = Logger.NULL; protected Logger logger = Logger.NULL;
protected final ObjectMD5 objectMD5; protected final ObjectMD5 objectMD5;
protected final ListBlobsInContainer getAllBlobMetadata; protected final ListBlobsInContainer getAllBlobMetadata;
private final AtmosStorageAsyncClient client; private final AtmosAsyncClient client;
private final ExecutorService userExecutor; private final ExecutorService userExecutor;
/** /**
* maximum duration of an blob Request * maximum duration of an blob Request
@ -74,7 +74,7 @@ public class FindMD5InUserMetadata implements ContainsValueInListStrategy {
@Inject @Inject
FindMD5InUserMetadata(@Named(Constants.PROPERTY_USER_THREADS) ExecutorService userExecutor, ObjectMD5 objectMD5, FindMD5InUserMetadata(@Named(Constants.PROPERTY_USER_THREADS) ExecutorService userExecutor, ObjectMD5 objectMD5,
ListBlobsInContainer getAllBlobMetadata, AtmosStorageAsyncClient client) { ListBlobsInContainer getAllBlobMetadata, AtmosAsyncClient client) {
this.objectMD5 = objectMD5; this.objectMD5 = objectMD5;
this.getAllBlobMetadata = getAllBlobMetadata; this.getAllBlobMetadata = getAllBlobMetadata;
this.client = client; this.client = client;

View File

@ -17,10 +17,10 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.config; package org.jclouds.atmos.config;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.atmosonline.saas.domain.MutableContentMetadata; import org.jclouds.atmos.domain.MutableContentMetadata;
import org.jclouds.blobstore.config.BlobStoreObjectModule; import org.jclouds.blobstore.config.BlobStoreObjectModule;
import com.google.inject.AbstractModule; import com.google.inject.AbstractModule;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.config; package org.jclouds.atmos.config;
import org.jclouds.json.config.GsonModule.DateAdapter; import org.jclouds.json.config.GsonModule.DateAdapter;
import org.jclouds.json.config.GsonModule.Iso8601DateAdapter; import org.jclouds.json.config.GsonModule.Iso8601DateAdapter;
@ -29,7 +29,7 @@ import com.google.inject.AbstractModule;
* *
* @author Adrian Cole * @author Adrian Cole
*/ */
public class AtmosStorageParserModule extends AbstractModule { public class AtmosParserModule extends AbstractModule {
@Override @Override
protected void configure() { protected void configure() {

View File

@ -17,17 +17,17 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.config; package org.jclouds.atmos.config;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import javax.inject.Named; import javax.inject.Named;
import org.jclouds.Constants; import org.jclouds.Constants;
import org.jclouds.atmosonline.saas.AtmosStorageAsyncClient; import org.jclouds.atmos.AtmosAsyncClient;
import org.jclouds.atmosonline.saas.AtmosStorageClient; import org.jclouds.atmos.AtmosClient;
import org.jclouds.atmosonline.saas.handlers.AtmosStorageClientErrorRetryHandler; import org.jclouds.atmos.handlers.AtmosClientErrorRetryHandler;
import org.jclouds.atmosonline.saas.handlers.ParseAtmosStorageErrorFromXmlContent; import org.jclouds.atmos.handlers.ParseAtmosErrorFromXmlContent;
import org.jclouds.date.DateService; import org.jclouds.date.DateService;
import org.jclouds.date.TimeStamp; import org.jclouds.date.TimeStamp;
import org.jclouds.http.HttpErrorHandler; import org.jclouds.http.HttpErrorHandler;
@ -51,14 +51,14 @@ import com.google.inject.Provides;
*/ */
@ConfiguresRestClient @ConfiguresRestClient
@RequiresHttp @RequiresHttp
public class AtmosStorageRestClientModule extends RestClientModule<AtmosStorageClient, AtmosStorageAsyncClient> { public class AtmosRestClientModule extends RestClientModule<AtmosClient, AtmosAsyncClient> {
public AtmosStorageRestClientModule() { public AtmosRestClientModule() {
super(AtmosStorageClient.class, AtmosStorageAsyncClient.class); super(AtmosClient.class, AtmosAsyncClient.class);
} }
@Override @Override
protected void configure() { protected void configure() {
install(new AtmosStorageParserModule()); install(new AtmosParserModule());
install(new AtmosObjectModule()); install(new AtmosObjectModule());
super.configure(); super.configure();
} }
@ -85,14 +85,14 @@ public class AtmosStorageRestClientModule extends RestClientModule<AtmosStorageC
@Override @Override
protected void bindErrorHandlers() { protected void bindErrorHandlers() {
bind(HttpErrorHandler.class).annotatedWith(Redirection.class).to(ParseAtmosStorageErrorFromXmlContent.class); bind(HttpErrorHandler.class).annotatedWith(Redirection.class).to(ParseAtmosErrorFromXmlContent.class);
bind(HttpErrorHandler.class).annotatedWith(ClientError.class).to(ParseAtmosStorageErrorFromXmlContent.class); bind(HttpErrorHandler.class).annotatedWith(ClientError.class).to(ParseAtmosErrorFromXmlContent.class);
bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(ParseAtmosStorageErrorFromXmlContent.class); bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(ParseAtmosErrorFromXmlContent.class);
} }
@Override @Override
protected void bindRetryHandlers() { protected void bindRetryHandlers() {
bind(HttpRetryHandler.class).annotatedWith(ClientError.class).to(AtmosStorageClientErrorRetryHandler.class); bind(HttpRetryHandler.class).annotatedWith(ClientError.class).to(AtmosClientErrorRetryHandler.class);
} }
} }

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.domain; package org.jclouds.atmos.domain;
/** /**
* When an Atmos Storage request is in error, the client receives an error response. * When an Atmos Storage request is in error, the client receives an error response.
@ -27,18 +27,18 @@ package org.jclouds.atmosonline.saas.domain;
* @author Adrian Cole * @author Adrian Cole
* *
*/ */
public class AtmosStorageError { public class AtmosError {
private final int code; private final int code;
private final String message; private final String message;
private String stringSigned; private String stringSigned;
@Override @Override
public String toString() { public String toString() {
return "AtmosStorageError [code=" + code + ", message=" + message return "AtmosError [code=" + code + ", message=" + message
+ (stringSigned != null ? (", stringSigned=" + stringSigned) : "") + "]"; + (stringSigned != null ? (", stringSigned=" + stringSigned) : "") + "]";
} }
public AtmosStorageError(int code, String message) { public AtmosError(int code, String message) {
this.code = code; this.code = code;
this.message = message; this.message = message;
} }

View File

@ -17,11 +17,11 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.domain; package org.jclouds.atmos.domain;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import org.jclouds.atmosonline.saas.domain.internal.AtmosObjectImpl.AtmosObjectFactory; import org.jclouds.atmos.domain.internal.AtmosObjectImpl.AtmosObjectFactory;
import org.jclouds.io.PayloadEnclosing; import org.jclouds.io.PayloadEnclosing;
import com.google.common.collect.Multimap; import com.google.common.collect.Multimap;

View File

@ -17,13 +17,13 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.domain; package org.jclouds.atmos.domain;
import java.util.Set; import java.util.Set;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import org.jclouds.atmosonline.saas.domain.internal.BoundedLinkedHashSet; import org.jclouds.atmos.domain.internal.BoundedLinkedHashSet;
import com.google.inject.ImplementedBy; import com.google.inject.ImplementedBy;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.domain; package org.jclouds.atmos.domain;
/** /**
* Metadata of a Atmos Online object * Metadata of a Atmos Online object

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.domain; package org.jclouds.atmos.domain;
public enum FileType { public enum FileType {

View File

@ -17,9 +17,9 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.domain; package org.jclouds.atmos.domain;
import org.jclouds.atmosonline.saas.domain.internal.DelegatingMutableContentMetadata; import org.jclouds.atmos.domain.internal.DelegatingMutableContentMetadata;
import com.google.inject.ImplementedBy; import com.google.inject.ImplementedBy;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.domain; package org.jclouds.atmos.domain;
import java.util.Date; import java.util.Date;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.domain; package org.jclouds.atmos.domain;
import java.net.URI; import java.net.URI;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.domain; package org.jclouds.atmos.domain;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.domain.internal; package org.jclouds.atmos.domain.internal;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
@ -25,10 +25,10 @@ import javax.inject.Inject;
import javax.inject.Provider; import javax.inject.Provider;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.atmosonline.saas.domain.MutableContentMetadata; import org.jclouds.atmos.domain.MutableContentMetadata;
import org.jclouds.atmosonline.saas.domain.SystemMetadata; import org.jclouds.atmos.domain.SystemMetadata;
import org.jclouds.atmosonline.saas.domain.UserMetadata; import org.jclouds.atmos.domain.UserMetadata;
import org.jclouds.http.internal.PayloadEnclosingImpl; import org.jclouds.http.internal.PayloadEnclosingImpl;
import org.jclouds.io.Payload; import org.jclouds.io.Payload;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.domain.internal; package org.jclouds.atmos.domain.internal;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
@ -25,7 +25,7 @@ import java.util.LinkedHashSet;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import org.jclouds.atmosonline.saas.domain.BoundedSet; import org.jclouds.atmos.domain.BoundedSet;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;

View File

@ -17,9 +17,9 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.domain.internal; package org.jclouds.atmos.domain.internal;
import org.jclouds.atmosonline.saas.domain.MutableContentMetadata; import org.jclouds.atmos.domain.MutableContentMetadata;
import org.jclouds.io.payloads.BaseMutableContentMetadata; import org.jclouds.io.payloads.BaseMutableContentMetadata;
import com.google.common.collect.Multimap; import com.google.common.collect.Multimap;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.filters; package org.jclouds.atmos.filters;
import static org.jclouds.Constants.LOGGER_SIGNATURE; import static org.jclouds.Constants.LOGGER_SIGNATURE;
import static org.jclouds.Constants.PROPERTY_CREDENTIAL; import static org.jclouds.Constants.PROPERTY_CREDENTIAL;
@ -35,7 +35,7 @@ import javax.inject.Provider;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.HttpHeaders;
import org.jclouds.atmosonline.saas.reference.AtmosStorageHeaders; import org.jclouds.atmos.reference.AtmosHeaders;
import org.jclouds.crypto.Crypto; import org.jclouds.crypto.Crypto;
import org.jclouds.crypto.CryptoStreams; import org.jclouds.crypto.CryptoStreams;
import org.jclouds.date.TimeStamp; import org.jclouds.date.TimeStamp;
@ -93,14 +93,14 @@ public class SignRequest implements HttpRequestFilter {
@Override @Override
public HttpRequest filter(HttpRequest request) throws HttpException { public HttpRequest filter(HttpRequest request) throws HttpException {
Builder<String, String> builder = ImmutableMap.builder(); Builder<String, String> builder = ImmutableMap.builder();
builder.put(AtmosStorageHeaders.UID, uid); builder.put(AtmosHeaders.UID, uid);
String date = timeStampProvider.get(); String date = timeStampProvider.get();
builder.put(HttpHeaders.DATE, date); builder.put(HttpHeaders.DATE, date);
if (request.getHeaders().containsKey(AtmosStorageHeaders.DATE)) if (request.getHeaders().containsKey(AtmosHeaders.DATE))
builder.put(AtmosStorageHeaders.DATE, date); builder.put(AtmosHeaders.DATE, date);
request = ModifyRequest.replaceHeaders(request, Multimaps.forMap(builder.build())); request = ModifyRequest.replaceHeaders(request, Multimaps.forMap(builder.build()));
String signature = calculateSignature(createStringToSign(request)); String signature = calculateSignature(createStringToSign(request));
request = ModifyRequest.replaceHeader(request, AtmosStorageHeaders.SIGNATURE, signature); request = ModifyRequest.replaceHeader(request, AtmosHeaders.SIGNATURE, signature);
utils.logRequest(signatureLog, request, "<<"); utils.logRequest(signatureLog, request, "<<");
return request; return request;
} }
@ -144,7 +144,7 @@ public class SignRequest implements HttpRequestFilter {
// TreeSet == Sort the headers alphabetically. // TreeSet == Sort the headers alphabetically.
Set<String> headers = new TreeSet<String>(request.getHeaders().keySet()); Set<String> headers = new TreeSet<String>(request.getHeaders().keySet());
for (String header : headers) { for (String header : headers) {
if (header.startsWith("x-emc-") && !header.equals(AtmosStorageHeaders.SIGNATURE)) { if (header.startsWith("x-emc-") && !header.equals(AtmosHeaders.SIGNATURE)) {
// Convert all header names to lowercase. // Convert all header names to lowercase.
toSign.append(header.toLowerCase()).append(":"); toSign.append(header.toLowerCase()).append(":");
// For headers with values that span multiple lines, convert them into one line by // For headers with values that span multiple lines, convert them into one line by

View File

@ -17,14 +17,14 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.functions; package org.jclouds.atmos.functions;
import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import com.google.common.base.Function; import com.google.common.base.Function;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.functions; package org.jclouds.atmos.functions;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
@ -25,11 +25,11 @@ import javax.inject.Inject;
import javax.inject.Provider; import javax.inject.Provider;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.domain.BoundedSet; import org.jclouds.atmos.domain.BoundedSet;
import org.jclouds.atmosonline.saas.domain.DirectoryEntry; import org.jclouds.atmos.domain.DirectoryEntry;
import org.jclouds.atmosonline.saas.domain.internal.BoundedLinkedHashSet; import org.jclouds.atmos.domain.internal.BoundedLinkedHashSet;
import org.jclouds.atmosonline.saas.reference.AtmosStorageHeaders; import org.jclouds.atmos.reference.AtmosHeaders;
import org.jclouds.atmosonline.saas.xml.ListDirectoryResponseHandler; import org.jclouds.atmos.xml.ListDirectoryResponseHandler;
import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponse;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.http.functions.ParseSax.Factory; import org.jclouds.http.functions.ParseSax.Factory;
@ -58,7 +58,7 @@ public class ParseDirectoryListFromContentAndHeaders implements Function<HttpRes
*/ */
public BoundedSet<DirectoryEntry> apply(HttpResponse from) { public BoundedSet<DirectoryEntry> apply(HttpResponse from) {
checkNotNull(from, "http response"); checkNotNull(from, "http response");
String token = from.getFirstHeaderOrNull(AtmosStorageHeaders.TOKEN); String token = from.getFirstHeaderOrNull(AtmosHeaders.TOKEN);
return new BoundedLinkedHashSet<DirectoryEntry>(factory.create(listHandlerProvider.get()).parse( return new BoundedLinkedHashSet<DirectoryEntry>(factory.create(listHandlerProvider.get()).parse(
from.getPayload().getInput()), token); from.getPayload().getInput()), token);
} }

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.functions; package org.jclouds.atmos.functions;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.http.HttpUtils.attemptToParseSizeAndRangeFromHeaders; import static org.jclouds.http.HttpUtils.attemptToParseSizeAndRangeFromHeaders;
@ -25,7 +25,7 @@ import static org.jclouds.http.HttpUtils.attemptToParseSizeAndRangeFromHeaders;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.blobstore.functions.ParseSystemAndUserMetadataFromHeaders; import org.jclouds.blobstore.functions.ParseSystemAndUserMetadataFromHeaders;
import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponse;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.functions; package org.jclouds.atmos.functions;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
@ -26,9 +26,9 @@ import java.util.Map;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.domain.FileType; import org.jclouds.atmos.domain.FileType;
import org.jclouds.atmosonline.saas.domain.SystemMetadata; import org.jclouds.atmos.domain.SystemMetadata;
import org.jclouds.atmosonline.saas.reference.AtmosStorageHeaders; import org.jclouds.atmos.reference.AtmosHeaders;
import org.jclouds.crypto.CryptoStreams; import org.jclouds.crypto.CryptoStreams;
import org.jclouds.date.DateService; import org.jclouds.date.DateService;
import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponse;
@ -50,7 +50,7 @@ public class ParseSystemMetadataFromHeaders implements Function<HttpResponse, Sy
public SystemMetadata apply(HttpResponse from) { public SystemMetadata apply(HttpResponse from) {
checkNotNull(from, "http response"); checkNotNull(from, "http response");
String meta = checkNotNull(from.getFirstHeaderOrNull(AtmosStorageHeaders.META), AtmosStorageHeaders.META); String meta = checkNotNull(from.getFirstHeaderOrNull(AtmosHeaders.META), AtmosHeaders.META);
Map<String, String> metaMap = Maps.newHashMap(); Map<String, String> metaMap = Maps.newHashMap();
String[] metas = meta.split(", "); String[] metas = meta.split(", ");
for (String entry : metas) { for (String entry : metas) {

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.functions; package org.jclouds.atmos.functions;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
@ -26,8 +26,8 @@ import java.util.Set;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.domain.UserMetadata; import org.jclouds.atmos.domain.UserMetadata;
import org.jclouds.atmosonline.saas.reference.AtmosStorageHeaders; import org.jclouds.atmos.reference.AtmosHeaders;
import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponse;
import com.google.common.base.Function; import com.google.common.base.Function;
@ -58,17 +58,17 @@ public class ParseUserMetadataFromHeaders implements Function<HttpResponse, User
checkNotNull(from, "http response"); checkNotNull(from, "http response");
Map<String, String> meta = Maps.filterKeys( Map<String, String> meta = Maps.filterKeys(
getMetaMap(checkNotNull(from.getFirstHeaderOrNull(AtmosStorageHeaders.META), AtmosStorageHeaders.META)), getMetaMap(checkNotNull(from.getFirstHeaderOrNull(AtmosHeaders.META), AtmosHeaders.META)),
filter); filter);
Map<String, String> listableMeta = (from.getFirstHeaderOrNull(AtmosStorageHeaders.LISTABLE_META) != null) ? getMetaMap(from Map<String, String> listableMeta = (from.getFirstHeaderOrNull(AtmosHeaders.LISTABLE_META) != null) ? getMetaMap(from
.getFirstHeaderOrNull(AtmosStorageHeaders.LISTABLE_META)) : ImmutableMap.<String, String> of(); .getFirstHeaderOrNull(AtmosHeaders.LISTABLE_META)) : ImmutableMap.<String, String> of();
Iterable<String> tags = (from.getFirstHeaderOrNull(AtmosStorageHeaders.TAGS) != null) ? Splitter.on(", ").split( Iterable<String> tags = (from.getFirstHeaderOrNull(AtmosHeaders.TAGS) != null) ? Splitter.on(", ").split(
from.getFirstHeaderOrNull(AtmosStorageHeaders.TAGS)) : ImmutableSet.<String> of(); from.getFirstHeaderOrNull(AtmosHeaders.TAGS)) : ImmutableSet.<String> of();
Iterable<String> listableTags = (from.getFirstHeaderOrNull(AtmosStorageHeaders.LISTABLE_TAGS) != null) ? Splitter Iterable<String> listableTags = (from.getFirstHeaderOrNull(AtmosHeaders.LISTABLE_TAGS) != null) ? Splitter
.on(", ").split(from.getFirstHeaderOrNull(AtmosStorageHeaders.LISTABLE_TAGS)) : ImmutableSet.<String> of(); .on(", ").split(from.getFirstHeaderOrNull(AtmosHeaders.LISTABLE_TAGS)) : ImmutableSet.<String> of();
return new UserMetadata(meta, listableMeta, tags, listableTags); return new UserMetadata(meta, listableMeta, tags, listableTags);
} }

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.functions; package org.jclouds.atmos.functions;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.util.Throwables2.propagateOrNull; import static org.jclouds.util.Throwables2.propagateOrNull;

View File

@ -17,14 +17,14 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.handlers; package org.jclouds.atmos.handlers;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.inject.Named; import javax.inject.Named;
import org.jclouds.Constants; import org.jclouds.Constants;
import org.jclouds.atmosonline.saas.domain.AtmosStorageError; import org.jclouds.atmos.domain.AtmosError;
import org.jclouds.atmosonline.saas.util.AtmosStorageUtils; import org.jclouds.atmos.util.AtmosUtils;
import org.jclouds.http.HttpCommand; import org.jclouds.http.HttpCommand;
import org.jclouds.http.HttpException; import org.jclouds.http.HttpException;
import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponse;
@ -40,13 +40,13 @@ import com.google.inject.Inject;
* *
* @author Adrian Cole * @author Adrian Cole
*/ */
public class AtmosStorageClientErrorRetryHandler implements HttpRetryHandler { public class AtmosClientErrorRetryHandler implements HttpRetryHandler {
private final AtmosStorageUtils utils; private final AtmosUtils utils;
private final BackoffLimitedRetryHandler backoffHandler; private final BackoffLimitedRetryHandler backoffHandler;
@Inject @Inject
public AtmosStorageClientErrorRetryHandler(BackoffLimitedRetryHandler backoffHandler, public AtmosClientErrorRetryHandler(BackoffLimitedRetryHandler backoffHandler,
AtmosStorageUtils utils) { AtmosUtils utils) {
this.backoffHandler = backoffHandler; this.backoffHandler = backoffHandler;
this.utils = utils; this.utils = utils;
} }
@ -68,7 +68,7 @@ public class AtmosStorageClientErrorRetryHandler implements HttpRetryHandler {
// Content can be null in the case of HEAD requests // Content can be null in the case of HEAD requests
if (content != null) { if (content != null) {
try { try {
AtmosStorageError error = utils.parseAtmosStorageErrorFromContent(command, response, AtmosError error = utils.parseAtmosErrorFromContent(command, response,
new String(content)); new String(content));
if (error.getCode() == 1016) { if (error.getCode() == 1016) {
return backoffHandler.shouldRetryRequest(command, response); return backoffHandler.shouldRetryRequest(command, response);

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.handlers; package org.jclouds.atmos.handlers;
import static org.jclouds.http.HttpUtils.releasePayload; import static org.jclouds.http.HttpUtils.releasePayload;
@ -30,9 +30,9 @@ import javax.annotation.Resource;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.AtmosStorageResponseException; import org.jclouds.atmos.AtmosResponseException;
import org.jclouds.atmosonline.saas.domain.AtmosStorageError; import org.jclouds.atmos.domain.AtmosError;
import org.jclouds.atmosonline.saas.util.AtmosStorageUtils; import org.jclouds.atmos.util.AtmosUtils;
import org.jclouds.blobstore.ContainerNotFoundException; import org.jclouds.blobstore.ContainerNotFoundException;
import org.jclouds.blobstore.KeyAlreadyExistsException; import org.jclouds.blobstore.KeyAlreadyExistsException;
import org.jclouds.blobstore.KeyNotFoundException; import org.jclouds.blobstore.KeyNotFoundException;
@ -47,19 +47,19 @@ import org.jclouds.util.Strings2;
/** /**
* This will parse and set an appropriate exception on the command object. * This will parse and set an appropriate exception on the command object.
* *
* @see AtmosStorageError * @see AtmosError
* @author Adrian Cole * @author Adrian Cole
* *
*/ */
@Singleton @Singleton
public class ParseAtmosStorageErrorFromXmlContent implements HttpErrorHandler { public class ParseAtmosErrorFromXmlContent implements HttpErrorHandler {
@Resource @Resource
protected Logger logger = Logger.NULL; protected Logger logger = Logger.NULL;
private final AtmosStorageUtils utils; private final AtmosUtils utils;
@Inject @Inject
public ParseAtmosStorageErrorFromXmlContent(AtmosStorageUtils utils) { public ParseAtmosErrorFromXmlContent(AtmosUtils utils) {
this.utils = utils; this.utils = utils;
} }
@ -69,12 +69,12 @@ public class ParseAtmosStorageErrorFromXmlContent implements HttpErrorHandler {
public void handleError(HttpCommand command, HttpResponse response) { public void handleError(HttpCommand command, HttpResponse response) {
Exception exception = new HttpResponseException(command, response); Exception exception = new HttpResponseException(command, response);
try { try {
AtmosStorageError error = null; AtmosError error = null;
if (response.getPayload() != null) { if (response.getPayload() != null) {
try { try {
String content = Strings2.toStringAndClose(response.getPayload().getInput()); String content = Strings2.toStringAndClose(response.getPayload().getInput());
if (content != null && content.indexOf('<') >= 0) { if (content != null && content.indexOf('<') >= 0) {
error = utils.parseAtmosStorageErrorFromContent(command, response, Strings2.toInputStream(content)); error = utils.parseAtmosErrorFromContent(command, response, Strings2.toInputStream(content));
} else { } else {
exception = content != null ? new HttpResponseException(command, response, content) : exception; exception = content != null ? new HttpResponseException(command, response, content) : exception;
} }
@ -107,7 +107,7 @@ public class ParseAtmosStorageErrorFromXmlContent implements HttpErrorHandler {
} }
break; break;
default: default:
exception = error != null ? new AtmosStorageResponseException(command, response, error) exception = error != null ? new AtmosResponseException(command, response, error)
: new HttpResponseException(command, response); : new HttpResponseException(command, response);
} }

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.options; package org.jclouds.atmos.options;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Preconditions.checkState;

View File

@ -17,16 +17,16 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.reference; package org.jclouds.atmos.reference;
/** /**
* Query parameters common to AtmosStorage apis. * Query parameters common to Atmos apis.
* *
* @see <a href="https://community.emc.com/community/labs/atmos_online" /> * @see <a href="https://community.emc.com/community/labs/atmos_online" />
* @author Adrian Cole * @author Adrian Cole
* *
*/ */
public interface AtmosStorageHeaders { public interface AtmosHeaders {
public static final String SIGNATURE = "x-emc-signature"; public static final String SIGNATURE = "x-emc-signature";
public static final String LISTABLE_META = "x-emc-listable-meta"; public static final String LISTABLE_META = "x-emc-listable-meta";

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.util; package org.jclouds.atmos.util;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.InputStream; import java.io.InputStream;
@ -25,11 +25,11 @@ import java.io.InputStream;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Provider; import javax.inject.Provider;
import org.jclouds.atmosonline.saas.AtmosStorageClient; import org.jclouds.atmos.AtmosClient;
import org.jclouds.atmosonline.saas.blobstore.functions.BlobToObject; import org.jclouds.atmos.blobstore.functions.BlobToObject;
import org.jclouds.atmosonline.saas.domain.AtmosStorageError; import org.jclouds.atmos.domain.AtmosError;
import org.jclouds.atmosonline.saas.filters.SignRequest; import org.jclouds.atmos.filters.SignRequest;
import org.jclouds.atmosonline.saas.xml.ErrorHandler; import org.jclouds.atmos.xml.ErrorHandler;
import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.domain.Blob;
import org.jclouds.crypto.Crypto; import org.jclouds.crypto.Crypto;
import org.jclouds.http.HttpCommand; import org.jclouds.http.HttpCommand;
@ -46,7 +46,7 @@ import com.google.common.base.Supplier;
* *
* @author Adrian Cole * @author Adrian Cole
*/ */
public class AtmosStorageUtils { public class AtmosUtils {
@Inject @Inject
SignRequest signer; SignRequest signer;
@ -57,9 +57,9 @@ public class AtmosStorageUtils {
@Inject @Inject
Provider<ErrorHandler> errorHandlerProvider; Provider<ErrorHandler> errorHandlerProvider;
public AtmosStorageError parseAtmosStorageErrorFromContent(HttpCommand command, HttpResponse response, public AtmosError parseAtmosErrorFromContent(HttpCommand command, HttpResponse response,
InputStream content) throws HttpException { InputStream content) throws HttpException {
AtmosStorageError error = (AtmosStorageError) factory.create(errorHandlerProvider.get()).parse(content); AtmosError error = (AtmosError) factory.create(errorHandlerProvider.get()).parse(content);
if (error.getCode() == 1032) { if (error.getCode() == 1032) {
error.setStringSigned(signer.createStringToSign(command.getCurrentRequest())); error.setStringSigned(signer.createStringToSign(command.getCurrentRequest()));
} }
@ -67,7 +67,7 @@ public class AtmosStorageUtils {
} }
public static String putBlob(final AtmosStorageClient sync, Crypto crypto, BlobToObject blob2Object, public static String putBlob(final AtmosClient sync, Crypto crypto, BlobToObject blob2Object,
String container, Blob blob) { String container, Blob blob) {
final String path = container + "/" + blob.getMetadata().getName(); final String path = container + "/" + blob.getMetadata().getName();
deleteAndEnsureGone(sync, path); deleteAndEnsureGone(sync, path);
@ -75,7 +75,7 @@ public class AtmosStorageUtils {
return path; return path;
} }
public static void deleteAndEnsureGone(final AtmosStorageClient sync, final String path) { public static void deleteAndEnsureGone(final AtmosClient sync, final String path) {
try { try {
if (!Assertions.eventuallyTrue(new Supplier<Boolean>() { if (!Assertions.eventuallyTrue(new Supplier<Boolean>() {
public Boolean get() { public Boolean get() {
@ -90,9 +90,9 @@ public class AtmosStorageUtils {
} }
} }
public AtmosStorageError parseAtmosStorageErrorFromContent(HttpCommand command, HttpResponse response, String content) public AtmosError parseAtmosErrorFromContent(HttpCommand command, HttpResponse response, String content)
throws HttpException { throws HttpException {
return parseAtmosStorageErrorFromContent(command, response, new ByteArrayInputStream(content.getBytes())); return parseAtmosErrorFromContent(command, response, new ByteArrayInputStream(content.getBytes()));
} }
public static String adjustContainerIfDirOptionPresent(String container, public static String adjustContainerIfDirOptionPresent(String container,

View File

@ -17,9 +17,9 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.xml; package org.jclouds.atmos.xml;
import org.jclouds.atmosonline.saas.domain.AtmosStorageError; import org.jclouds.atmos.domain.AtmosError;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
/** /**
@ -27,14 +27,14 @@ import org.jclouds.http.functions.ParseSax;
* *
* @author Adrian Cole * @author Adrian Cole
*/ */
public class ErrorHandler extends ParseSax.HandlerWithResult<AtmosStorageError> { public class ErrorHandler extends ParseSax.HandlerWithResult<AtmosError> {
private StringBuilder currentText = new StringBuilder(); private StringBuilder currentText = new StringBuilder();
private int code; private int code;
private String message; private String message;
public AtmosStorageError getResult() { public AtmosError getResult() {
return new AtmosStorageError(code, message); return new AtmosError(code, message);
} }
public void endElement(String uri, String name, String qName) { public void endElement(String uri, String name, String qName) {

View File

@ -17,12 +17,12 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.xml; package org.jclouds.atmos.xml;
import java.util.Set; import java.util.Set;
import org.jclouds.atmosonline.saas.domain.DirectoryEntry; import org.jclouds.atmos.domain.DirectoryEntry;
import org.jclouds.atmosonline.saas.domain.FileType; import org.jclouds.atmos.domain.FileType;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas; package org.jclouds.atmos;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
@ -28,15 +28,15 @@ import java.util.Properties;
import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.HttpHeaders;
import org.jclouds.atmosonline.saas.blobstore.functions.BlobToObject; import org.jclouds.atmos.blobstore.functions.BlobToObject;
import org.jclouds.atmosonline.saas.config.AtmosStorageRestClientModule; import org.jclouds.atmos.config.AtmosRestClientModule;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.atmosonline.saas.filters.SignRequest; import org.jclouds.atmos.filters.SignRequest;
import org.jclouds.atmosonline.saas.functions.ParseDirectoryListFromContentAndHeaders; import org.jclouds.atmos.functions.ParseDirectoryListFromContentAndHeaders;
import org.jclouds.atmosonline.saas.functions.ParseObjectFromHeadersAndHttpContent; import org.jclouds.atmos.functions.ParseObjectFromHeadersAndHttpContent;
import org.jclouds.atmosonline.saas.functions.ParseSystemMetadataFromHeaders; import org.jclouds.atmos.functions.ParseSystemMetadataFromHeaders;
import org.jclouds.atmosonline.saas.functions.ReturnEndpointIfAlreadyExists; import org.jclouds.atmos.functions.ReturnEndpointIfAlreadyExists;
import org.jclouds.atmosonline.saas.options.ListOptions; import org.jclouds.atmos.options.ListOptions;
import org.jclouds.blobstore.binders.BindBlobToMultipartFormTest; import org.jclouds.blobstore.binders.BindBlobToMultipartFormTest;
import org.jclouds.blobstore.functions.ThrowContainerNotFoundOn404; import org.jclouds.blobstore.functions.ThrowContainerNotFoundOn404;
import org.jclouds.blobstore.functions.ThrowKeyNotFoundOn404; import org.jclouds.blobstore.functions.ThrowKeyNotFoundOn404;
@ -61,18 +61,18 @@ import com.google.inject.Module;
import com.google.inject.TypeLiteral; import com.google.inject.TypeLiteral;
/** /**
* Tests behavior of {@code AtmosStorageAsyncClient} * Tests behavior of {@code AtmosAsyncClient}
* *
* @author Adrian Cole * @author Adrian Cole
*/ */
// 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 = "AtmosStorageAsyncClientTest") @Test(groups = "unit", testName = "AtmosAsyncClientTest")
public class AtmosStorageAsyncClientTest extends RestClientTest<AtmosStorageAsyncClient> { public class AtmosAsyncClientTest extends RestClientTest<AtmosAsyncClient> {
private BlobToObject blobToObject; private BlobToObject blobToObject;
public void testListDirectories() throws SecurityException, NoSuchMethodException, IOException { public void testListDirectories() throws SecurityException, NoSuchMethodException, IOException {
Method method = AtmosStorageAsyncClient.class.getMethod("listDirectories", Array Method method = AtmosAsyncClient.class.getMethod("listDirectories", Array
.newInstance(ListOptions.class, 0).getClass()); .newInstance(ListOptions.class, 0).getClass());
HttpRequest request = processor.createRequest(method); HttpRequest request = processor.createRequest(method);
@ -88,7 +88,7 @@ public class AtmosStorageAsyncClientTest extends RestClientTest<AtmosStorageAsyn
} }
public void testListDirectory() throws SecurityException, NoSuchMethodException, IOException { public void testListDirectory() throws SecurityException, NoSuchMethodException, IOException {
Method method = AtmosStorageAsyncClient.class.getMethod("listDirectory", String.class, Array.newInstance( Method method = AtmosAsyncClient.class.getMethod("listDirectory", String.class, Array.newInstance(
ListOptions.class, 0).getClass()); ListOptions.class, 0).getClass());
HttpRequest request = processor.createRequest(method, "directory"); HttpRequest request = processor.createRequest(method, "directory");
@ -104,7 +104,7 @@ public class AtmosStorageAsyncClientTest extends RestClientTest<AtmosStorageAsyn
} }
public void testListDirectoriesOptions() throws SecurityException, NoSuchMethodException, IOException { public void testListDirectoriesOptions() throws SecurityException, NoSuchMethodException, IOException {
Method method = AtmosStorageAsyncClient.class.getMethod("listDirectories", Array Method method = AtmosAsyncClient.class.getMethod("listDirectories", Array
.newInstance(ListOptions.class, 0).getClass()); .newInstance(ListOptions.class, 0).getClass());
HttpRequest request = processor.createRequest(method, new ListOptions().limit(1).token("asda")); HttpRequest request = processor.createRequest(method, new ListOptions().limit(1).token("asda"));
@ -120,7 +120,7 @@ public class AtmosStorageAsyncClientTest extends RestClientTest<AtmosStorageAsyn
} }
public void testListDirectoryOptions() throws SecurityException, NoSuchMethodException, IOException { public void testListDirectoryOptions() throws SecurityException, NoSuchMethodException, IOException {
Method method = AtmosStorageAsyncClient.class.getMethod("listDirectory", String.class, Array.newInstance( Method method = AtmosAsyncClient.class.getMethod("listDirectory", String.class, Array.newInstance(
ListOptions.class, 0).getClass()); ListOptions.class, 0).getClass());
HttpRequest request = processor.createRequest(method, "directory", new ListOptions().limit(1).token("asda")); HttpRequest request = processor.createRequest(method, "directory", new ListOptions().limit(1).token("asda"));
@ -136,7 +136,7 @@ public class AtmosStorageAsyncClientTest extends RestClientTest<AtmosStorageAsyn
} }
public void testCreateDirectory() throws SecurityException, NoSuchMethodException, IOException { public void testCreateDirectory() throws SecurityException, NoSuchMethodException, IOException {
Method method = AtmosStorageAsyncClient.class.getMethod("createDirectory", String.class); Method method = AtmosAsyncClient.class.getMethod("createDirectory", String.class);
HttpRequest request = processor.createRequest(method, "dir"); HttpRequest request = processor.createRequest(method, "dir");
assertRequestLineEquals(request, "POST https://accesspoint.atmosonline.com/rest/namespace/dir/ HTTP/1.1"); assertRequestLineEquals(request, "POST https://accesspoint.atmosonline.com/rest/namespace/dir/ HTTP/1.1");
@ -151,7 +151,7 @@ public class AtmosStorageAsyncClientTest extends RestClientTest<AtmosStorageAsyn
} }
public void testCreateFile() throws SecurityException, NoSuchMethodException, IOException { public void testCreateFile() throws SecurityException, NoSuchMethodException, IOException {
Method method = AtmosStorageAsyncClient.class.getMethod("createFile", String.class, AtmosObject.class); Method method = AtmosAsyncClient.class.getMethod("createFile", String.class, AtmosObject.class);
HttpRequest request = processor.createRequest(method, "dir", blobToObject HttpRequest request = processor.createRequest(method, "dir", blobToObject
.apply(BindBlobToMultipartFormTest.TEST_BLOB)); .apply(BindBlobToMultipartFormTest.TEST_BLOB));
@ -167,7 +167,7 @@ public class AtmosStorageAsyncClientTest extends RestClientTest<AtmosStorageAsyn
} }
public void testUpdateFile() throws SecurityException, NoSuchMethodException, IOException { public void testUpdateFile() throws SecurityException, NoSuchMethodException, IOException {
Method method = AtmosStorageAsyncClient.class.getMethod("updateFile", String.class, AtmosObject.class); Method method = AtmosAsyncClient.class.getMethod("updateFile", String.class, AtmosObject.class);
HttpRequest request = processor.createRequest(method, "dir", blobToObject HttpRequest request = processor.createRequest(method, "dir", blobToObject
.apply(BindBlobToMultipartFormTest.TEST_BLOB)); .apply(BindBlobToMultipartFormTest.TEST_BLOB));
@ -183,7 +183,7 @@ public class AtmosStorageAsyncClientTest extends RestClientTest<AtmosStorageAsyn
} }
public void testReadFile() throws SecurityException, NoSuchMethodException, IOException { public void testReadFile() throws SecurityException, NoSuchMethodException, IOException {
Method method = AtmosStorageAsyncClient.class.getMethod("readFile", String.class, GetOptions[].class); Method method = AtmosAsyncClient.class.getMethod("readFile", String.class, GetOptions[].class);
HttpRequest request = processor.createRequest(method, "dir/file"); HttpRequest request = processor.createRequest(method, "dir/file");
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace/dir/file HTTP/1.1"); assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace/dir/file HTTP/1.1");
@ -198,7 +198,7 @@ public class AtmosStorageAsyncClientTest extends RestClientTest<AtmosStorageAsyn
} }
public void testGetSystemMetadata() throws SecurityException, NoSuchMethodException, IOException { public void testGetSystemMetadata() throws SecurityException, NoSuchMethodException, IOException {
Method method = AtmosStorageAsyncClient.class.getMethod("getSystemMetadata", String.class); Method method = AtmosAsyncClient.class.getMethod("getSystemMetadata", String.class);
HttpRequest request = processor.createRequest(method, "dir/file"); HttpRequest request = processor.createRequest(method, "dir/file");
assertRequestLineEquals(request, "HEAD https://accesspoint.atmosonline.com/rest/namespace/dir/file HTTP/1.1"); assertRequestLineEquals(request, "HEAD https://accesspoint.atmosonline.com/rest/namespace/dir/file HTTP/1.1");
@ -213,7 +213,7 @@ public class AtmosStorageAsyncClientTest extends RestClientTest<AtmosStorageAsyn
} }
public void testDeletePath() throws SecurityException, NoSuchMethodException, IOException { public void testDeletePath() throws SecurityException, NoSuchMethodException, IOException {
Method method = AtmosStorageAsyncClient.class.getMethod("deletePath", String.class); Method method = AtmosAsyncClient.class.getMethod("deletePath", String.class);
HttpRequest request = processor.createRequest(method, "dir/file"); HttpRequest request = processor.createRequest(method, "dir/file");
assertRequestLineEquals(request, "DELETE https://accesspoint.atmosonline.com/rest/namespace/dir/file HTTP/1.1"); assertRequestLineEquals(request, "DELETE https://accesspoint.atmosonline.com/rest/namespace/dir/file HTTP/1.1");
@ -228,7 +228,7 @@ public class AtmosStorageAsyncClientTest extends RestClientTest<AtmosStorageAsyn
} }
public void testNewObject() throws SecurityException, NoSuchMethodException, IOException { public void testNewObject() throws SecurityException, NoSuchMethodException, IOException {
Method method = AtmosStorageAsyncClient.class.getMethod("newObject"); Method method = AtmosAsyncClient.class.getMethod("newObject");
assertEquals(method.getReturnType(), AtmosObject.class); assertEquals(method.getReturnType(), AtmosObject.class);
} }
@ -239,8 +239,8 @@ public class AtmosStorageAsyncClientTest extends RestClientTest<AtmosStorageAsyn
} }
@Override @Override
protected TypeLiteral<RestAnnotationProcessor<AtmosStorageAsyncClient>> createTypeLiteral() { protected TypeLiteral<RestAnnotationProcessor<AtmosAsyncClient>> createTypeLiteral() {
return new TypeLiteral<RestAnnotationProcessor<AtmosStorageAsyncClient>>() { return new TypeLiteral<RestAnnotationProcessor<AtmosAsyncClient>>() {
}; };
} }
@ -253,12 +253,12 @@ public class AtmosStorageAsyncClientTest extends RestClientTest<AtmosStorageAsyn
@Override @Override
protected Module createModule() { protected Module createModule() {
return new TestAtmosStorageRestClientModule(); return new TestAtmosRestClientModule();
} }
@RequiresHttp @RequiresHttp
@ConfiguresRestClient @ConfiguresRestClient
private static final class TestAtmosStorageRestClientModule extends AtmosStorageRestClientModule { private static final class TestAtmosRestClientModule extends AtmosRestClientModule {
@Override @Override
protected void configure() { protected void configure() {
super.configure(); super.configure();
@ -272,7 +272,7 @@ public class AtmosStorageAsyncClientTest extends RestClientTest<AtmosStorageAsyn
@Override @Override
public RestContextSpec<?, ?> createContextSpec() { public RestContextSpec<?, ?> createContextSpec() {
return new RestContextFactory().createContextSpec("atmosonline", "identity", "credential", new Properties()); return new RestContextFactory().createContextSpec("atmos", "identity", "credential", new Properties());
} }
} }

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas; package org.jclouds.atmos;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
@ -28,12 +28,12 @@ import java.security.SecureRandom;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.atmosonline.saas.domain.BoundedSet; import org.jclouds.atmos.domain.BoundedSet;
import org.jclouds.atmosonline.saas.domain.DirectoryEntry; import org.jclouds.atmos.domain.DirectoryEntry;
import org.jclouds.atmosonline.saas.domain.FileType; import org.jclouds.atmos.domain.FileType;
import org.jclouds.atmosonline.saas.domain.SystemMetadata; import org.jclouds.atmos.domain.SystemMetadata;
import org.jclouds.atmosonline.saas.options.ListOptions; import org.jclouds.atmos.options.ListOptions;
import org.jclouds.blobstore.KeyAlreadyExistsException; import org.jclouds.blobstore.KeyAlreadyExistsException;
import org.jclouds.blobstore.KeyNotFoundException; import org.jclouds.blobstore.KeyNotFoundException;
import org.jclouds.blobstore.integration.internal.BaseBlobStoreIntegrationTest; import org.jclouds.blobstore.integration.internal.BaseBlobStoreIntegrationTest;
@ -50,23 +50,23 @@ import com.google.common.collect.Iterables;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
/** /**
* Tests behavior of {@code AtmosStorageClient} * Tests behavior of {@code AtmosClient}
* *
* @author Adrian Cole * @author Adrian Cole
*/ */
@Test(groups = "live", sequential = true) @Test(groups = "live", sequential = true)
public class AtmosStorageClientLiveTest extends BaseBlobStoreIntegrationTest { public class AtmosClientLiveTest extends BaseBlobStoreIntegrationTest {
public AtmosStorageClient getApi() { public AtmosClient getApi() {
return (AtmosStorageClient) context.getProviderSpecificContext().getApi(); return (AtmosClient) context.getProviderSpecificContext().getApi();
} }
private static final class HeadMatches implements Runnable { private static final class HeadMatches implements Runnable {
private final AtmosStorageClient connection; private final AtmosClient connection;
private final String name; private final String name;
private final String metadataValue; private final String metadataValue;
private HeadMatches(AtmosStorageClient connection, String name, String metadataValue) { private HeadMatches(AtmosClient connection, String name, String metadataValue) {
this.connection = connection; this.connection = connection;
this.name = name; this.name = name;
this.metadataValue = metadataValue; this.metadataValue = metadataValue;
@ -82,12 +82,12 @@ public class AtmosStorageClientLiveTest extends BaseBlobStoreIntegrationTest {
} }
private static final class ObjectMatches implements Runnable { private static final class ObjectMatches implements Runnable {
private final AtmosStorageClient connection; private final AtmosClient connection;
private final String name; private final String name;
private final String metadataValue; private final String metadataValue;
private final String compare; private final String compare;
private ObjectMatches(AtmosStorageClient connection, String name, String metadataValue, String compare) { private ObjectMatches(AtmosClient connection, String name, String metadataValue, String compare) {
this.connection = connection; this.connection = connection;
this.name = name; this.name = name;
this.metadataValue = metadataValue; this.metadataValue = metadataValue;
@ -237,14 +237,14 @@ public class AtmosStorageClientLiveTest extends BaseBlobStoreIntegrationTest {
assertEventually(new HeadMatches(getApi(), privateDirectory + "/" + name, metadataValue)); assertEventually(new HeadMatches(getApi(), privateDirectory + "/" + name, metadataValue));
} }
private static void verifyHeadObject(AtmosStorageClient connection, String path, String metadataValue) private static void verifyHeadObject(AtmosClient connection, String path, String metadataValue)
throws InterruptedException, ExecutionException, TimeoutException, IOException { throws InterruptedException, ExecutionException, TimeoutException, IOException {
AtmosObject getBlob = connection.headFile(path); AtmosObject getBlob = connection.headFile(path);
assertEquals(Strings2.toStringAndClose(getBlob.getPayload().getInput()), ""); assertEquals(Strings2.toStringAndClose(getBlob.getPayload().getInput()), "");
verifyMetadata(metadataValue, getBlob); verifyMetadata(metadataValue, getBlob);
} }
private static void verifyObject(AtmosStorageClient connection, String path, String compare, String metadataValue) private static void verifyObject(AtmosClient connection, String path, String compare, String metadataValue)
throws InterruptedException, ExecutionException, TimeoutException, IOException { throws InterruptedException, ExecutionException, TimeoutException, IOException {
AtmosObject getBlob = connection.readFile(path); AtmosObject getBlob = connection.readFile(path);
assertEquals(Strings2.toStringAndClose(getBlob.getPayload().getInput()), compare); assertEquals(Strings2.toStringAndClose(getBlob.getPayload().getInput()), compare);

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas; package org.jclouds.atmos;
import org.jclouds.blobstore.util.BlobStoreUtils; import org.jclouds.blobstore.util.BlobStoreUtils;
import org.jclouds.rest.Providers; import org.jclouds.rest.Providers;
@ -36,15 +36,13 @@ public class ProvidersInPropertiesTest {
@Test @Test
public void testSupportedProviders() { public void testSupportedProviders() {
Iterable<String> providers = Providers.getSupportedProviders(); Iterable<String> providers = Providers.getSupportedProviders();
assert Iterables.contains(providers, "atmosonline") : providers; assert Iterables.contains(providers, "atmos") : providers;
assert Iterables.contains(providers, "synaptic") : providers;
} }
@Test @Test
public void testSupportedBlobStoreProviders() { public void testSupportedBlobStoreProviders() {
Iterable<String> providers = BlobStoreUtils.getSupportedProviders(); Iterable<String> providers = BlobStoreUtils.getSupportedProviders();
assert Iterables.contains(providers, "atmosonline") : providers; assert Iterables.contains(providers, "atmos") : providers;
assert Iterables.contains(providers, "synaptic") : providers;
} }
} }

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.binders; package org.jclouds.atmos.binders;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
@ -26,7 +26,7 @@ import java.net.URI;
import javax.ws.rs.HttpMethod; import javax.ws.rs.HttpMethod;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
import org.jclouds.io.Payload; import org.jclouds.io.Payload;
import org.jclouds.io.Payloads; import org.jclouds.io.Payloads;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.binders; package org.jclouds.atmos.binders;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
@ -26,7 +26,7 @@ import java.net.URI;
import javax.ws.rs.HttpMethod; import javax.ws.rs.HttpMethod;
import org.jclouds.atmosonline.saas.domain.UserMetadata; import org.jclouds.atmos.domain.UserMetadata;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
import org.testng.annotations.Test; import org.testng.annotations.Test;

View File

@ -17,16 +17,16 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore; package org.jclouds.atmos.blobstore;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
import java.io.IOException; import java.io.IOException;
import java.util.Properties; import java.util.Properties;
import org.jclouds.atmosonline.saas.AtmosStorageAsyncClient; import org.jclouds.atmos.AtmosAsyncClient;
import org.jclouds.atmosonline.saas.config.AtmosStorageRestClientModule; import org.jclouds.atmos.config.AtmosRestClientModule;
import org.jclouds.atmosonline.saas.filters.SignRequest; import org.jclouds.atmos.filters.SignRequest;
import org.jclouds.blobstore.BlobRequestSigner; import org.jclouds.blobstore.BlobRequestSigner;
import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.domain.Blob.Factory; import org.jclouds.blobstore.domain.Blob.Factory;
@ -52,7 +52,7 @@ import com.google.inject.TypeLiteral;
*/ */
// 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 = "AtmosBlobRequestSignerTest") @Test(groups = "unit", testName = "AtmosBlobRequestSignerTest")
public class AtmosBlobRequestSignerTest extends RestClientTest<AtmosStorageAsyncClient> { public class AtmosBlobRequestSignerTest extends RestClientTest<AtmosAsyncClient> {
private BlobRequestSigner signer; private BlobRequestSigner signer;
private Factory blobFactory; private Factory blobFactory;
@ -120,19 +120,19 @@ public class AtmosBlobRequestSignerTest extends RestClientTest<AtmosStorageAsync
} }
@Override @Override
protected TypeLiteral<RestAnnotationProcessor<AtmosStorageAsyncClient>> createTypeLiteral() { protected TypeLiteral<RestAnnotationProcessor<AtmosAsyncClient>> createTypeLiteral() {
return new TypeLiteral<RestAnnotationProcessor<AtmosStorageAsyncClient>>() { return new TypeLiteral<RestAnnotationProcessor<AtmosAsyncClient>>() {
}; };
} }
@Override @Override
protected Module createModule() { protected Module createModule() {
return new TestAtmosStorageRestClientModule(); return new TestAtmosRestClientModule();
} }
@RequiresHttp @RequiresHttp
@ConfiguresRestClient @ConfiguresRestClient
private static final class TestAtmosStorageRestClientModule extends AtmosStorageRestClientModule { private static final class TestAtmosRestClientModule extends AtmosRestClientModule {
@Override @Override
protected void configure() { protected void configure() {
super.configure(); super.configure();
@ -146,7 +146,7 @@ public class AtmosBlobRequestSignerTest extends RestClientTest<AtmosStorageAsync
@Override @Override
public RestContextSpec<?, ?> createContextSpec() { public RestContextSpec<?, ?> createContextSpec() {
return new RestContextFactory().createContextSpec("atmosonline", "identity", "credential", new Properties()); return new RestContextFactory().createContextSpec("atmos", "identity", "credential", new Properties());
} }
} }

View File

@ -17,11 +17,11 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.config; package org.jclouds.atmos.blobstore.config;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
import org.jclouds.atmosonline.saas.blobstore.strategy.FindMD5InUserMetadata; import org.jclouds.atmos.blobstore.strategy.FindMD5InUserMetadata;
import org.jclouds.blobstore.BlobStoreContext; import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.blobstore.internal.BlobStoreContextImpl; import org.jclouds.blobstore.internal.BlobStoreContextImpl;
import org.jclouds.blobstore.strategy.ContainsValueInListStrategy; import org.jclouds.blobstore.strategy.ContainsValueInListStrategy;
@ -41,7 +41,7 @@ import com.google.inject.Module;
public class AtmosBlobStoreModuleTest { public class AtmosBlobStoreModuleTest {
Injector createInjector() { Injector createInjector() {
return new RestContextFactory().createContextBuilder("atmosonline", "uid", "key", return new RestContextFactory().createContextBuilder("atmos", "uid", "key",
ImmutableSet.<Module> of(new MockModule(), new NullLoggingModule())).buildInjector(); ImmutableSet.<Module> of(new MockModule(), new NullLoggingModule())).buildInjector();
} }

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.functions; package org.jclouds.atmos.blobstore.functions;
import javax.inject.Singleton; import javax.inject.Singleton;
@ -30,8 +30,8 @@ import com.google.common.base.Function;
*/ */
@Singleton @Singleton
public class ListOptionsToBlobStoreListOptions implements public class ListOptionsToBlobStoreListOptions implements
Function<org.jclouds.atmosonline.saas.options.ListOptions[], ListContainerOptions> { Function<org.jclouds.atmos.options.ListOptions[], ListContainerOptions> {
public ListContainerOptions apply(org.jclouds.atmosonline.saas.options.ListOptions[] optionsList) { public ListContainerOptions apply(org.jclouds.atmos.options.ListOptions[] optionsList) {
ListContainerOptions options = new ListContainerOptions(); ListContainerOptions options = new ListContainerOptions();
if (optionsList.length != 0) { if (optionsList.length != 0) {
if (optionsList[0].getToken() != null) { if (optionsList[0].getToken() != null) {

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.functions; package org.jclouds.atmos.blobstore.functions;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;

View File

@ -17,14 +17,14 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.functions; package org.jclouds.atmos.blobstore.functions;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.atmosonline.saas.domain.BoundedSet; import org.jclouds.atmos.domain.BoundedSet;
import org.jclouds.atmosonline.saas.domain.DirectoryEntry; import org.jclouds.atmos.domain.DirectoryEntry;
import org.jclouds.atmosonline.saas.domain.FileType; import org.jclouds.atmos.domain.FileType;
import org.jclouds.atmosonline.saas.domain.internal.BoundedLinkedHashSet; import org.jclouds.atmos.domain.internal.BoundedLinkedHashSet;
import org.jclouds.blobstore.domain.StorageMetadata; import org.jclouds.blobstore.domain.StorageMetadata;
import org.jclouds.blobstore.domain.StorageType; import org.jclouds.blobstore.domain.StorageType;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.integration; package org.jclouds.atmos.blobstore.integration;
import org.jclouds.blobstore.integration.internal.BaseBlobSignerLiveTest; import org.jclouds.blobstore.integration.internal.BaseBlobSignerLiveTest;
import org.testng.annotations.Test; import org.testng.annotations.Test;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.integration; package org.jclouds.atmos.blobstore.integration;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
@ -32,7 +32,7 @@ import org.testng.annotations.Test;
* @author Adrian Cole * @author Adrian Cole
*/ */
@Test(groups = "live") @Test(groups = "live")
public class AtmosStorageContainerIntegrationLiveTest extends BaseContainerIntegrationTest { public class AtmosContainerIntegrationLiveTest extends BaseContainerIntegrationTest {
@Override @Override
public void testListContainerMaxResults() throws InterruptedException, public void testListContainerMaxResults() throws InterruptedException,

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.integration; package org.jclouds.atmos.blobstore.integration;
import org.jclouds.blobstore.integration.internal.BaseContainerLiveTest; import org.jclouds.blobstore.integration.internal.BaseContainerLiveTest;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -26,6 +26,6 @@ import org.testng.annotations.Test;
* @author Adrian Cole * @author Adrian Cole
*/ */
@Test(groups = { "live" }) @Test(groups = { "live" })
public class AtmosStorageContainerLiveTest extends BaseContainerLiveTest { public class AtmosContainerLiveTest extends BaseContainerLiveTest {
} }

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.integration; package org.jclouds.atmos.blobstore.integration;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
@ -29,7 +29,7 @@ import org.testng.annotations.Test;
* @author Adrian Cole * @author Adrian Cole
*/ */
@Test(groups = "live") @Test(groups = "live")
public class AtmosStorageInputStreamMapIntegrationLiveTest extends BaseInputStreamMapIntegrationTest { public class AtmosInputStreamMapIntegrationLiveTest extends BaseInputStreamMapIntegrationTest {
@Override @Override
@Test(enabled = false) @Test(enabled = false)

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.integration; package org.jclouds.atmos.blobstore.integration;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
@ -35,7 +35,7 @@ import org.testng.annotations.Test;
* @author Adrian Cole * @author Adrian Cole
*/ */
@Test(groups = { "integration", "live" }) @Test(groups = { "integration", "live" })
public class AtmosStorageIntegrationLiveTest extends BaseBlobIntegrationTest { public class AtmosIntegrationLiveTest extends BaseBlobIntegrationTest {
@DataProvider(name = "delete") @DataProvider(name = "delete")
// no unicode support // no unicode support

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.integration; package org.jclouds.atmos.blobstore.integration;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
@ -29,7 +29,7 @@ import org.testng.annotations.Test;
* @author Adrian Cole * @author Adrian Cole
*/ */
@Test(groups = { "live" }) @Test(groups = { "live" })
public class AtmosStorageLiveTest extends BaseBlobLiveTest { public class AtmosLiveTest extends BaseBlobLiveTest {
protected void checkMD5(String container, String name, byte[] md5) { protected void checkMD5(String container, String name, byte[] md5) {
// atmos does not support content-md5 yet // atmos does not support content-md5 yet
assertEquals(context.getBlobStore().blobMetadata(container, name).getContentMetadata().getContentMD5(), null); assertEquals(context.getBlobStore().blobMetadata(container, name).getContentMetadata().getContentMD5(), null);

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.integration; package org.jclouds.atmos.blobstore.integration;
import java.io.IOException; import java.io.IOException;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
@ -30,7 +30,7 @@ import org.testng.annotations.Test;
* @author Adrian Cole * @author Adrian Cole
*/ */
@Test(groups = "live") @Test(groups = "live")
public class AtmosStorageMapIntegrationLiveTest extends BaseBlobMapIntegrationTest { public class AtmosMapIntegrationLiveTest extends BaseBlobMapIntegrationTest {
@Override @Override
// NO support for Content-MD5, so contains cannot work // NO support for Content-MD5, so contains cannot work

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.integration; package org.jclouds.atmos.blobstore.integration;
import org.jclouds.blobstore.integration.internal.BaseServiceIntegrationTest; import org.jclouds.blobstore.integration.internal.BaseServiceIntegrationTest;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -26,6 +26,6 @@ import org.testng.annotations.Test;
* @author Adrian Cole * @author Adrian Cole
*/ */
@Test(groups = "live") @Test(groups = "live")
public class AtmosStorageServiceIntegrationLiveTest extends BaseServiceIntegrationTest { public class AtmosServiceIntegrationLiveTest extends BaseServiceIntegrationTest {
} }

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.blobstore.integration; package org.jclouds.atmos.blobstore.integration;
import java.io.IOException; import java.io.IOException;
@ -33,8 +33,8 @@ import com.google.inject.Module;
* *
* @author Adrian Cole * @author Adrian Cole
*/ */
public class AtmosStorageTestInitializer extends TransientBlobStoreTestInitializer { public class AtmosTestInitializer extends TransientBlobStoreTestInitializer {
public AtmosStorageTestInitializer() { public AtmosTestInitializer() {
provider = "synaptic"; provider = "synaptic";
} }

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.filters; package org.jclouds.atmos.filters;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
@ -30,8 +30,8 @@ import java.util.Properties;
import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import org.jclouds.atmosonline.saas.config.AtmosStorageRestClientModule; import org.jclouds.atmos.config.AtmosRestClientModule;
import org.jclouds.atmosonline.saas.reference.AtmosStorageHeaders; import org.jclouds.atmos.reference.AtmosHeaders;
import org.jclouds.date.TimeStamp; import org.jclouds.date.TimeStamp;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
import org.jclouds.http.RequiresHttp; import org.jclouds.http.RequiresHttp;
@ -85,26 +85,26 @@ public class SignRequestTest {
void testFilter() throws IOException, NoSuchAlgorithmException, InvalidKeyException { void testFilter() throws IOException, NoSuchAlgorithmException, InvalidKeyException {
HttpRequest request = newRequest(inputHeaders().build()); HttpRequest request = newRequest(inputHeaders().build());
request = filter.filter(request); request = filter.filter(request);
assertEquals(request.getFirstHeaderOrNull(AtmosStorageHeaders.SIGNATURE), EXPECTED_SIGNATURE); assertEquals(request.getFirstHeaderOrNull(AtmosHeaders.SIGNATURE), EXPECTED_SIGNATURE);
} }
@Test @Test
void testFilterReplacesOldValues() throws IOException, NoSuchAlgorithmException, InvalidKeyException { void testFilterReplacesOldValues() throws IOException, NoSuchAlgorithmException, InvalidKeyException {
HttpRequest request = newRequest(inputHeaders().put(AtmosStorageHeaders.SIGNATURE, "foo") HttpRequest request = newRequest(inputHeaders().put(AtmosHeaders.SIGNATURE, "foo")
.put(HttpHeaders.DATE, "foo").put(AtmosStorageHeaders.DATE, "foo").put(AtmosStorageHeaders.UID, "foo") .put(HttpHeaders.DATE, "foo").put(AtmosHeaders.DATE, "foo").put(AtmosHeaders.UID, "foo")
.build()); .build());
request = filter.filter(request); request = filter.filter(request);
assertEquals(request.getFirstHeaderOrNull(AtmosStorageHeaders.SIGNATURE), EXPECTED_SIGNATURE); assertEquals(request.getFirstHeaderOrNull(AtmosHeaders.SIGNATURE), EXPECTED_SIGNATURE);
} }
@BeforeClass @BeforeClass
protected void createFilter() { protected void createFilter() {
Injector injector = new RestContextFactory() Injector injector = new RestContextFactory()
.createContextBuilder( .createContextBuilder(
"atmosonline", "atmos",
UID, UID,
KEY, KEY,
ImmutableSet.<Module> of(new MockModule(), new TestAtmosStorageRestClientModule(), ImmutableSet.<Module> of(new MockModule(), new TestAtmosRestClientModule(),
new NullLoggingModule()), new Properties()).buildInjector(); new NullLoggingModule()), new Properties()).buildInjector();
filter = injector.getInstance(SignRequest.class); filter = injector.getInstance(SignRequest.class);
@ -113,7 +113,7 @@ public class SignRequestTest {
@RequiresHttp @RequiresHttp
@ConfiguresRestClient @ConfiguresRestClient
private static final class TestAtmosStorageRestClientModule extends AtmosStorageRestClientModule { private static final class TestAtmosRestClientModule extends AtmosRestClientModule {
@Override @Override
protected void configure() { protected void configure() {
@ -137,18 +137,18 @@ public class SignRequestTest {
protected Builder<String, String> preconstructedHeaders() { protected Builder<String, String> preconstructedHeaders() {
Builder<String, String> builder = inputHeaders(); Builder<String, String> builder = inputHeaders();
builder.put(HttpHeaders.DATE, DEFAULT_DATE); builder.put(HttpHeaders.DATE, DEFAULT_DATE);
builder.put(AtmosStorageHeaders.UID, UID); builder.put(AtmosHeaders.UID, UID);
return builder; return builder;
} }
protected Builder<String, String> inputHeaders() { protected Builder<String, String> inputHeaders() {
Builder<String, String> builder = ImmutableMultimap.builder(); Builder<String, String> builder = ImmutableMultimap.builder();
builder.put(AtmosStorageHeaders.LISTABLE_META, "part4/part7/part8=quick"); builder.put(AtmosHeaders.LISTABLE_META, "part4/part7/part8=quick");
builder.put(AtmosStorageHeaders.META, "part1=buy"); builder.put(AtmosHeaders.META, "part1=buy");
builder.put(HttpHeaders.ACCEPT, "*/*"); builder.put(HttpHeaders.ACCEPT, "*/*");
builder.put(AtmosStorageHeaders.USER_ACL, "john=FULL_CONTROL,mary=WRITE"); builder.put(AtmosHeaders.USER_ACL, "john=FULL_CONTROL,mary=WRITE");
builder.put(AtmosStorageHeaders.GROUP_ACL, "other=NONE"); builder.put(AtmosHeaders.GROUP_ACL, "other=NONE");
builder.put(AtmosStorageHeaders.DATE, DEFAULT_DATE); builder.put(AtmosHeaders.DATE, DEFAULT_DATE);
builder.put(HttpHeaders.HOST, "10.5.115.118"); builder.put(HttpHeaders.HOST, "10.5.115.118");
return builder; return builder;
} }

View File

@ -17,16 +17,16 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.functions; package org.jclouds.atmos.functions;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
import java.io.File; import java.io.File;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.atmosonline.saas.domain.AtmosObject.Factory; import org.jclouds.atmos.domain.AtmosObject.Factory;
import org.jclouds.atmosonline.saas.domain.SystemMetadata; import org.jclouds.atmos.domain.SystemMetadata;
import org.jclouds.atmosonline.saas.domain.UserMetadata; import org.jclouds.atmos.domain.UserMetadata;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.google.inject.Guice; import com.google.inject.Guice;

View File

@ -17,17 +17,17 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.functions; package org.jclouds.atmos.functions;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
import java.util.Set; import java.util.Set;
import org.jclouds.atmosonline.saas.domain.BoundedSet; import org.jclouds.atmos.domain.BoundedSet;
import org.jclouds.atmosonline.saas.domain.DirectoryEntry; import org.jclouds.atmos.domain.DirectoryEntry;
import org.jclouds.atmosonline.saas.domain.FileType; import org.jclouds.atmos.domain.FileType;
import org.jclouds.atmosonline.saas.domain.internal.BoundedLinkedHashSet; import org.jclouds.atmos.domain.internal.BoundedLinkedHashSet;
import org.jclouds.atmosonline.saas.reference.AtmosStorageHeaders; import org.jclouds.atmos.reference.AtmosHeaders;
import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponse;
import org.jclouds.http.functions.BaseHandlerTest; import org.jclouds.http.functions.BaseHandlerTest;
import org.jclouds.io.Payloads; import org.jclouds.io.Payloads;
@ -52,7 +52,7 @@ public class ParseDirectoryListFromContentAndHeadersTest extends BaseHandlerTest
public void testWithToken() { public void testWithToken() {
HttpResponse response = new HttpResponse(200, "ok", Payloads.newPayload(getClass().getResourceAsStream( HttpResponse response = new HttpResponse(200, "ok", Payloads.newPayload(getClass().getResourceAsStream(
"/list_basic.xml")), ImmutableMultimap.of(AtmosStorageHeaders.TOKEN, "token")); "/list_basic.xml")), ImmutableMultimap.of(AtmosHeaders.TOKEN, "token"));
BoundedSet<DirectoryEntry> result = createFn().apply(response); BoundedSet<DirectoryEntry> result = createFn().apply(response);
assertEquals(result, new BoundedLinkedHashSet<DirectoryEntry>(values(), "token")); assertEquals(result, new BoundedLinkedHashSet<DirectoryEntry>(values(), "token"));

View File

@ -17,12 +17,12 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.functions; package org.jclouds.atmos.functions;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.atmosonline.saas.reference.AtmosStorageHeaders; import org.jclouds.atmos.reference.AtmosHeaders;
import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponse;
import org.jclouds.io.Payloads; import org.jclouds.io.Payloads;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -39,13 +39,13 @@ import com.google.inject.Guice;
public class ParseObjectFromHeadersAndHttpContentTest { public class ParseObjectFromHeadersAndHttpContentTest {
static final HttpResponse RESPONSE = new HttpResponse(200, "ok", Payloads.newStringPayload(""), static final HttpResponse RESPONSE = new HttpResponse(200, "ok", Payloads.newStringPayload(""),
ImmutableMultimap.of(AtmosStorageHeaders.TAGS, "tag1, tag2", AtmosStorageHeaders.LISTABLE_TAGS, ImmutableMultimap.of(AtmosHeaders.TAGS, "tag1, tag2", AtmosHeaders.LISTABLE_TAGS,
"listabletag1, listabletag2", AtmosStorageHeaders.META, "listabletag1, listabletag2", AtmosHeaders.META,
"meta1=foo1, content-md5=1f3870be274f6c49b3e31a0c6728957f, atime=2009-10-12T16:09:42Z, mtime=2009-10-19T04:37:00Z," "meta1=foo1, content-md5=1f3870be274f6c49b3e31a0c6728957f, atime=2009-10-12T16:09:42Z, mtime=2009-10-19T04:37:00Z,"
+ " ctime=2009-10-19T04:37:00Z, itime=2009-10-12T16:09:42Z, type=directory, uid=root, " + " ctime=2009-10-19T04:37:00Z, itime=2009-10-12T16:09:42Z, type=directory, uid=root, "
+ "gid=rootr, objectid=4980cdb2b010109b04a44f7bb83f5f04ad354c638ae5, " + "gid=rootr, objectid=4980cdb2b010109b04a44f7bb83f5f04ad354c638ae5, "
+ "objname=e913e09366364e9ba384b8fead643d43, size=4096, nlink=1, policyname=default", + "objname=e913e09366364e9ba384b8fead643d43, size=4096, nlink=1, policyname=default",
AtmosStorageHeaders.LISTABLE_META, "listablemeta1=listablefoo1, listablemeta2=listablefoo2")); AtmosHeaders.LISTABLE_META, "listablemeta1=listablefoo1, listablemeta2=listablefoo2"));
public static final AtmosObject EXPECTED; public static final AtmosObject EXPECTED;

View File

@ -17,12 +17,12 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.functions; package org.jclouds.atmos.functions;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
import org.jclouds.atmosonline.saas.domain.FileType; import org.jclouds.atmos.domain.FileType;
import org.jclouds.atmosonline.saas.domain.SystemMetadata; import org.jclouds.atmos.domain.SystemMetadata;
import org.jclouds.crypto.CryptoStreams; import org.jclouds.crypto.CryptoStreams;
import org.jclouds.date.DateService; import org.jclouds.date.DateService;
import org.jclouds.date.internal.SimpleDateFormatDateService; import org.jclouds.date.internal.SimpleDateFormatDateService;

View File

@ -17,11 +17,11 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.functions; package org.jclouds.atmos.functions;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
import org.jclouds.atmosonline.saas.domain.UserMetadata; import org.jclouds.atmos.domain.UserMetadata;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;

View File

@ -1,4 +1,4 @@
package org.jclouds.atmosonline.saas.functions; package org.jclouds.atmos.functions;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.internal; package org.jclouds.atmos.internal;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.util.concurrent.Futures.immediateFailedFuture; import static com.google.common.util.concurrent.Futures.immediateFailedFuture;
@ -31,18 +31,18 @@ import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
import org.jclouds.Constants; import org.jclouds.Constants;
import org.jclouds.atmosonline.saas.AtmosStorageAsyncClient; import org.jclouds.atmos.AtmosAsyncClient;
import org.jclouds.atmosonline.saas.blobstore.functions.BlobMetadataToObject; import org.jclouds.atmos.blobstore.functions.BlobMetadataToObject;
import org.jclouds.atmosonline.saas.blobstore.functions.BlobToObject; import org.jclouds.atmos.blobstore.functions.BlobToObject;
import org.jclouds.atmosonline.saas.blobstore.functions.ListOptionsToBlobStoreListOptions; import org.jclouds.atmos.blobstore.functions.ListOptionsToBlobStoreListOptions;
import org.jclouds.atmosonline.saas.blobstore.functions.ObjectToBlob; import org.jclouds.atmos.blobstore.functions.ObjectToBlob;
import org.jclouds.atmosonline.saas.blobstore.functions.ResourceMetadataListToDirectoryEntryList; import org.jclouds.atmos.blobstore.functions.ResourceMetadataListToDirectoryEntryList;
import org.jclouds.atmosonline.saas.domain.AtmosObject; import org.jclouds.atmos.domain.AtmosObject;
import org.jclouds.atmosonline.saas.domain.BoundedSet; import org.jclouds.atmos.domain.BoundedSet;
import org.jclouds.atmosonline.saas.domain.DirectoryEntry; import org.jclouds.atmos.domain.DirectoryEntry;
import org.jclouds.atmosonline.saas.domain.SystemMetadata; import org.jclouds.atmos.domain.SystemMetadata;
import org.jclouds.atmosonline.saas.domain.UserMetadata; import org.jclouds.atmos.domain.UserMetadata;
import org.jclouds.atmosonline.saas.options.ListOptions; import org.jclouds.atmos.options.ListOptions;
import org.jclouds.blobstore.TransientAsyncBlobStore; import org.jclouds.blobstore.TransientAsyncBlobStore;
import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.BlobMetadata;
@ -55,11 +55,11 @@ import com.google.common.base.Throwables;
import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListenableFuture;
/** /**
* Implementation of {@link AtmosStorageAsyncClient} which keeps all data in a local Map object. * Implementation of {@link AtmosAsyncClient} which keeps all data in a local Map object.
* *
* @author Adrian Cole * @author Adrian Cole
*/ */
public class StubAtmosStorageAsyncClient implements AtmosStorageAsyncClient { public class StubAtmosAsyncClient implements AtmosAsyncClient {
private final HttpGetOptionsListToGetOptions httpGetOptionsConverter; private final HttpGetOptionsListToGetOptions httpGetOptionsConverter;
private final TransientAsyncBlobStore blobStore; private final TransientAsyncBlobStore blobStore;
private final AtmosObject.Factory objectProvider; private final AtmosObject.Factory objectProvider;
@ -71,7 +71,7 @@ public class StubAtmosStorageAsyncClient implements AtmosStorageAsyncClient {
private final ExecutorService service; private final ExecutorService service;
@Inject @Inject
private StubAtmosStorageAsyncClient(TransientAsyncBlobStore blobStore, AtmosObject.Factory objectProvider, private StubAtmosAsyncClient(TransientAsyncBlobStore blobStore, AtmosObject.Factory objectProvider,
HttpGetOptionsListToGetOptions httpGetOptionsConverter, ObjectToBlob object2Blob, BlobToObject blob2Object, HttpGetOptionsListToGetOptions httpGetOptionsConverter, ObjectToBlob object2Blob, BlobToObject blob2Object,
BlobMetadataToObject blob2ObjectInfo, ListOptionsToBlobStoreListOptions container2ContainerListOptions, BlobMetadataToObject blob2ObjectInfo, ListOptionsToBlobStoreListOptions container2ContainerListOptions,
@Named(Constants.PROPERTY_USER_THREADS) ExecutorService service, @Named(Constants.PROPERTY_USER_THREADS) ExecutorService service,

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.options; package org.jclouds.atmos.options;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;

View File

@ -17,13 +17,13 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.xml; package org.jclouds.atmos.xml;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
import java.io.InputStream; import java.io.InputStream;
import org.jclouds.atmosonline.saas.domain.AtmosStorageError; import org.jclouds.atmos.domain.AtmosError;
import org.jclouds.http.functions.BaseHandlerTest; import org.jclouds.http.functions.BaseHandlerTest;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -37,16 +37,16 @@ import org.testng.annotations.Test;
@Test(groups = "unit", testName = "ErrorHandlerTest") @Test(groups = "unit", testName = "ErrorHandlerTest")
public class ErrorHandlerTest extends BaseHandlerTest { public class ErrorHandlerTest extends BaseHandlerTest {
ParseSax<AtmosStorageError> createParser() { ParseSax<AtmosError> createParser() {
ParseSax<AtmosStorageError> parser = (ParseSax<AtmosStorageError>) factory.create(injector ParseSax<AtmosError> parser = (ParseSax<AtmosError>) factory.create(injector
.getInstance(ErrorHandler.class)); .getInstance(ErrorHandler.class));
return parser; return parser;
} }
public void testApplyInputStream() { public void testApplyInputStream() {
InputStream is = getClass().getResourceAsStream("/error.xml"); InputStream is = getClass().getResourceAsStream("/error.xml");
ParseSax<AtmosStorageError> parser = createParser(); ParseSax<AtmosError> parser = createParser();
AtmosStorageError result = parser.parse(is); AtmosError result = parser.parse(is);
assertEquals(result.getCode(), 1003); assertEquals(result.getCode(), 1003);
} }
} }

View File

@ -17,15 +17,15 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.atmosonline.saas.xml; package org.jclouds.atmos.xml;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
import java.io.InputStream; import java.io.InputStream;
import java.util.Set; import java.util.Set;
import org.jclouds.atmosonline.saas.domain.DirectoryEntry; import org.jclouds.atmos.domain.DirectoryEntry;
import org.jclouds.atmosonline.saas.domain.FileType; import org.jclouds.atmos.domain.FileType;
import org.jclouds.http.functions.BaseHandlerTest; import org.jclouds.http.functions.BaseHandlerTest;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.testng.annotations.Test; import org.testng.annotations.Test;

View File

@ -45,5 +45,6 @@
<module>vcloud</module> <module>vcloud</module>
<module>vcloudexpress</module> <module>vcloudexpress</module>
<module>elasticstack</module> <module>elasticstack</module>
<module>atmos</module>
</modules> </modules>
</project> </project>

View File

@ -147,6 +147,10 @@ stub.contextbuilder=org.jclouds.compute.stub.StubComputeServiceContextBuilder
# example of where to change your endpoint # example of where to change your endpoint
# bluelock.endpoint=https://express3.bluelock.com/api # bluelock.endpoint=https://express3.bluelock.com/api
atmos.contextbuilder=org.jclouds.atmos.AtmosContextBuilder
atmos.endpoint=https://accesspoint.atmosonline.com
atmos.apiversion=1.3.0
atmosonline.contextbuilder=org.jclouds.atmosonline.saas.AtmosStorageContextBuilder atmosonline.contextbuilder=org.jclouds.atmosonline.saas.AtmosStorageContextBuilder
atmosonline.endpoint=https://accesspoint.atmosonline.com atmosonline.endpoint=https://accesspoint.atmosonline.com
atmosonline.apiversion=1.3.0 atmosonline.apiversion=1.3.0

View File

@ -46,7 +46,6 @@
<module>tools</module> <module>tools</module>
<module>scriptbuilder</module> <module>scriptbuilder</module>
<module>azure</module> <module>azure</module>
<module>atmos</module>
<module>allcompute</module> <module>allcompute</module>
<module>allblobstore</module> <module>allblobstore</module>
<module>all</module> <module>all</module>