From 74be2180d3377cfaa3c73a32a4ab92c7a93c5458 Mon Sep 17 00:00:00 2001 From: "adrian.f.cole" Date: Sun, 13 Dec 2009 06:42:22 +0000 Subject: [PATCH] Issue 131: reorganized package structure git-svn-id: http://jclouds.googlecode.com/svn/trunk@2409 3d8758e0-26b5-11de-8745-db77d3ebf521 --- ...mosObjectToEntityAndMetadataToHeaders.java | 2 +- .../saas/blobstore/AtmosAsyncBlobStore.java | 2 +- .../saas/blobstore/AtmosBlobStore.java | 2 +- .../functions/ObjectToBlobMetadata.java | 2 +- .../config/AtmosStorageRestClientModule.java | 4 +- .../atmosonline/saas/filters/SignRequest.java | 4 +- .../ParseSystemMetadataFromHeaders.java | 2 +- .../saas/AtmosStorageClientTest.java | 4 +- .../AtmosStorageRestClientModuleTest.java | 2 +- .../saas/filters/SignRequestTest.java | 2 +- .../ParseSystemMetadataFromHeadersTest.java | 2 +- .../aws/ec2/config/EC2RestClientModule.java | 4 +- .../jclouds/aws/ec2/filters/FormSigner.java | 4 +- .../aws/ec2/xml/BaseReservationHandler.java | 2 +- .../xml/DescribeInstancesResponseHandler.java | 2 +- .../ec2/xml/RunInstancesResponseHandler.java | 2 +- .../aws/s3/config/S3RestClientModule.java | 4 +- .../s3/filters/RequestAuthorizeSignature.java | 4 +- .../ParseObjectMetadataFromHeaders.java | 2 +- .../aws/s3/options/CopyObjectOptions.java | 4 +- .../jclouds/aws/s3/xml/CopyObjectHandler.java | 2 +- .../aws/s3/xml/ListAllMyBucketsHandler.java | 2 +- .../jclouds/aws/s3/xml/ListBucketHandler.java | 4 +- .../org/jclouds/aws/ec2/EC2ClientTest.java | 2 +- .../DescribeInstancesResponseHandlerTest.java | 2 +- .../xml/RunInstancesResponseHandlerTest.java | 2 +- ...TerminateInstancesResponseHandlerTest.java | 2 +- .../java/org/jclouds/aws/s3/S3ClientTest.java | 2 +- .../aws/s3/config/S3RestClientModuleTest.java | 2 +- .../ParseObjectMetadataFromHeadersTest.java | 4 +- .../aws/s3/internal/StubS3AsyncClient.java | 2 +- .../aws/s3/options/CopyObjectOptionsTest.java | 2 +- .../aws/s3/xml/CopyObjectHandlerTest.java | 4 +- .../aws/s3/xml/ListBucketHandlerTest.java | 6 +- .../org/jclouds/aws/s3/xml/S3ParserTest.java | 2 +- .../java/org/jclouds/aws/s3/jets3t/Util.java | 4 +- .../java/com/amazon/s3/DateServiceTest.java | 2 +- .../test/java/com/amazon/s3/S3ParserTest.java | 2 +- .../blob/binders/BindAzureBlobToEntity.java | 2 +- .../ParseContainerPropertiesFromHeaders.java | 2 +- .../AccountNameEnumerationResultsHandler.java | 2 +- ...ontainerNameEnumerationResultsHandler.java | 2 +- .../config/AzureStorageRestClientModule.java | 4 +- .../filters/SharedKeyAuthentication.java | 4 +- .../storage/blob/AzureBlobClientLiveTest.java | 4 +- .../storage/blob/AzureBlobClientTest.java | 2 +- .../config/RestAzureBlobClientModuleTest.java | 2 +- ...ountNameEnumerationResultsHandlerTest.java | 2 +- ...inerNameEnumerationResultsHandlerTest.java | 2 +- .../AzureStorageRestClientModuleTest.java | 2 +- .../filters/SharedKeyAuthenticationTest.java | 2 +- .../storage/queue/AzureQueueClientTest.java | 2 +- .../blobstore/binders/BindBlobToEntity.java | 2 +- ...ityAndUserMetadataToHeadersWithPrefix.java | 2 +- .../HttpGetOptionsListToGetOptions.java | 2 +- ...ParseSystemAndUserMetadataFromHeaders.java | 4 +- .../functions/impl/JCEGenerateMD5.java | 4 +- .../functions/impl/JCEGenerateMD5Result.java | 6 +- .../ParseBlobMetadataFromHeadersTest.java | 4 +- .../internal/BaseBlobIntegrationTest.java | 2 +- .../internal/BaseBlobLiveTest.java | 2 +- .../internal/StubAsyncBlobStore.java | 4 +- .../jclouds/{util => date}/DateService.java | 4 +- .../org/jclouds/{util => date}/TimeStamp.java | 2 +- .../internal/SimpleDateFormatDateService.java | 4 +- .../EncryptionService.java | 4 +- .../{util => encryption}/internal/Base64.java | 2 +- .../internal/BaseEncryptionService.java | 4 +- .../internal/JCEEncryptionService.java | 2 +- .../http/filters/BasicAuthentication.java | 2 +- .../functions/ParseContentMD5FromHeaders.java | 2 +- .../http/functions/config/ParserModule.java | 2 +- .../org/jclouds/http/options/GetOptions.java | 4 +- .../java/org/jclouds/PerformanceTest.java | 2 +- .../{util => date}/DateServiceTest.java | 3 +- .../EncryptionServiceTest.java | 5 +- .../http/filters/BasicAuthenticationTest.java | 2 +- .../jclouds/http/internal/WireLiveTest.java | 4 +- .../jclouds/http/options/GetOptionsTest.java | 2 +- .../internal/RestAnnotationProcessorTest.java | 4 +- .../tweetstore/config/GuiceServletConfig.java | 25 +++--- .../BouncyCastleEncryptionService.java | 29 +++++- .../BouncyCastleEncryptionServiceModule.java | 44 +++++++++ .../util/internal/EncryptionService.java | 90 ------------------- .../BouncyCastleEncryptionServiceTest.java | 11 ++- extensions/gae/pom.xml | 60 ++++++------- .../joda}/JodaDateService.java | 7 +- .../joda/config/JodaDateServiceModule.java | 44 +++++++++ .../joda}/JodaDateServiceTest.java | 13 ++- .../pcs2/config/PCSRestClientModule.java | 2 +- .../mezeo/pcs2/xml/ContainerHandler.java | 2 +- .../jclouds/mezeo/pcs2/xml/FileHandler.java | 2 +- .../org/jclouds/mezeo/pcs2/PCSClientTest.java | 2 +- .../jclouds/mezeo/pcs2/PCSCloudLiveTest.java | 2 +- .../org/jclouds/mezeo/pcs2/PCSCloudTest.java | 2 +- .../mezeo/pcs2/xml/ContainerHandlerTest.java | 2 +- .../pcs2/xml/FileMetadataHandlerTest.java | 2 +- .../nirvanix/sdn/SDNClientLiveTest.java | 2 +- .../filters/AddSessionTokenToRequestTest.java | 2 +- .../binders/BindCFObjectToEntity.java | 2 +- .../functions/ObjectToBlobMetadata.java | 2 +- .../functions/ResourceToObjectInfo.java | 2 +- .../functions/ParseObjectInfoFromHeaders.java | 2 +- .../ParseObjectInfoListFromJsonResponse.java | 2 +- .../options/CreateServerOptions.java | 2 +- .../cloudfiles/CloudFilesClientLiveTest.java | 4 +- ...rseObjectInfoListFromJsonResponseTest.java | 2 +- .../ParseImageFromJsonResponseTest.java | 2 +- .../ParseImageListFromJsonResponseTest.java | 2 +- .../miro/RimuHostingAsyncClientTest.java | 2 +- .../config/TwitterRestClientModule.java | 2 +- .../jclouds/twitter/TwitterClientTest.java | 2 +- .../ParseStatusesFromJsonResponseTest.java | 4 +- .../VCloudDiscoveryRestClientModule.java | 2 +- .../org/jclouds/vcloud/xml/TaskHandler.java | 2 +- .../org/jclouds/vcloud/VCloudLoginTest.java | 2 +- .../jclouds/vcloud/xml/TaskHandlerTest.java | 2 +- .../vcloud/xml/TasksListHandlerTest.java | 2 +- .../terremark/xml/VirtualSystemHandler.java | 2 +- 119 files changed, 322 insertions(+), 289 deletions(-) rename core/src/main/java/org/jclouds/{util => date}/DateService.java (95%) mode change 100644 => 100755 rename core/src/main/java/org/jclouds/{util => date}/TimeStamp.java (98%) rename core/src/main/java/org/jclouds/{util => date}/internal/SimpleDateFormatDateService.java (98%) rename core/src/main/java/org/jclouds/{util => encryption}/EncryptionService.java (96%) rename core/src/main/java/org/jclouds/{util => encryption}/internal/Base64.java (99%) rename core/src/main/java/org/jclouds/{util => encryption}/internal/BaseEncryptionService.java (96%) rename core/src/main/java/org/jclouds/{util => encryption}/internal/JCEEncryptionService.java (98%) rename core/src/test/java/org/jclouds/{util => date}/DateServiceTest.java (99%) mode change 100644 => 100755 rename core/src/test/java/org/jclouds/{util => encryption}/EncryptionServiceTest.java (97%) rename extensions/bouncycastle/src/main/java/org/jclouds/{util/internal => encryption/bouncycastle}/BouncyCastleEncryptionService.java (76%) create mode 100755 extensions/bouncycastle/src/main/java/org/jclouds/encryption/bouncycastle/config/BouncyCastleEncryptionServiceModule.java delete mode 100644 extensions/bouncycastle/src/main/java/org/jclouds/util/internal/EncryptionService.java rename extensions/bouncycastle/src/test/java/org/jclouds/{util/internal => encryption/bouncycastle}/BouncyCastleEncryptionServiceTest.java (51%) rename extensions/joda/src/main/java/org/jclouds/{util/internal => date/joda}/JodaDateService.java (97%) create mode 100755 extensions/joda/src/main/java/org/jclouds/date/joda/config/JodaDateServiceModule.java rename extensions/joda/src/test/java/org/jclouds/{util => date/joda}/JodaDateServiceTest.java (79%) diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/binders/BindAtmosObjectToEntityAndMetadataToHeaders.java b/atmos/src/main/java/org/jclouds/atmosonline/saas/binders/BindAtmosObjectToEntityAndMetadataToHeaders.java index 148b8980da..a29b831a17 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/binders/BindAtmosObjectToEntityAndMetadataToHeaders.java +++ b/atmos/src/main/java/org/jclouds/atmosonline/saas/binders/BindAtmosObjectToEntityAndMetadataToHeaders.java @@ -29,9 +29,9 @@ import javax.inject.Inject; import javax.ws.rs.core.HttpHeaders; import org.jclouds.atmosonline.saas.domain.AtmosObject; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.HttpRequest; import org.jclouds.rest.Binder; -import org.jclouds.util.EncryptionService; public class BindAtmosObjectToEntityAndMetadataToHeaders implements Binder { private final BindUserMetadataToHeaders metaBinder; diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosAsyncBlobStore.java b/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosAsyncBlobStore.java index 426bbf5555..ea3066208d 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosAsyncBlobStore.java +++ b/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosAsyncBlobStore.java @@ -52,9 +52,9 @@ import org.jclouds.blobstore.domain.Blob.Factory; import org.jclouds.blobstore.functions.BlobToHttpGetOptions; import org.jclouds.blobstore.strategy.ClearListStrategy; import org.jclouds.concurrent.FutureFunctionCallable; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.options.GetOptions; import org.jclouds.logging.Logger.LoggerFactory; -import org.jclouds.util.EncryptionService; import org.jclouds.util.Utils; import com.google.common.base.Function; diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosBlobStore.java b/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosBlobStore.java index c69572375a..f92d13e47e 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosBlobStore.java +++ b/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/AtmosBlobStore.java @@ -47,9 +47,9 @@ import org.jclouds.blobstore.domain.ResourceMetadata; import org.jclouds.blobstore.domain.Blob.Factory; import org.jclouds.blobstore.functions.BlobToHttpGetOptions; import org.jclouds.blobstore.strategy.ClearListStrategy; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.options.GetOptions; import org.jclouds.logging.Logger.LoggerFactory; -import org.jclouds.util.EncryptionService; import org.jclouds.util.Utils; import com.google.common.base.Supplier; diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/functions/ObjectToBlobMetadata.java b/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/functions/ObjectToBlobMetadata.java index 6b5c5abb04..8e1491c44e 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/functions/ObjectToBlobMetadata.java +++ b/atmos/src/main/java/org/jclouds/atmosonline/saas/blobstore/functions/ObjectToBlobMetadata.java @@ -35,7 +35,7 @@ import org.jclouds.atmosonline.saas.functions.AtmosObjectName; import org.jclouds.blobstore.domain.MutableBlobMetadata; import org.jclouds.blobstore.domain.ResourceType; import org.jclouds.blobstore.domain.internal.MutableBlobMetadataImpl; -import org.jclouds.util.EncryptionService; +import org.jclouds.encryption.EncryptionService; import com.google.common.base.Function; import com.google.common.collect.ImmutableSet; diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/config/AtmosStorageRestClientModule.java b/atmos/src/main/java/org/jclouds/atmosonline/saas/config/AtmosStorageRestClientModule.java index 006c8b2640..163422c00f 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/config/AtmosStorageRestClientModule.java +++ b/atmos/src/main/java/org/jclouds/atmosonline/saas/config/AtmosStorageRestClientModule.java @@ -39,6 +39,8 @@ import org.jclouds.atmosonline.saas.handlers.AtmosStorageClientErrorRetryHandler import org.jclouds.atmosonline.saas.handlers.ParseAtmosStorageErrorFromXmlContent; import org.jclouds.concurrent.ExpirableSupplier; import org.jclouds.concurrent.internal.SyncProxy; +import org.jclouds.date.DateService; +import org.jclouds.date.TimeStamp; import org.jclouds.http.HttpErrorHandler; import org.jclouds.http.HttpRetryHandler; import org.jclouds.http.RequiresHttp; @@ -47,8 +49,6 @@ import org.jclouds.http.annotation.Redirection; import org.jclouds.http.annotation.ServerError; import org.jclouds.rest.ConfiguresRestClient; import org.jclouds.rest.RestClientFactory; -import org.jclouds.util.DateService; -import org.jclouds.util.TimeStamp; import com.google.common.base.Supplier; import com.google.inject.AbstractModule; diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/filters/SignRequest.java b/atmos/src/main/java/org/jclouds/atmosonline/saas/filters/SignRequest.java index a581384caa..aeb6b4550e 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/filters/SignRequest.java +++ b/atmos/src/main/java/org/jclouds/atmosonline/saas/filters/SignRequest.java @@ -38,6 +38,8 @@ import javax.ws.rs.core.HttpHeaders; import org.apache.commons.io.IOUtils; import org.jclouds.atmosonline.saas.reference.AtmosStorageConstants; import org.jclouds.atmosonline.saas.reference.AtmosStorageHeaders; +import org.jclouds.date.TimeStamp; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.HttpConstants; import org.jclouds.http.HttpException; import org.jclouds.http.HttpRequest; @@ -45,8 +47,6 @@ import org.jclouds.http.HttpRequestFilter; import org.jclouds.http.HttpUtils; import org.jclouds.http.internal.SignatureWire; import org.jclouds.logging.Logger; -import org.jclouds.util.EncryptionService; -import org.jclouds.util.TimeStamp; import com.google.common.annotations.VisibleForTesting; diff --git a/atmos/src/main/java/org/jclouds/atmosonline/saas/functions/ParseSystemMetadataFromHeaders.java b/atmos/src/main/java/org/jclouds/atmosonline/saas/functions/ParseSystemMetadataFromHeaders.java index 0e2e63091c..3c55559b7a 100644 --- a/atmos/src/main/java/org/jclouds/atmosonline/saas/functions/ParseSystemMetadataFromHeaders.java +++ b/atmos/src/main/java/org/jclouds/atmosonline/saas/functions/ParseSystemMetadataFromHeaders.java @@ -33,8 +33,8 @@ import javax.inject.Singleton; import org.jclouds.atmosonline.saas.domain.FileType; import org.jclouds.atmosonline.saas.domain.SystemMetadata; import org.jclouds.atmosonline.saas.reference.AtmosStorageHeaders; +import org.jclouds.date.DateService; import org.jclouds.http.HttpResponse; -import org.jclouds.util.DateService; import com.google.common.base.Function; import com.google.common.collect.Maps; diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/AtmosStorageClientTest.java b/atmos/src/test/java/org/jclouds/atmosonline/saas/AtmosStorageClientTest.java index 4754295f8e..ec7e169329 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/AtmosStorageClientTest.java +++ b/atmos/src/test/java/org/jclouds/atmosonline/saas/AtmosStorageClientTest.java @@ -46,6 +46,8 @@ import org.jclouds.blobstore.binders.BindBlobToMultipartFormTest; import org.jclouds.blobstore.config.BlobStoreObjectModule; import org.jclouds.blobstore.functions.ReturnVoidOnNotFoundOr404; import org.jclouds.blobstore.functions.ThrowKeyNotFoundOn404; +import org.jclouds.date.TimeStamp; +import org.jclouds.encryption.internal.Base64; import org.jclouds.http.functions.ParseURIFromListOrLocationHeaderIf20x; import org.jclouds.http.functions.ReturnVoidIf2xx; import org.jclouds.http.options.GetOptions; @@ -55,8 +57,6 @@ import org.jclouds.rest.RestClientTest; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.jclouds.rest.internal.RestAnnotationProcessor; import org.jclouds.util.Jsr330; -import org.jclouds.util.TimeStamp; -import org.jclouds.util.internal.Base64; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/config/AtmosStorageRestClientModuleTest.java b/atmos/src/test/java/org/jclouds/atmosonline/saas/config/AtmosStorageRestClientModuleTest.java index 226e11ca43..fe71cbb9fc 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/config/AtmosStorageRestClientModuleTest.java +++ b/atmos/src/test/java/org/jclouds/atmosonline/saas/config/AtmosStorageRestClientModuleTest.java @@ -32,12 +32,12 @@ import org.jclouds.atmosonline.saas.handlers.ParseAtmosStorageErrorFromXmlConten import org.jclouds.atmosonline.saas.reference.AtmosStorageConstants; import org.jclouds.concurrent.WithinThreadExecutorService; import org.jclouds.concurrent.config.ExecutorServiceModule; +import org.jclouds.date.internal.SimpleDateFormatDateService; import org.jclouds.http.functions.config.ParserModule; import org.jclouds.http.handlers.DelegatingErrorHandler; import org.jclouds.http.handlers.DelegatingRetryHandler; import org.jclouds.http.handlers.RedirectionRetryHandler; import org.jclouds.util.Jsr330; -import org.jclouds.util.internal.SimpleDateFormatDateService; import org.testng.annotations.Test; import com.google.common.base.Supplier; diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/filters/SignRequestTest.java b/atmos/src/test/java/org/jclouds/atmosonline/saas/filters/SignRequestTest.java index 407fe2776c..fafeb94710 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/filters/SignRequestTest.java +++ b/atmos/src/test/java/org/jclouds/atmosonline/saas/filters/SignRequestTest.java @@ -37,9 +37,9 @@ import org.jclouds.atmosonline.saas.reference.AtmosStorageConstants; import org.jclouds.atmosonline.saas.reference.AtmosStorageHeaders; import org.jclouds.concurrent.WithinThreadExecutorService; import org.jclouds.concurrent.config.ExecutorServiceModule; +import org.jclouds.date.TimeStamp; import org.jclouds.http.HttpRequest; import org.jclouds.util.Jsr330; -import org.jclouds.util.TimeStamp; import org.jclouds.util.Utils; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ParseSystemMetadataFromHeadersTest.java b/atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ParseSystemMetadataFromHeadersTest.java index 85681359aa..a575075067 100644 --- a/atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ParseSystemMetadataFromHeadersTest.java +++ b/atmos/src/test/java/org/jclouds/atmosonline/saas/functions/ParseSystemMetadataFromHeadersTest.java @@ -27,8 +27,8 @@ import static org.testng.Assert.assertEquals; import org.jclouds.atmosonline.saas.domain.FileType; import org.jclouds.atmosonline.saas.domain.SystemMetadata; +import org.jclouds.date.DateService; import org.jclouds.http.HttpResponse; -import org.jclouds.util.DateService; import org.testng.annotations.Test; import com.google.inject.Guice; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/config/EC2RestClientModule.java b/aws/core/src/main/java/org/jclouds/aws/ec2/config/EC2RestClientModule.java index 353d12e9e5..08aa9e269d 100755 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/config/EC2RestClientModule.java +++ b/aws/core/src/main/java/org/jclouds/aws/ec2/config/EC2RestClientModule.java @@ -39,6 +39,8 @@ import org.jclouds.aws.handlers.AWSRedirectionRetryHandler; import org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent; import org.jclouds.aws.util.RequestSigner; import org.jclouds.concurrent.internal.SyncProxy; +import org.jclouds.date.DateService; +import org.jclouds.date.TimeStamp; import org.jclouds.http.HttpErrorHandler; import org.jclouds.http.HttpRetryHandler; import org.jclouds.http.RequiresHttp; @@ -47,8 +49,6 @@ import org.jclouds.http.annotation.Redirection; import org.jclouds.http.annotation.ServerError; import org.jclouds.rest.ConfiguresRestClient; import org.jclouds.rest.RestClientFactory; -import org.jclouds.util.DateService; -import org.jclouds.util.TimeStamp; import com.google.inject.AbstractModule; import com.google.inject.Provides; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/filters/FormSigner.java b/aws/core/src/main/java/org/jclouds/aws/ec2/filters/FormSigner.java index 9e33be21b0..9eeb199d04 100755 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/filters/FormSigner.java +++ b/aws/core/src/main/java/org/jclouds/aws/ec2/filters/FormSigner.java @@ -48,6 +48,8 @@ import javax.ws.rs.core.HttpHeaders; import org.apache.commons.io.IOUtils; import org.jclouds.aws.reference.AWSConstants; import org.jclouds.aws.util.RequestSigner; +import org.jclouds.date.TimeStamp; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.HttpConstants; import org.jclouds.http.HttpException; import org.jclouds.http.HttpRequest; @@ -57,8 +59,6 @@ import org.jclouds.http.internal.SignatureWire; import org.jclouds.logging.Logger; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.jclouds.rest.internal.RestAnnotationProcessor; -import org.jclouds.util.EncryptionService; -import org.jclouds.util.TimeStamp; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/BaseReservationHandler.java b/aws/core/src/main/java/org/jclouds/aws/ec2/xml/BaseReservationHandler.java index bcbbec9007..d9cc720623 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/BaseReservationHandler.java +++ b/aws/core/src/main/java/org/jclouds/aws/ec2/xml/BaseReservationHandler.java @@ -35,9 +35,9 @@ import org.jclouds.aws.ec2.domain.InstanceState; import org.jclouds.aws.ec2.domain.InstanceType; import org.jclouds.aws.ec2.domain.Reservation; import org.jclouds.aws.ec2.domain.RunningInstance; +import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax.HandlerWithResult; import org.jclouds.logging.Logger; -import org.jclouds.util.DateService; import org.xml.sax.Attributes; import com.google.common.collect.Sets; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeInstancesResponseHandler.java b/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeInstancesResponseHandler.java index 3b57f6f125..be99a16cda 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeInstancesResponseHandler.java +++ b/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeInstancesResponseHandler.java @@ -28,7 +28,7 @@ import java.util.SortedSet; import javax.inject.Inject; import org.jclouds.aws.ec2.domain.Reservation; -import org.jclouds.util.DateService; +import org.jclouds.date.DateService; import com.google.common.collect.Sets; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/RunInstancesResponseHandler.java b/aws/core/src/main/java/org/jclouds/aws/ec2/xml/RunInstancesResponseHandler.java index 78e0b51028..37ff11a9ab 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/RunInstancesResponseHandler.java +++ b/aws/core/src/main/java/org/jclouds/aws/ec2/xml/RunInstancesResponseHandler.java @@ -26,7 +26,7 @@ package org.jclouds.aws.ec2.xml; import javax.inject.Inject; import org.jclouds.aws.ec2.domain.Reservation; -import org.jclouds.util.DateService; +import org.jclouds.date.DateService; /** * Parses the following XML document: diff --git a/aws/core/src/main/java/org/jclouds/aws/s3/config/S3RestClientModule.java b/aws/core/src/main/java/org/jclouds/aws/s3/config/S3RestClientModule.java index 14c980ff10..6e4c2fcae5 100755 --- a/aws/core/src/main/java/org/jclouds/aws/s3/config/S3RestClientModule.java +++ b/aws/core/src/main/java/org/jclouds/aws/s3/config/S3RestClientModule.java @@ -40,6 +40,8 @@ import org.jclouds.aws.s3.reference.S3Constants; import org.jclouds.aws.util.RequestSigner; import org.jclouds.concurrent.ExpirableSupplier; import org.jclouds.concurrent.internal.SyncProxy; +import org.jclouds.date.DateService; +import org.jclouds.date.TimeStamp; import org.jclouds.http.HttpErrorHandler; import org.jclouds.http.HttpRetryHandler; import org.jclouds.http.RequiresHttp; @@ -48,8 +50,6 @@ import org.jclouds.http.annotation.Redirection; import org.jclouds.http.annotation.ServerError; import org.jclouds.rest.ConfiguresRestClient; import org.jclouds.rest.RestClientFactory; -import org.jclouds.util.DateService; -import org.jclouds.util.TimeStamp; import com.google.common.base.Supplier; import com.google.inject.AbstractModule; diff --git a/aws/core/src/main/java/org/jclouds/aws/s3/filters/RequestAuthorizeSignature.java b/aws/core/src/main/java/org/jclouds/aws/s3/filters/RequestAuthorizeSignature.java index a719077497..61d3d0068b 100755 --- a/aws/core/src/main/java/org/jclouds/aws/s3/filters/RequestAuthorizeSignature.java +++ b/aws/core/src/main/java/org/jclouds/aws/s3/filters/RequestAuthorizeSignature.java @@ -40,6 +40,8 @@ import javax.ws.rs.core.HttpHeaders; import org.apache.commons.io.IOUtils; import org.jclouds.aws.s3.reference.S3Constants; import org.jclouds.aws.util.RequestSigner; +import org.jclouds.date.TimeStamp; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.HttpConstants; import org.jclouds.http.HttpException; import org.jclouds.http.HttpRequest; @@ -47,8 +49,6 @@ import org.jclouds.http.HttpRequestFilter; import org.jclouds.http.HttpUtils; import org.jclouds.http.internal.SignatureWire; import org.jclouds.logging.Logger; -import org.jclouds.util.EncryptionService; -import org.jclouds.util.TimeStamp; import com.google.common.annotations.VisibleForTesting; diff --git a/aws/core/src/main/java/org/jclouds/aws/s3/functions/ParseObjectMetadataFromHeaders.java b/aws/core/src/main/java/org/jclouds/aws/s3/functions/ParseObjectMetadataFromHeaders.java index 5d1de2bbd8..1b51dcbdf5 100644 --- a/aws/core/src/main/java/org/jclouds/aws/s3/functions/ParseObjectMetadataFromHeaders.java +++ b/aws/core/src/main/java/org/jclouds/aws/s3/functions/ParseObjectMetadataFromHeaders.java @@ -31,10 +31,10 @@ import org.jclouds.aws.s3.domain.MutableObjectMetadata; import org.jclouds.aws.s3.reference.S3Headers; import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.functions.ParseSystemAndUserMetadataFromHeaders; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.HttpResponse; import org.jclouds.rest.InvocationContext; import org.jclouds.rest.internal.GeneratedHttpRequest; -import org.jclouds.util.EncryptionService; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Function; diff --git a/aws/core/src/main/java/org/jclouds/aws/s3/options/CopyObjectOptions.java b/aws/core/src/main/java/org/jclouds/aws/s3/options/CopyObjectOptions.java index afba941b0f..54306cfabd 100755 --- a/aws/core/src/main/java/org/jclouds/aws/s3/options/CopyObjectOptions.java +++ b/aws/core/src/main/java/org/jclouds/aws/s3/options/CopyObjectOptions.java @@ -36,9 +36,9 @@ import javax.inject.Named; import org.jclouds.aws.s3.domain.CannedAccessPolicy; import org.jclouds.aws.s3.reference.S3Headers; +import org.jclouds.date.DateService; +import org.jclouds.date.internal.SimpleDateFormatDateService; import org.jclouds.http.options.BaseHttpRequestOptions; -import org.jclouds.util.DateService; -import org.jclouds.util.internal.SimpleDateFormatDateService; import com.google.common.base.Preconditions; import com.google.common.collect.LinkedHashMultimap; diff --git a/aws/core/src/main/java/org/jclouds/aws/s3/xml/CopyObjectHandler.java b/aws/core/src/main/java/org/jclouds/aws/s3/xml/CopyObjectHandler.java index caf859daeb..8a15142f9d 100755 --- a/aws/core/src/main/java/org/jclouds/aws/s3/xml/CopyObjectHandler.java +++ b/aws/core/src/main/java/org/jclouds/aws/s3/xml/CopyObjectHandler.java @@ -29,8 +29,8 @@ import javax.inject.Inject; import org.jclouds.aws.s3.domain.ObjectMetadata; import org.jclouds.aws.s3.domain.internal.CopyObjectResult; +import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; -import org.jclouds.util.DateService; /** * Parses the response from Amazon S3 COPY Object command. diff --git a/aws/core/src/main/java/org/jclouds/aws/s3/xml/ListAllMyBucketsHandler.java b/aws/core/src/main/java/org/jclouds/aws/s3/xml/ListAllMyBucketsHandler.java index 511cf79a8b..014a45e769 100644 --- a/aws/core/src/main/java/org/jclouds/aws/s3/xml/ListAllMyBucketsHandler.java +++ b/aws/core/src/main/java/org/jclouds/aws/s3/xml/ListAllMyBucketsHandler.java @@ -30,8 +30,8 @@ import javax.inject.Inject; import org.jclouds.aws.s3.domain.BucketMetadata; import org.jclouds.aws.s3.domain.CanonicalUser; +import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; -import org.jclouds.util.DateService; import com.google.common.collect.Sets; diff --git a/aws/core/src/main/java/org/jclouds/aws/s3/xml/ListBucketHandler.java b/aws/core/src/main/java/org/jclouds/aws/s3/xml/ListBucketHandler.java index 2ba8805d46..f2af35562e 100755 --- a/aws/core/src/main/java/org/jclouds/aws/s3/xml/ListBucketHandler.java +++ b/aws/core/src/main/java/org/jclouds/aws/s3/xml/ListBucketHandler.java @@ -34,9 +34,9 @@ import org.jclouds.aws.s3.domain.ObjectMetadata; import org.jclouds.aws.s3.domain.ObjectMetadata.StorageClass; import org.jclouds.aws.s3.domain.internal.BucketListObjectMetadata; import org.jclouds.aws.s3.domain.internal.TreeSetListBucketResponse; +import org.jclouds.date.DateService; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.functions.ParseSax; -import org.jclouds.util.DateService; -import org.jclouds.util.EncryptionService; import org.xml.sax.Attributes; import com.google.common.collect.Sets; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/EC2ClientTest.java b/aws/core/src/test/java/org/jclouds/aws/ec2/EC2ClientTest.java index 2b0df65611..e2128c10b1 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/EC2ClientTest.java +++ b/aws/core/src/test/java/org/jclouds/aws/ec2/EC2ClientTest.java @@ -49,6 +49,7 @@ import org.jclouds.aws.ec2.xml.KeyPairResponseHandler; import org.jclouds.aws.ec2.xml.RunInstancesResponseHandler; import org.jclouds.aws.ec2.xml.TerminateInstancesResponseHandler; import org.jclouds.aws.reference.AWSConstants; +import org.jclouds.date.TimeStamp; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ReturnStringIf200; import org.jclouds.http.functions.ReturnVoidIf2xx; @@ -58,7 +59,6 @@ import org.jclouds.rest.RestClientTest; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.jclouds.rest.internal.RestAnnotationProcessor; import org.jclouds.util.Jsr330; -import org.jclouds.util.TimeStamp; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeInstancesResponseHandlerTest.java b/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeInstancesResponseHandlerTest.java index 528a75bbff..aaa21fec5d 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeInstancesResponseHandlerTest.java +++ b/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeInstancesResponseHandlerTest.java @@ -34,8 +34,8 @@ import org.jclouds.aws.ec2.domain.InstanceState; import org.jclouds.aws.ec2.domain.InstanceType; import org.jclouds.aws.ec2.domain.Reservation; import org.jclouds.aws.ec2.domain.RunningInstance; +import org.jclouds.date.DateService; import org.jclouds.http.functions.BaseHandlerTest; -import org.jclouds.util.DateService; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/RunInstancesResponseHandlerTest.java b/aws/core/src/test/java/org/jclouds/aws/ec2/xml/RunInstancesResponseHandlerTest.java index f5940d4e66..d19dde9168 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/RunInstancesResponseHandlerTest.java +++ b/aws/core/src/test/java/org/jclouds/aws/ec2/xml/RunInstancesResponseHandlerTest.java @@ -32,8 +32,8 @@ import org.jclouds.aws.ec2.domain.InstanceState; import org.jclouds.aws.ec2.domain.InstanceType; import org.jclouds.aws.ec2.domain.Reservation; import org.jclouds.aws.ec2.domain.RunningInstance; +import org.jclouds.date.DateService; import org.jclouds.http.functions.BaseHandlerTest; -import org.jclouds.util.DateService; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/TerminateInstancesResponseHandlerTest.java b/aws/core/src/test/java/org/jclouds/aws/ec2/xml/TerminateInstancesResponseHandlerTest.java index ed27716333..ab1b1d78ee 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/TerminateInstancesResponseHandlerTest.java +++ b/aws/core/src/test/java/org/jclouds/aws/ec2/xml/TerminateInstancesResponseHandlerTest.java @@ -30,8 +30,8 @@ import java.util.SortedSet; import org.jclouds.aws.ec2.domain.InstanceState; import org.jclouds.aws.ec2.domain.TerminatedInstance; +import org.jclouds.date.DateService; import org.jclouds.http.functions.BaseHandlerTest; -import org.jclouds.util.DateService; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/aws/core/src/test/java/org/jclouds/aws/s3/S3ClientTest.java b/aws/core/src/test/java/org/jclouds/aws/s3/S3ClientTest.java index e0fe46e9e7..2faa9e0b37 100644 --- a/aws/core/src/test/java/org/jclouds/aws/s3/S3ClientTest.java +++ b/aws/core/src/test/java/org/jclouds/aws/s3/S3ClientTest.java @@ -55,6 +55,7 @@ import org.jclouds.blobstore.functions.ReturnVoidOnNotFoundOr404; import org.jclouds.blobstore.functions.ThrowContainerNotFoundOn404; import org.jclouds.blobstore.functions.ThrowKeyNotFoundOn404; import org.jclouds.blobstore.reference.BlobStoreConstants; +import org.jclouds.date.TimeStamp; import org.jclouds.http.functions.ParseETagHeader; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ReturnFalseOn404; @@ -67,7 +68,6 @@ import org.jclouds.rest.RestClientTest; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.jclouds.rest.internal.RestAnnotationProcessor; import org.jclouds.util.Jsr330; -import org.jclouds.util.TimeStamp; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/aws/core/src/test/java/org/jclouds/aws/s3/config/S3RestClientModuleTest.java b/aws/core/src/test/java/org/jclouds/aws/s3/config/S3RestClientModuleTest.java index 5516a01dfd..db8d7bac65 100644 --- a/aws/core/src/test/java/org/jclouds/aws/s3/config/S3RestClientModuleTest.java +++ b/aws/core/src/test/java/org/jclouds/aws/s3/config/S3RestClientModuleTest.java @@ -32,11 +32,11 @@ import org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent; import org.jclouds.aws.s3.reference.S3Constants; import org.jclouds.concurrent.WithinThreadExecutorService; import org.jclouds.concurrent.config.ExecutorServiceModule; +import org.jclouds.date.internal.SimpleDateFormatDateService; import org.jclouds.http.functions.config.ParserModule; import org.jclouds.http.handlers.DelegatingErrorHandler; import org.jclouds.http.handlers.DelegatingRetryHandler; import org.jclouds.util.Jsr330; -import org.jclouds.util.internal.SimpleDateFormatDateService; import org.testng.annotations.Test; import com.google.common.base.Supplier; diff --git a/aws/core/src/test/java/org/jclouds/aws/s3/functions/ParseObjectMetadataFromHeadersTest.java b/aws/core/src/test/java/org/jclouds/aws/s3/functions/ParseObjectMetadataFromHeadersTest.java index 5de942dae3..d9b6815d53 100644 --- a/aws/core/src/test/java/org/jclouds/aws/s3/functions/ParseObjectMetadataFromHeadersTest.java +++ b/aws/core/src/test/java/org/jclouds/aws/s3/functions/ParseObjectMetadataFromHeadersTest.java @@ -41,9 +41,9 @@ import org.jclouds.aws.s3.reference.S3Headers; import org.jclouds.blobstore.domain.MutableBlobMetadata; import org.jclouds.blobstore.domain.internal.MutableBlobMetadataImpl; import org.jclouds.blobstore.functions.ParseSystemAndUserMetadataFromHeaders; +import org.jclouds.encryption.EncryptionService; +import org.jclouds.encryption.internal.JCEEncryptionService; import org.jclouds.http.HttpResponse; -import org.jclouds.util.EncryptionService; -import org.jclouds.util.internal.JCEEncryptionService; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/aws/core/src/test/java/org/jclouds/aws/s3/internal/StubS3AsyncClient.java b/aws/core/src/test/java/org/jclouds/aws/s3/internal/StubS3AsyncClient.java index 213f98bd6d..ff5619230f 100755 --- a/aws/core/src/test/java/org/jclouds/aws/s3/internal/StubS3AsyncClient.java +++ b/aws/core/src/test/java/org/jclouds/aws/s3/internal/StubS3AsyncClient.java @@ -66,9 +66,9 @@ import org.jclouds.blobstore.integration.internal.StubAsyncBlobStore; import org.jclouds.blobstore.integration.internal.StubAsyncBlobStore.FutureBase; import org.jclouds.blobstore.options.ListContainerOptions; import org.jclouds.concurrent.FutureFunctionWrapper; +import org.jclouds.date.DateService; import org.jclouds.http.options.GetOptions; import org.jclouds.logging.Logger.LoggerFactory; -import org.jclouds.util.DateService; import com.google.common.base.Function; import com.google.common.collect.Iterables; diff --git a/aws/core/src/test/java/org/jclouds/aws/s3/options/CopyObjectOptionsTest.java b/aws/core/src/test/java/org/jclouds/aws/s3/options/CopyObjectOptionsTest.java index 242c7d1e39..897001979c 100755 --- a/aws/core/src/test/java/org/jclouds/aws/s3/options/CopyObjectOptionsTest.java +++ b/aws/core/src/test/java/org/jclouds/aws/s3/options/CopyObjectOptionsTest.java @@ -39,7 +39,7 @@ import java.util.Map; import org.jclouds.aws.s3.domain.CannedAccessPolicy; import org.jclouds.aws.s3.reference.S3Headers; -import org.jclouds.util.internal.SimpleDateFormatDateService; +import org.jclouds.date.internal.SimpleDateFormatDateService; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; diff --git a/aws/core/src/test/java/org/jclouds/aws/s3/xml/CopyObjectHandlerTest.java b/aws/core/src/test/java/org/jclouds/aws/s3/xml/CopyObjectHandlerTest.java index 4ffa7dd596..cd29ba79fa 100644 --- a/aws/core/src/test/java/org/jclouds/aws/s3/xml/CopyObjectHandlerTest.java +++ b/aws/core/src/test/java/org/jclouds/aws/s3/xml/CopyObjectHandlerTest.java @@ -29,9 +29,9 @@ import java.io.InputStream; import org.jclouds.aws.s3.domain.ObjectMetadata; import org.jclouds.aws.s3.domain.internal.CopyObjectResult; +import org.jclouds.date.DateService; +import org.jclouds.date.internal.SimpleDateFormatDateService; import org.jclouds.http.functions.BaseHandlerTest; -import org.jclouds.util.DateService; -import org.jclouds.util.internal.SimpleDateFormatDateService; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/aws/core/src/test/java/org/jclouds/aws/s3/xml/ListBucketHandlerTest.java b/aws/core/src/test/java/org/jclouds/aws/s3/xml/ListBucketHandlerTest.java index 8d32a9227d..61e9fcf1e1 100755 --- a/aws/core/src/test/java/org/jclouds/aws/s3/xml/ListBucketHandlerTest.java +++ b/aws/core/src/test/java/org/jclouds/aws/s3/xml/ListBucketHandlerTest.java @@ -35,12 +35,12 @@ import org.jclouds.aws.s3.domain.ObjectMetadata; import org.jclouds.aws.s3.domain.ObjectMetadata.StorageClass; import org.jclouds.aws.s3.domain.internal.BucketListObjectMetadata; import org.jclouds.aws.s3.domain.internal.TreeSetListBucketResponse; +import org.jclouds.date.DateService; +import org.jclouds.encryption.EncryptionService; +import org.jclouds.encryption.internal.JCEEncryptionService; import org.jclouds.http.HttpException; import org.jclouds.http.functions.BaseHandlerTest; import org.jclouds.http.functions.ParseSax; -import org.jclouds.util.DateService; -import org.jclouds.util.EncryptionService; -import org.jclouds.util.internal.JCEEncryptionService; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/aws/core/src/test/java/org/jclouds/aws/s3/xml/S3ParserTest.java b/aws/core/src/test/java/org/jclouds/aws/s3/xml/S3ParserTest.java index 333f6492cf..3bcab602f7 100755 --- a/aws/core/src/test/java/org/jclouds/aws/s3/xml/S3ParserTest.java +++ b/aws/core/src/test/java/org/jclouds/aws/s3/xml/S3ParserTest.java @@ -41,10 +41,10 @@ import org.jclouds.aws.s3.domain.CanonicalUser; import org.jclouds.aws.s3.domain.ListBucketResponse; import org.jclouds.aws.s3.domain.ObjectMetadata; import org.jclouds.aws.s3.domain.ObjectMetadata.StorageClass; +import org.jclouds.date.internal.SimpleDateFormatDateService; import org.jclouds.http.HttpException; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.config.ParserModule; -import org.jclouds.util.internal.SimpleDateFormatDateService; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/aws/extensions/jets3t/src/main/java/org/jclouds/aws/s3/jets3t/Util.java b/aws/extensions/jets3t/src/main/java/org/jclouds/aws/s3/jets3t/Util.java index a74af90649..11eec664ff 100755 --- a/aws/extensions/jets3t/src/main/java/org/jclouds/aws/s3/jets3t/Util.java +++ b/aws/extensions/jets3t/src/main/java/org/jclouds/aws/s3/jets3t/Util.java @@ -44,9 +44,9 @@ import org.jclouds.aws.s3.domain.ObjectMetadata.StorageClass; import org.jclouds.aws.s3.options.CopyObjectOptions; import org.jclouds.aws.s3.options.ListBucketOptions; import org.jclouds.aws.s3.options.PutObjectOptions; +import org.jclouds.date.DateService; +import org.jclouds.date.internal.SimpleDateFormatDateService; import org.jclouds.http.options.GetOptions; -import org.jclouds.util.DateService; -import org.jclouds.util.internal.SimpleDateFormatDateService; import org.jets3t.service.S3ServiceException; import org.jets3t.service.acl.AccessControlList; import org.jets3t.service.acl.CanonicalGrantee; diff --git a/aws/perftest/src/test/java/com/amazon/s3/DateServiceTest.java b/aws/perftest/src/test/java/com/amazon/s3/DateServiceTest.java index f6d7aa8475..d7aabe8a4e 100755 --- a/aws/perftest/src/test/java/com/amazon/s3/DateServiceTest.java +++ b/aws/perftest/src/test/java/com/amazon/s3/DateServiceTest.java @@ -35,7 +35,7 @@ import org.testng.annotations.Test; * @author James Murty */ @Test(sequential = true, timeOut = 2 * 60 * 1000, testName = "s3.DateTest") -public class DateServiceTest extends org.jclouds.util.DateServiceTest { +public class DateServiceTest extends org.jclouds.date.DateServiceTest { @Test void testAmazonParseDateSerialResponseTime() { diff --git a/aws/perftest/src/test/java/com/amazon/s3/S3ParserTest.java b/aws/perftest/src/test/java/com/amazon/s3/S3ParserTest.java index 2225b5b9e6..2a8ffa93b3 100755 --- a/aws/perftest/src/test/java/com/amazon/s3/S3ParserTest.java +++ b/aws/perftest/src/test/java/com/amazon/s3/S3ParserTest.java @@ -34,7 +34,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorCompletionService; import org.apache.commons.io.IOUtils; -import org.jclouds.util.internal.SimpleDateFormatDateService; +import org.jclouds.date.internal.SimpleDateFormatDateService; import org.testng.annotations.Test; /** diff --git a/azure/src/main/java/org/jclouds/azure/storage/blob/binders/BindAzureBlobToEntity.java b/azure/src/main/java/org/jclouds/azure/storage/blob/binders/BindAzureBlobToEntity.java index 2bdf373263..9918ee44ad 100644 --- a/azure/src/main/java/org/jclouds/azure/storage/blob/binders/BindAzureBlobToEntity.java +++ b/azure/src/main/java/org/jclouds/azure/storage/blob/binders/BindAzureBlobToEntity.java @@ -34,8 +34,8 @@ import org.jclouds.azure.storage.blob.blobstore.functions.AzureBlobToBlob; import org.jclouds.azure.storage.blob.domain.AzureBlob; import org.jclouds.azure.storage.blob.reference.AzureBlobConstants; import org.jclouds.blobstore.binders.BindBlobToEntityAndUserMetadataToHeadersWithPrefix; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.HttpRequest; -import org.jclouds.util.EncryptionService; public class BindAzureBlobToEntity extends BindBlobToEntityAndUserMetadataToHeadersWithPrefix { diff --git a/azure/src/main/java/org/jclouds/azure/storage/blob/functions/ParseContainerPropertiesFromHeaders.java b/azure/src/main/java/org/jclouds/azure/storage/blob/functions/ParseContainerPropertiesFromHeaders.java index e65c3d8c94..b2d63de420 100644 --- a/azure/src/main/java/org/jclouds/azure/storage/blob/functions/ParseContainerPropertiesFromHeaders.java +++ b/azure/src/main/java/org/jclouds/azure/storage/blob/functions/ParseContainerPropertiesFromHeaders.java @@ -33,11 +33,11 @@ import org.jclouds.azure.storage.blob.domain.ContainerProperties; import org.jclouds.azure.storage.blob.domain.MutableContainerPropertiesWithMetadata; import org.jclouds.azure.storage.blob.domain.internal.MutableContainerPropertiesWithMetadataImpl; import org.jclouds.azure.storage.blob.reference.AzureBlobConstants; +import org.jclouds.date.DateService; import org.jclouds.http.HttpException; import org.jclouds.http.HttpResponse; import org.jclouds.rest.InvocationContext; import org.jclouds.rest.internal.GeneratedHttpRequest; -import org.jclouds.util.DateService; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Function; diff --git a/azure/src/main/java/org/jclouds/azure/storage/blob/xml/AccountNameEnumerationResultsHandler.java b/azure/src/main/java/org/jclouds/azure/storage/blob/xml/AccountNameEnumerationResultsHandler.java index 390aeb6656..dbd0bc4991 100755 --- a/azure/src/main/java/org/jclouds/azure/storage/blob/xml/AccountNameEnumerationResultsHandler.java +++ b/azure/src/main/java/org/jclouds/azure/storage/blob/xml/AccountNameEnumerationResultsHandler.java @@ -33,8 +33,8 @@ import org.jclouds.azure.storage.blob.domain.ListableContainerProperties; import org.jclouds.azure.storage.blob.domain.internal.ListableContainerPropertiesImpl; import org.jclouds.azure.storage.domain.BoundedSortedSet; import org.jclouds.azure.storage.domain.internal.BoundedTreeSet; +import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; -import org.jclouds.util.DateService; import com.google.common.collect.Sets; diff --git a/azure/src/main/java/org/jclouds/azure/storage/blob/xml/ContainerNameEnumerationResultsHandler.java b/azure/src/main/java/org/jclouds/azure/storage/blob/xml/ContainerNameEnumerationResultsHandler.java index 044531c7d5..3701030dd8 100644 --- a/azure/src/main/java/org/jclouds/azure/storage/blob/xml/ContainerNameEnumerationResultsHandler.java +++ b/azure/src/main/java/org/jclouds/azure/storage/blob/xml/ContainerNameEnumerationResultsHandler.java @@ -33,9 +33,9 @@ import org.jclouds.azure.storage.blob.domain.ListBlobsResponse; import org.jclouds.azure.storage.blob.domain.ListableBlobProperties; import org.jclouds.azure.storage.blob.domain.internal.ListableBlobPropertiesImpl; import org.jclouds.azure.storage.blob.domain.internal.TreeSetListBlobsResponse; +import org.jclouds.date.DateService; import org.jclouds.http.HttpUtils; import org.jclouds.http.functions.ParseSax; -import org.jclouds.util.DateService; import org.xml.sax.Attributes; import org.xml.sax.SAXException; diff --git a/azure/src/main/java/org/jclouds/azure/storage/config/AzureStorageRestClientModule.java b/azure/src/main/java/org/jclouds/azure/storage/config/AzureStorageRestClientModule.java index 8a1bcfc8f7..e5a2cd1ffc 100644 --- a/azure/src/main/java/org/jclouds/azure/storage/config/AzureStorageRestClientModule.java +++ b/azure/src/main/java/org/jclouds/azure/storage/config/AzureStorageRestClientModule.java @@ -31,14 +31,14 @@ import javax.inject.Named; import org.jclouds.azure.storage.handlers.ParseAzureStorageErrorFromXmlContent; import org.jclouds.concurrent.ExpirableSupplier; +import org.jclouds.date.DateService; +import org.jclouds.date.TimeStamp; import org.jclouds.http.HttpErrorHandler; import org.jclouds.http.RequiresHttp; import org.jclouds.http.annotation.ClientError; import org.jclouds.http.annotation.Redirection; import org.jclouds.http.annotation.ServerError; import org.jclouds.rest.ConfiguresRestClient; -import org.jclouds.util.DateService; -import org.jclouds.util.TimeStamp; import com.google.common.base.Supplier; import com.google.inject.AbstractModule; diff --git a/azure/src/main/java/org/jclouds/azure/storage/filters/SharedKeyAuthentication.java b/azure/src/main/java/org/jclouds/azure/storage/filters/SharedKeyAuthentication.java index 1079869f5e..6bc363a1ea 100644 --- a/azure/src/main/java/org/jclouds/azure/storage/filters/SharedKeyAuthentication.java +++ b/azure/src/main/java/org/jclouds/azure/storage/filters/SharedKeyAuthentication.java @@ -37,6 +37,8 @@ import javax.ws.rs.core.HttpHeaders; import org.apache.commons.io.IOUtils; import org.jclouds.azure.storage.reference.AzureStorageConstants; +import org.jclouds.date.TimeStamp; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.HttpConstants; import org.jclouds.http.HttpException; import org.jclouds.http.HttpRequest; @@ -44,8 +46,6 @@ import org.jclouds.http.HttpRequestFilter; import org.jclouds.http.HttpUtils; import org.jclouds.http.internal.SignatureWire; import org.jclouds.logging.Logger; -import org.jclouds.util.EncryptionService; -import org.jclouds.util.TimeStamp; import com.google.common.annotations.VisibleForTesting; diff --git a/azure/src/test/java/org/jclouds/azure/storage/blob/AzureBlobClientLiveTest.java b/azure/src/test/java/org/jclouds/azure/storage/blob/AzureBlobClientLiveTest.java index 537df9e9ea..3a80b213f7 100644 --- a/azure/src/test/java/org/jclouds/azure/storage/blob/AzureBlobClientLiveTest.java +++ b/azure/src/test/java/org/jclouds/azure/storage/blob/AzureBlobClientLiveTest.java @@ -43,12 +43,12 @@ import org.jclouds.azure.storage.blob.domain.ListableContainerProperties; import org.jclouds.azure.storage.blob.options.CreateContainerOptions; import org.jclouds.azure.storage.domain.BoundedSortedSet; import org.jclouds.azure.storage.options.ListOptions; +import org.jclouds.encryption.EncryptionService; +import org.jclouds.encryption.internal.JCEEncryptionService; import org.jclouds.http.HttpResponseException; import org.jclouds.http.options.GetOptions; import org.jclouds.logging.log4j.config.Log4JLoggingModule; -import org.jclouds.util.EncryptionService; import org.jclouds.util.Utils; -import org.jclouds.util.internal.JCEEncryptionService; import org.testng.annotations.BeforeGroups; import org.testng.annotations.Test; diff --git a/azure/src/test/java/org/jclouds/azure/storage/blob/AzureBlobClientTest.java b/azure/src/test/java/org/jclouds/azure/storage/blob/AzureBlobClientTest.java index 166789982d..08ff6c6c91 100644 --- a/azure/src/test/java/org/jclouds/azure/storage/blob/AzureBlobClientTest.java +++ b/azure/src/test/java/org/jclouds/azure/storage/blob/AzureBlobClientTest.java @@ -49,6 +49,7 @@ import org.jclouds.blobstore.functions.ReturnVoidOnNotFoundOr404; import org.jclouds.blobstore.reference.BlobStoreConstants; import org.jclouds.concurrent.WithinThreadExecutorService; import org.jclouds.concurrent.config.ExecutorServiceModule; +import org.jclouds.encryption.internal.Base64; import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ReturnTrueIf2xx; @@ -60,7 +61,6 @@ import org.jclouds.rest.config.RestModule; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.jclouds.rest.internal.RestAnnotationProcessor; import org.jclouds.util.Jsr330; -import org.jclouds.util.internal.Base64; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/azure/src/test/java/org/jclouds/azure/storage/blob/config/RestAzureBlobClientModuleTest.java b/azure/src/test/java/org/jclouds/azure/storage/blob/config/RestAzureBlobClientModuleTest.java index 76c1406619..05a8491f1f 100644 --- a/azure/src/test/java/org/jclouds/azure/storage/blob/config/RestAzureBlobClientModuleTest.java +++ b/azure/src/test/java/org/jclouds/azure/storage/blob/config/RestAzureBlobClientModuleTest.java @@ -31,12 +31,12 @@ import org.jclouds.azure.storage.handlers.ParseAzureStorageErrorFromXmlContent; import org.jclouds.azure.storage.reference.AzureStorageConstants; import org.jclouds.concurrent.WithinThreadExecutorService; import org.jclouds.concurrent.config.ExecutorServiceModule; +import org.jclouds.encryption.internal.Base64; import org.jclouds.http.functions.config.ParserModule; import org.jclouds.http.handlers.DelegatingErrorHandler; import org.jclouds.http.handlers.DelegatingRetryHandler; import org.jclouds.http.handlers.RedirectionRetryHandler; import org.jclouds.util.Jsr330; -import org.jclouds.util.internal.Base64; import org.testng.annotations.Test; import com.google.inject.AbstractModule; diff --git a/azure/src/test/java/org/jclouds/azure/storage/blob/xml/AccountNameEnumerationResultsHandlerTest.java b/azure/src/test/java/org/jclouds/azure/storage/blob/xml/AccountNameEnumerationResultsHandlerTest.java index f4f98c358a..946fb5404e 100644 --- a/azure/src/test/java/org/jclouds/azure/storage/blob/xml/AccountNameEnumerationResultsHandlerTest.java +++ b/azure/src/test/java/org/jclouds/azure/storage/blob/xml/AccountNameEnumerationResultsHandlerTest.java @@ -33,8 +33,8 @@ import org.jclouds.azure.storage.blob.domain.ListableContainerProperties; import org.jclouds.azure.storage.blob.domain.internal.ListableContainerPropertiesImpl; import org.jclouds.azure.storage.domain.BoundedSortedSet; import org.jclouds.azure.storage.domain.internal.BoundedTreeSet; +import org.jclouds.date.DateService; import org.jclouds.http.functions.BaseHandlerTest; -import org.jclouds.util.DateService; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/azure/src/test/java/org/jclouds/azure/storage/blob/xml/ContainerNameEnumerationResultsHandlerTest.java b/azure/src/test/java/org/jclouds/azure/storage/blob/xml/ContainerNameEnumerationResultsHandlerTest.java index ff4136d248..fbe907a7cb 100644 --- a/azure/src/test/java/org/jclouds/azure/storage/blob/xml/ContainerNameEnumerationResultsHandlerTest.java +++ b/azure/src/test/java/org/jclouds/azure/storage/blob/xml/ContainerNameEnumerationResultsHandlerTest.java @@ -33,8 +33,8 @@ import org.jclouds.azure.storage.blob.domain.ListBlobsResponse; import org.jclouds.azure.storage.blob.domain.ListableBlobProperties; import org.jclouds.azure.storage.blob.domain.internal.ListableBlobPropertiesImpl; import org.jclouds.azure.storage.blob.domain.internal.TreeSetListBlobsResponse; +import org.jclouds.date.DateService; import org.jclouds.http.functions.BaseHandlerTest; -import org.jclouds.util.DateService; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/azure/src/test/java/org/jclouds/azure/storage/config/AzureStorageRestClientModuleTest.java b/azure/src/test/java/org/jclouds/azure/storage/config/AzureStorageRestClientModuleTest.java index 6ae46e3aa4..788875ecfe 100644 --- a/azure/src/test/java/org/jclouds/azure/storage/config/AzureStorageRestClientModuleTest.java +++ b/azure/src/test/java/org/jclouds/azure/storage/config/AzureStorageRestClientModuleTest.java @@ -32,13 +32,13 @@ import static org.testng.Assert.assertFalse; import org.jclouds.azure.storage.handlers.ParseAzureStorageErrorFromXmlContent; import org.jclouds.concurrent.WithinThreadExecutorService; import org.jclouds.concurrent.config.ExecutorServiceModule; +import org.jclouds.date.internal.SimpleDateFormatDateService; import org.jclouds.http.HttpRetryHandler; import org.jclouds.http.functions.config.ParserModule; import org.jclouds.http.handlers.DelegatingErrorHandler; import org.jclouds.http.handlers.DelegatingRetryHandler; import org.jclouds.http.handlers.RedirectionRetryHandler; import org.jclouds.util.Jsr330; -import org.jclouds.util.internal.SimpleDateFormatDateService; import org.testng.annotations.Test; import com.google.common.base.Supplier; diff --git a/azure/src/test/java/org/jclouds/azure/storage/filters/SharedKeyAuthenticationTest.java b/azure/src/test/java/org/jclouds/azure/storage/filters/SharedKeyAuthenticationTest.java index 7ccb55fa06..df764a63be 100755 --- a/azure/src/test/java/org/jclouds/azure/storage/filters/SharedKeyAuthenticationTest.java +++ b/azure/src/test/java/org/jclouds/azure/storage/filters/SharedKeyAuthenticationTest.java @@ -35,10 +35,10 @@ import org.jclouds.azure.storage.config.AzureStorageRestClientModule; import org.jclouds.azure.storage.reference.AzureStorageConstants; import org.jclouds.concurrent.WithinThreadExecutorService; import org.jclouds.concurrent.config.ExecutorServiceModule; +import org.jclouds.encryption.internal.Base64; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.config.ParserModule; import org.jclouds.util.Jsr330; -import org.jclouds.util.internal.Base64; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; diff --git a/azure/src/test/java/org/jclouds/azure/storage/queue/AzureQueueClientTest.java b/azure/src/test/java/org/jclouds/azure/storage/queue/AzureQueueClientTest.java index 55fb20dd38..f9ead3f444 100644 --- a/azure/src/test/java/org/jclouds/azure/storage/queue/AzureQueueClientTest.java +++ b/azure/src/test/java/org/jclouds/azure/storage/queue/AzureQueueClientTest.java @@ -40,6 +40,7 @@ import org.jclouds.azure.storage.options.ListOptions; import org.jclouds.azure.storage.reference.AzureStorageConstants; import org.jclouds.concurrent.WithinThreadExecutorService; import org.jclouds.concurrent.config.ExecutorServiceModule; +import org.jclouds.encryption.internal.Base64; import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ReturnTrueIf2xx; @@ -49,7 +50,6 @@ import org.jclouds.rest.config.RestModule; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.jclouds.rest.internal.RestAnnotationProcessor; import org.jclouds.util.Jsr330; -import org.jclouds.util.internal.Base64; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/blobstore/src/main/java/org/jclouds/blobstore/binders/BindBlobToEntity.java b/blobstore/src/main/java/org/jclouds/blobstore/binders/BindBlobToEntity.java index efd97a7397..a543e7bdd2 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/binders/BindBlobToEntity.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/binders/BindBlobToEntity.java @@ -29,9 +29,9 @@ import javax.inject.Inject; import javax.ws.rs.core.HttpHeaders; import org.jclouds.blobstore.domain.Blob; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.HttpRequest; import org.jclouds.rest.Binder; -import org.jclouds.util.EncryptionService; /** * diff --git a/blobstore/src/main/java/org/jclouds/blobstore/binders/BindBlobToEntityAndUserMetadataToHeadersWithPrefix.java b/blobstore/src/main/java/org/jclouds/blobstore/binders/BindBlobToEntityAndUserMetadataToHeadersWithPrefix.java index d514c52dd1..07529212c6 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/binders/BindBlobToEntityAndUserMetadataToHeadersWithPrefix.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/binders/BindBlobToEntityAndUserMetadataToHeadersWithPrefix.java @@ -29,8 +29,8 @@ import javax.inject.Inject; import javax.inject.Named; import org.jclouds.blobstore.domain.Blob; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.HttpRequest; -import org.jclouds.util.EncryptionService; /** * diff --git a/blobstore/src/main/java/org/jclouds/blobstore/functions/HttpGetOptionsListToGetOptions.java b/blobstore/src/main/java/org/jclouds/blobstore/functions/HttpGetOptionsListToGetOptions.java index bfb4ed65ac..b4d6896807 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/functions/HttpGetOptionsListToGetOptions.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/functions/HttpGetOptionsListToGetOptions.java @@ -28,7 +28,7 @@ import java.util.Date; import javax.inject.Inject; import org.jclouds.blobstore.options.GetOptions; -import org.jclouds.util.DateService; +import org.jclouds.date.DateService; import com.google.common.base.Function; diff --git a/blobstore/src/main/java/org/jclouds/blobstore/functions/ParseSystemAndUserMetadataFromHeaders.java b/blobstore/src/main/java/org/jclouds/blobstore/functions/ParseSystemAndUserMetadataFromHeaders.java index 9b51a5bb60..d80667bbc3 100755 --- a/blobstore/src/main/java/org/jclouds/blobstore/functions/ParseSystemAndUserMetadataFromHeaders.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/functions/ParseSystemAndUserMetadataFromHeaders.java @@ -33,12 +33,12 @@ import javax.inject.Provider; import javax.ws.rs.core.HttpHeaders; import org.jclouds.blobstore.domain.MutableBlobMetadata; +import org.jclouds.date.DateService; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.HttpException; import org.jclouds.http.HttpResponse; import org.jclouds.rest.InvocationContext; import org.jclouds.rest.internal.GeneratedHttpRequest; -import org.jclouds.util.DateService; -import org.jclouds.util.EncryptionService; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Function; diff --git a/blobstore/src/main/java/org/jclouds/blobstore/functions/impl/JCEGenerateMD5.java b/blobstore/src/main/java/org/jclouds/blobstore/functions/impl/JCEGenerateMD5.java index 91bbcd808f..1f47a2680b 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/functions/impl/JCEGenerateMD5.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/functions/impl/JCEGenerateMD5.java @@ -26,8 +26,8 @@ package org.jclouds.blobstore.functions.impl; import javax.inject.Singleton; import org.jclouds.blobstore.functions.GenerateMD5; -import org.jclouds.util.EncryptionService; -import org.jclouds.util.internal.JCEEncryptionService; +import org.jclouds.encryption.EncryptionService; +import org.jclouds.encryption.internal.JCEEncryptionService; /** * diff --git a/blobstore/src/main/java/org/jclouds/blobstore/functions/impl/JCEGenerateMD5Result.java b/blobstore/src/main/java/org/jclouds/blobstore/functions/impl/JCEGenerateMD5Result.java index 30f0d18f86..763b3b6449 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/functions/impl/JCEGenerateMD5Result.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/functions/impl/JCEGenerateMD5Result.java @@ -29,8 +29,8 @@ import javax.inject.Singleton; import org.jclouds.blobstore.domain.MD5InputStreamResult; import org.jclouds.blobstore.functions.GenerateMD5Result; -import org.jclouds.util.EncryptionService; -import org.jclouds.util.internal.JCEEncryptionService; +import org.jclouds.encryption.EncryptionService; +import org.jclouds.encryption.internal.JCEEncryptionService; /** * @@ -41,7 +41,7 @@ public class JCEGenerateMD5Result implements GenerateMD5Result { private static final EncryptionService encryptionService = new JCEEncryptionService(); public MD5InputStreamResult apply(InputStream toEncode) { - org.jclouds.util.EncryptionService.MD5InputStreamResult result = encryptionService + org.jclouds.encryption.EncryptionService.MD5InputStreamResult result = encryptionService .generateMD5Result(toEncode); return new MD5InputStreamResult(result.data, result.md5, result.length); } diff --git a/blobstore/src/test/java/org/jclouds/blobstore/functions/ParseBlobMetadataFromHeadersTest.java b/blobstore/src/test/java/org/jclouds/blobstore/functions/ParseBlobMetadataFromHeadersTest.java index f1ad4149b7..b475f2d74d 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/functions/ParseBlobMetadataFromHeadersTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/functions/ParseBlobMetadataFromHeadersTest.java @@ -37,11 +37,11 @@ import javax.ws.rs.core.MediaType; import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.MutableBlobMetadata; import org.jclouds.blobstore.domain.internal.MutableBlobMetadataImpl; +import org.jclouds.date.internal.SimpleDateFormatDateService; +import org.jclouds.encryption.internal.JCEEncryptionService; import org.jclouds.http.HttpException; import org.jclouds.http.HttpResponse; import org.jclouds.rest.internal.GeneratedHttpRequest; -import org.jclouds.util.internal.JCEEncryptionService; -import org.jclouds.util.internal.SimpleDateFormatDateService; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java index 64f4b5e76f..6050c6e78a 100755 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java @@ -45,8 +45,8 @@ import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.ResourceMetadata; import org.jclouds.blobstore.util.BlobStoreUtils; +import org.jclouds.encryption.internal.JCEEncryptionService; import org.jclouds.http.HttpResponseException; -import org.jclouds.util.internal.JCEEncryptionService; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobLiveTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobLiveTest.java index d61f70a189..e6e8d325f7 100755 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobLiveTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobLiveTest.java @@ -31,7 +31,7 @@ import java.net.URL; import java.net.URLConnection; import org.jclouds.blobstore.domain.Blob; -import org.jclouds.util.internal.JCEEncryptionService; +import org.jclouds.encryption.internal.JCEEncryptionService; import org.testng.annotations.Optional; import org.testng.annotations.Parameters; import org.testng.annotations.Test; diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/StubAsyncBlobStore.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/StubAsyncBlobStore.java index 931aeb2aa8..ac736a2013 100755 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/StubAsyncBlobStore.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/StubAsyncBlobStore.java @@ -78,13 +78,13 @@ import org.jclouds.blobstore.options.ListContainerOptions; import org.jclouds.blobstore.strategy.GetDirectoryStrategy; import org.jclouds.blobstore.strategy.IsDirectoryStrategy; import org.jclouds.blobstore.strategy.MkdirStrategy; +import org.jclouds.date.DateService; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.HttpCommand; import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponseException; import org.jclouds.http.options.HttpRequestOptions; -import org.jclouds.util.DateService; -import org.jclouds.util.EncryptionService; import org.jclouds.util.Utils; import com.google.common.base.Function; diff --git a/core/src/main/java/org/jclouds/util/DateService.java b/core/src/main/java/org/jclouds/date/DateService.java old mode 100644 new mode 100755 similarity index 95% rename from core/src/main/java/org/jclouds/util/DateService.java rename to core/src/main/java/org/jclouds/date/DateService.java index fa1003d39b..29a40afea0 --- a/core/src/main/java/org/jclouds/util/DateService.java +++ b/core/src/main/java/org/jclouds/date/DateService.java @@ -21,11 +21,11 @@ * under the License. * ==================================================================== */ -package org.jclouds.util; +package org.jclouds.date; import java.util.Date; -import org.jclouds.util.internal.SimpleDateFormatDateService; +import org.jclouds.date.internal.SimpleDateFormatDateService; import com.google.inject.ImplementedBy; diff --git a/core/src/main/java/org/jclouds/util/TimeStamp.java b/core/src/main/java/org/jclouds/date/TimeStamp.java similarity index 98% rename from core/src/main/java/org/jclouds/util/TimeStamp.java rename to core/src/main/java/org/jclouds/date/TimeStamp.java index 5a1f2d842a..f97ce023fa 100644 --- a/core/src/main/java/org/jclouds/util/TimeStamp.java +++ b/core/src/main/java/org/jclouds/date/TimeStamp.java @@ -21,7 +21,7 @@ * under the License. * ==================================================================== */ -package org.jclouds.util; +package org.jclouds.date; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/org/jclouds/util/internal/SimpleDateFormatDateService.java b/core/src/main/java/org/jclouds/date/internal/SimpleDateFormatDateService.java similarity index 98% rename from core/src/main/java/org/jclouds/util/internal/SimpleDateFormatDateService.java rename to core/src/main/java/org/jclouds/date/internal/SimpleDateFormatDateService.java index 75d08e8aca..2cb4eaebdf 100755 --- a/core/src/main/java/org/jclouds/util/internal/SimpleDateFormatDateService.java +++ b/core/src/main/java/org/jclouds/date/internal/SimpleDateFormatDateService.java @@ -21,7 +21,7 @@ * under the License. * ==================================================================== */ -package org.jclouds.util.internal; +package org.jclouds.date.internal; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -32,7 +32,7 @@ import java.util.SimpleTimeZone; import net.jcip.annotations.GuardedBy; import net.jcip.annotations.ThreadSafe; -import org.jclouds.util.DateService; +import org.jclouds.date.DateService; /** * diff --git a/core/src/main/java/org/jclouds/util/EncryptionService.java b/core/src/main/java/org/jclouds/encryption/EncryptionService.java similarity index 96% rename from core/src/main/java/org/jclouds/util/EncryptionService.java rename to core/src/main/java/org/jclouds/encryption/EncryptionService.java index d8bc21d6db..6dc1ed17c4 100644 --- a/core/src/main/java/org/jclouds/util/EncryptionService.java +++ b/core/src/main/java/org/jclouds/encryption/EncryptionService.java @@ -21,7 +21,7 @@ * under the License. * ==================================================================== */ -package org.jclouds.util; +package org.jclouds.encryption; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; @@ -33,7 +33,7 @@ import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; -import org.jclouds.util.internal.JCEEncryptionService; +import org.jclouds.encryption.internal.JCEEncryptionService; import com.google.inject.ImplementedBy; diff --git a/core/src/main/java/org/jclouds/util/internal/Base64.java b/core/src/main/java/org/jclouds/encryption/internal/Base64.java similarity index 99% rename from core/src/main/java/org/jclouds/util/internal/Base64.java rename to core/src/main/java/org/jclouds/encryption/internal/Base64.java index 94343d8f39..126bc97612 100644 --- a/core/src/main/java/org/jclouds/util/internal/Base64.java +++ b/core/src/main/java/org/jclouds/encryption/internal/Base64.java @@ -5,7 +5,7 @@ // http://iharder.sourceforge.net/current/java/base64/ // -package org.jclouds.util.internal; +package org.jclouds.encryption.internal; /** diff --git a/core/src/main/java/org/jclouds/util/internal/BaseEncryptionService.java b/core/src/main/java/org/jclouds/encryption/internal/BaseEncryptionService.java similarity index 96% rename from core/src/main/java/org/jclouds/util/internal/BaseEncryptionService.java rename to core/src/main/java/org/jclouds/encryption/internal/BaseEncryptionService.java index a795050e3d..5a02690640 100755 --- a/core/src/main/java/org/jclouds/util/internal/BaseEncryptionService.java +++ b/core/src/main/java/org/jclouds/encryption/internal/BaseEncryptionService.java @@ -1,4 +1,4 @@ -package org.jclouds.util.internal; +package org.jclouds.encryption.internal; import static com.google.common.base.Preconditions.checkNotNull; @@ -10,7 +10,7 @@ import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; -import org.jclouds.util.EncryptionService; +import org.jclouds.encryption.EncryptionService; /** * diff --git a/core/src/main/java/org/jclouds/util/internal/JCEEncryptionService.java b/core/src/main/java/org/jclouds/encryption/internal/JCEEncryptionService.java similarity index 98% rename from core/src/main/java/org/jclouds/util/internal/JCEEncryptionService.java rename to core/src/main/java/org/jclouds/encryption/internal/JCEEncryptionService.java index 28d75dcf74..3dc2f665aa 100644 --- a/core/src/main/java/org/jclouds/util/internal/JCEEncryptionService.java +++ b/core/src/main/java/org/jclouds/encryption/internal/JCEEncryptionService.java @@ -1,4 +1,4 @@ -package org.jclouds.util.internal; +package org.jclouds.encryption.internal; import java.io.File; import java.io.FileInputStream; diff --git a/core/src/main/java/org/jclouds/http/filters/BasicAuthentication.java b/core/src/main/java/org/jclouds/http/filters/BasicAuthentication.java index 4f662cb57a..1334a049d7 100644 --- a/core/src/main/java/org/jclouds/http/filters/BasicAuthentication.java +++ b/core/src/main/java/org/jclouds/http/filters/BasicAuthentication.java @@ -32,10 +32,10 @@ import java.util.List; import javax.inject.Singleton; import javax.ws.rs.core.HttpHeaders; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.HttpException; import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequestFilter; -import org.jclouds.util.EncryptionService; /** * Uses Basic Authentication to sign the request. diff --git a/core/src/main/java/org/jclouds/http/functions/ParseContentMD5FromHeaders.java b/core/src/main/java/org/jclouds/http/functions/ParseContentMD5FromHeaders.java index 413e372799..ad441e4fb6 100644 --- a/core/src/main/java/org/jclouds/http/functions/ParseContentMD5FromHeaders.java +++ b/core/src/main/java/org/jclouds/http/functions/ParseContentMD5FromHeaders.java @@ -26,11 +26,11 @@ package org.jclouds.http.functions; import javax.annotation.Resource; import org.apache.commons.io.IOUtils; +import org.jclouds.encryption.internal.Base64; import org.jclouds.http.HttpResponse; import org.jclouds.logging.Logger; import org.jclouds.rest.InvocationContext; import org.jclouds.rest.internal.GeneratedHttpRequest; -import org.jclouds.util.internal.Base64; import com.google.common.base.Function; diff --git a/core/src/main/java/org/jclouds/http/functions/config/ParserModule.java b/core/src/main/java/org/jclouds/http/functions/config/ParserModule.java index 6c893a47fb..d4c9eba4d8 100755 --- a/core/src/main/java/org/jclouds/http/functions/config/ParserModule.java +++ b/core/src/main/java/org/jclouds/http/functions/config/ParserModule.java @@ -35,9 +35,9 @@ import javax.inject.Singleton; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; +import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax.HandlerWithResult; -import org.jclouds.util.DateService; import org.xml.sax.XMLReader; import com.google.common.collect.Sets; diff --git a/core/src/main/java/org/jclouds/http/options/GetOptions.java b/core/src/main/java/org/jclouds/http/options/GetOptions.java index d0dc21a0e6..e76894535f 100644 --- a/core/src/main/java/org/jclouds/http/options/GetOptions.java +++ b/core/src/main/java/org/jclouds/http/options/GetOptions.java @@ -33,8 +33,8 @@ import java.util.List; import javax.ws.rs.core.HttpHeaders; -import org.jclouds.util.DateService; -import org.jclouds.util.internal.SimpleDateFormatDateService; +import org.jclouds.date.DateService; +import org.jclouds.date.internal.SimpleDateFormatDateService; import com.google.common.base.Joiner; import com.google.common.collect.Multimap; diff --git a/core/src/test/java/org/jclouds/PerformanceTest.java b/core/src/test/java/org/jclouds/PerformanceTest.java index 36b651c4f2..a19a88f613 100644 --- a/core/src/test/java/org/jclouds/PerformanceTest.java +++ b/core/src/test/java/org/jclouds/PerformanceTest.java @@ -32,7 +32,7 @@ import java.util.concurrent.ExecutorCompletionService; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import org.jclouds.util.DateServiceTest; +import org.jclouds.date.DateServiceTest; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/core/src/test/java/org/jclouds/util/DateServiceTest.java b/core/src/test/java/org/jclouds/date/DateServiceTest.java old mode 100644 new mode 100755 similarity index 99% rename from core/src/test/java/org/jclouds/util/DateServiceTest.java rename to core/src/test/java/org/jclouds/date/DateServiceTest.java index d97f534ba9..74314699d5 --- a/core/src/test/java/org/jclouds/util/DateServiceTest.java +++ b/core/src/test/java/org/jclouds/date/DateServiceTest.java @@ -21,7 +21,7 @@ * under the License. * ==================================================================== */ -package org.jclouds.util; +package org.jclouds.date; import static org.testng.Assert.assertEquals; @@ -31,6 +31,7 @@ import java.util.List; import java.util.concurrent.ExecutionException; import org.jclouds.PerformanceTest; +import org.jclouds.date.DateService; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/core/src/test/java/org/jclouds/util/EncryptionServiceTest.java b/core/src/test/java/org/jclouds/encryption/EncryptionServiceTest.java similarity index 97% rename from core/src/test/java/org/jclouds/util/EncryptionServiceTest.java rename to core/src/test/java/org/jclouds/encryption/EncryptionServiceTest.java index 6de7327151..6d914386bc 100644 --- a/core/src/test/java/org/jclouds/util/EncryptionServiceTest.java +++ b/core/src/test/java/org/jclouds/encryption/EncryptionServiceTest.java @@ -21,7 +21,7 @@ * under the License. * ==================================================================== */ -package org.jclouds.util; +package org.jclouds.encryption; import static org.testng.Assert.assertEquals; @@ -35,7 +35,8 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorCompletionService; import org.jclouds.PerformanceTest; -import org.jclouds.util.internal.Base64; +import org.jclouds.encryption.EncryptionService; +import org.jclouds.encryption.internal.Base64; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; diff --git a/core/src/test/java/org/jclouds/http/filters/BasicAuthenticationTest.java b/core/src/test/java/org/jclouds/http/filters/BasicAuthenticationTest.java index 3b326838a4..e94270b4da 100755 --- a/core/src/test/java/org/jclouds/http/filters/BasicAuthenticationTest.java +++ b/core/src/test/java/org/jclouds/http/filters/BasicAuthenticationTest.java @@ -30,8 +30,8 @@ import java.net.URI; import javax.ws.rs.core.HttpHeaders; +import org.jclouds.encryption.internal.JCEEncryptionService; import org.jclouds.http.HttpRequest; -import org.jclouds.util.internal.JCEEncryptionService; import org.testng.annotations.Test; /** diff --git a/core/src/test/java/org/jclouds/http/internal/WireLiveTest.java b/core/src/test/java/org/jclouds/http/internal/WireLiveTest.java index 2746d8f5ee..0c021cbe5c 100644 --- a/core/src/test/java/org/jclouds/http/internal/WireLiveTest.java +++ b/core/src/test/java/org/jclouds/http/internal/WireLiveTest.java @@ -39,9 +39,9 @@ import java.util.concurrent.TimeUnit; import org.apache.commons.io.IOUtils; import org.jclouds.concurrent.WithinThreadExecutorService; +import org.jclouds.encryption.EncryptionService; +import org.jclouds.encryption.internal.JCEEncryptionService; import org.jclouds.logging.Logger; -import org.jclouds.util.EncryptionService; -import org.jclouds.util.internal.JCEEncryptionService; import org.testng.annotations.Test; /** diff --git a/core/src/test/java/org/jclouds/http/options/GetOptionsTest.java b/core/src/test/java/org/jclouds/http/options/GetOptionsTest.java index 07b6e26c0d..523af8c906 100644 --- a/core/src/test/java/org/jclouds/http/options/GetOptionsTest.java +++ b/core/src/test/java/org/jclouds/http/options/GetOptionsTest.java @@ -36,7 +36,7 @@ import static org.testng.Assert.assertNull; import java.io.UnsupportedEncodingException; import java.util.Date; -import org.jclouds.util.internal.SimpleDateFormatDateService; +import org.jclouds.date.internal.SimpleDateFormatDateService; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java b/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java index 32d7c864f2..eb401ae206 100755 --- a/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java +++ b/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java @@ -63,6 +63,8 @@ import javax.ws.rs.core.MediaType; import org.apache.commons.io.IOUtils; import org.jclouds.concurrent.WithinThreadExecutorService; import org.jclouds.concurrent.config.ExecutorServiceModule; +import org.jclouds.date.DateService; +import org.jclouds.date.internal.SimpleDateFormatDateService; import org.jclouds.http.HttpException; import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequestFilter; @@ -99,9 +101,7 @@ import org.jclouds.rest.binders.BindMapToMatrixParams; import org.jclouds.rest.binders.BindToJsonEntity; import org.jclouds.rest.binders.BindToStringEntity; import org.jclouds.rest.config.RestModule; -import org.jclouds.util.DateService; import org.jclouds.util.Jsr330; -import org.jclouds.util.internal.SimpleDateFormatDateService; import org.mortbay.jetty.HttpHeaders; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; diff --git a/demos/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java b/demos/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java index 26791edb7d..73e35aec31 100755 --- a/demos/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java +++ b/demos/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java @@ -42,7 +42,7 @@ import org.jclouds.blobstore.BlobStoreContextBuilder; import org.jclouds.demo.tweetstore.controller.AddTweetsController; import org.jclouds.demo.tweetstore.controller.StoreTweetsController; import org.jclouds.gae.config.GaeHttpCommandExecutorServiceModule; -import org.jclouds.twitter.TwitterAsyncClient; +import org.jclouds.twitter.TwitterClient; import org.jclouds.twitter.TwitterContextFactory; import com.google.appengine.api.labs.taskqueue.Queue; @@ -64,8 +64,8 @@ import com.google.inject.util.Jsr330; */ public class GuiceServletConfig extends GuiceServletContextListener { - private Map> providerTypeToBlobStoreMap; - private TwitterAsyncClient twitterClient; + private Map> providerTypeToBlobStoreMap; + private TwitterClient twitterClient; private String container; @SuppressWarnings("unchecked") @@ -76,7 +76,7 @@ public class GuiceServletConfig extends GuiceServletContextListener { // shared across all blobstores and used to retrieve tweets twitterClient = TwitterContextFactory.createContext(props, - new GaeHttpCommandExecutorServiceModule()).getAsyncApi(); + new GaeHttpCommandExecutorServiceModule()).getApi(); // common namespace for storing tweets. container = checkNotNull(props.getProperty(PROPERTY_TWEETSTORE_CONTAINER), @@ -88,12 +88,12 @@ public class GuiceServletConfig extends GuiceServletContextListener { // instantiate and store references to all blobstores by provider name providerTypeToBlobStoreMap = Maps.newHashMap(); for (String className : contextBuilderClassNames) { - Class> builderClass; - Constructor> constructor; + Class> builderClass; + Constructor> constructor; String name; - BlobStoreContext context; + BlobStoreContext context; try { - builderClass = (Class>) Class.forName(className); + builderClass = (Class>) Class.forName(className); name = builderClass.getSimpleName().replaceAll("BlobStoreContextBuilder", ""); constructor = builderClass.getConstructor(Properties.class); context = constructor.newInstance(props).withModules( @@ -133,21 +133,20 @@ public class GuiceServletConfig extends GuiceServletContextListener { return Guice.createInjector(new ServletModule() { @Override protected void configureServlets() { - bind(new TypeLiteral>>() { + bind(new TypeLiteral>>() { }).toInstance(GuiceServletConfig.this.providerTypeToBlobStoreMap); - bind(TwitterAsyncClient.class).toInstance(twitterClient); + bind(TwitterClient.class).toInstance(twitterClient); bindConstant().annotatedWith(Jsr330.named(PROPERTY_TWEETSTORE_CONTAINER)).to(container); serve("/store/*").with(StoreTweetsController.class); serve("/tweets/*").with(AddTweetsController.class); requestInjection(this); } - } - ); + }); } @Override public void contextDestroyed(ServletContextEvent servletContextEvent) { - for (BlobStoreContext context : providerTypeToBlobStoreMap.values()) { + for (BlobStoreContext context : providerTypeToBlobStoreMap.values()) { context.close(); } super.contextDestroyed(servletContextEvent); diff --git a/extensions/bouncycastle/src/main/java/org/jclouds/util/internal/BouncyCastleEncryptionService.java b/extensions/bouncycastle/src/main/java/org/jclouds/encryption/bouncycastle/BouncyCastleEncryptionService.java similarity index 76% rename from extensions/bouncycastle/src/main/java/org/jclouds/util/internal/BouncyCastleEncryptionService.java rename to extensions/bouncycastle/src/main/java/org/jclouds/encryption/bouncycastle/BouncyCastleEncryptionService.java index 88ee2af3bd..c59fc86404 100644 --- a/extensions/bouncycastle/src/main/java/org/jclouds/util/internal/BouncyCastleEncryptionService.java +++ b/extensions/bouncycastle/src/main/java/org/jclouds/encryption/bouncycastle/BouncyCastleEncryptionService.java @@ -1,4 +1,27 @@ -package org.jclouds.util.internal; +/** + * + * Copyright (C) 2009 Global Cloud Specialists, Inc. + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + */ +package org.jclouds.encryption.bouncycastle; import java.io.File; import java.io.FileInputStream; @@ -8,6 +31,8 @@ import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; +import javax.inject.Singleton; + import org.apache.commons.io.IOUtils; import org.apache.commons.io.output.ByteArrayOutputStream; import org.bouncycastle.crypto.Digest; @@ -17,12 +42,14 @@ import org.bouncycastle.crypto.digests.SHA256Digest; import org.bouncycastle.crypto.macs.HMac; import org.bouncycastle.crypto.params.KeyParameter; import org.bouncycastle.util.encoders.Base64; +import org.jclouds.encryption.internal.BaseEncryptionService; import org.jclouds.util.Utils; /** * * @author Adrian Cole */ +@Singleton public class BouncyCastleEncryptionService extends BaseEncryptionService { public String hmacSha256Base64(String toEncode, byte[] key) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException { diff --git a/extensions/bouncycastle/src/main/java/org/jclouds/encryption/bouncycastle/config/BouncyCastleEncryptionServiceModule.java b/extensions/bouncycastle/src/main/java/org/jclouds/encryption/bouncycastle/config/BouncyCastleEncryptionServiceModule.java new file mode 100755 index 0000000000..d7ef6499f8 --- /dev/null +++ b/extensions/bouncycastle/src/main/java/org/jclouds/encryption/bouncycastle/config/BouncyCastleEncryptionServiceModule.java @@ -0,0 +1,44 @@ +/** + * + * Copyright (C) 2009 Global Cloud Specialists, Inc. + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + */ +package org.jclouds.encryption.bouncycastle.config; + +import org.jclouds.encryption.EncryptionService; +import org.jclouds.encryption.bouncycastle.BouncyCastleEncryptionService; + +import com.google.inject.AbstractModule; + +/** + * Configures EncryptionService of type {@link BouncyCastleEncryptionService} + * + * @author Adrian Cole + * + */ +public class BouncyCastleEncryptionServiceModule extends AbstractModule { + + @Override + protected void configure() { + bind(EncryptionService.class).to(BouncyCastleEncryptionService.class); + } + +} diff --git a/extensions/bouncycastle/src/main/java/org/jclouds/util/internal/EncryptionService.java b/extensions/bouncycastle/src/main/java/org/jclouds/util/internal/EncryptionService.java deleted file mode 100644 index b346976d44..0000000000 --- a/extensions/bouncycastle/src/main/java/org/jclouds/util/internal/EncryptionService.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * - * Copyright (C) 2009 Global Cloud Specialists, Inc. - * - * ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== - */ -package org.jclouds.util.internal; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - -import java.io.File; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; -import java.security.NoSuchProviderException; - -import org.bouncycastle.crypto.Digest; - -/** - * - * @author Adrian Cole - */ -public interface EncryptionService { - - String toHexString(byte[] raw); - - byte[] fromHexString(String hex); - - String hmacSha256Base64(String toEncode, byte[] key) throws NoSuchAlgorithmException, - NoSuchProviderException, InvalidKeyException; - - byte[] hmac(String toEncode, byte[] key, Digest digest); - - String hmacSha1Base64(String toEncode, byte[] key) throws NoSuchAlgorithmException, - NoSuchProviderException, InvalidKeyException; - - String md5Hex(byte[] toEncode) throws NoSuchAlgorithmException, NoSuchProviderException, - InvalidKeyException, UnsupportedEncodingException; - - String md5Base64(byte[] toEncode) throws NoSuchAlgorithmException, NoSuchProviderException, - InvalidKeyException; - - byte[] md5(byte[] plainBytes); - - byte[] md5(File toEncode); - - String toBase64String(byte[] resBuf); - - Long calculateSize(Object data); - - byte[] md5(Object data); - - MD5InputStreamResult generateMD5Result(InputStream toEncode); - - public static class MD5InputStreamResult { - public final byte[] data; - public final byte[] md5; - public final long length; - - MD5InputStreamResult(byte[] data, byte[] eTag, long length) { - this.data = checkNotNull(data, "data"); - this.md5 = checkNotNull(eTag, "eTag"); - checkArgument(length >= 0, "length cannot me negative"); - this.length = length; - } - - } - - byte[] fromBase64String(String encoded); - -} \ No newline at end of file diff --git a/extensions/bouncycastle/src/test/java/org/jclouds/util/internal/BouncyCastleEncryptionServiceTest.java b/extensions/bouncycastle/src/test/java/org/jclouds/encryption/bouncycastle/BouncyCastleEncryptionServiceTest.java similarity index 51% rename from extensions/bouncycastle/src/test/java/org/jclouds/util/internal/BouncyCastleEncryptionServiceTest.java rename to extensions/bouncycastle/src/test/java/org/jclouds/encryption/bouncycastle/BouncyCastleEncryptionServiceTest.java index e3ba61bf7e..7da9166998 100644 --- a/extensions/bouncycastle/src/test/java/org/jclouds/util/internal/BouncyCastleEncryptionServiceTest.java +++ b/extensions/bouncycastle/src/test/java/org/jclouds/encryption/bouncycastle/BouncyCastleEncryptionServiceTest.java @@ -1,6 +1,8 @@ -package org.jclouds.util.internal; +package org.jclouds.encryption.bouncycastle; -import org.jclouds.util.EncryptionServiceTest; +import org.jclouds.encryption.EncryptionService; +import org.jclouds.encryption.EncryptionServiceTest; +import org.jclouds.encryption.bouncycastle.config.BouncyCastleEncryptionServiceModule; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; @@ -17,7 +19,8 @@ public class BouncyCastleEncryptionServiceTest extends EncryptionServiceTest { @BeforeTest protected void createEncryptionService() { - Injector i = Guice.createInjector(); - encryptionService = i.getInstance(BouncyCastleEncryptionService.class); + Injector i = Guice.createInjector(new BouncyCastleEncryptionServiceModule()); + encryptionService = i.getInstance(EncryptionService.class); + assert encryptionService instanceof BouncyCastleEncryptionService; } } diff --git a/extensions/gae/pom.xml b/extensions/gae/pom.xml index cbb0c729e6..e824c54603 100644 --- a/extensions/gae/pom.xml +++ b/extensions/gae/pom.xml @@ -1,31 +1,27 @@ - - + http://www.apache.org/licenses/LICENSE-2.0.html Unless required + by applicable law or agreed to in writing, software distributed + under the License is distributed on an "AS IS" BASIS, WITHOUT + WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions + and limitations under the License. + ==================================================================== + --> + 4.0.0 org.jclouds @@ -67,14 +63,12 @@ ${project.version} test-jar test - + org.apache.geronimo.specs diff --git a/extensions/joda/src/main/java/org/jclouds/util/internal/JodaDateService.java b/extensions/joda/src/main/java/org/jclouds/date/joda/JodaDateService.java similarity index 97% rename from extensions/joda/src/main/java/org/jclouds/util/internal/JodaDateService.java rename to extensions/joda/src/main/java/org/jclouds/date/joda/JodaDateService.java index 50a6b56d89..d880d52bf6 100755 --- a/extensions/joda/src/main/java/org/jclouds/util/internal/JodaDateService.java +++ b/extensions/joda/src/main/java/org/jclouds/date/joda/JodaDateService.java @@ -21,14 +21,16 @@ * under the License. * ==================================================================== */ -package org.jclouds.util.internal; +package org.jclouds.date.joda; import java.util.Date; import java.util.Locale; +import javax.inject.Singleton; + import net.jcip.annotations.ThreadSafe; -import org.jclouds.util.DateService; +import org.jclouds.date.DateService; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.format.DateTimeFormat; @@ -40,6 +42,7 @@ import org.joda.time.format.DateTimeFormatter; * @author James Murty */ @ThreadSafe +@Singleton public class JodaDateService implements DateService { private static final DateTimeFormatter rfc822DateFormatter = DateTimeFormat.forPattern( diff --git a/extensions/joda/src/main/java/org/jclouds/date/joda/config/JodaDateServiceModule.java b/extensions/joda/src/main/java/org/jclouds/date/joda/config/JodaDateServiceModule.java new file mode 100755 index 0000000000..660deccee9 --- /dev/null +++ b/extensions/joda/src/main/java/org/jclouds/date/joda/config/JodaDateServiceModule.java @@ -0,0 +1,44 @@ +/** + * + * Copyright (C) 2009 Global Cloud Specialists, Inc. + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + */ +package org.jclouds.date.joda.config; + +import org.jclouds.date.DateService; +import org.jclouds.date.joda.JodaDateService; + +import com.google.inject.AbstractModule; + +/** + * Configures DateService of type {@link JodaDateService} + * + * @author Adrian Cole + * + */ +public class JodaDateServiceModule extends AbstractModule { + + @Override + protected void configure() { + bind(DateService.class).to(JodaDateService.class); + } + +} diff --git a/extensions/joda/src/test/java/org/jclouds/util/JodaDateServiceTest.java b/extensions/joda/src/test/java/org/jclouds/date/joda/JodaDateServiceTest.java similarity index 79% rename from extensions/joda/src/test/java/org/jclouds/util/JodaDateServiceTest.java rename to extensions/joda/src/test/java/org/jclouds/date/joda/JodaDateServiceTest.java index c69a4dd2b2..040fee8995 100755 --- a/extensions/joda/src/test/java/org/jclouds/util/JodaDateServiceTest.java +++ b/extensions/joda/src/test/java/org/jclouds/date/joda/JodaDateServiceTest.java @@ -21,12 +21,17 @@ * under the License. * ==================================================================== */ -package org.jclouds.util; +package org.jclouds.date.joda; -import org.jclouds.util.internal.JodaDateService; +import org.jclouds.date.DateService; +import org.jclouds.date.DateServiceTest; +import org.jclouds.date.joda.config.JodaDateServiceModule; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; +import com.google.inject.Guice; +import com.google.inject.Injector; + /* * TODO: Scrap any non-DateService references (eg Joda & Amazon) if/when * we confirm that the DateService is fast enough. @@ -43,7 +48,9 @@ public class JodaDateServiceTest extends DateServiceTest { @Override @BeforeTest protected void createDateService() { - dateService = new JodaDateService(); + Injector i = Guice.createInjector(new JodaDateServiceModule()); + dateService = i.getInstance(DateService.class); + assert dateService instanceof JodaDateService; } } \ No newline at end of file diff --git a/mezeo/pcs2/core/src/main/java/org/jclouds/mezeo/pcs2/config/PCSRestClientModule.java b/mezeo/pcs2/core/src/main/java/org/jclouds/mezeo/pcs2/config/PCSRestClientModule.java index bb8fb97420..765ad78508 100755 --- a/mezeo/pcs2/core/src/main/java/org/jclouds/mezeo/pcs2/config/PCSRestClientModule.java +++ b/mezeo/pcs2/core/src/main/java/org/jclouds/mezeo/pcs2/config/PCSRestClientModule.java @@ -33,6 +33,7 @@ import javax.inject.Named; import javax.inject.Singleton; import org.jclouds.concurrent.internal.SyncProxy; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.HttpRetryHandler; import org.jclouds.http.RequiresHttp; import org.jclouds.http.annotation.ClientError; @@ -54,7 +55,6 @@ import org.jclouds.mezeo.pcs2.handlers.PCSClientErrorRetryHandler; import org.jclouds.mezeo.pcs2.reference.PCSConstants; import org.jclouds.rest.ConfiguresRestClient; import org.jclouds.rest.RestClientFactory; -import org.jclouds.util.EncryptionService; import com.google.inject.AbstractModule; import com.google.inject.Provides; diff --git a/mezeo/pcs2/core/src/main/java/org/jclouds/mezeo/pcs2/xml/ContainerHandler.java b/mezeo/pcs2/core/src/main/java/org/jclouds/mezeo/pcs2/xml/ContainerHandler.java index 41b3246664..7f42708ba2 100755 --- a/mezeo/pcs2/core/src/main/java/org/jclouds/mezeo/pcs2/xml/ContainerHandler.java +++ b/mezeo/pcs2/core/src/main/java/org/jclouds/mezeo/pcs2/xml/ContainerHandler.java @@ -31,6 +31,7 @@ import java.util.SortedSet; import javax.annotation.Resource; import javax.inject.Inject; +import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.logging.Logger; import org.jclouds.mezeo.pcs2.domain.ContainerList; @@ -38,7 +39,6 @@ import org.jclouds.mezeo.pcs2.domain.ResourceInfo; import org.jclouds.mezeo.pcs2.domain.internal.ContainerInfoImpl; import org.jclouds.mezeo.pcs2.domain.internal.ContainerListImpl; import org.jclouds.mezeo.pcs2.domain.internal.FileInfoImpl; -import org.jclouds.util.DateService; import org.xml.sax.Attributes; import org.xml.sax.SAXException; diff --git a/mezeo/pcs2/core/src/main/java/org/jclouds/mezeo/pcs2/xml/FileHandler.java b/mezeo/pcs2/core/src/main/java/org/jclouds/mezeo/pcs2/xml/FileHandler.java index cac38f769d..8f48514785 100644 --- a/mezeo/pcs2/core/src/main/java/org/jclouds/mezeo/pcs2/xml/FileHandler.java +++ b/mezeo/pcs2/core/src/main/java/org/jclouds/mezeo/pcs2/xml/FileHandler.java @@ -29,10 +29,10 @@ import java.util.Map; import javax.inject.Inject; +import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.mezeo.pcs2.domain.FileInfoWithMetadata; import org.jclouds.mezeo.pcs2.domain.internal.FileInfoWithMetadataImpl; -import org.jclouds.util.DateService; import org.xml.sax.Attributes; import org.xml.sax.SAXException; diff --git a/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/PCSClientTest.java b/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/PCSClientTest.java index 8b88fbf628..334f34fea5 100644 --- a/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/PCSClientTest.java +++ b/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/PCSClientTest.java @@ -41,6 +41,7 @@ import org.jclouds.blobstore.binders.BindBlobToMultipartFormTest; import org.jclouds.blobstore.config.BlobStoreObjectModule; import org.jclouds.blobstore.functions.ReturnVoidOnNotFoundOr404; import org.jclouds.blobstore.functions.ThrowKeyNotFoundOn404; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.filters.BasicAuthentication; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseURIFromListOrLocationHeaderIf20x; @@ -59,7 +60,6 @@ import org.jclouds.mezeo.pcs2.xml.FileHandler; import org.jclouds.rest.RestClientTest; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.jclouds.rest.internal.RestAnnotationProcessor; -import org.jclouds.util.EncryptionService; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/PCSCloudLiveTest.java b/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/PCSCloudLiveTest.java index a6f3311cbd..fb8f61f6b5 100644 --- a/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/PCSCloudLiveTest.java +++ b/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/PCSCloudLiveTest.java @@ -34,6 +34,7 @@ import javax.inject.Singleton; import org.jclouds.concurrent.WithinThreadExecutorService; import org.jclouds.concurrent.config.ExecutorServiceModule; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule; import org.jclouds.http.filters.BasicAuthentication; import org.jclouds.logging.Logger; @@ -41,7 +42,6 @@ import org.jclouds.logging.Logger.LoggerFactory; import org.jclouds.mezeo.pcs2.PCSCloud.Response; import org.jclouds.rest.RestClientFactory; import org.jclouds.rest.config.RestModule; -import org.jclouds.util.EncryptionService; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/PCSCloudTest.java b/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/PCSCloudTest.java index cb37cc4daa..52fe153adb 100644 --- a/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/PCSCloudTest.java +++ b/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/PCSCloudTest.java @@ -33,6 +33,7 @@ import javax.inject.Singleton; import org.jclouds.concurrent.WithinThreadExecutorService; import org.jclouds.concurrent.config.ExecutorServiceModule; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule; import org.jclouds.http.filters.BasicAuthentication; import org.jclouds.http.functions.ParseSax; @@ -42,7 +43,6 @@ import org.jclouds.mezeo.pcs2.xml.CloudXlinkHandler; import org.jclouds.rest.config.RestModule; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.jclouds.rest.internal.RestAnnotationProcessor; -import org.jclouds.util.EncryptionService; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/xml/ContainerHandlerTest.java b/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/xml/ContainerHandlerTest.java index 786a03dced..c548c73cee 100644 --- a/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/xml/ContainerHandlerTest.java +++ b/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/xml/ContainerHandlerTest.java @@ -28,13 +28,13 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; import java.net.URI; +import org.jclouds.date.DateService; import org.jclouds.http.functions.BaseHandlerTest; import org.jclouds.mezeo.pcs2.domain.ContainerList; import org.jclouds.mezeo.pcs2.domain.ResourceInfo; import org.jclouds.mezeo.pcs2.domain.internal.ContainerInfoImpl; import org.jclouds.mezeo.pcs2.domain.internal.ContainerListImpl; import org.jclouds.mezeo.pcs2.domain.internal.FileInfoImpl; -import org.jclouds.util.DateService; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/xml/FileMetadataHandlerTest.java b/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/xml/FileMetadataHandlerTest.java index 45734daee1..a56adf103d 100644 --- a/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/xml/FileMetadataHandlerTest.java +++ b/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/xml/FileMetadataHandlerTest.java @@ -28,10 +28,10 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; import java.net.URI; +import org.jclouds.date.DateService; import org.jclouds.http.functions.BaseHandlerTest; import org.jclouds.mezeo.pcs2.domain.FileInfoWithMetadata; import org.jclouds.mezeo.pcs2.domain.internal.FileInfoWithMetadataImpl; -import org.jclouds.util.DateService; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/nirvanix/sdn/core/src/test/java/org/jclouds/nirvanix/sdn/SDNClientLiveTest.java b/nirvanix/sdn/core/src/test/java/org/jclouds/nirvanix/sdn/SDNClientLiveTest.java index c88e798479..3fd0ef1069 100644 --- a/nirvanix/sdn/core/src/test/java/org/jclouds/nirvanix/sdn/SDNClientLiveTest.java +++ b/nirvanix/sdn/core/src/test/java/org/jclouds/nirvanix/sdn/SDNClientLiveTest.java @@ -34,9 +34,9 @@ import java.util.concurrent.TimeoutException; import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.integration.internal.BaseBlobStoreIntegrationTest; +import org.jclouds.encryption.internal.Base64; import org.jclouds.logging.log4j.config.Log4JLoggingModule; import org.jclouds.nirvanix.sdn.domain.UploadInfo; -import org.jclouds.util.internal.Base64; import org.testng.annotations.BeforeGroups; import org.testng.annotations.Test; diff --git a/nirvanix/sdn/core/src/test/java/org/jclouds/nirvanix/sdn/filters/AddSessionTokenToRequestTest.java b/nirvanix/sdn/core/src/test/java/org/jclouds/nirvanix/sdn/filters/AddSessionTokenToRequestTest.java index fc94067223..4bb9c155cb 100755 --- a/nirvanix/sdn/core/src/test/java/org/jclouds/nirvanix/sdn/filters/AddSessionTokenToRequestTest.java +++ b/nirvanix/sdn/core/src/test/java/org/jclouds/nirvanix/sdn/filters/AddSessionTokenToRequestTest.java @@ -33,6 +33,7 @@ import javax.ws.rs.ext.RuntimeDelegate; import org.jclouds.concurrent.WithinThreadExecutorService; import org.jclouds.concurrent.config.ExecutorServiceModule; +import org.jclouds.date.DateService; import org.jclouds.http.HttpRequest; import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule; import org.jclouds.logging.Logger; @@ -42,7 +43,6 @@ import org.jclouds.rest.annotations.Endpoint; import org.jclouds.rest.config.RestModule; import org.jclouds.rest.internal.RestAnnotationProcessor; import org.jclouds.rest.internal.RuntimeDelegateImpl; -import org.jclouds.util.DateService; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; diff --git a/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/binders/BindCFObjectToEntity.java b/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/binders/BindCFObjectToEntity.java index d009d36187..eb2d0acce9 100644 --- a/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/binders/BindCFObjectToEntity.java +++ b/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/binders/BindCFObjectToEntity.java @@ -30,11 +30,11 @@ import javax.inject.Named; import javax.ws.rs.core.HttpHeaders; import org.jclouds.blobstore.binders.BindBlobToEntityAndUserMetadataToHeadersWithPrefix; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.HttpRequest; import org.jclouds.rackspace.cloudfiles.blobstore.functions.ObjectToBlob; import org.jclouds.rackspace.cloudfiles.domain.CFObject; import org.jclouds.rackspace.cloudfiles.reference.CloudFilesConstants; -import org.jclouds.util.EncryptionService; public class BindCFObjectToEntity extends BindBlobToEntityAndUserMetadataToHeadersWithPrefix { private final ObjectToBlob object2Blob; diff --git a/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/blobstore/functions/ObjectToBlobMetadata.java b/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/blobstore/functions/ObjectToBlobMetadata.java index 5324e7dae3..62b00dc7a4 100644 --- a/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/blobstore/functions/ObjectToBlobMetadata.java +++ b/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/blobstore/functions/ObjectToBlobMetadata.java @@ -30,9 +30,9 @@ import org.jclouds.blobstore.domain.MutableBlobMetadata; import org.jclouds.blobstore.domain.ResourceType; import org.jclouds.blobstore.domain.internal.MutableBlobMetadataImpl; import org.jclouds.blobstore.strategy.IsDirectoryStrategy; +import org.jclouds.encryption.EncryptionService; import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata; import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo; -import org.jclouds.util.EncryptionService; import com.google.common.base.Function; diff --git a/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/blobstore/functions/ResourceToObjectInfo.java b/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/blobstore/functions/ResourceToObjectInfo.java index ef3f705557..01a7419ab4 100644 --- a/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/blobstore/functions/ResourceToObjectInfo.java +++ b/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/blobstore/functions/ResourceToObjectInfo.java @@ -29,9 +29,9 @@ import javax.inject.Singleton; import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.ResourceMetadata; import org.jclouds.blobstore.domain.ResourceType; +import org.jclouds.encryption.EncryptionService; import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata; import org.jclouds.rackspace.cloudfiles.domain.internal.MutableObjectInfoWithMetadataImpl; -import org.jclouds.util.EncryptionService; import com.google.common.base.Function; diff --git a/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectInfoFromHeaders.java b/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectInfoFromHeaders.java index 9d425d93f7..1c43a2eebb 100644 --- a/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectInfoFromHeaders.java +++ b/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectInfoFromHeaders.java @@ -27,12 +27,12 @@ import javax.inject.Inject; import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.functions.ParseSystemAndUserMetadataFromHeaders; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.HttpResponse; import org.jclouds.rackspace.cloudfiles.blobstore.functions.ResourceToObjectInfo; import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata; import org.jclouds.rest.InvocationContext; import org.jclouds.rest.internal.GeneratedHttpRequest; -import org.jclouds.util.EncryptionService; import com.google.common.base.Function; diff --git a/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectInfoListFromJsonResponse.java b/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectInfoListFromJsonResponse.java index e6b00c01c5..65848b5ae7 100644 --- a/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectInfoListFromJsonResponse.java +++ b/rackspace/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectInfoListFromJsonResponse.java @@ -37,12 +37,12 @@ import javax.inject.Inject; import org.jclouds.blobstore.domain.ListContainerResponse; import org.jclouds.blobstore.domain.internal.ListContainerResponseImpl; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.functions.ParseJson; import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo; import org.jclouds.rackspace.cloudfiles.options.ListContainerOptions; import org.jclouds.rest.InvocationContext; import org.jclouds.rest.internal.GeneratedHttpRequest; -import org.jclouds.util.EncryptionService; import com.google.common.base.Function; import com.google.common.collect.Iterables; diff --git a/rackspace/src/main/java/org/jclouds/rackspace/cloudservers/options/CreateServerOptions.java b/rackspace/src/main/java/org/jclouds/rackspace/cloudservers/options/CreateServerOptions.java index b48d91ed92..ffcdeaa76b 100644 --- a/rackspace/src/main/java/org/jclouds/rackspace/cloudservers/options/CreateServerOptions.java +++ b/rackspace/src/main/java/org/jclouds/rackspace/cloudservers/options/CreateServerOptions.java @@ -32,10 +32,10 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; +import org.jclouds.encryption.internal.Base64; import org.jclouds.http.HttpRequest; import org.jclouds.rackspace.cloudservers.domain.Addresses; import org.jclouds.rest.binders.BindToJsonEntity; -import org.jclouds.util.internal.Base64; import com.google.common.collect.ImmutableMap; import com.google.inject.internal.Lists; diff --git a/rackspace/src/test/java/org/jclouds/rackspace/cloudfiles/CloudFilesClientLiveTest.java b/rackspace/src/test/java/org/jclouds/rackspace/cloudfiles/CloudFilesClientLiveTest.java index a107b75b13..66007d619b 100644 --- a/rackspace/src/test/java/org/jclouds/rackspace/cloudfiles/CloudFilesClientLiveTest.java +++ b/rackspace/src/test/java/org/jclouds/rackspace/cloudfiles/CloudFilesClientLiveTest.java @@ -43,6 +43,8 @@ import org.jclouds.blobstore.ContainerNotFoundException; import org.jclouds.blobstore.KeyNotFoundException; import org.jclouds.blobstore.domain.ListResponse; import org.jclouds.blobstore.integration.internal.BaseBlobStoreIntegrationTest; +import org.jclouds.encryption.EncryptionService; +import org.jclouds.encryption.internal.JCEEncryptionService; import org.jclouds.http.HttpResponseException; import org.jclouds.http.options.GetOptions; import org.jclouds.rackspace.cloudfiles.domain.AccountMetadata; @@ -53,8 +55,6 @@ import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata; import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo; import org.jclouds.rackspace.cloudfiles.options.ListCdnContainerOptions; import org.jclouds.rackspace.cloudfiles.options.ListContainerOptions; -import org.jclouds.util.EncryptionService; -import org.jclouds.util.internal.JCEEncryptionService; import org.testng.annotations.Test; import com.google.common.base.Predicate; diff --git a/rackspace/src/test/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectInfoListFromJsonResponseTest.java b/rackspace/src/test/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectInfoListFromJsonResponseTest.java index 446c5299ab..0f91c80a13 100644 --- a/rackspace/src/test/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectInfoListFromJsonResponseTest.java +++ b/rackspace/src/test/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectInfoListFromJsonResponseTest.java @@ -31,12 +31,12 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; import java.util.List; +import org.jclouds.date.internal.SimpleDateFormatDateService; import org.jclouds.http.functions.config.ParserModule; import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo; import org.jclouds.rackspace.cloudfiles.functions.ParseObjectInfoListFromJsonResponse.ObjectInfoImpl; import org.jclouds.rackspace.cloudfiles.options.ListContainerOptions; import org.jclouds.rest.internal.GeneratedHttpRequest; -import org.jclouds.util.internal.SimpleDateFormatDateService; import org.testng.annotations.Test; import org.testng.collections.Lists; diff --git a/rackspace/src/test/java/org/jclouds/rackspace/cloudservers/functions/ParseImageFromJsonResponseTest.java b/rackspace/src/test/java/org/jclouds/rackspace/cloudservers/functions/ParseImageFromJsonResponseTest.java index 772d96d038..e81275fdaf 100644 --- a/rackspace/src/test/java/org/jclouds/rackspace/cloudservers/functions/ParseImageFromJsonResponseTest.java +++ b/rackspace/src/test/java/org/jclouds/rackspace/cloudservers/functions/ParseImageFromJsonResponseTest.java @@ -28,10 +28,10 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; import java.net.UnknownHostException; +import org.jclouds.date.DateService; import org.jclouds.http.functions.config.ParserModule; import org.jclouds.rackspace.cloudservers.domain.Image; import org.jclouds.rackspace.cloudservers.domain.ImageStatus; -import org.jclouds.util.DateService; import org.testng.annotations.Test; import com.google.gson.Gson; diff --git a/rackspace/src/test/java/org/jclouds/rackspace/cloudservers/functions/ParseImageListFromJsonResponseTest.java b/rackspace/src/test/java/org/jclouds/rackspace/cloudservers/functions/ParseImageListFromJsonResponseTest.java index 59bbe8e852..35e91d5e1e 100644 --- a/rackspace/src/test/java/org/jclouds/rackspace/cloudservers/functions/ParseImageListFromJsonResponseTest.java +++ b/rackspace/src/test/java/org/jclouds/rackspace/cloudservers/functions/ParseImageListFromJsonResponseTest.java @@ -29,10 +29,10 @@ import java.io.InputStream; import java.net.UnknownHostException; import java.util.List; +import org.jclouds.date.DateService; import org.jclouds.http.functions.config.ParserModule; import org.jclouds.rackspace.cloudservers.domain.Image; import org.jclouds.rackspace.cloudservers.domain.ImageStatus; -import org.jclouds.util.DateService; import org.testng.annotations.Test; import com.google.common.collect.ImmutableList; diff --git a/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingAsyncClientTest.java b/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingAsyncClientTest.java index 14abc1af96..9dad6e1f1e 100644 --- a/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingAsyncClientTest.java +++ b/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingAsyncClientTest.java @@ -31,13 +31,13 @@ import java.net.URI; import javax.inject.Singleton; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.filters.BasicAuthentication; import org.jclouds.logging.Logger; import org.jclouds.logging.Logger.LoggerFactory; import org.jclouds.rest.RestClientTest; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.jclouds.rest.internal.RestAnnotationProcessor; -import org.jclouds.util.EncryptionService; import org.testng.annotations.Test; import com.google.inject.AbstractModule; diff --git a/twitter/src/main/java/org/jclouds/twitter/config/TwitterRestClientModule.java b/twitter/src/main/java/org/jclouds/twitter/config/TwitterRestClientModule.java index a58b991270..25163e90a2 100755 --- a/twitter/src/main/java/org/jclouds/twitter/config/TwitterRestClientModule.java +++ b/twitter/src/main/java/org/jclouds/twitter/config/TwitterRestClientModule.java @@ -30,6 +30,7 @@ import javax.inject.Named; import javax.inject.Singleton; import org.jclouds.concurrent.internal.SyncProxy; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.RequiresHttp; import org.jclouds.http.filters.BasicAuthentication; import org.jclouds.rest.ConfiguresRestClient; @@ -38,7 +39,6 @@ import org.jclouds.twitter.Twitter; import org.jclouds.twitter.TwitterAsyncClient; import org.jclouds.twitter.TwitterClient; import org.jclouds.twitter.reference.TwitterConstants; -import org.jclouds.util.EncryptionService; import com.google.inject.AbstractModule; import com.google.inject.Provides; diff --git a/twitter/src/test/java/org/jclouds/twitter/TwitterClientTest.java b/twitter/src/test/java/org/jclouds/twitter/TwitterClientTest.java index 31edcbc06d..1b41a907a8 100644 --- a/twitter/src/test/java/org/jclouds/twitter/TwitterClientTest.java +++ b/twitter/src/test/java/org/jclouds/twitter/TwitterClientTest.java @@ -32,6 +32,7 @@ import java.net.URI; import javax.inject.Singleton; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.filters.BasicAuthentication; import org.jclouds.logging.Logger; import org.jclouds.logging.Logger.LoggerFactory; @@ -39,7 +40,6 @@ import org.jclouds.rest.RestClientTest; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.jclouds.rest.internal.RestAnnotationProcessor; import org.jclouds.twitter.functions.ParseStatusesFromJsonResponse; -import org.jclouds.util.EncryptionService; import org.testng.annotations.Test; import com.google.inject.AbstractModule; diff --git a/twitter/src/test/java/org/jclouds/twitter/functions/ParseStatusesFromJsonResponseTest.java b/twitter/src/test/java/org/jclouds/twitter/functions/ParseStatusesFromJsonResponseTest.java index 89201b36f0..3c540367a7 100644 --- a/twitter/src/test/java/org/jclouds/twitter/functions/ParseStatusesFromJsonResponseTest.java +++ b/twitter/src/test/java/org/jclouds/twitter/functions/ParseStatusesFromJsonResponseTest.java @@ -30,11 +30,11 @@ import java.net.URI; import java.net.UnknownHostException; import java.util.SortedSet; +import org.jclouds.date.DateService; +import org.jclouds.date.internal.SimpleDateFormatDateService; import org.jclouds.http.functions.config.ParserModule; import org.jclouds.twitter.domain.Status; import org.jclouds.twitter.domain.User; -import org.jclouds.util.DateService; -import org.jclouds.util.internal.SimpleDateFormatDateService; import org.testng.annotations.Test; import com.google.common.collect.ImmutableSortedSet; diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/config/VCloudDiscoveryRestClientModule.java b/vcloud/core/src/main/java/org/jclouds/vcloud/config/VCloudDiscoveryRestClientModule.java index 3aeab60d30..3da0e33f53 100755 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/config/VCloudDiscoveryRestClientModule.java +++ b/vcloud/core/src/main/java/org/jclouds/vcloud/config/VCloudDiscoveryRestClientModule.java @@ -39,11 +39,11 @@ import javax.inject.Named; import javax.inject.Singleton; import org.jclouds.concurrent.ExpirableSupplier; +import org.jclouds.encryption.EncryptionService; import org.jclouds.http.RequiresHttp; import org.jclouds.http.filters.BasicAuthentication; import org.jclouds.rest.ConfiguresRestClient; import org.jclouds.rest.RestClientFactory; -import org.jclouds.util.EncryptionService; import org.jclouds.util.Utils; import org.jclouds.vcloud.VCloudDiscovery; import org.jclouds.vcloud.VCloudLogin; diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/xml/TaskHandler.java b/vcloud/core/src/main/java/org/jclouds/vcloud/xml/TaskHandler.java index e6c76d4028..9055ccbea1 100644 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/xml/TaskHandler.java +++ b/vcloud/core/src/main/java/org/jclouds/vcloud/xml/TaskHandler.java @@ -29,12 +29,12 @@ import java.util.Date; import javax.annotation.Resource; import javax.inject.Inject; +import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.logging.Logger; import org.jclouds.rest.domain.Link; import org.jclouds.rest.domain.NamedLink; import org.jclouds.rest.util.Utils; -import org.jclouds.util.DateService; import org.jclouds.vcloud.domain.Task; import org.jclouds.vcloud.domain.TaskStatus; import org.jclouds.vcloud.domain.internal.TaskImpl; diff --git a/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudLoginTest.java b/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudLoginTest.java index 12ee37f72d..2736b9bc6c 100755 --- a/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudLoginTest.java +++ b/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudLoginTest.java @@ -32,13 +32,13 @@ import java.net.URI; import javax.ws.rs.core.HttpHeaders; +import org.jclouds.encryption.internal.JCEEncryptionService; import org.jclouds.http.filters.BasicAuthentication; import org.jclouds.logging.Logger; import org.jclouds.logging.Logger.LoggerFactory; import org.jclouds.rest.RestClientTest; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.jclouds.rest.internal.RestAnnotationProcessor; -import org.jclouds.util.internal.JCEEncryptionService; import org.jclouds.vcloud.functions.ParseLoginResponseFromHeaders; import org.testng.annotations.Test; diff --git a/vcloud/core/src/test/java/org/jclouds/vcloud/xml/TaskHandlerTest.java b/vcloud/core/src/test/java/org/jclouds/vcloud/xml/TaskHandlerTest.java index d2040be29b..e6a8eb7e47 100644 --- a/vcloud/core/src/test/java/org/jclouds/vcloud/xml/TaskHandlerTest.java +++ b/vcloud/core/src/test/java/org/jclouds/vcloud/xml/TaskHandlerTest.java @@ -28,9 +28,9 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; import java.net.URI; +import org.jclouds.date.DateService; import org.jclouds.http.functions.BaseHandlerTest; import org.jclouds.rest.domain.internal.NamedLinkImpl; -import org.jclouds.util.DateService; import org.jclouds.vcloud.VCloudMediaType; import org.jclouds.vcloud.domain.Task; import org.jclouds.vcloud.domain.TaskStatus; diff --git a/vcloud/core/src/test/java/org/jclouds/vcloud/xml/TasksListHandlerTest.java b/vcloud/core/src/test/java/org/jclouds/vcloud/xml/TasksListHandlerTest.java index c347a33d0b..ead800fbe3 100644 --- a/vcloud/core/src/test/java/org/jclouds/vcloud/xml/TasksListHandlerTest.java +++ b/vcloud/core/src/test/java/org/jclouds/vcloud/xml/TasksListHandlerTest.java @@ -28,9 +28,9 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; import java.net.URI; +import org.jclouds.date.DateService; import org.jclouds.http.functions.BaseHandlerTest; import org.jclouds.rest.domain.internal.NamedLinkImpl; -import org.jclouds.util.DateService; import org.jclouds.vcloud.VCloudMediaType; import org.jclouds.vcloud.domain.Task; import org.jclouds.vcloud.domain.TaskStatus; diff --git a/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/xml/VirtualSystemHandler.java b/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/xml/VirtualSystemHandler.java index f6c8697abf..31f5644ef7 100644 --- a/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/xml/VirtualSystemHandler.java +++ b/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/xml/VirtualSystemHandler.java @@ -27,8 +27,8 @@ import java.util.Date; import javax.inject.Inject; +import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; -import org.jclouds.util.DateService; import org.xml.sax.Attributes; import org.xml.sax.SAXException;