From de174248713fd0bc001b512b0590ce765a81d189 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Sun, 16 Jan 2011 13:45:11 -0800 Subject: [PATCH] Issue 440: moved atmos to api groupId --- README.txt | 2 +- allblobstore/pom.xml | 4 +- {atmos => apis/atmos}/README.txt | 0 {atmos => apis/atmos}/pom.xml | 81 +++++-------------- .../org/jclouds/atmos/AtmosAsyncClient.java | 54 ++++++------- .../java/org/jclouds/atmos/AtmosClient.java | 18 ++--- .../jclouds/atmos/AtmosContextBuilder.java | 16 ++-- .../jclouds/atmos/AtmosResponseException.java | 34 ++++---- .../atmos}/binders/BindMetadataToHeaders.java | 4 +- .../binders/BindUserMetadataToHeaders.java | 4 +- .../atmos}/blobstore/AtmosAsyncBlobStore.java | 64 +++++++-------- .../blobstore/AtmosBlobRequestSigner.java | 20 ++--- .../atmos}/blobstore/AtmosBlobStore.java | 54 ++++++------- .../config/AtmosBlobStoreContextModule.java | 16 ++-- .../functions/BlobMetadataToObject.java | 8 +- .../BlobStoreListOptionsToListOptions.java | 10 +-- .../functions/BlobToContentMetadata.java | 8 +- .../blobstore/functions/BlobToObject.java | 6 +- .../functions/BlobToSystemMetadata.java | 8 +- ...ectoryEntryListToResourceMetadataList.java | 10 +-- .../blobstore/functions/ObjectToBlob.java | 4 +- .../functions/ObjectToBlobMetadata.java | 10 +-- .../strategy/FindMD5InUserMetadata.java | 10 +-- .../atmos}/config/AtmosObjectModule.java | 8 +- .../atmos/config/AtmosParserModule.java | 4 +- .../atmos/config/AtmosRestClientModule.java | 26 +++--- .../org/jclouds/atmos/domain/AtmosError.java | 8 +- .../jclouds/atmos}/domain/AtmosObject.java | 6 +- .../org/jclouds/atmos}/domain/BoundedSet.java | 6 +- .../jclouds/atmos}/domain/DirectoryEntry.java | 4 +- .../org/jclouds/atmos}/domain/FileType.java | 2 +- .../atmos}/domain/MutableContentMetadata.java | 6 +- .../jclouds/atmos}/domain/SystemMetadata.java | 4 +- .../org/jclouds/atmos}/domain/UploadInfo.java | 2 +- .../jclouds/atmos}/domain/UserMetadata.java | 4 +- .../domain/internal/AtmosObjectImpl.java | 10 +-- .../domain/internal/BoundedLinkedHashSet.java | 6 +- .../DelegatingMutableContentMetadata.java | 6 +- .../jclouds/atmos}/filters/SignRequest.java | 16 ++-- .../atmos}/functions/AtmosObjectName.java | 6 +- ...rseDirectoryListFromContentAndHeaders.java | 14 ++-- .../ParseObjectFromHeadersAndHttpContent.java | 6 +- .../ParseSystemMetadataFromHeaders.java | 12 +-- .../ParseUserMetadataFromHeaders.java | 22 ++--- .../ReturnEndpointIfAlreadyExists.java | 4 +- .../AtmosClientErrorRetryHandler.java | 16 ++-- .../ParseAtmosErrorFromXmlContent.java | 24 +++--- .../jclouds/atmos}/options/ListOptions.java | 2 +- .../jclouds/atmos/reference/AtmosHeaders.java | 6 +- .../org/jclouds/atmos/util/AtmosUtils.java | 28 +++---- .../org/jclouds/atmos}/xml/ErrorHandler.java | 10 +-- .../xml/ListDirectoryResponseHandler.java | 6 +- .../jclouds/atmos/AtmosAsyncClientTest.java | 58 ++++++------- .../jclouds/atmos/AtmosClientLiveTest.java | 34 ++++---- .../atmos}/ProvidersInPropertiesTest.java | 8 +- .../binders/BindMetadataToHeadersTest.java | 4 +- .../BindUserMetadataToHeadersTest.java | 4 +- .../blobstore/AtmosBlobRequestSignerTest.java | 22 ++--- .../config/AtmosBlobStoreModuleTest.java | 8 +- .../ListOptionsToBlobStoreListOptions.java | 8 +- .../functions/ObjectToBlobMetadataTest.java | 2 +- ...ourceMetadataListToDirectoryEntryList.java | 12 +-- .../integration/AtmosBlobSignerLiveTest.java | 4 +- .../AtmosContainerIntegrationLiveTest.java | 6 +- .../integration/AtmosContainerLiveTest.java | 6 +- ...tmosInputStreamMapIntegrationLiveTest.java | 6 +- .../integration/AtmosIntegrationLiveTest.java | 6 +- .../blobstore/integration/AtmosLiveTest.java | 6 +- .../AtmosMapIntegrationLiveTest.java | 6 +- .../AtmosServiceIntegrationLiveTest.java | 6 +- .../integration/AtmosTestInitializer.java | 8 +- .../atmos}/filters/SignRequestTest.java | 34 ++++---- .../atmos}/functions/AtmosObjectNameTest.java | 10 +-- ...irectoryListFromContentAndHeadersTest.java | 14 ++-- ...seObjectFromHeadersAndHttpContentTest.java | 12 +-- .../ParseSystemMetadataFromHeadersTest.java | 6 +- .../ParseUserMetadataFromHeadersTest.java | 4 +- .../ReturnEndpointIfAlreadyExistsTest.java | 2 +- .../atmos/internal/StubAtmosAsyncClient.java | 32 ++++---- .../atmos}/options/ListOptionsTest.java | 2 +- .../jclouds/atmos}/xml/ErrorHandlerTest.java | 12 +-- .../xml/ListDirectoryResponseHandlerTest.java | 6 +- .../atmos}/src/test/resources/error.xml | 0 .../atmos}/src/test/resources/hashstring.txt | 0 .../atmos}/src/test/resources/list_basic.xml | 0 .../atmos}/src/test/resources/list_meta.xml | 0 .../atmos}/src/test/resources/log4j.xml | 0 apis/pom.xml | 1 + core/src/main/resources/rest.properties | 4 + pom.xml | 1 - 90 files changed, 518 insertions(+), 555 deletions(-) rename {atmos => apis/atmos}/README.txt (100%) rename {atmos => apis/atmos}/pom.xml (51%) rename atmos/src/main/java/org/jclouds/atmosonline/saas/AtmosStorageAsyncClient.java => apis/atmos/src/main/java/org/jclouds/atmos/AtmosAsyncClient.java (79%) rename atmos/src/main/java/org/jclouds/atmosonline/saas/AtmosStorageClient.java => apis/atmos/src/main/java/org/jclouds/atmos/AtmosClient.java (81%) rename atmos/src/main/java/org/jclouds/atmosonline/saas/AtmosStorageContextBuilder.java => apis/atmos/src/main/java/org/jclouds/atmos/AtmosContextBuilder.java (78%) mode change 100755 => 100644 rename atmos/src/main/java/org/jclouds/atmosonline/saas/AtmosStorageResponseException.java => apis/atmos/src/main/java/org/jclouds/atmos/AtmosResponseException.java (62%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/binders/BindMetadataToHeaders.java (94%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/binders/BindUserMetadataToHeaders.java (96%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/blobstore/AtmosAsyncBlobStore.java (77%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/blobstore/AtmosBlobRequestSigner.java (76%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/blobstore/AtmosBlobStore.java (77%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/blobstore/config/AtmosBlobStoreContextModule.java (84%) mode change 100755 => 100644 rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/blobstore/functions/BlobMetadataToObject.java (91%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/blobstore/functions/BlobStoreListOptionsToListOptions.java (79%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/blobstore/functions/BlobToContentMetadata.java (87%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/blobstore/functions/BlobToObject.java (93%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/blobstore/functions/BlobToSystemMetadata.java (89%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/blobstore/functions/DirectoryEntryListToResourceMetadataList.java (92%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/blobstore/functions/ObjectToBlob.java (94%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/blobstore/functions/ObjectToBlobMetadata.java (92%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/blobstore/strategy/FindMD5InUserMetadata.java (94%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/config/AtmosObjectModule.java (90%) rename atmos/src/main/java/org/jclouds/atmosonline/saas/config/AtmosStorageParserModule.java => apis/atmos/src/main/java/org/jclouds/atmos/config/AtmosParserModule.java (91%) rename atmos/src/main/java/org/jclouds/atmosonline/saas/config/AtmosStorageRestClientModule.java => apis/atmos/src/main/java/org/jclouds/atmos/config/AtmosRestClientModule.java (77%) rename atmos/src/main/java/org/jclouds/atmosonline/saas/domain/AtmosStorageError.java => apis/atmos/src/main/java/org/jclouds/atmos/domain/AtmosError.java (88%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/domain/AtmosObject.java (92%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/domain/BoundedSet.java (89%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/domain/DirectoryEntry.java (98%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/domain/FileType.java (96%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/domain/MutableContentMetadata.java (89%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/domain/SystemMetadata.java (99%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/domain/UploadInfo.java (96%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/domain/UserMetadata.java (98%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/domain/internal/AtmosObjectImpl.java (94%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/domain/internal/BoundedLinkedHashSet.java (95%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/domain/internal/DelegatingMutableContentMetadata.java (97%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/filters/SignRequest.java (94%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/functions/AtmosObjectName.java (93%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/functions/ParseDirectoryListFromContentAndHeaders.java (82%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/functions/ParseObjectFromHeadersAndHttpContent.java (96%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/functions/ParseSystemMetadataFromHeaders.java (91%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/functions/ParseUserMetadataFromHeaders.java (76%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/functions/ReturnEndpointIfAlreadyExists.java (97%) rename atmos/src/main/java/org/jclouds/atmosonline/saas/handlers/AtmosStorageClientErrorRetryHandler.java => apis/atmos/src/main/java/org/jclouds/atmos/handlers/AtmosClientErrorRetryHandler.java (84%) rename atmos/src/main/java/org/jclouds/atmosonline/saas/handlers/ParseAtmosStorageErrorFromXmlContent.java => apis/atmos/src/main/java/org/jclouds/atmos/handlers/ParseAtmosErrorFromXmlContent.java (85%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/options/ListOptions.java (98%) rename atmos/src/main/java/org/jclouds/atmosonline/saas/reference/AtmosStorageHeaders.java => apis/atmos/src/main/java/org/jclouds/atmos/reference/AtmosHeaders.java (91%) rename atmos/src/main/java/org/jclouds/atmosonline/saas/util/AtmosStorageUtils.java => apis/atmos/src/main/java/org/jclouds/atmos/util/AtmosUtils.java (74%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/xml/ErrorHandler.java (87%) rename {atmos/src/main/java/org/jclouds/atmosonline/saas => apis/atmos/src/main/java/org/jclouds/atmos}/xml/ListDirectoryResponseHandler.java (93%) rename atmos/src/test/java/org/jclouds/atmosonline/saas/AtmosStorageAsyncClientTest.java => apis/atmos/src/test/java/org/jclouds/atmos/AtmosAsyncClientTest.java (81%) rename atmos/src/test/java/org/jclouds/atmosonline/saas/AtmosStorageClientLiveTest.java => apis/atmos/src/test/java/org/jclouds/atmos/AtmosClientLiveTest.java (92%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/ProvidersInPropertiesTest.java (80%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/binders/BindMetadataToHeadersTest.java (97%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/binders/BindUserMetadataToHeadersTest.java (97%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/blobstore/AtmosBlobRequestSignerTest.java (88%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/blobstore/config/AtmosBlobStoreModuleTest.java (92%) mode change 100755 => 100644 rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/blobstore/functions/ListOptionsToBlobStoreListOptions.java (85%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/blobstore/functions/ObjectToBlobMetadataTest.java (95%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/blobstore/functions/ResourceMetadataListToDirectoryEntryList.java (86%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/blobstore/integration/AtmosBlobSignerLiveTest.java (94%) rename atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageContainerIntegrationLiveTest.java => apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosContainerIntegrationLiveTest.java (91%) mode change 100755 => 100644 rename atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageContainerLiveTest.java => apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosContainerLiveTest.java (87%) rename atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageInputStreamMapIntegrationLiveTest.java => apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosInputStreamMapIntegrationLiveTest.java (93%) rename atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageIntegrationLiveTest.java => apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosIntegrationLiveTest.java (96%) mode change 100755 => 100644 rename atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageLiveTest.java => apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosLiveTest.java (91%) rename atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageMapIntegrationLiveTest.java => apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosMapIntegrationLiveTest.java (89%) rename atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageServiceIntegrationLiveTest.java => apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosServiceIntegrationLiveTest.java (86%) rename atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageTestInitializer.java => apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosTestInitializer.java (89%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/filters/SignRequestTest.java (80%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/functions/AtmosObjectNameTest.java (87%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/functions/ParseDirectoryListFromContentAndHeadersTest.java (86%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/functions/ParseObjectFromHeadersAndHttpContentTest.java (83%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/functions/ParseSystemMetadataFromHeadersTest.java (92%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/functions/ParseUserMetadataFromHeadersTest.java (94%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/functions/ReturnEndpointIfAlreadyExistsTest.java (95%) rename atmos/src/test/java/org/jclouds/atmosonline/saas/internal/StubAtmosStorageAsyncClient.java => apis/atmos/src/test/java/org/jclouds/atmos/internal/StubAtmosAsyncClient.java (88%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/options/ListOptionsTest.java (98%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/xml/ErrorHandlerTest.java (80%) rename {atmos/src/test/java/org/jclouds/atmosonline/saas => apis/atmos/src/test/java/org/jclouds/atmos}/xml/ListDirectoryResponseHandlerTest.java (93%) rename {atmos => apis/atmos}/src/test/resources/error.xml (100%) rename {atmos => apis/atmos}/src/test/resources/hashstring.txt (100%) rename {atmos => apis/atmos}/src/test/resources/list_basic.xml (100%) rename {atmos => apis/atmos}/src/test/resources/list_meta.xml (100%) rename {atmos => apis/atmos}/src/test/resources/log4j.xml (100%) diff --git a/README.txt b/README.txt index 0f66571420..677a732876 100644 --- a/README.txt +++ b/README.txt @@ -42,7 +42,7 @@ our compute api supports: aws-ec2, gogrid, cloudservers (generic), cloudservers- to all of these providers 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, ecc-s3, swift (generic), transient (in-mem), filesystem (on-disk) diff --git a/allblobstore/pom.xml b/allblobstore/pom.xml index 80347cc79c..dc8f50d78a 100644 --- a/allblobstore/pom.xml +++ b/allblobstore/pom.xml @@ -65,8 +65,8 @@ ${project.version} - ${project.groupId} - jclouds-atmos + org.jclouds.api + atmos ${project.version} diff --git a/atmos/README.txt b/apis/atmos/README.txt similarity index 100% rename from atmos/README.txt rename to apis/atmos/README.txt diff --git a/atmos/pom.xml b/apis/atmos/pom.xml similarity index 51% rename from atmos/pom.xml rename to apis/atmos/pom.xml index 1b406db4f8..48b43fed4c 100644 --- a/atmos/pom.xml +++ b/apis/atmos/pom.xml @@ -23,43 +23,36 @@ 4.0.0 - jclouds-project org.jclouds + jclouds-project 1.0-SNAPSHOT - ../project/pom.xml + ../../project/pom.xml - jclouds-atmos - jclouds atmosonline components + org.jclouds.api + atmos + jclouds atmos components - org.jclouds.atmosonline.saas.blobstore.integration.AtmosStorageTestInitializer - https://accesspoint.atmosonline.com - 1.3.0 - FIXME - FIXME - https://cloudonestorage.peer1.com - 1.3.0 - FIXME - FIXME - https://storage.synaptic.att.com - 1.3.0 - FIXME - FIXME + org.jclouds.atmos.blobstore.integration.AtmosStorageTestInitializer + https://accesspoint.atmos.com + 1.3.0 + FIXME + FIXME - ${project.groupId} + org.jclouds jclouds-blobstore ${project.version} - ${project.groupId} + org.jclouds jclouds-blobstore ${project.version} test-jar test - ${project.groupId} + org.jclouds jclouds-core ${project.version} test-jar @@ -96,52 +89,20 @@ - test.atmosonline.endpoint - ${test.atmosonline.endpoint} + test.atmos.endpoint + ${test.atmos.endpoint} - test.atmosonline.apiversion - ${test.atmosonline.apiversion} + test.atmos.apiversion + ${test.atmos.apiversion} - test.atmosonline.identity - ${test.atmosonline.identity} + test.atmos.identity + ${test.atmos.identity} - test.atmosonline.credential - ${test.atmosonline.credential} - - - test.peer1-storage.endpoint - ${test.peer1-storage.endpoint} - - - test.peer1-storage.apiversion - ${test.peer1-storage.apiversion} - - - test.peer1-storage.identity - ${test.peer1-storage.identity} - - - test.peer1-storage.credential - ${test.peer1-storage.credential} - - - test.synaptic.endpoint - ${test.synaptic.endpoint} - - - test.synaptic.apiversion - ${test.synaptic.apiversion} - - - test.synaptic.identity - ${test.synaptic.identity} - - - test.synaptic.credential - ${test.synaptic.credential} + test.atmos.credential + ${test.atmos.credential} test.initializer diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/AtmosStorageAsyncClient.java b/apis/atmos/src/main/java/org/jclouds/atmos/AtmosAsyncClient.java similarity index 79% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/AtmosStorageAsyncClient.java rename to apis/atmos/src/main/java/org/jclouds/atmos/AtmosAsyncClient.java index 58a8018179..003e429201 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/AtmosStorageAsyncClient.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/AtmosAsyncClient.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas; +package org.jclouds.atmos; import java.net.URI; @@ -32,19 +32,19 @@ import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; -import org.jclouds.atmosonline.saas.binders.BindMetadataToHeaders; -import org.jclouds.atmosonline.saas.domain.AtmosObject; -import org.jclouds.atmosonline.saas.domain.BoundedSet; -import org.jclouds.atmosonline.saas.domain.DirectoryEntry; -import org.jclouds.atmosonline.saas.domain.SystemMetadata; -import org.jclouds.atmosonline.saas.domain.UserMetadata; -import org.jclouds.atmosonline.saas.filters.SignRequest; -import org.jclouds.atmosonline.saas.functions.AtmosObjectName; -import org.jclouds.atmosonline.saas.functions.ParseDirectoryListFromContentAndHeaders; -import org.jclouds.atmosonline.saas.functions.ParseObjectFromHeadersAndHttpContent; -import org.jclouds.atmosonline.saas.functions.ParseSystemMetadataFromHeaders; -import org.jclouds.atmosonline.saas.functions.ReturnEndpointIfAlreadyExists; -import org.jclouds.atmosonline.saas.options.ListOptions; +import org.jclouds.atmos.binders.BindMetadataToHeaders; +import org.jclouds.atmos.domain.AtmosObject; +import org.jclouds.atmos.domain.BoundedSet; +import org.jclouds.atmos.domain.DirectoryEntry; +import org.jclouds.atmos.domain.SystemMetadata; +import org.jclouds.atmos.domain.UserMetadata; +import org.jclouds.atmos.filters.SignRequest; +import org.jclouds.atmos.functions.AtmosObjectName; +import org.jclouds.atmos.functions.ParseDirectoryListFromContentAndHeaders; +import org.jclouds.atmos.functions.ParseObjectFromHeadersAndHttpContent; +import org.jclouds.atmos.functions.ParseSystemMetadataFromHeaders; +import org.jclouds.atmos.functions.ReturnEndpointIfAlreadyExists; +import org.jclouds.atmos.options.ListOptions; import org.jclouds.blobstore.functions.ThrowContainerNotFoundOn404; import org.jclouds.blobstore.functions.ThrowKeyNotFoundOn404; 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. *

* - * @see AtmosStorageClient + * @see AtmosClient * @see * @author Adrian Cole */ @RequestFilters(SignRequest.class) @SkipEncoding('/') @Path("/rest/namespace") -public interface AtmosStorageAsyncClient { +public interface AtmosAsyncClient { /** * Creates a default implementation of AtmosObject */ AtmosObject newObject(); /** - * @see AtmosStorageClient#listDirectories + * @see AtmosClient#listDirectories */ @GET @ResponseParser(ParseDirectoryListFromContentAndHeaders.class) @@ -87,7 +87,7 @@ public interface AtmosStorageAsyncClient { ListenableFuture> listDirectories(ListOptions... options); /** - * @see AtmosStorageClient#listDirectory + * @see AtmosClient#listDirectory */ @GET @Path("/{directoryName}/") @@ -98,7 +98,7 @@ public interface AtmosStorageAsyncClient { @PathParam("directoryName") String directoryName, ListOptions... options); /** - * @see AtmosStorageClient#createDirectory + * @see AtmosClient#createDirectory */ @POST @Path("/{directoryName}/") @@ -108,7 +108,7 @@ public interface AtmosStorageAsyncClient { ListenableFuture createDirectory(@PathParam("directoryName") String directoryName); /** - * @see AtmosStorageClient#createFile + * @see AtmosClient#createFile */ @POST @Path("/{parent}/{name}") @@ -118,7 +118,7 @@ public interface AtmosStorageAsyncClient { @PathParam("name") @ParamParser(AtmosObjectName.class) @BinderParam(BindMetadataToHeaders.class) AtmosObject object); /** - * @see AtmosStorageClient#updateFile + * @see AtmosClient#updateFile */ @PUT @Path("/{parent}/{name}") @@ -129,7 +129,7 @@ public interface AtmosStorageAsyncClient { @PathParam("name") @ParamParser(AtmosObjectName.class) @BinderParam(BindMetadataToHeaders.class) AtmosObject object); /** - * @see AtmosStorageClient#readFile + * @see AtmosClient#readFile */ @GET @ResponseParser(ParseObjectFromHeadersAndHttpContent.class) @@ -139,7 +139,7 @@ public interface AtmosStorageAsyncClient { ListenableFuture readFile(@PathParam("path") String path, GetOptions... options); /** - * @see AtmosStorageClient#headFile + * @see AtmosClient#headFile */ @HEAD @ResponseParser(ParseObjectFromHeadersAndHttpContent.class) @@ -149,7 +149,7 @@ public interface AtmosStorageAsyncClient { ListenableFuture headFile(@PathParam("path") String path); /** - * @see AtmosStorageClient#getSystemMetadata + * @see AtmosClient#getSystemMetadata */ @HEAD @ResponseParser(ParseSystemMetadataFromHeaders.class) @@ -160,7 +160,7 @@ public interface AtmosStorageAsyncClient { ListenableFuture getSystemMetadata(@PathParam("path") String path); /** - * @see AtmosStorageClient#getUserMetadata + * @see AtmosClient#getUserMetadata */ @HEAD @ResponseParser(ParseSystemMetadataFromHeaders.class) @@ -171,7 +171,7 @@ public interface AtmosStorageAsyncClient { ListenableFuture getUserMetadata(@PathParam("path") String path); /** - * @see AtmosStorageClient#deletePath + * @see AtmosClient#deletePath */ @DELETE @ExceptionParser(ReturnVoidOnNotFoundOr404.class) @@ -180,7 +180,7 @@ public interface AtmosStorageAsyncClient { ListenableFuture deletePath(@PathParam("path") String path); /** - * @see AtmosStorageClient#pathExists + * @see AtmosClient#pathExists */ @HEAD @ExceptionParser(ReturnFalseOnNotFoundOr404.class) diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/AtmosStorageClient.java b/apis/atmos/src/main/java/org/jclouds/atmos/AtmosClient.java similarity index 81% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/AtmosStorageClient.java rename to apis/atmos/src/main/java/org/jclouds/atmos/AtmosClient.java index 8cc19b19e7..5be01e6e42 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/AtmosStorageClient.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/AtmosClient.java @@ -17,17 +17,17 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas; +package org.jclouds.atmos; import java.net.URI; import java.util.concurrent.TimeUnit; -import org.jclouds.atmosonline.saas.domain.AtmosObject; -import org.jclouds.atmosonline.saas.domain.BoundedSet; -import org.jclouds.atmosonline.saas.domain.DirectoryEntry; -import org.jclouds.atmosonline.saas.domain.SystemMetadata; -import org.jclouds.atmosonline.saas.domain.UserMetadata; -import org.jclouds.atmosonline.saas.options.ListOptions; +import org.jclouds.atmos.domain.AtmosObject; +import org.jclouds.atmos.domain.BoundedSet; +import org.jclouds.atmos.domain.DirectoryEntry; +import org.jclouds.atmos.domain.SystemMetadata; +import org.jclouds.atmos.domain.UserMetadata; +import org.jclouds.atmos.options.ListOptions; import org.jclouds.concurrent.Timeout; 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. *

* - * @see AtmosStorageAsyncClient + * @see AtmosAsyncClient * @see * @author Adrian Cole */ @Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) -public interface AtmosStorageClient { +public interface AtmosClient { /** * Creates a default implementation of AtmosObject */ diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/AtmosStorageContextBuilder.java b/apis/atmos/src/main/java/org/jclouds/atmos/AtmosContextBuilder.java old mode 100755 new mode 100644 similarity index 78% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/AtmosStorageContextBuilder.java rename to apis/atmos/src/main/java/org/jclouds/atmos/AtmosContextBuilder.java index 1404191463..5a274508df --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/AtmosStorageContextBuilder.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/AtmosContextBuilder.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas; +package org.jclouds.atmos; import java.util.List; import java.util.Properties; -import org.jclouds.atmosonline.saas.blobstore.config.AtmosBlobStoreContextModule; -import org.jclouds.atmosonline.saas.config.AtmosStorageRestClientModule; +import org.jclouds.atmos.blobstore.config.AtmosBlobStoreContextModule; +import org.jclouds.atmos.config.AtmosRestClientModule; import org.jclouds.blobstore.BlobStoreContextBuilder; import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule; import org.jclouds.logging.jdk.config.JDKLoggingModule; @@ -44,11 +44,11 @@ import com.google.inject.Module; * @author Adrian Cole, Andrew Newdigate * @see AtmosBlobStoreContext */ -public class AtmosStorageContextBuilder extends - BlobStoreContextBuilder { +public class AtmosContextBuilder extends + BlobStoreContextBuilder { - public AtmosStorageContextBuilder(Properties props) { - super(AtmosStorageClient.class, AtmosStorageAsyncClient.class, props); + public AtmosContextBuilder(Properties props) { + super(AtmosClient.class, AtmosAsyncClient.class, props); } @Override @@ -58,6 +58,6 @@ public class AtmosStorageContextBuilder extends @Override protected void addClientModule(List modules) { - modules.add(new AtmosStorageRestClientModule()); + modules.add(new AtmosRestClientModule()); } } diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/AtmosStorageResponseException.java b/apis/atmos/src/main/java/org/jclouds/atmos/AtmosResponseException.java similarity index 62% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/AtmosStorageResponseException.java rename to apis/atmos/src/main/java/org/jclouds/atmos/AtmosResponseException.java index 730971e8c5..acd037873a 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/AtmosStorageResponseException.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/AtmosResponseException.java @@ -17,10 +17,10 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas; +package org.jclouds.atmos; -import org.jclouds.atmosonline.saas.domain.AtmosStorageError; -import org.jclouds.atmosonline.saas.handlers.ParseAtmosStorageErrorFromXmlContent; +import org.jclouds.atmos.domain.AtmosError; +import org.jclouds.atmos.handlers.ParseAtmosErrorFromXmlContent; import org.jclouds.http.HttpCommand; import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponseException; @@ -28,52 +28,52 @@ import org.jclouds.http.HttpResponseException; /** * Encapsulates an Error from Atmos Storage Services. * - * @see AtmosStorageError - * @see ParseAtmosStorageErrorFromXmlContent + * @see AtmosError + * @see ParseAtmosErrorFromXmlContent * @author Adrian Cole * */ -public class AtmosStorageResponseException extends HttpResponseException { +public class AtmosResponseException extends HttpResponseException { private static final long serialVersionUID = 1L; - private AtmosStorageError error; + private AtmosError error; - public AtmosStorageResponseException(HttpCommand command, HttpResponse response, - AtmosStorageError error) { + public AtmosResponseException(HttpCommand command, HttpResponse response, + AtmosError error) { super(String.format("command %s failed with code %s, error: %s", command.getCurrentRequest() .getRequestLine(), response.getStatusCode(), error.toString()), command, response); this.setError(error); } - public AtmosStorageResponseException(HttpCommand command, HttpResponse response, - AtmosStorageError error, Throwable cause) { + public AtmosResponseException(HttpCommand command, HttpResponse response, + AtmosError error, Throwable cause) { super(String.format("command %1$s failed with error: %2$s", command.getCurrentRequest() .getRequestLine(), error.toString()), command, response, cause); this.setError(error); } - public AtmosStorageResponseException(String message, HttpCommand command, HttpResponse response, - AtmosStorageError error) { + public AtmosResponseException(String message, HttpCommand command, HttpResponse response, + AtmosError error) { super(message, command, response); this.setError(error); } - public AtmosStorageResponseException(String message, HttpCommand command, HttpResponse response, - AtmosStorageError error, Throwable cause) { + public AtmosResponseException(String message, HttpCommand command, HttpResponse response, + AtmosError error, Throwable cause) { super(message, command, response, cause); this.setError(error); } - public void setError(AtmosStorageError error) { + public void setError(AtmosError error) { this.error = error; } - public AtmosStorageError getError() { + public AtmosError getError() { return error; } diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/binders/BindMetadataToHeaders.java b/apis/atmos/src/main/java/org/jclouds/atmos/binders/BindMetadataToHeaders.java similarity index 94% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/binders/BindMetadataToHeaders.java rename to apis/atmos/src/main/java/org/jclouds/atmos/binders/BindMetadataToHeaders.java index e3295abcd2..86b534e6e9 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/binders/BindMetadataToHeaders.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/binders/BindMetadataToHeaders.java @@ -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.checkNotNull; @@ -25,7 +25,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import javax.inject.Inject; 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.rest.Binder; diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/binders/BindUserMetadataToHeaders.java b/apis/atmos/src/main/java/org/jclouds/atmos/binders/BindUserMetadataToHeaders.java similarity index 96% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/binders/BindUserMetadataToHeaders.java rename to apis/atmos/src/main/java/org/jclouds/atmos/binders/BindUserMetadataToHeaders.java index a36a520f08..471cc08039 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/binders/BindUserMetadataToHeaders.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/binders/BindUserMetadataToHeaders.java @@ -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.checkNotNull; @@ -26,7 +26,7 @@ import java.util.Map; 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.utils.ModifyRequest; import org.jclouds.rest.Binder; diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosAsyncBlobStore.java b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosAsyncBlobStore.java similarity index 77% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosAsyncBlobStore.java rename to apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosAsyncBlobStore.java index da6e552226..a96ed0b66c 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosAsyncBlobStore.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosAsyncBlobStore.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.blobstore; +package org.jclouds.atmos.blobstore; import static com.google.common.base.Preconditions.checkNotNull; @@ -32,18 +32,18 @@ import javax.inject.Provider; import javax.inject.Singleton; import org.jclouds.Constants; -import org.jclouds.atmosonline.saas.AtmosStorageAsyncClient; -import org.jclouds.atmosonline.saas.AtmosStorageClient; -import org.jclouds.atmosonline.saas.blobstore.functions.BlobStoreListOptionsToListOptions; -import org.jclouds.atmosonline.saas.blobstore.functions.BlobToObject; -import org.jclouds.atmosonline.saas.blobstore.functions.DirectoryEntryListToResourceMetadataList; -import org.jclouds.atmosonline.saas.blobstore.functions.ObjectToBlob; -import org.jclouds.atmosonline.saas.blobstore.functions.ObjectToBlobMetadata; -import org.jclouds.atmosonline.saas.domain.AtmosObject; -import org.jclouds.atmosonline.saas.domain.BoundedSet; -import org.jclouds.atmosonline.saas.domain.DirectoryEntry; -import org.jclouds.atmosonline.saas.options.ListOptions; -import org.jclouds.atmosonline.saas.util.AtmosStorageUtils; +import org.jclouds.atmos.AtmosAsyncClient; +import org.jclouds.atmos.AtmosClient; +import org.jclouds.atmos.blobstore.functions.BlobStoreListOptionsToListOptions; +import org.jclouds.atmos.blobstore.functions.BlobToObject; +import org.jclouds.atmos.blobstore.functions.DirectoryEntryListToResourceMetadataList; +import org.jclouds.atmos.blobstore.functions.ObjectToBlob; +import org.jclouds.atmos.blobstore.functions.ObjectToBlobMetadata; +import org.jclouds.atmos.domain.AtmosObject; +import org.jclouds.atmos.domain.BoundedSet; +import org.jclouds.atmos.domain.DirectoryEntry; +import org.jclouds.atmos.options.ListOptions; +import org.jclouds.atmos.util.AtmosUtils; import org.jclouds.blobstore.BlobStoreContext; import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.domain.BlobMetadata; @@ -68,8 +68,8 @@ import com.google.common.util.concurrent.ListenableFuture; */ @Singleton public class AtmosAsyncBlobStore extends BaseAsyncBlobStore { - private final AtmosStorageAsyncClient async; - private final AtmosStorageClient sync; + private final AtmosAsyncClient async; + private final AtmosClient sync; private final ObjectToBlob object2Blob; private final ObjectToBlobMetadata object2BlobMd; private final BlobToObject blob2Object; @@ -82,8 +82,8 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore { @Inject AtmosAsyncBlobStore(BlobStoreContext context, BlobUtils blobUtils, @Named(Constants.PROPERTY_USER_THREADS) ExecutorService service, Supplier defaultLocation, - @Memoized Supplier> locations, AtmosStorageAsyncClient async, - AtmosStorageClient sync, ObjectToBlob object2Blob, ObjectToBlobMetadata object2BlobMd, + @Memoized Supplier> locations, AtmosAsyncClient async, + AtmosClient sync, ObjectToBlob object2Blob, ObjectToBlobMetadata object2BlobMd, BlobToObject blob2Object, BlobStoreListOptionsToListOptions container2ContainerListOptions, DirectoryEntryListToResourceMetadataList container2ResourceList, Crypto crypto, BlobToHttpGetOptions blob2ObjectGetOptions, Provider fetchBlobMetadataProvider) { @@ -102,7 +102,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore { } /** - * This implementation invokes {@link AtmosStorageAsyncClient#headFile} + * This implementation invokes {@link AtmosAsyncClient#headFile} */ @Override public ListenableFuture 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} *

* 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 public ListenableFuture createDirectory(String container, String directory) { @@ -145,8 +145,8 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore { } /** - * This implementation invokes {@link AtmosStorageAsyncClient#deletePath} followed by - * {@link AtmosStorageAsyncClient#pathExists} until it is true. + * This implementation invokes {@link AtmosAsyncClient#deletePath} followed by + * {@link AtmosAsyncClient#pathExists} until it is true. */ protected boolean deleteAndVerifyContainerGone(final String 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 public ListenableFuture 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 public ListenableFuture 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 * container @@ -191,7 +191,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore { } /** - * This implementation invokes {@link AtmosStorageAsyncClient#readFile} + * This implementation invokes {@link AtmosAsyncClient#readFile} */ @Override public ListenableFuture 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 public ListenableFuture> list() { @@ -209,12 +209,12 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore { } /** - * This implementation invokes {@link AtmosStorageAsyncClient#listDirectory} + * This implementation invokes {@link AtmosAsyncClient#listDirectory} */ @Override public ListenableFuture> list(String container, org.jclouds.blobstore.options.ListContainerOptions options) { - container = AtmosStorageUtils.adjustContainerIfDirOptionPresent(container, options); + container = AtmosUtils.adjustContainerIfDirOptionPresent(container, options); ListOptions nativeOptions = container2ContainerListOptions.apply(options); ListenableFuture> returnVal = async.listDirectory(container, nativeOptions); ListenableFuture> 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} *

* Since there is no etag support in atmos, we just return the path. */ @@ -234,7 +234,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore { @Override 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 public ListenableFuture removeBlob(String container, String key) { diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosBlobRequestSigner.java b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosBlobRequestSigner.java similarity index 76% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosBlobRequestSigner.java rename to apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosBlobRequestSigner.java index ddbdfbc48a..26d3540b0f 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosBlobRequestSigner.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosBlobRequestSigner.java @@ -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 org.jclouds.blobstore.util.BlobStoreUtils.cleanRequest; @@ -27,9 +27,9 @@ import java.lang.reflect.Method; import javax.inject.Inject; import javax.inject.Singleton; -import org.jclouds.atmosonline.saas.AtmosStorageAsyncClient; -import org.jclouds.atmosonline.saas.blobstore.functions.BlobToObject; -import org.jclouds.atmosonline.saas.domain.AtmosObject; +import org.jclouds.atmos.AtmosAsyncClient; +import org.jclouds.atmos.blobstore.functions.BlobToObject; +import org.jclouds.atmos.domain.AtmosObject; import org.jclouds.blobstore.BlobRequestSigner; import org.jclouds.blobstore.domain.Blob; import org.jclouds.http.HttpRequest; @@ -42,20 +42,20 @@ import org.jclouds.rest.internal.RestAnnotationProcessor; */ @Singleton public class AtmosBlobRequestSigner implements BlobRequestSigner { - private final RestAnnotationProcessor processor; + private final RestAnnotationProcessor processor; private final BlobToObject blobToObject; private final Method getMethod; private final Method deleteMethod; private final Method createMethod; @Inject - public AtmosBlobRequestSigner(RestAnnotationProcessor processor, BlobToObject blobToObject) + public AtmosBlobRequestSigner(RestAnnotationProcessor processor, BlobToObject blobToObject) throws SecurityException, NoSuchMethodException { this.processor = checkNotNull(processor, "processor"); this.blobToObject = checkNotNull(blobToObject, "blobToObject"); - this.getMethod = AtmosStorageAsyncClient.class.getMethod("readFile", String.class, GetOptions[].class); - this.deleteMethod = AtmosStorageAsyncClient.class.getMethod("deletePath", String.class); - this.createMethod = AtmosStorageAsyncClient.class.getMethod("createFile", String.class, AtmosObject.class); + this.getMethod = AtmosAsyncClient.class.getMethod("readFile", String.class, GetOptions[].class); + this.deleteMethod = AtmosAsyncClient.class.getMethod("deletePath", String.class); + this.createMethod = AtmosAsyncClient.class.getMethod("createFile", String.class, AtmosObject.class); } @@ -78,4 +78,4 @@ public class AtmosBlobRequestSigner implements BlobRequestSigner { return checkNotNull(container, "container") + "/" + checkNotNull(name, "name"); } -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosBlobStore.java b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosBlobStore.java similarity index 77% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosBlobStore.java rename to apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosBlobStore.java index cb010d850c..9ffd845297 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosBlobStore.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosBlobStore.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.blobstore; +package org.jclouds.atmos.blobstore; import static com.google.common.base.Preconditions.checkNotNull; @@ -27,15 +27,15 @@ import javax.inject.Inject; import javax.inject.Provider; import javax.inject.Singleton; -import org.jclouds.atmosonline.saas.AtmosStorageAsyncClient; -import org.jclouds.atmosonline.saas.AtmosStorageClient; -import org.jclouds.atmosonline.saas.blobstore.functions.BlobStoreListOptionsToListOptions; -import org.jclouds.atmosonline.saas.blobstore.functions.BlobToObject; -import org.jclouds.atmosonline.saas.blobstore.functions.DirectoryEntryListToResourceMetadataList; -import org.jclouds.atmosonline.saas.blobstore.functions.ObjectToBlob; -import org.jclouds.atmosonline.saas.blobstore.functions.ObjectToBlobMetadata; -import org.jclouds.atmosonline.saas.options.ListOptions; -import org.jclouds.atmosonline.saas.util.AtmosStorageUtils; +import org.jclouds.atmos.AtmosAsyncClient; +import org.jclouds.atmos.AtmosClient; +import org.jclouds.atmos.blobstore.functions.BlobStoreListOptionsToListOptions; +import org.jclouds.atmos.blobstore.functions.BlobToObject; +import org.jclouds.atmos.blobstore.functions.DirectoryEntryListToResourceMetadataList; +import org.jclouds.atmos.blobstore.functions.ObjectToBlob; +import org.jclouds.atmos.blobstore.functions.ObjectToBlobMetadata; +import org.jclouds.atmos.options.ListOptions; +import org.jclouds.atmos.util.AtmosUtils; import org.jclouds.blobstore.BlobStoreContext; import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.domain.BlobMetadata; @@ -57,7 +57,7 @@ import com.google.common.base.Supplier; */ @Singleton public class AtmosBlobStore extends BaseBlobStore { - private final AtmosStorageClient sync; + private final AtmosClient sync; private final ObjectToBlob object2Blob; private final ObjectToBlobMetadata object2BlobMd; private final BlobToObject blob2Object; @@ -69,7 +69,7 @@ public class AtmosBlobStore extends BaseBlobStore { @Inject AtmosBlobStore(BlobStoreContext context, BlobUtils blobUtils, Supplier defaultLocation, - @Memoized Supplier> locations, AtmosStorageClient sync, ObjectToBlob object2Blob, + @Memoized Supplier> locations, AtmosClient sync, ObjectToBlob object2Blob, ObjectToBlobMetadata object2BlobMd, BlobToObject blob2Object, BlobStoreListOptionsToListOptions container2ContainerListOptions, 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 public BlobMetadata blobMetadata(String container, String key) { @@ -96,8 +96,8 @@ public class AtmosBlobStore extends BaseBlobStore { } /** - * This implementation invokes {@link AtmosStorageAsyncClient#deletePath} followed by - * {@link AtmosStorageAsyncClient#pathExists} until it is true. + * This implementation invokes {@link AtmosAsyncClient#deletePath} followed by + * {@link AtmosAsyncClient#pathExists} until it is true. */ protected boolean deleteAndVerifyContainerGone(final String 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 * 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 * directory name @@ -138,7 +138,7 @@ public class AtmosBlobStore extends BaseBlobStore { } /** - * This implementation invokes {@link AtmosStorageClient#pathExists} + * This implementation invokes {@link AtmosClient#pathExists} */ @Override 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 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 * container @@ -167,7 +167,7 @@ public class AtmosBlobStore extends BaseBlobStore { } /** - * This implementation invokes {@link AtmosStorageClient#readFile} + * This implementation invokes {@link AtmosClient#readFile} */ @Override 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 public PageSet list() { @@ -184,12 +184,12 @@ public class AtmosBlobStore extends BaseBlobStore { } /** - * This implementation invokes {@link AtmosStorageClient#listDirectory} + * This implementation invokes {@link AtmosClient#listDirectory} */ @Override public PageSet list(String container, org.jclouds.blobstore.options.ListContainerOptions options) { - container = AtmosStorageUtils.adjustContainerIfDirOptionPresent(container, options); + container = AtmosUtils.adjustContainerIfDirOptionPresent(container, options); ListOptions nativeOptions = container2ContainerListOptions.apply(options); // until includeMeta() option works for namespace interface PageSet 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} *

* Since there is no etag support in atmos, we just return the path. */ @Override 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 public void removeBlob(String container, String key) { diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/config/AtmosBlobStoreContextModule.java b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/config/AtmosBlobStoreContextModule.java old mode 100755 new mode 100644 similarity index 84% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/config/AtmosBlobStoreContextModule.java rename to apis/atmos/src/main/java/org/jclouds/atmos/blobstore/config/AtmosBlobStoreContextModule.java index 0f5fc6837a..a2482df1e2 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/config/AtmosBlobStoreContextModule.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/config/AtmosBlobStoreContextModule.java @@ -17,18 +17,18 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.blobstore.config; +package org.jclouds.atmos.blobstore.config; import java.util.Set; import javax.inject.Singleton; -import org.jclouds.atmosonline.saas.AtmosStorageAsyncClient; -import org.jclouds.atmosonline.saas.AtmosStorageClient; -import org.jclouds.atmosonline.saas.blobstore.AtmosAsyncBlobStore; -import org.jclouds.atmosonline.saas.blobstore.AtmosBlobRequestSigner; -import org.jclouds.atmosonline.saas.blobstore.AtmosBlobStore; -import org.jclouds.atmosonline.saas.blobstore.strategy.FindMD5InUserMetadata; +import org.jclouds.atmos.AtmosAsyncClient; +import org.jclouds.atmos.AtmosClient; +import org.jclouds.atmos.blobstore.AtmosAsyncBlobStore; +import org.jclouds.atmos.blobstore.AtmosBlobRequestSigner; +import org.jclouds.atmos.blobstore.AtmosBlobStore; +import org.jclouds.atmos.blobstore.strategy.FindMD5InUserMetadata; import org.jclouds.blobstore.AsyncBlobStore; import org.jclouds.blobstore.BlobRequestSigner; import org.jclouds.blobstore.BlobStore; @@ -65,7 +65,7 @@ public class AtmosBlobStoreContextModule extends AbstractModule { bind(AsyncBlobStore.class).to(AtmosAsyncBlobStore.class).in(Scopes.SINGLETON); bind(BlobStore.class).to(AtmosBlobStore.class).in(Scopes.SINGLETON); bind(BlobStoreContext.class).to( - new TypeLiteral>() { + new TypeLiteral>() { }).in(Scopes.SINGLETON); bind(ContainsValueInListStrategy.class).to(FindMD5InUserMetadata.class); bind(BlobRequestSigner.class).to(AtmosBlobRequestSigner.class); diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/functions/BlobMetadataToObject.java b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/functions/BlobMetadataToObject.java similarity index 91% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/functions/BlobMetadataToObject.java rename to apis/atmos/src/main/java/org/jclouds/atmos/blobstore/functions/BlobMetadataToObject.java index 9b7362cfe2..fb154ef8a4 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/functions/BlobMetadataToObject.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/functions/BlobMetadataToObject.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.blobstore.functions; +package org.jclouds.atmos.blobstore.functions; import java.util.Map.Entry; import javax.inject.Inject; import javax.inject.Singleton; -import org.jclouds.atmosonline.saas.domain.AtmosObject; -import org.jclouds.atmosonline.saas.domain.UserMetadata; +import org.jclouds.atmos.domain.AtmosObject; +import org.jclouds.atmos.domain.UserMetadata; import org.jclouds.blobstore.domain.BlobMetadata; import com.google.common.base.Function; @@ -58,4 +58,4 @@ public class BlobMetadataToObject implements Function return factory.create(blob2ContentMd.apply(from), blob2SysMd.apply(from), userMd); } -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/functions/BlobStoreListOptionsToListOptions.java b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/functions/BlobStoreListOptionsToListOptions.java similarity index 79% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/functions/BlobStoreListOptionsToListOptions.java rename to apis/atmos/src/main/java/org/jclouds/atmos/blobstore/functions/BlobStoreListOptionsToListOptions.java index 4bcdbf75c4..0a9cabc1d1 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/functions/BlobStoreListOptionsToListOptions.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/functions/BlobStoreListOptionsToListOptions.java @@ -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; @@ -32,11 +32,11 @@ import com.google.common.base.Function; */ @Singleton public class BlobStoreListOptionsToListOptions implements - Function { + Function { @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"); - 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) { httpOptions.token(from.getMarker()); } @@ -48,4 +48,4 @@ public class BlobStoreListOptionsToListOptions implements } return httpOptions; } -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/functions/BlobToContentMetadata.java b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/functions/BlobToContentMetadata.java similarity index 87% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/functions/BlobToContentMetadata.java rename to apis/atmos/src/main/java/org/jclouds/atmos/blobstore/functions/BlobToContentMetadata.java index 78021bdca9..1f4440ba21 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/functions/BlobToContentMetadata.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/functions/BlobToContentMetadata.java @@ -17,12 +17,12 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.blobstore.functions; +package org.jclouds.atmos.blobstore.functions; import javax.inject.Singleton; -import org.jclouds.atmosonline.saas.domain.MutableContentMetadata; -import org.jclouds.atmosonline.saas.domain.internal.DelegatingMutableContentMetadata; +import org.jclouds.atmos.domain.MutableContentMetadata; +import org.jclouds.atmos.domain.internal.DelegatingMutableContentMetadata; import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.internal.MutableBlobMetadataImpl; import org.jclouds.http.HttpUtils; @@ -40,4 +40,4 @@ public class BlobToContentMetadata implements Function { object.setAllHeaders(from.getAllHeaders()); return object; } -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/functions/BlobToSystemMetadata.java b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/functions/BlobToSystemMetadata.java similarity index 89% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/functions/BlobToSystemMetadata.java rename to apis/atmos/src/main/java/org/jclouds/atmos/blobstore/functions/BlobToSystemMetadata.java index 4c619b370c..b3966db114 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/functions/BlobToSystemMetadata.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/functions/BlobToSystemMetadata.java @@ -17,12 +17,12 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.blobstore.functions; +package org.jclouds.atmos.blobstore.functions; import javax.inject.Singleton; -import org.jclouds.atmosonline.saas.domain.FileType; -import org.jclouds.atmosonline.saas.domain.SystemMetadata; +import org.jclouds.atmos.domain.FileType; +import org.jclouds.atmos.domain.SystemMetadata; import org.jclouds.blobstore.domain.BlobMetadata; import com.google.common.base.Function; @@ -38,4 +38,4 @@ public class BlobToSystemMetadata implements Function { - public AtmosStorageRestClientModule() { - super(AtmosStorageClient.class, AtmosStorageAsyncClient.class); +public class AtmosRestClientModule extends RestClientModule { + public AtmosRestClientModule() { + super(AtmosClient.class, AtmosAsyncClient.class); } @Override protected void configure() { - install(new AtmosStorageParserModule()); + install(new AtmosParserModule()); install(new AtmosObjectModule()); super.configure(); } @@ -85,14 +85,14 @@ public class AtmosStorageRestClientModule extends RestClientModule { Multimap getAllHeaders(); void setAllHeaders(Multimap allHeaders); -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/BoundedSet.java b/apis/atmos/src/main/java/org/jclouds/atmos/domain/BoundedSet.java similarity index 89% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/domain/BoundedSet.java rename to apis/atmos/src/main/java/org/jclouds/atmos/domain/BoundedSet.java index d8e92a525f..06abd8b16f 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/BoundedSet.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/domain/BoundedSet.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.domain; +package org.jclouds.atmos.domain; import java.util.Set; import javax.annotation.Nullable; -import org.jclouds.atmosonline.saas.domain.internal.BoundedLinkedHashSet; +import org.jclouds.atmos.domain.internal.BoundedLinkedHashSet; import com.google.inject.ImplementedBy; @@ -38,4 +38,4 @@ public interface BoundedSet extends Set { @Nullable String getToken(); -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/DirectoryEntry.java b/apis/atmos/src/main/java/org/jclouds/atmos/domain/DirectoryEntry.java similarity index 98% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/domain/DirectoryEntry.java rename to apis/atmos/src/main/java/org/jclouds/atmos/domain/DirectoryEntry.java index 701a40f432..908abbca4b 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/DirectoryEntry.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/domain/DirectoryEntry.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.domain; +package org.jclouds.atmos.domain; /** * Metadata of a Atmos Online object @@ -95,4 +95,4 @@ public class DirectoryEntry implements Comparable { return "DirectoryEntry [type=" + type + ", objectid=" + objectid + ", objname=" + objname + "]"; } -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/FileType.java b/apis/atmos/src/main/java/org/jclouds/atmos/domain/FileType.java similarity index 96% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/domain/FileType.java rename to apis/atmos/src/main/java/org/jclouds/atmos/domain/FileType.java index b39734bfdf..0dd28de6a9 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/FileType.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/domain/FileType.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.domain; +package org.jclouds.atmos.domain; public enum FileType { diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/MutableContentMetadata.java b/apis/atmos/src/main/java/org/jclouds/atmos/domain/MutableContentMetadata.java similarity index 89% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/domain/MutableContentMetadata.java rename to apis/atmos/src/main/java/org/jclouds/atmos/domain/MutableContentMetadata.java index bbd7588bf1..800cfbf968 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/MutableContentMetadata.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/domain/MutableContentMetadata.java @@ -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; @@ -35,4 +35,4 @@ public interface MutableContentMetadata extends org.jclouds.io.MutableContentMet public void setName(String name); -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/SystemMetadata.java b/apis/atmos/src/main/java/org/jclouds/atmos/domain/SystemMetadata.java similarity index 99% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/domain/SystemMetadata.java rename to apis/atmos/src/main/java/org/jclouds/atmos/domain/SystemMetadata.java index 5643b3bd92..04d70439f7 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/SystemMetadata.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/domain/SystemMetadata.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.domain; +package org.jclouds.atmos.domain; import java.util.Date; @@ -168,4 +168,4 @@ public class SystemMetadata extends DirectoryEntry { return "[type=" + getType() + ", id=" + getObjectID() + ", name=" + getObjectName() + "]"; } -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/UploadInfo.java b/apis/atmos/src/main/java/org/jclouds/atmos/domain/UploadInfo.java similarity index 96% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/domain/UploadInfo.java rename to apis/atmos/src/main/java/org/jclouds/atmos/domain/UploadInfo.java index 47b54f615e..d45548b2ca 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/UploadInfo.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/domain/UploadInfo.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.domain; +package org.jclouds.atmos.domain; import java.net.URI; diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/UserMetadata.java b/apis/atmos/src/main/java/org/jclouds/atmos/domain/UserMetadata.java similarity index 98% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/domain/UserMetadata.java rename to apis/atmos/src/main/java/org/jclouds/atmos/domain/UserMetadata.java index 9a617d1905..fd457c8d1b 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/UserMetadata.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/domain/UserMetadata.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.domain; +package org.jclouds.atmos.domain; import static com.google.common.base.Preconditions.checkNotNull; @@ -118,4 +118,4 @@ public class UserMetadata { return true; } -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/internal/AtmosObjectImpl.java b/apis/atmos/src/main/java/org/jclouds/atmos/domain/internal/AtmosObjectImpl.java similarity index 94% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/domain/internal/AtmosObjectImpl.java rename to apis/atmos/src/main/java/org/jclouds/atmos/domain/internal/AtmosObjectImpl.java index eeb523a024..46564f0e0e 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/internal/AtmosObjectImpl.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/domain/internal/AtmosObjectImpl.java @@ -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; @@ -25,10 +25,10 @@ import javax.inject.Inject; import javax.inject.Provider; import javax.inject.Singleton; -import org.jclouds.atmosonline.saas.domain.AtmosObject; -import org.jclouds.atmosonline.saas.domain.MutableContentMetadata; -import org.jclouds.atmosonline.saas.domain.SystemMetadata; -import org.jclouds.atmosonline.saas.domain.UserMetadata; +import org.jclouds.atmos.domain.AtmosObject; +import org.jclouds.atmos.domain.MutableContentMetadata; +import org.jclouds.atmos.domain.SystemMetadata; +import org.jclouds.atmos.domain.UserMetadata; import org.jclouds.http.internal.PayloadEnclosingImpl; import org.jclouds.io.Payload; diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/internal/BoundedLinkedHashSet.java b/apis/atmos/src/main/java/org/jclouds/atmos/domain/internal/BoundedLinkedHashSet.java similarity index 95% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/domain/internal/BoundedLinkedHashSet.java rename to apis/atmos/src/main/java/org/jclouds/atmos/domain/internal/BoundedLinkedHashSet.java index 2a8c4b782d..5cddb749b0 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/internal/BoundedLinkedHashSet.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/domain/internal/BoundedLinkedHashSet.java @@ -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; @@ -25,7 +25,7 @@ import java.util.LinkedHashSet; import javax.annotation.Nullable; -import org.jclouds.atmosonline.saas.domain.BoundedSet; +import org.jclouds.atmos.domain.BoundedSet; import com.google.common.collect.Iterables; @@ -80,4 +80,4 @@ public class BoundedLinkedHashSet extends LinkedHashSet implements Bounded return "[token=" + token + ", contents=" + super.toString() + "]"; } -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/internal/DelegatingMutableContentMetadata.java b/apis/atmos/src/main/java/org/jclouds/atmos/domain/internal/DelegatingMutableContentMetadata.java similarity index 97% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/domain/internal/DelegatingMutableContentMetadata.java rename to apis/atmos/src/main/java/org/jclouds/atmos/domain/internal/DelegatingMutableContentMetadata.java index b752d20fc2..de0110bd0e 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/domain/internal/DelegatingMutableContentMetadata.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/domain/internal/DelegatingMutableContentMetadata.java @@ -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 com.google.common.collect.Multimap; @@ -157,4 +157,4 @@ public class DelegatingMutableContentMetadata implements MutableContentMetadata delegate.setPropertiesFromHttpHeaders(headers); } -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/filters/SignRequest.java b/apis/atmos/src/main/java/org/jclouds/atmos/filters/SignRequest.java similarity index 94% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/filters/SignRequest.java rename to apis/atmos/src/main/java/org/jclouds/atmos/filters/SignRequest.java index c929512182..c663db69b2 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/filters/SignRequest.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/filters/SignRequest.java @@ -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.PROPERTY_CREDENTIAL; @@ -35,7 +35,7 @@ import javax.inject.Provider; import javax.inject.Singleton; 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.CryptoStreams; import org.jclouds.date.TimeStamp; @@ -93,14 +93,14 @@ public class SignRequest implements HttpRequestFilter { @Override public HttpRequest filter(HttpRequest request) throws HttpException { Builder builder = ImmutableMap.builder(); - builder.put(AtmosStorageHeaders.UID, uid); + builder.put(AtmosHeaders.UID, uid); String date = timeStampProvider.get(); builder.put(HttpHeaders.DATE, date); - if (request.getHeaders().containsKey(AtmosStorageHeaders.DATE)) - builder.put(AtmosStorageHeaders.DATE, date); + if (request.getHeaders().containsKey(AtmosHeaders.DATE)) + builder.put(AtmosHeaders.DATE, date); request = ModifyRequest.replaceHeaders(request, Multimaps.forMap(builder.build())); String signature = calculateSignature(createStringToSign(request)); - request = ModifyRequest.replaceHeader(request, AtmosStorageHeaders.SIGNATURE, signature); + request = ModifyRequest.replaceHeader(request, AtmosHeaders.SIGNATURE, signature); utils.logRequest(signatureLog, request, "<<"); return request; } @@ -144,7 +144,7 @@ public class SignRequest implements HttpRequestFilter { // TreeSet == Sort the headers alphabetically. Set headers = new TreeSet(request.getHeaders().keySet()); 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. toSign.append(header.toLowerCase()).append(":"); // For headers with values that span multiple lines, convert them into one line by @@ -188,4 +188,4 @@ public class SignRequest implements HttpRequestFilter { toSign.append(request.getEndpoint().getRawPath().toLowerCase()).append("\n"); } -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/functions/AtmosObjectName.java b/apis/atmos/src/main/java/org/jclouds/atmos/functions/AtmosObjectName.java similarity index 93% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/functions/AtmosObjectName.java rename to apis/atmos/src/main/java/org/jclouds/atmos/functions/AtmosObjectName.java index 6f9616af56..55cca7eea6 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/functions/AtmosObjectName.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/functions/AtmosObjectName.java @@ -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.checkNotNull; import javax.inject.Singleton; -import org.jclouds.atmosonline.saas.domain.AtmosObject; +import org.jclouds.atmos.domain.AtmosObject; import com.google.common.base.Function; @@ -44,4 +44,4 @@ public class AtmosObjectName implements Function { : object.getSystemMetadata().getObjectName(), "objectName"); } -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/functions/ParseDirectoryListFromContentAndHeaders.java b/apis/atmos/src/main/java/org/jclouds/atmos/functions/ParseDirectoryListFromContentAndHeaders.java similarity index 82% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/functions/ParseDirectoryListFromContentAndHeaders.java rename to apis/atmos/src/main/java/org/jclouds/atmos/functions/ParseDirectoryListFromContentAndHeaders.java index 2cfc37a3ba..8cde9365a5 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/functions/ParseDirectoryListFromContentAndHeaders.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/functions/ParseDirectoryListFromContentAndHeaders.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.functions; +package org.jclouds.atmos.functions; import static com.google.common.base.Preconditions.checkNotNull; @@ -25,11 +25,11 @@ import javax.inject.Inject; import javax.inject.Provider; import javax.inject.Singleton; -import org.jclouds.atmosonline.saas.domain.BoundedSet; -import org.jclouds.atmosonline.saas.domain.DirectoryEntry; -import org.jclouds.atmosonline.saas.domain.internal.BoundedLinkedHashSet; -import org.jclouds.atmosonline.saas.reference.AtmosStorageHeaders; -import org.jclouds.atmosonline.saas.xml.ListDirectoryResponseHandler; +import org.jclouds.atmos.domain.BoundedSet; +import org.jclouds.atmos.domain.DirectoryEntry; +import org.jclouds.atmos.domain.internal.BoundedLinkedHashSet; +import org.jclouds.atmos.reference.AtmosHeaders; +import org.jclouds.atmos.xml.ListDirectoryResponseHandler; import org.jclouds.http.HttpResponse; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax.Factory; @@ -58,7 +58,7 @@ public class ParseDirectoryListFromContentAndHeaders implements Function apply(HttpResponse from) { checkNotNull(from, "http response"); - String token = from.getFirstHeaderOrNull(AtmosStorageHeaders.TOKEN); + String token = from.getFirstHeaderOrNull(AtmosHeaders.TOKEN); return new BoundedLinkedHashSet(factory.create(listHandlerProvider.get()).parse( from.getPayload().getInput()), token); } diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/functions/ParseObjectFromHeadersAndHttpContent.java b/apis/atmos/src/main/java/org/jclouds/atmos/functions/ParseObjectFromHeadersAndHttpContent.java similarity index 96% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/functions/ParseObjectFromHeadersAndHttpContent.java rename to apis/atmos/src/main/java/org/jclouds/atmos/functions/ParseObjectFromHeadersAndHttpContent.java index f75bcad351..ad23cec653 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/functions/ParseObjectFromHeadersAndHttpContent.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/functions/ParseObjectFromHeadersAndHttpContent.java @@ -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 org.jclouds.http.HttpUtils.attemptToParseSizeAndRangeFromHeaders; @@ -25,7 +25,7 @@ import static org.jclouds.http.HttpUtils.attemptToParseSizeAndRangeFromHeaders; import javax.inject.Inject; 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.http.HttpResponse; @@ -69,4 +69,4 @@ public class ParseObjectFromHeadersAndHttpContent implements Function metaMap = Maps.newHashMap(); String[] metas = meta.split(", "); for (String entry : metas) { @@ -68,4 +68,4 @@ public class ParseSystemMetadataFromHeaders implements Function meta = Maps.filterKeys( - getMetaMap(checkNotNull(from.getFirstHeaderOrNull(AtmosStorageHeaders.META), AtmosStorageHeaders.META)), + getMetaMap(checkNotNull(from.getFirstHeaderOrNull(AtmosHeaders.META), AtmosHeaders.META)), filter); - Map listableMeta = (from.getFirstHeaderOrNull(AtmosStorageHeaders.LISTABLE_META) != null) ? getMetaMap(from - .getFirstHeaderOrNull(AtmosStorageHeaders.LISTABLE_META)) : ImmutableMap. of(); + Map listableMeta = (from.getFirstHeaderOrNull(AtmosHeaders.LISTABLE_META) != null) ? getMetaMap(from + .getFirstHeaderOrNull(AtmosHeaders.LISTABLE_META)) : ImmutableMap. of(); - Iterable tags = (from.getFirstHeaderOrNull(AtmosStorageHeaders.TAGS) != null) ? Splitter.on(", ").split( - from.getFirstHeaderOrNull(AtmosStorageHeaders.TAGS)) : ImmutableSet. of(); + Iterable tags = (from.getFirstHeaderOrNull(AtmosHeaders.TAGS) != null) ? Splitter.on(", ").split( + from.getFirstHeaderOrNull(AtmosHeaders.TAGS)) : ImmutableSet. of(); - Iterable listableTags = (from.getFirstHeaderOrNull(AtmosStorageHeaders.LISTABLE_TAGS) != null) ? Splitter - .on(", ").split(from.getFirstHeaderOrNull(AtmosStorageHeaders.LISTABLE_TAGS)) : ImmutableSet. of(); + Iterable listableTags = (from.getFirstHeaderOrNull(AtmosHeaders.LISTABLE_TAGS) != null) ? Splitter + .on(", ").split(from.getFirstHeaderOrNull(AtmosHeaders.LISTABLE_TAGS)) : ImmutableSet. of(); return new UserMetadata(meta, listableMeta, tags, listableTags); } @@ -82,4 +82,4 @@ public class ParseUserMetadataFromHeaders implements Function, return this; } -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/handlers/AtmosStorageClientErrorRetryHandler.java b/apis/atmos/src/main/java/org/jclouds/atmos/handlers/AtmosClientErrorRetryHandler.java similarity index 84% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/handlers/AtmosStorageClientErrorRetryHandler.java rename to apis/atmos/src/main/java/org/jclouds/atmos/handlers/AtmosClientErrorRetryHandler.java index 00e38957e1..df7a0dda3b 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/handlers/AtmosStorageClientErrorRetryHandler.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/handlers/AtmosClientErrorRetryHandler.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.handlers; +package org.jclouds.atmos.handlers; import javax.annotation.Resource; import javax.inject.Named; import org.jclouds.Constants; -import org.jclouds.atmosonline.saas.domain.AtmosStorageError; -import org.jclouds.atmosonline.saas.util.AtmosStorageUtils; +import org.jclouds.atmos.domain.AtmosError; +import org.jclouds.atmos.util.AtmosUtils; import org.jclouds.http.HttpCommand; import org.jclouds.http.HttpException; import org.jclouds.http.HttpResponse; @@ -40,13 +40,13 @@ import com.google.inject.Inject; * * @author Adrian Cole */ -public class AtmosStorageClientErrorRetryHandler implements HttpRetryHandler { - private final AtmosStorageUtils utils; +public class AtmosClientErrorRetryHandler implements HttpRetryHandler { + private final AtmosUtils utils; private final BackoffLimitedRetryHandler backoffHandler; @Inject - public AtmosStorageClientErrorRetryHandler(BackoffLimitedRetryHandler backoffHandler, - AtmosStorageUtils utils) { + public AtmosClientErrorRetryHandler(BackoffLimitedRetryHandler backoffHandler, + AtmosUtils utils) { this.backoffHandler = backoffHandler; this.utils = utils; } @@ -68,7 +68,7 @@ public class AtmosStorageClientErrorRetryHandler implements HttpRetryHandler { // Content can be null in the case of HEAD requests if (content != null) { try { - AtmosStorageError error = utils.parseAtmosStorageErrorFromContent(command, response, + AtmosError error = utils.parseAtmosErrorFromContent(command, response, new String(content)); if (error.getCode() == 1016) { return backoffHandler.shouldRetryRequest(command, response); diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/handlers/ParseAtmosStorageErrorFromXmlContent.java b/apis/atmos/src/main/java/org/jclouds/atmos/handlers/ParseAtmosErrorFromXmlContent.java similarity index 85% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/handlers/ParseAtmosStorageErrorFromXmlContent.java rename to apis/atmos/src/main/java/org/jclouds/atmos/handlers/ParseAtmosErrorFromXmlContent.java index da240b5688..e8428cc7b2 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/handlers/ParseAtmosStorageErrorFromXmlContent.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/handlers/ParseAtmosErrorFromXmlContent.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.handlers; +package org.jclouds.atmos.handlers; import static org.jclouds.http.HttpUtils.releasePayload; @@ -30,9 +30,9 @@ import javax.annotation.Resource; import javax.inject.Inject; import javax.inject.Singleton; -import org.jclouds.atmosonline.saas.AtmosStorageResponseException; -import org.jclouds.atmosonline.saas.domain.AtmosStorageError; -import org.jclouds.atmosonline.saas.util.AtmosStorageUtils; +import org.jclouds.atmos.AtmosResponseException; +import org.jclouds.atmos.domain.AtmosError; +import org.jclouds.atmos.util.AtmosUtils; import org.jclouds.blobstore.ContainerNotFoundException; import org.jclouds.blobstore.KeyAlreadyExistsException; 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. * - * @see AtmosStorageError + * @see AtmosError * @author Adrian Cole * */ @Singleton -public class ParseAtmosStorageErrorFromXmlContent implements HttpErrorHandler { +public class ParseAtmosErrorFromXmlContent implements HttpErrorHandler { @Resource protected Logger logger = Logger.NULL; - private final AtmosStorageUtils utils; + private final AtmosUtils utils; @Inject - public ParseAtmosStorageErrorFromXmlContent(AtmosStorageUtils utils) { + public ParseAtmosErrorFromXmlContent(AtmosUtils utils) { this.utils = utils; } @@ -69,12 +69,12 @@ public class ParseAtmosStorageErrorFromXmlContent implements HttpErrorHandler { public void handleError(HttpCommand command, HttpResponse response) { Exception exception = new HttpResponseException(command, response); try { - AtmosStorageError error = null; + AtmosError error = null; if (response.getPayload() != null) { try { String content = Strings2.toStringAndClose(response.getPayload().getInput()); if (content != null && content.indexOf('<') >= 0) { - error = utils.parseAtmosStorageErrorFromContent(command, response, Strings2.toInputStream(content)); + error = utils.parseAtmosErrorFromContent(command, response, Strings2.toInputStream(content)); } else { exception = content != null ? new HttpResponseException(command, response, content) : exception; } @@ -107,7 +107,7 @@ public class ParseAtmosStorageErrorFromXmlContent implements HttpErrorHandler { } break; default: - exception = error != null ? new AtmosStorageResponseException(command, response, error) + exception = error != null ? new AtmosResponseException(command, response, error) : new HttpResponseException(command, response); } @@ -118,4 +118,4 @@ public class ParseAtmosStorageErrorFromXmlContent implements HttpErrorHandler { } } -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/options/ListOptions.java b/apis/atmos/src/main/java/org/jclouds/atmos/options/ListOptions.java similarity index 98% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/options/ListOptions.java rename to apis/atmos/src/main/java/org/jclouds/atmos/options/ListOptions.java index ad313813ff..a936e9cbbe 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/options/ListOptions.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/options/ListOptions.java @@ -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.checkState; diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/reference/AtmosStorageHeaders.java b/apis/atmos/src/main/java/org/jclouds/atmos/reference/AtmosHeaders.java similarity index 91% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/reference/AtmosStorageHeaders.java rename to apis/atmos/src/main/java/org/jclouds/atmos/reference/AtmosHeaders.java index 92275bd0af..d7e751f5bf 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/reference/AtmosStorageHeaders.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/reference/AtmosHeaders.java @@ -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 * @author Adrian Cole * */ -public interface AtmosStorageHeaders { +public interface AtmosHeaders { public static final String SIGNATURE = "x-emc-signature"; public static final String LISTABLE_META = "x-emc-listable-meta"; diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/util/AtmosStorageUtils.java b/apis/atmos/src/main/java/org/jclouds/atmos/util/AtmosUtils.java similarity index 74% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/util/AtmosStorageUtils.java rename to apis/atmos/src/main/java/org/jclouds/atmos/util/AtmosUtils.java index df1b973bdc..6421052e03 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/util/AtmosStorageUtils.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/util/AtmosUtils.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.util; +package org.jclouds.atmos.util; import java.io.ByteArrayInputStream; import java.io.InputStream; @@ -25,11 +25,11 @@ import java.io.InputStream; import javax.inject.Inject; import javax.inject.Provider; -import org.jclouds.atmosonline.saas.AtmosStorageClient; -import org.jclouds.atmosonline.saas.blobstore.functions.BlobToObject; -import org.jclouds.atmosonline.saas.domain.AtmosStorageError; -import org.jclouds.atmosonline.saas.filters.SignRequest; -import org.jclouds.atmosonline.saas.xml.ErrorHandler; +import org.jclouds.atmos.AtmosClient; +import org.jclouds.atmos.blobstore.functions.BlobToObject; +import org.jclouds.atmos.domain.AtmosError; +import org.jclouds.atmos.filters.SignRequest; +import org.jclouds.atmos.xml.ErrorHandler; import org.jclouds.blobstore.domain.Blob; import org.jclouds.crypto.Crypto; import org.jclouds.http.HttpCommand; @@ -46,7 +46,7 @@ import com.google.common.base.Supplier; * * @author Adrian Cole */ -public class AtmosStorageUtils { +public class AtmosUtils { @Inject SignRequest signer; @@ -57,9 +57,9 @@ public class AtmosStorageUtils { @Inject Provider errorHandlerProvider; - public AtmosStorageError parseAtmosStorageErrorFromContent(HttpCommand command, HttpResponse response, + public AtmosError parseAtmosErrorFromContent(HttpCommand command, HttpResponse response, 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) { 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) { final String path = container + "/" + blob.getMetadata().getName(); deleteAndEnsureGone(sync, path); @@ -75,7 +75,7 @@ public class AtmosStorageUtils { return path; } - public static void deleteAndEnsureGone(final AtmosStorageClient sync, final String path) { + public static void deleteAndEnsureGone(final AtmosClient sync, final String path) { try { if (!Assertions.eventuallyTrue(new Supplier() { 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 { - return parseAtmosStorageErrorFromContent(command, response, new ByteArrayInputStream(content.getBytes())); + return parseAtmosErrorFromContent(command, response, new ByteArrayInputStream(content.getBytes())); } public static String adjustContainerIfDirOptionPresent(String container, @@ -107,4 +107,4 @@ public class AtmosStorageUtils { } return container; } -} \ No newline at end of file +} diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/xml/ErrorHandler.java b/apis/atmos/src/main/java/org/jclouds/atmos/xml/ErrorHandler.java similarity index 87% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/xml/ErrorHandler.java rename to apis/atmos/src/main/java/org/jclouds/atmos/xml/ErrorHandler.java index 7f92b81abd..a6cb884aec 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/xml/ErrorHandler.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/xml/ErrorHandler.java @@ -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; /** @@ -27,14 +27,14 @@ import org.jclouds.http.functions.ParseSax; * * @author Adrian Cole */ -public class ErrorHandler extends ParseSax.HandlerWithResult { +public class ErrorHandler extends ParseSax.HandlerWithResult { private StringBuilder currentText = new StringBuilder(); private int code; private String message; - public AtmosStorageError getResult() { - return new AtmosStorageError(code, message); + public AtmosError getResult() { + return new AtmosError(code, message); } public void endElement(String uri, String name, String qName) { diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/xml/ListDirectoryResponseHandler.java b/apis/atmos/src/main/java/org/jclouds/atmos/xml/ListDirectoryResponseHandler.java similarity index 93% rename from atmos/src/main/java/org/jclouds/atmosonline/saas/xml/ListDirectoryResponseHandler.java rename to apis/atmos/src/main/java/org/jclouds/atmos/xml/ListDirectoryResponseHandler.java index 562613eff5..8f0c72a65a 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/xml/ListDirectoryResponseHandler.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/xml/ListDirectoryResponseHandler.java @@ -17,12 +17,12 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.xml; +package org.jclouds.atmos.xml; import java.util.Set; -import org.jclouds.atmosonline.saas.domain.DirectoryEntry; -import org.jclouds.atmosonline.saas.domain.FileType; +import org.jclouds.atmos.domain.DirectoryEntry; +import org.jclouds.atmos.domain.FileType; import org.jclouds.http.functions.ParseSax; import com.google.common.collect.Sets; diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/AtmosStorageAsyncClientTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/AtmosAsyncClientTest.java similarity index 81% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/AtmosStorageAsyncClientTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/AtmosAsyncClientTest.java index 507d9f6011..5e793674e8 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/AtmosStorageAsyncClientTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/AtmosAsyncClientTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas; +package org.jclouds.atmos; import static org.testng.Assert.assertEquals; @@ -28,15 +28,15 @@ import java.util.Properties; import javax.ws.rs.core.HttpHeaders; -import org.jclouds.atmosonline.saas.blobstore.functions.BlobToObject; -import org.jclouds.atmosonline.saas.config.AtmosStorageRestClientModule; -import org.jclouds.atmosonline.saas.domain.AtmosObject; -import org.jclouds.atmosonline.saas.filters.SignRequest; -import org.jclouds.atmosonline.saas.functions.ParseDirectoryListFromContentAndHeaders; -import org.jclouds.atmosonline.saas.functions.ParseObjectFromHeadersAndHttpContent; -import org.jclouds.atmosonline.saas.functions.ParseSystemMetadataFromHeaders; -import org.jclouds.atmosonline.saas.functions.ReturnEndpointIfAlreadyExists; -import org.jclouds.atmosonline.saas.options.ListOptions; +import org.jclouds.atmos.blobstore.functions.BlobToObject; +import org.jclouds.atmos.config.AtmosRestClientModule; +import org.jclouds.atmos.domain.AtmosObject; +import org.jclouds.atmos.filters.SignRequest; +import org.jclouds.atmos.functions.ParseDirectoryListFromContentAndHeaders; +import org.jclouds.atmos.functions.ParseObjectFromHeadersAndHttpContent; +import org.jclouds.atmos.functions.ParseSystemMetadataFromHeaders; +import org.jclouds.atmos.functions.ReturnEndpointIfAlreadyExists; +import org.jclouds.atmos.options.ListOptions; import org.jclouds.blobstore.binders.BindBlobToMultipartFormTest; import org.jclouds.blobstore.functions.ThrowContainerNotFoundOn404; import org.jclouds.blobstore.functions.ThrowKeyNotFoundOn404; @@ -61,18 +61,18 @@ import com.google.inject.Module; import com.google.inject.TypeLiteral; /** - * Tests behavior of {@code AtmosStorageAsyncClient} + * Tests behavior of {@code AtmosAsyncClient} * * @author Adrian Cole */ // NOTE:without testName, this will not call @Before* and fail w/NPE during surefire -@Test(groups = "unit", testName = "AtmosStorageAsyncClientTest") -public class AtmosStorageAsyncClientTest extends RestClientTest { +@Test(groups = "unit", testName = "AtmosAsyncClientTest") +public class AtmosAsyncClientTest extends RestClientTest { private BlobToObject blobToObject; 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()); HttpRequest request = processor.createRequest(method); @@ -88,7 +88,7 @@ public class AtmosStorageAsyncClientTest extends RestClientTest> createTypeLiteral() { - return new TypeLiteral>() { + protected TypeLiteral> createTypeLiteral() { + return new TypeLiteral>() { }; } @@ -253,12 +253,12 @@ public class AtmosStorageAsyncClientTest extends RestClientTest createContextSpec() { - return new RestContextFactory().createContextSpec("atmosonline", "identity", "credential", new Properties()); + return new RestContextFactory().createContextSpec("atmos", "identity", "credential", new Properties()); } } diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/AtmosStorageClientLiveTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/AtmosClientLiveTest.java similarity index 92% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/AtmosStorageClientLiveTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/AtmosClientLiveTest.java index e6ff9bbe56..63c12875d5 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/AtmosStorageClientLiveTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/AtmosClientLiveTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas; +package org.jclouds.atmos; import static org.testng.Assert.assertEquals; @@ -28,12 +28,12 @@ import java.security.SecureRandom; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; -import org.jclouds.atmosonline.saas.domain.AtmosObject; -import org.jclouds.atmosonline.saas.domain.BoundedSet; -import org.jclouds.atmosonline.saas.domain.DirectoryEntry; -import org.jclouds.atmosonline.saas.domain.FileType; -import org.jclouds.atmosonline.saas.domain.SystemMetadata; -import org.jclouds.atmosonline.saas.options.ListOptions; +import org.jclouds.atmos.domain.AtmosObject; +import org.jclouds.atmos.domain.BoundedSet; +import org.jclouds.atmos.domain.DirectoryEntry; +import org.jclouds.atmos.domain.FileType; +import org.jclouds.atmos.domain.SystemMetadata; +import org.jclouds.atmos.options.ListOptions; import org.jclouds.blobstore.KeyAlreadyExistsException; import org.jclouds.blobstore.KeyNotFoundException; import org.jclouds.blobstore.integration.internal.BaseBlobStoreIntegrationTest; @@ -50,23 +50,23 @@ import com.google.common.collect.Iterables; import com.google.common.collect.Sets; /** - * Tests behavior of {@code AtmosStorageClient} + * Tests behavior of {@code AtmosClient} * * @author Adrian Cole */ @Test(groups = "live", sequential = true) -public class AtmosStorageClientLiveTest extends BaseBlobStoreIntegrationTest { +public class AtmosClientLiveTest extends BaseBlobStoreIntegrationTest { - public AtmosStorageClient getApi() { - return (AtmosStorageClient) context.getProviderSpecificContext().getApi(); + public AtmosClient getApi() { + return (AtmosClient) context.getProviderSpecificContext().getApi(); } private static final class HeadMatches implements Runnable { - private final AtmosStorageClient connection; + private final AtmosClient connection; private final String name; private final String metadataValue; - private HeadMatches(AtmosStorageClient connection, String name, String metadataValue) { + private HeadMatches(AtmosClient connection, String name, String metadataValue) { this.connection = connection; this.name = name; this.metadataValue = metadataValue; @@ -82,12 +82,12 @@ public class AtmosStorageClientLiveTest extends BaseBlobStoreIntegrationTest { } private static final class ObjectMatches implements Runnable { - private final AtmosStorageClient connection; + private final AtmosClient connection; private final String name; private final String metadataValue; 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.name = name; this.metadataValue = metadataValue; @@ -237,14 +237,14 @@ public class AtmosStorageClientLiveTest extends BaseBlobStoreIntegrationTest { 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 { AtmosObject getBlob = connection.headFile(path); assertEquals(Strings2.toStringAndClose(getBlob.getPayload().getInput()), ""); 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 { AtmosObject getBlob = connection.readFile(path); assertEquals(Strings2.toStringAndClose(getBlob.getPayload().getInput()), compare); diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/ProvidersInPropertiesTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/ProvidersInPropertiesTest.java similarity index 80% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/ProvidersInPropertiesTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/ProvidersInPropertiesTest.java index 819495b8b0..ca1250bfb3 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/ProvidersInPropertiesTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/ProvidersInPropertiesTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas; +package org.jclouds.atmos; import org.jclouds.blobstore.util.BlobStoreUtils; import org.jclouds.rest.Providers; @@ -36,15 +36,13 @@ public class ProvidersInPropertiesTest { @Test public void testSupportedProviders() { Iterable providers = Providers.getSupportedProviders(); - assert Iterables.contains(providers, "atmosonline") : providers; - assert Iterables.contains(providers, "synaptic") : providers; + assert Iterables.contains(providers, "atmos") : providers; } @Test public void testSupportedBlobStoreProviders() { Iterable providers = BlobStoreUtils.getSupportedProviders(); - assert Iterables.contains(providers, "atmosonline") : providers; - assert Iterables.contains(providers, "synaptic") : providers; + assert Iterables.contains(providers, "atmos") : providers; } } diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/binders/BindMetadataToHeadersTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/binders/BindMetadataToHeadersTest.java similarity index 97% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/binders/BindMetadataToHeadersTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/binders/BindMetadataToHeadersTest.java index 8fad07c325..bf76abcb8b 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/binders/BindMetadataToHeadersTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/binders/BindMetadataToHeadersTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.binders; +package org.jclouds.atmos.binders; import static org.testng.Assert.assertEquals; @@ -26,7 +26,7 @@ import java.net.URI; 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.io.Payload; import org.jclouds.io.Payloads; diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/binders/BindUserMetadataToHeadersTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/binders/BindUserMetadataToHeadersTest.java similarity index 97% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/binders/BindUserMetadataToHeadersTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/binders/BindUserMetadataToHeadersTest.java index c2f26eba8c..5a04ea0bdb 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/binders/BindUserMetadataToHeadersTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/binders/BindUserMetadataToHeadersTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.binders; +package org.jclouds.atmos.binders; import static org.testng.Assert.assertEquals; @@ -26,7 +26,7 @@ import java.net.URI; 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.testng.annotations.Test; diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/AtmosBlobRequestSignerTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/AtmosBlobRequestSignerTest.java similarity index 88% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/AtmosBlobRequestSignerTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/blobstore/AtmosBlobRequestSignerTest.java index 59a2ec5c8a..8baa991cd8 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/AtmosBlobRequestSignerTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/AtmosBlobRequestSignerTest.java @@ -17,16 +17,16 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.blobstore; +package org.jclouds.atmos.blobstore; import static org.testng.Assert.assertEquals; import java.io.IOException; import java.util.Properties; -import org.jclouds.atmosonline.saas.AtmosStorageAsyncClient; -import org.jclouds.atmosonline.saas.config.AtmosStorageRestClientModule; -import org.jclouds.atmosonline.saas.filters.SignRequest; +import org.jclouds.atmos.AtmosAsyncClient; +import org.jclouds.atmos.config.AtmosRestClientModule; +import org.jclouds.atmos.filters.SignRequest; import org.jclouds.blobstore.BlobRequestSigner; import org.jclouds.blobstore.domain.Blob; 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 @Test(groups = "unit", testName = "AtmosBlobRequestSignerTest") -public class AtmosBlobRequestSignerTest extends RestClientTest { +public class AtmosBlobRequestSignerTest extends RestClientTest { private BlobRequestSigner signer; private Factory blobFactory; @@ -120,19 +120,19 @@ public class AtmosBlobRequestSignerTest extends RestClientTest> createTypeLiteral() { - return new TypeLiteral>() { + protected TypeLiteral> createTypeLiteral() { + return new TypeLiteral>() { }; } @Override protected Module createModule() { - return new TestAtmosStorageRestClientModule(); + return new TestAtmosRestClientModule(); } @RequiresHttp @ConfiguresRestClient - private static final class TestAtmosStorageRestClientModule extends AtmosStorageRestClientModule { + private static final class TestAtmosRestClientModule extends AtmosRestClientModule { @Override protected void configure() { super.configure(); @@ -146,7 +146,7 @@ public class AtmosBlobRequestSignerTest extends RestClientTest createContextSpec() { - return new RestContextFactory().createContextSpec("atmosonline", "identity", "credential", new Properties()); + return new RestContextFactory().createContextSpec("atmos", "identity", "credential", new Properties()); } -} \ No newline at end of file +} diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/config/AtmosBlobStoreModuleTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/config/AtmosBlobStoreModuleTest.java old mode 100755 new mode 100644 similarity index 92% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/config/AtmosBlobStoreModuleTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/blobstore/config/AtmosBlobStoreModuleTest.java index 1590e5bab6..c915db0244 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/config/AtmosBlobStoreModuleTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/config/AtmosBlobStoreModuleTest.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.blobstore.config; +package org.jclouds.atmos.blobstore.config; 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.internal.BlobStoreContextImpl; import org.jclouds.blobstore.strategy.ContainsValueInListStrategy; @@ -41,7 +41,7 @@ import com.google.inject.Module; public class AtmosBlobStoreModuleTest { Injector createInjector() { - return new RestContextFactory().createContextBuilder("atmosonline", "uid", "key", + return new RestContextFactory().createContextBuilder("atmos", "uid", "key", ImmutableSet. of(new MockModule(), new NullLoggingModule())).buildInjector(); } @@ -57,4 +57,4 @@ public class AtmosBlobStoreModuleTest { assertEquals(valueList.getClass(), FindMD5InUserMetadata.class); } -} \ No newline at end of file +} diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/functions/ListOptionsToBlobStoreListOptions.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/functions/ListOptionsToBlobStoreListOptions.java similarity index 85% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/functions/ListOptionsToBlobStoreListOptions.java rename to apis/atmos/src/test/java/org/jclouds/atmos/blobstore/functions/ListOptionsToBlobStoreListOptions.java index b41fcaba83..390a987694 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/functions/ListOptionsToBlobStoreListOptions.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/functions/ListOptionsToBlobStoreListOptions.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.blobstore.functions; +package org.jclouds.atmos.blobstore.functions; import javax.inject.Singleton; @@ -30,8 +30,8 @@ import com.google.common.base.Function; */ @Singleton public class ListOptionsToBlobStoreListOptions implements - Function { - public ListContainerOptions apply(org.jclouds.atmosonline.saas.options.ListOptions[] optionsList) { + Function { + public ListContainerOptions apply(org.jclouds.atmos.options.ListOptions[] optionsList) { ListContainerOptions options = new ListContainerOptions(); if (optionsList.length != 0) { if (optionsList[0].getToken() != null) { @@ -46,4 +46,4 @@ public class ListOptionsToBlobStoreListOptions implements } return options; } -} \ No newline at end of file +} diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/functions/ObjectToBlobMetadataTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/functions/ObjectToBlobMetadataTest.java similarity index 95% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/functions/ObjectToBlobMetadataTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/blobstore/functions/ObjectToBlobMetadataTest.java index 30d1f8d3af..e4deefa567 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/functions/ObjectToBlobMetadataTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/functions/ObjectToBlobMetadataTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.blobstore.functions; +package org.jclouds.atmos.blobstore.functions; import static org.testng.Assert.assertEquals; diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/functions/ResourceMetadataListToDirectoryEntryList.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/functions/ResourceMetadataListToDirectoryEntryList.java similarity index 86% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/functions/ResourceMetadataListToDirectoryEntryList.java rename to apis/atmos/src/test/java/org/jclouds/atmos/blobstore/functions/ResourceMetadataListToDirectoryEntryList.java index 7c72525337..64e2f23fba 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/functions/ResourceMetadataListToDirectoryEntryList.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/functions/ResourceMetadataListToDirectoryEntryList.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.blobstore.functions; +package org.jclouds.atmos.blobstore.functions; import javax.inject.Singleton; -import org.jclouds.atmosonline.saas.domain.BoundedSet; -import org.jclouds.atmosonline.saas.domain.DirectoryEntry; -import org.jclouds.atmosonline.saas.domain.FileType; -import org.jclouds.atmosonline.saas.domain.internal.BoundedLinkedHashSet; +import org.jclouds.atmos.domain.BoundedSet; +import org.jclouds.atmos.domain.DirectoryEntry; +import org.jclouds.atmos.domain.FileType; +import org.jclouds.atmos.domain.internal.BoundedLinkedHashSet; import org.jclouds.blobstore.domain.StorageMetadata; import org.jclouds.blobstore.domain.StorageType; @@ -53,4 +53,4 @@ public class ResourceMetadataListToDirectoryEntryList }), from.getNextMarker()); } -} \ No newline at end of file +} diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosBlobSignerLiveTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosBlobSignerLiveTest.java similarity index 94% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosBlobSignerLiveTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosBlobSignerLiveTest.java index c751c10d32..a1a72323ee 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosBlobSignerLiveTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosBlobSignerLiveTest.java @@ -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.testng.annotations.Test; @@ -29,4 +29,4 @@ import org.testng.annotations.Test; @Test(groups = { "live" }) public class AtmosBlobSignerLiveTest extends BaseBlobSignerLiveTest { -} \ No newline at end of file +} diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageContainerIntegrationLiveTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosContainerIntegrationLiveTest.java old mode 100755 new mode 100644 similarity index 91% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageContainerIntegrationLiveTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosContainerIntegrationLiveTest.java index 0049dc6488..7ba6307bd4 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageContainerIntegrationLiveTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosContainerIntegrationLiveTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.blobstore.integration; +package org.jclouds.atmos.blobstore.integration; import static org.testng.Assert.assertEquals; @@ -32,7 +32,7 @@ import org.testng.annotations.Test; * @author Adrian Cole */ @Test(groups = "live") -public class AtmosStorageContainerIntegrationLiveTest extends BaseContainerIntegrationTest { +public class AtmosContainerIntegrationLiveTest extends BaseContainerIntegrationTest { @Override public void testListContainerMaxResults() throws InterruptedException, @@ -49,4 +49,4 @@ public class AtmosStorageContainerIntegrationLiveTest extends BaseContainerInteg // atmos doesn't support MD5 assertEquals(metadata.getContentMetadata().getContentMD5(), null); } -} \ No newline at end of file +} diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageContainerLiveTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosContainerLiveTest.java similarity index 87% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageContainerLiveTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosContainerLiveTest.java index 2ce2871281..520c937b97 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageContainerLiveTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosContainerLiveTest.java @@ -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.testng.annotations.Test; @@ -26,6 +26,6 @@ import org.testng.annotations.Test; * @author Adrian Cole */ @Test(groups = { "live" }) -public class AtmosStorageContainerLiveTest extends BaseContainerLiveTest { +public class AtmosContainerLiveTest extends BaseContainerLiveTest { -} \ No newline at end of file +} diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageInputStreamMapIntegrationLiveTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosInputStreamMapIntegrationLiveTest.java similarity index 93% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageInputStreamMapIntegrationLiveTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosInputStreamMapIntegrationLiveTest.java index 25b539ca64..4bf6c8a9fc 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageInputStreamMapIntegrationLiveTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosInputStreamMapIntegrationLiveTest.java @@ -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.TimeoutException; @@ -29,7 +29,7 @@ import org.testng.annotations.Test; * @author Adrian Cole */ @Test(groups = "live") -public class AtmosStorageInputStreamMapIntegrationLiveTest extends BaseInputStreamMapIntegrationTest { +public class AtmosInputStreamMapIntegrationLiveTest extends BaseInputStreamMapIntegrationTest { @Override @Test(enabled = false) @@ -83,4 +83,4 @@ public class AtmosStorageInputStreamMapIntegrationLiveTest extends BaseInputStre // TODO not reliable NPE } -} \ No newline at end of file +} diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageIntegrationLiveTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosIntegrationLiveTest.java old mode 100755 new mode 100644 similarity index 96% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageIntegrationLiveTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosIntegrationLiveTest.java index f35c662bb7..8198533644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageIntegrationLiveTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosIntegrationLiveTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.blobstore.integration; +package org.jclouds.atmos.blobstore.integration; import static org.testng.Assert.assertEquals; @@ -35,7 +35,7 @@ import org.testng.annotations.Test; * @author Adrian Cole */ @Test(groups = { "integration", "live" }) -public class AtmosStorageIntegrationLiveTest extends BaseBlobIntegrationTest { +public class AtmosIntegrationLiveTest extends BaseBlobIntegrationTest { @DataProvider(name = "delete") // no unicode support @@ -125,4 +125,4 @@ public class AtmosStorageIntegrationLiveTest extends BaseBlobIntegrationTest { // TODO } -} \ No newline at end of file +} diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageLiveTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosLiveTest.java similarity index 91% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageLiveTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosLiveTest.java index 65c2c7d7a5..8406488b96 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageLiveTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosLiveTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.blobstore.integration; +package org.jclouds.atmos.blobstore.integration; import static org.testng.Assert.assertEquals; @@ -29,9 +29,9 @@ import org.testng.annotations.Test; * @author Adrian Cole */ @Test(groups = { "live" }) -public class AtmosStorageLiveTest extends BaseBlobLiveTest { +public class AtmosLiveTest extends BaseBlobLiveTest { protected void checkMD5(String container, String name, byte[] md5) { // atmos does not support content-md5 yet assertEquals(context.getBlobStore().blobMetadata(container, name).getContentMetadata().getContentMD5(), null); } -} \ No newline at end of file +} diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageMapIntegrationLiveTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosMapIntegrationLiveTest.java similarity index 89% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageMapIntegrationLiveTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosMapIntegrationLiveTest.java index 825a762920..853048e461 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageMapIntegrationLiveTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosMapIntegrationLiveTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.blobstore.integration; +package org.jclouds.atmos.blobstore.integration; import java.io.IOException; import java.util.concurrent.ExecutionException; @@ -30,7 +30,7 @@ import org.testng.annotations.Test; * @author Adrian Cole */ @Test(groups = "live") -public class AtmosStorageMapIntegrationLiveTest extends BaseBlobMapIntegrationTest { +public class AtmosMapIntegrationLiveTest extends BaseBlobMapIntegrationTest { @Override // NO support for Content-MD5, so contains cannot work @@ -38,4 +38,4 @@ public class AtmosStorageMapIntegrationLiveTest extends BaseBlobMapIntegrationTe } -} \ No newline at end of file +} diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageServiceIntegrationLiveTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosServiceIntegrationLiveTest.java similarity index 86% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageServiceIntegrationLiveTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosServiceIntegrationLiveTest.java index b9f11965d9..a37b172c51 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageServiceIntegrationLiveTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosServiceIntegrationLiveTest.java @@ -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.testng.annotations.Test; @@ -26,6 +26,6 @@ import org.testng.annotations.Test; * @author Adrian Cole */ @Test(groups = "live") -public class AtmosStorageServiceIntegrationLiveTest extends BaseServiceIntegrationTest { +public class AtmosServiceIntegrationLiveTest extends BaseServiceIntegrationTest { -} \ No newline at end of file +} diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageTestInitializer.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosTestInitializer.java similarity index 89% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageTestInitializer.java rename to apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosTestInitializer.java index 39e9ae5947..4c22ddcf64 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/blobstore/integration/AtmosStorageTestInitializer.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosTestInitializer.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.blobstore.integration; +package org.jclouds.atmos.blobstore.integration; import java.io.IOException; @@ -33,8 +33,8 @@ import com.google.inject.Module; * * @author Adrian Cole */ -public class AtmosStorageTestInitializer extends TransientBlobStoreTestInitializer { - public AtmosStorageTestInitializer() { +public class AtmosTestInitializer extends TransientBlobStoreTestInitializer { + public AtmosTestInitializer() { provider = "synaptic"; } @@ -45,4 +45,4 @@ public class AtmosStorageTestInitializer extends TransientBlobStoreTestInitializ new Log4JLoggingModule()), setupProperties(endpoint, apiversion, identity, credential)); } -} \ No newline at end of file +} diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/filters/SignRequestTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/filters/SignRequestTest.java similarity index 80% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/filters/SignRequestTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/filters/SignRequestTest.java index ecac9a17e4..3ecf2b7384 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/filters/SignRequestTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/filters/SignRequestTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.filters; +package org.jclouds.atmos.filters; 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.MediaType; -import org.jclouds.atmosonline.saas.config.AtmosStorageRestClientModule; -import org.jclouds.atmosonline.saas.reference.AtmosStorageHeaders; +import org.jclouds.atmos.config.AtmosRestClientModule; +import org.jclouds.atmos.reference.AtmosHeaders; import org.jclouds.date.TimeStamp; import org.jclouds.http.HttpRequest; import org.jclouds.http.RequiresHttp; @@ -85,26 +85,26 @@ public class SignRequestTest { void testFilter() throws IOException, NoSuchAlgorithmException, InvalidKeyException { HttpRequest request = newRequest(inputHeaders().build()); request = filter.filter(request); - assertEquals(request.getFirstHeaderOrNull(AtmosStorageHeaders.SIGNATURE), EXPECTED_SIGNATURE); + assertEquals(request.getFirstHeaderOrNull(AtmosHeaders.SIGNATURE), EXPECTED_SIGNATURE); } @Test void testFilterReplacesOldValues() throws IOException, NoSuchAlgorithmException, InvalidKeyException { - HttpRequest request = newRequest(inputHeaders().put(AtmosStorageHeaders.SIGNATURE, "foo") - .put(HttpHeaders.DATE, "foo").put(AtmosStorageHeaders.DATE, "foo").put(AtmosStorageHeaders.UID, "foo") + HttpRequest request = newRequest(inputHeaders().put(AtmosHeaders.SIGNATURE, "foo") + .put(HttpHeaders.DATE, "foo").put(AtmosHeaders.DATE, "foo").put(AtmosHeaders.UID, "foo") .build()); request = filter.filter(request); - assertEquals(request.getFirstHeaderOrNull(AtmosStorageHeaders.SIGNATURE), EXPECTED_SIGNATURE); + assertEquals(request.getFirstHeaderOrNull(AtmosHeaders.SIGNATURE), EXPECTED_SIGNATURE); } @BeforeClass protected void createFilter() { Injector injector = new RestContextFactory() .createContextBuilder( - "atmosonline", + "atmos", UID, KEY, - ImmutableSet. of(new MockModule(), new TestAtmosStorageRestClientModule(), + ImmutableSet. of(new MockModule(), new TestAtmosRestClientModule(), new NullLoggingModule()), new Properties()).buildInjector(); filter = injector.getInstance(SignRequest.class); @@ -113,7 +113,7 @@ public class SignRequestTest { @RequiresHttp @ConfiguresRestClient - private static final class TestAtmosStorageRestClientModule extends AtmosStorageRestClientModule { + private static final class TestAtmosRestClientModule extends AtmosRestClientModule { @Override protected void configure() { @@ -137,19 +137,19 @@ public class SignRequestTest { protected Builder preconstructedHeaders() { Builder builder = inputHeaders(); builder.put(HttpHeaders.DATE, DEFAULT_DATE); - builder.put(AtmosStorageHeaders.UID, UID); + builder.put(AtmosHeaders.UID, UID); return builder; } protected Builder inputHeaders() { Builder builder = ImmutableMultimap.builder(); - builder.put(AtmosStorageHeaders.LISTABLE_META, "part4/part7/part8=quick"); - builder.put(AtmosStorageHeaders.META, "part1=buy"); + builder.put(AtmosHeaders.LISTABLE_META, "part4/part7/part8=quick"); + builder.put(AtmosHeaders.META, "part1=buy"); builder.put(HttpHeaders.ACCEPT, "*/*"); - builder.put(AtmosStorageHeaders.USER_ACL, "john=FULL_CONTROL,mary=WRITE"); - builder.put(AtmosStorageHeaders.GROUP_ACL, "other=NONE"); - builder.put(AtmosStorageHeaders.DATE, DEFAULT_DATE); + builder.put(AtmosHeaders.USER_ACL, "john=FULL_CONTROL,mary=WRITE"); + builder.put(AtmosHeaders.GROUP_ACL, "other=NONE"); + builder.put(AtmosHeaders.DATE, DEFAULT_DATE); builder.put(HttpHeaders.HOST, "10.5.115.118"); return builder; } -} \ No newline at end of file +} diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/functions/AtmosObjectNameTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/functions/AtmosObjectNameTest.java similarity index 87% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/functions/AtmosObjectNameTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/functions/AtmosObjectNameTest.java index a435289519..214b104e03 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/functions/AtmosObjectNameTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/functions/AtmosObjectNameTest.java @@ -17,16 +17,16 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.functions; +package org.jclouds.atmos.functions; import static org.testng.Assert.assertEquals; import java.io.File; -import org.jclouds.atmosonline.saas.domain.AtmosObject; -import org.jclouds.atmosonline.saas.domain.AtmosObject.Factory; -import org.jclouds.atmosonline.saas.domain.SystemMetadata; -import org.jclouds.atmosonline.saas.domain.UserMetadata; +import org.jclouds.atmos.domain.AtmosObject; +import org.jclouds.atmos.domain.AtmosObject.Factory; +import org.jclouds.atmos.domain.SystemMetadata; +import org.jclouds.atmos.domain.UserMetadata; import org.testng.annotations.Test; import com.google.inject.Guice; diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ParseDirectoryListFromContentAndHeadersTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/functions/ParseDirectoryListFromContentAndHeadersTest.java similarity index 86% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ParseDirectoryListFromContentAndHeadersTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/functions/ParseDirectoryListFromContentAndHeadersTest.java index f6fbc77b5d..e08bb87ff6 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ParseDirectoryListFromContentAndHeadersTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/functions/ParseDirectoryListFromContentAndHeadersTest.java @@ -17,17 +17,17 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.functions; +package org.jclouds.atmos.functions; import static org.testng.Assert.assertEquals; import java.util.Set; -import org.jclouds.atmosonline.saas.domain.BoundedSet; -import org.jclouds.atmosonline.saas.domain.DirectoryEntry; -import org.jclouds.atmosonline.saas.domain.FileType; -import org.jclouds.atmosonline.saas.domain.internal.BoundedLinkedHashSet; -import org.jclouds.atmosonline.saas.reference.AtmosStorageHeaders; +import org.jclouds.atmos.domain.BoundedSet; +import org.jclouds.atmos.domain.DirectoryEntry; +import org.jclouds.atmos.domain.FileType; +import org.jclouds.atmos.domain.internal.BoundedLinkedHashSet; +import org.jclouds.atmos.reference.AtmosHeaders; import org.jclouds.http.HttpResponse; import org.jclouds.http.functions.BaseHandlerTest; import org.jclouds.io.Payloads; @@ -52,7 +52,7 @@ public class ParseDirectoryListFromContentAndHeadersTest extends BaseHandlerTest public void testWithToken() { 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 result = createFn().apply(response); assertEquals(result, new BoundedLinkedHashSet(values(), "token")); diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ParseObjectFromHeadersAndHttpContentTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/functions/ParseObjectFromHeadersAndHttpContentTest.java similarity index 83% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ParseObjectFromHeadersAndHttpContentTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/functions/ParseObjectFromHeadersAndHttpContentTest.java index 756e9b810a..17200b063e 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ParseObjectFromHeadersAndHttpContentTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/functions/ParseObjectFromHeadersAndHttpContentTest.java @@ -17,12 +17,12 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.functions; +package org.jclouds.atmos.functions; import static org.testng.Assert.assertEquals; -import org.jclouds.atmosonline.saas.domain.AtmosObject; -import org.jclouds.atmosonline.saas.reference.AtmosStorageHeaders; +import org.jclouds.atmos.domain.AtmosObject; +import org.jclouds.atmos.reference.AtmosHeaders; import org.jclouds.http.HttpResponse; import org.jclouds.io.Payloads; import org.testng.annotations.Test; @@ -39,13 +39,13 @@ import com.google.inject.Guice; public class ParseObjectFromHeadersAndHttpContentTest { static final HttpResponse RESPONSE = new HttpResponse(200, "ok", Payloads.newStringPayload(""), - ImmutableMultimap.of(AtmosStorageHeaders.TAGS, "tag1, tag2", AtmosStorageHeaders.LISTABLE_TAGS, - "listabletag1, listabletag2", AtmosStorageHeaders.META, + ImmutableMultimap.of(AtmosHeaders.TAGS, "tag1, tag2", AtmosHeaders.LISTABLE_TAGS, + "listabletag1, listabletag2", AtmosHeaders.META, "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, " + "gid=rootr, objectid=4980cdb2b010109b04a44f7bb83f5f04ad354c638ae5, " + "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; diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ParseSystemMetadataFromHeadersTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/functions/ParseSystemMetadataFromHeadersTest.java similarity index 92% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ParseSystemMetadataFromHeadersTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/functions/ParseSystemMetadataFromHeadersTest.java index f1e4707a2e..cc3db50e3a 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ParseSystemMetadataFromHeadersTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/functions/ParseSystemMetadataFromHeadersTest.java @@ -17,12 +17,12 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.functions; +package org.jclouds.atmos.functions; import static org.testng.Assert.assertEquals; -import org.jclouds.atmosonline.saas.domain.FileType; -import org.jclouds.atmosonline.saas.domain.SystemMetadata; +import org.jclouds.atmos.domain.FileType; +import org.jclouds.atmos.domain.SystemMetadata; import org.jclouds.crypto.CryptoStreams; import org.jclouds.date.DateService; import org.jclouds.date.internal.SimpleDateFormatDateService; diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ParseUserMetadataFromHeadersTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/functions/ParseUserMetadataFromHeadersTest.java similarity index 94% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ParseUserMetadataFromHeadersTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/functions/ParseUserMetadataFromHeadersTest.java index a6c04472b4..cbdbc43e78 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ParseUserMetadataFromHeadersTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/functions/ParseUserMetadataFromHeadersTest.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.functions; +package org.jclouds.atmos.functions; 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 com.google.common.collect.ImmutableMap; diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ReturnEndpointIfAlreadyExistsTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/functions/ReturnEndpointIfAlreadyExistsTest.java similarity index 95% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ReturnEndpointIfAlreadyExistsTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/functions/ReturnEndpointIfAlreadyExistsTest.java index be2e93f32d..9e429dbd1d 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ReturnEndpointIfAlreadyExistsTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/functions/ReturnEndpointIfAlreadyExistsTest.java @@ -1,4 +1,4 @@ -package org.jclouds.atmosonline.saas.functions; +package org.jclouds.atmos.functions; import static org.testng.Assert.assertEquals; diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/internal/StubAtmosStorageAsyncClient.java b/apis/atmos/src/test/java/org/jclouds/atmos/internal/StubAtmosAsyncClient.java similarity index 88% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/internal/StubAtmosStorageAsyncClient.java rename to apis/atmos/src/test/java/org/jclouds/atmos/internal/StubAtmosAsyncClient.java index 405cb43a0a..01aa15cf3e 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/internal/StubAtmosStorageAsyncClient.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/internal/StubAtmosAsyncClient.java @@ -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.util.concurrent.Futures.immediateFailedFuture; @@ -31,18 +31,18 @@ import javax.inject.Inject; import javax.inject.Named; import org.jclouds.Constants; -import org.jclouds.atmosonline.saas.AtmosStorageAsyncClient; -import org.jclouds.atmosonline.saas.blobstore.functions.BlobMetadataToObject; -import org.jclouds.atmosonline.saas.blobstore.functions.BlobToObject; -import org.jclouds.atmosonline.saas.blobstore.functions.ListOptionsToBlobStoreListOptions; -import org.jclouds.atmosonline.saas.blobstore.functions.ObjectToBlob; -import org.jclouds.atmosonline.saas.blobstore.functions.ResourceMetadataListToDirectoryEntryList; -import org.jclouds.atmosonline.saas.domain.AtmosObject; -import org.jclouds.atmosonline.saas.domain.BoundedSet; -import org.jclouds.atmosonline.saas.domain.DirectoryEntry; -import org.jclouds.atmosonline.saas.domain.SystemMetadata; -import org.jclouds.atmosonline.saas.domain.UserMetadata; -import org.jclouds.atmosonline.saas.options.ListOptions; +import org.jclouds.atmos.AtmosAsyncClient; +import org.jclouds.atmos.blobstore.functions.BlobMetadataToObject; +import org.jclouds.atmos.blobstore.functions.BlobToObject; +import org.jclouds.atmos.blobstore.functions.ListOptionsToBlobStoreListOptions; +import org.jclouds.atmos.blobstore.functions.ObjectToBlob; +import org.jclouds.atmos.blobstore.functions.ResourceMetadataListToDirectoryEntryList; +import org.jclouds.atmos.domain.AtmosObject; +import org.jclouds.atmos.domain.BoundedSet; +import org.jclouds.atmos.domain.DirectoryEntry; +import org.jclouds.atmos.domain.SystemMetadata; +import org.jclouds.atmos.domain.UserMetadata; +import org.jclouds.atmos.options.ListOptions; import org.jclouds.blobstore.TransientAsyncBlobStore; import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.domain.BlobMetadata; @@ -55,11 +55,11 @@ import com.google.common.base.Throwables; 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 */ -public class StubAtmosStorageAsyncClient implements AtmosStorageAsyncClient { +public class StubAtmosAsyncClient implements AtmosAsyncClient { private final HttpGetOptionsListToGetOptions httpGetOptionsConverter; private final TransientAsyncBlobStore blobStore; private final AtmosObject.Factory objectProvider; @@ -71,7 +71,7 @@ public class StubAtmosStorageAsyncClient implements AtmosStorageAsyncClient { private final ExecutorService service; @Inject - private StubAtmosStorageAsyncClient(TransientAsyncBlobStore blobStore, AtmosObject.Factory objectProvider, + private StubAtmosAsyncClient(TransientAsyncBlobStore blobStore, AtmosObject.Factory objectProvider, HttpGetOptionsListToGetOptions httpGetOptionsConverter, ObjectToBlob object2Blob, BlobToObject blob2Object, BlobMetadataToObject blob2ObjectInfo, ListOptionsToBlobStoreListOptions container2ContainerListOptions, @Named(Constants.PROPERTY_USER_THREADS) ExecutorService service, diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/options/ListOptionsTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/options/ListOptionsTest.java similarity index 98% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/options/ListOptionsTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/options/ListOptionsTest.java index 782ac6c3c4..1dcebbca0b 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/options/ListOptionsTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/options/ListOptionsTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.options; +package org.jclouds.atmos.options; import static org.testng.Assert.assertEquals; diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/xml/ErrorHandlerTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/xml/ErrorHandlerTest.java similarity index 80% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/xml/ErrorHandlerTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/xml/ErrorHandlerTest.java index 7939dae87e..1dad291a96 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/xml/ErrorHandlerTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/xml/ErrorHandlerTest.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.xml; +package org.jclouds.atmos.xml; import static org.testng.Assert.assertEquals; 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.ParseSax; import org.testng.annotations.Test; @@ -37,16 +37,16 @@ import org.testng.annotations.Test; @Test(groups = "unit", testName = "ErrorHandlerTest") public class ErrorHandlerTest extends BaseHandlerTest { - ParseSax createParser() { - ParseSax parser = (ParseSax) factory.create(injector + ParseSax createParser() { + ParseSax parser = (ParseSax) factory.create(injector .getInstance(ErrorHandler.class)); return parser; } public void testApplyInputStream() { InputStream is = getClass().getResourceAsStream("/error.xml"); - ParseSax parser = createParser(); - AtmosStorageError result = parser.parse(is); + ParseSax parser = createParser(); + AtmosError result = parser.parse(is); assertEquals(result.getCode(), 1003); } } diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/xml/ListDirectoryResponseHandlerTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/xml/ListDirectoryResponseHandlerTest.java similarity index 93% rename from atmos/src/test/java/org/jclouds/atmosonline/saas/xml/ListDirectoryResponseHandlerTest.java rename to apis/atmos/src/test/java/org/jclouds/atmos/xml/ListDirectoryResponseHandlerTest.java index 0a1ff56b07..7dac720a98 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/xml/ListDirectoryResponseHandlerTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/xml/ListDirectoryResponseHandlerTest.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.jclouds.atmosonline.saas.xml; +package org.jclouds.atmos.xml; import static org.testng.Assert.assertEquals; import java.io.InputStream; import java.util.Set; -import org.jclouds.atmosonline.saas.domain.DirectoryEntry; -import org.jclouds.atmosonline.saas.domain.FileType; +import org.jclouds.atmos.domain.DirectoryEntry; +import org.jclouds.atmos.domain.FileType; import org.jclouds.http.functions.BaseHandlerTest; import org.jclouds.http.functions.ParseSax; import org.testng.annotations.Test; diff --git a/atmos/src/test/resources/error.xml b/apis/atmos/src/test/resources/error.xml similarity index 100% rename from atmos/src/test/resources/error.xml rename to apis/atmos/src/test/resources/error.xml diff --git a/atmos/src/test/resources/hashstring.txt b/apis/atmos/src/test/resources/hashstring.txt similarity index 100% rename from atmos/src/test/resources/hashstring.txt rename to apis/atmos/src/test/resources/hashstring.txt diff --git a/atmos/src/test/resources/list_basic.xml b/apis/atmos/src/test/resources/list_basic.xml similarity index 100% rename from atmos/src/test/resources/list_basic.xml rename to apis/atmos/src/test/resources/list_basic.xml diff --git a/atmos/src/test/resources/list_meta.xml b/apis/atmos/src/test/resources/list_meta.xml similarity index 100% rename from atmos/src/test/resources/list_meta.xml rename to apis/atmos/src/test/resources/list_meta.xml diff --git a/atmos/src/test/resources/log4j.xml b/apis/atmos/src/test/resources/log4j.xml similarity index 100% rename from atmos/src/test/resources/log4j.xml rename to apis/atmos/src/test/resources/log4j.xml diff --git a/apis/pom.xml b/apis/pom.xml index 16cc1aeaa0..2b0319f2f8 100644 --- a/apis/pom.xml +++ b/apis/pom.xml @@ -45,5 +45,6 @@ vcloud vcloudexpress elasticstack + atmos diff --git a/core/src/main/resources/rest.properties b/core/src/main/resources/rest.properties index 18b91be832..38bb88d589 100644 --- a/core/src/main/resources/rest.properties +++ b/core/src/main/resources/rest.properties @@ -147,6 +147,10 @@ stub.contextbuilder=org.jclouds.compute.stub.StubComputeServiceContextBuilder # example of where to change your endpoint # 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.endpoint=https://accesspoint.atmosonline.com atmosonline.apiversion=1.3.0 diff --git a/pom.xml b/pom.xml index 0c65e1e343..161860c55c 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,6 @@ tools scriptbuilder azure - atmos allcompute allblobstore all