From df7d2acbb4ab3833c60fc9b1589fd513ff44a66d Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Mon, 23 Apr 2012 19:14:36 -0700 Subject: [PATCH] wrapper -> view --- .../taskdefs/compute/ComputeTaskUtils.java | 2 +- .../org/jclouds/atmos/AtmosApiMetadata.java | 2 +- .../jclouds/atmos/AtmosClientLiveTest.java | 2 +- .../blobstore/integration/AtmosLiveTest.java | 2 +- .../org/jclouds/byon/BYONApiMetadata.java | 2 +- .../cloudfiles/CloudFilesApiMetadata.java | 2 +- .../cloudfiles/CloudFilesAsyncClient.java | 2 +- .../jclouds/cloudfiles/CloudFilesClient.java | 2 +- .../cloudfiles/CloudFilesClientLiveTest.java | 2 +- .../CloudLoadBalancersApiMetadata.java | 2 +- .../BaseCloudLoadBalancersClientLiveTest.java | 8 +- .../cloudservers/CloudServersApiMetadata.java | 2 +- .../cloudservers/CloudServersAsyncClient.java | 2 +- .../cloudservers/CloudServersClient.java | 2 +- .../CloudServersClientLiveTest.java | 2 +- .../cloudsigma/CloudSigmaApiMetadata.java | 2 +- .../cloudsigma/CloudSigmaClientLiveTest.java | 4 +- .../cloudstack/CloudStackApiMetadata.java | 2 +- .../ParseAsyncJobsFromHttpResponse.java | 4 +- .../ParseEventTypesFromHttpResponse.java | 4 +- .../ParseIdToNameFromHttpResponse.java | 4 +- .../ParseLoginResponseFromHttpResponse.java | 2 +- .../functions/ParseNamesFromHttpResponse.java | 4 +- .../internal/CloudStackContextImpl.java | 4 +- ...oudStackComputeServiceAdapterLiveTest.java | 2 +- .../compute/CloudStackExperimentLiveTest.java | 14 +-- .../BaseCloudStackClientLiveTest.java | 10 +- .../features/GlobalUserClientLiveTest.java | 2 +- .../cloudwatch/CloudWatchApiMetadataTest.java | 4 +- .../deltacloud/DeltacloudApiMetadata.java | 2 +- .../ReadOnlyDeltacloudClientLiveTest.java | 2 +- .../DeltacloudTemplateBuilderLiveTest.java | 2 +- .../java/org/jclouds/ec2/EC2ApiMetadata.java | 2 +- .../EC2ComputeServiceContextImpl.java | 4 +- ...icationArchitecturesEC2ClientLiveTest.java | 2 +- .../jclouds/ec2/EBSBootEC2ClientLiveTest.java | 2 +- .../compute/EC2ComputeServiceLiveTest.java | 16 ++-- .../compute/EC2TemplateBuilderLiveTest.java | 4 +- .../compute/TestCanRecreateGroupLiveTest.java | 12 +-- ...ailabilityZoneAndRegionClientLiveTest.java | 2 +- .../ElasticBlockStoreClientLiveTest.java | 4 +- .../ElasticIPAddressClientLiveTest.java | 2 +- .../ec2/services/InstanceClientLiveTest.java | 2 +- .../ec2/services/KeyPairClientLiveTest.java | 2 +- .../services/SecurityGroupClientLiveTest.java | 4 +- .../ec2/services/WindowsClientLiveTest.java | 6 +- .../elasticstack/ElasticStackApiMetadata.java | 2 +- .../ElasticStackClientLiveTest.java | 4 +- .../filesystem/FilesystemApiMetadata.java | 2 +- ...ystemContainerIntegrationTestDisabled.java | 4 +- .../openstack/nova/NovaApiMetadata.java | 2 +- .../openstack/nova/NovaAsyncClient.java | 2 +- .../jclouds/openstack/nova/NovaClient.java | 2 +- .../openstack/nova/NovaClientLiveTest.java | 2 +- .../openstack/nova/v1_1/NovaApiMetadata.java | 2 +- .../nova/v1_1/compute/NovaComputeService.java | 4 +- .../nova/v1_1/config/NovaParserModule.java | 6 +- .../v1_1/internal/BaseNovaClientLiveTest.java | 2 +- .../java/org/jclouds/s3/S3ApiMetadata.java | 2 +- .../java/org/jclouds/s3/S3AsyncClient.java | 2 +- .../main/java/org/jclouds/s3/S3Client.java | 2 +- .../internal/S3BlobStoreContextImpl.java | 4 +- .../java/org/jclouds/s3/S3ClientLiveTest.java | 2 +- .../jclouds/s3/services/BucketsLiveTest.java | 2 +- .../openstack/swift/SwiftApiMetadata.java | 2 +- .../openstack/swift/SwiftClientLiveTest.java | 2 +- .../SwiftBlobIntegrationLiveTest.java | 2 +- .../org/jclouds/vcloud/VCloudApiMetadata.java | 2 +- .../features/CatalogClientLiveTest.java | 2 +- .../internal/BaseVCloudClientLiveTest.java | 4 +- .../jclouds/blobstore/BlobStoreContext.java | 8 +- .../blobstore/TransientApiMetadata.java | 2 +- .../internal/BlobStoreContextImpl.java | 8 +- .../TransientContainerIntegrationTest.java | 6 +- .../internal/BaseBlobIntegrationTest.java | 70 +++++++------- .../internal/BaseBlobLiveTest.java | 8 +- .../internal/BaseBlobMapIntegrationTest.java | 26 ++--- .../internal/BaseBlobSignerLiveTest.java | 32 +++---- .../BaseBlobStoreIntegrationTest.java | 42 ++++----- .../BaseContainerIntegrationTest.java | 94 +++++++++---------- .../internal/BaseContainerLiveTest.java | 10 +- .../BaseInputStreamMapIntegrationTest.java | 32 +++---- .../internal/BaseMapIntegrationTest.java | 30 +++--- .../internal/BaseServiceIntegrationTest.java | 14 +-- .../BaseBlobStoreApiMetadataTest.java | 4 +- .../internal/TerremarkVCloudApiMetadata.java | 2 +- .../vcloud_0_8/TerremarkClientLiveTest.java | 16 ++-- .../VAppTemplatesInOrgsLiveTest.java | 2 +- .../internal/BaseTerremarkClientLiveTest.java | 4 +- .../compute/ComputeServiceContext.java | 8 +- .../internal/ComputeServiceContextImpl.java | 8 +- .../jclouds/compute/stub/StubApiMetadata.java | 2 +- .../BaseComputeServiceApiMetadataTest.java | 4 +- .../BaseComputeServiceContextLiveTest.java | 2 +- .../internal/BaseComputeServiceLiveTest.java | 18 ++-- ...eGenericComputeServiceContextLiveTest.java | 4 +- .../internal/BaseImageExtensionLiveTest.java | 14 +-- .../internal/BaseTemplateBuilderLiveTest.java | 36 +++---- .../main/java/org/jclouds/ContextBuilder.java | 28 +++--- .../org/jclouds/{Wrapper.java => View.java} | 22 ++--- .../java/org/jclouds/apis/ApiMetadata.java | 16 ++-- .../java/org/jclouds/apis/ApiPredicates.java | 8 +- core/src/main/java/org/jclouds/apis/Apis.java | 18 ++-- .../apis/internal/BaseApiMetadata.java | 36 +++---- .../{BaseWrapper.java => BaseView.java} | 35 ++++--- .../jclouds/providers/ProviderPredicates.java | 12 +-- .../java/org/jclouds/providers/Providers.java | 54 +++++------ ...ProviderMetadataContextAndCredentials.java | 4 +- .../main/java/org/jclouds/rest/Providers.java | 10 +- .../org/jclouds/rest/RestContextFactory.java | 6 +- .../rest/internal/AsyncRestClientProxy.java | 2 +- .../test/java/org/jclouds/apis/ApisTest.java | 6 +- .../test/java/org/jclouds/apis/Balancer.java | 4 +- ...perLiveTest.java => BaseViewLiveTest.java} | 16 ++-- .../test/java/org/jclouds/apis/Compute.java | 4 +- .../apis/JcloudsTestBlobStoreApiMetadata.java | 2 +- .../apis/JcloudsTestComputeApiMetadata.java | 2 +- ...loudsTestYetAnotherComputeApiMetadata.java | 2 +- .../test/java/org/jclouds/apis/Storage.java | 4 +- .../apis/internal/BaseApiMetadataTest.java | 14 +-- ...BaseWrapperTest.java => BaseViewTest.java} | 12 +-- .../org/jclouds/providers/ProvidersTest.java | 6 +- ...iderMetadataContextAndCredentialsTest.java | 10 +- .../internal/BaseProviderMetadataTest.java | 12 +-- .../internal/BaseRestApiMetadataTest.java | 6 +- .../internal/RestAnnotationProcessorTest.java | 6 +- .../java/org/jclouds/elb/ELBApiMetadata.java | 2 +- .../org/jclouds/glesys/GleSYSApiMetadata.java | 2 +- .../ParseTemplatesFromHttpResponse.java | 6 +- .../GleSYSTemplateBuilderLiveTest.java | 2 +- .../internal/BaseGleSYSClientLiveTest.java | 2 +- .../java/org/jclouds/nodepool/AppTest.java | 2 +- .../swift/v1/SwiftApiMetadataTest.java | 4 +- .../servers/OpSourceServersApiMetadata.java | 2 +- .../jclouds/savvis/vpdc/VPDCApiMetadata.java | 2 +- .../compute/VPDCTemplateBuilderLiveTest.java | 2 +- .../vpdc/features/VMClientLiveTest.java | 2 +- .../v1_5/VCloudDirectorApiMetadata.java | 2 +- .../director/v1_5/domain/Capabilities.java | 4 +- .../vcloud/director/v1_5/domain/Catalog.java | 4 +- .../vcloud/director/v1_5/domain/Entity.java | 4 +- .../vcloud/director/v1_5/domain/Group.java | 4 +- .../director/v1_5/domain/ResourceEntity.java | 4 +- .../vcloud/director/v1_5/domain/User.java | 4 +- .../director/v1_5/domain/VAppTemplate.java | 4 +- .../vcloud/director/v1_5/domain/Vdc.java | 6 +- .../director/v1_5/domain/org/AdminOrg.java | 12 +-- .../domain/params/ControlAccessParams.java | 4 +- .../v1_5/VCloudDirectorApiMetadataTest.java | 4 +- .../BaseVCloudDirectorClientLiveTest.java | 2 +- .../virtualbox/VirtualBoxApiMetadata.java | 2 +- .../jclouds/virtualbox/domain/ErrorCode.java | 6 +- .../BaseVirtualBoxClientLiveTest.java | 12 +-- ...rtualBoxComputeServiceAdapterLiveTest.java | 4 +- ...romIMachineIfNotAlreadyExistsLiveTest.java | 4 +- .../functions/CreateAndInstallVmLiveTest.java | 4 +- ...hineFromIsoIfNotAlreadyExistsLiveTest.java | 4 +- .../GuestAdditionsInstallerLiveTest.java | 4 +- .../IMachinePredicatesLiveTest.java | 4 +- .../util/MachineControllerLiveTest.java | 4 +- .../virtualbox/util/MachineUtilsLiveTest.java | 4 +- .../LoadBalancerServiceContext.java | 8 +- .../LoadBalancerServiceContextImpl.java | 10 +- .../BaseLoadBalancerServiceLiveTest.java | 6 +- ...aseLoadBalancerServiceApiMetadataTest.java | 4 +- .../jclouds/aws/ec2/AWSEC2ApiMetadata.java | 2 +- .../AWSEC2ComputeServiceContextImpl.java | 6 +- .../compute/AWSEC2ComputeServiceLiveTest.java | 12 +-- .../AWSEC2TemplateBuilderLiveTest.java | 32 +++---- .../aws/ec2/services/AMIClientLiveTest.java | 12 +-- .../ec2/services/AWSAMIClientLiveTest.java | 4 +- .../services/AWSInstanceClientLiveTest.java | 4 +- .../services/AWSKeyPairClientLiveTest.java | 14 +-- .../services/MonitoringClientLiveTest.java | 2 +- .../PlacementGroupClientLiveTest.java | 10 +- .../services/SpotInstanceClientLiveTest.java | 2 +- .../aws/ec2/services/TagClientLiveTest.java | 8 +- .../org/jclouds/aws/s3/AWSS3ApiMetadata.java | 2 +- .../internal/AWSS3BlobStoreContextImpl.java | 4 +- .../jclouds/aws/s3/AWSS3ClientLiveTest.java | 8 +- .../azureblob/AzureBlobApiMetadata.java | 2 +- .../azureblob/AzureBlobAsyncClient.java | 2 +- .../jclouds/azureblob/AzureBlobClient.java | 2 +- .../azureblob/AzureBlobClientLiveTest.java | 6 +- ...ckVCloudZone01TemplateBuilderLiveTest.java | 2 +- .../CloudFilesUKClientLiveTest.java | 2 +- ...CloudServersUKTemplateBuilderLiveTest.java | 2 +- ...CloudServersUSTemplateBuilderLiveTest.java | 2 +- ...dSigmaLasVegasTemplateBuilderLiveTest.java | 2 +- ...oudSigmaZurichTemplateBuilderLiveTest.java | 2 +- ...eer1LosAngelesTemplateBuilderLiveTest.java | 2 +- ...ueSquareLondonTemplateBuilderLiveTest.java | 2 +- ...stsPeer1LondonTemplateBuilderLiveTest.java | 2 +- ...eer1SanAntonioTemplateBuilderLiveTest.java | 2 +- ...tsPeer1TorontoTemplateBuilderLiveTest.java | 2 +- ...loudEucalyptusTemplateBuilderLiveTest.java | 2 +- ...dJohannesburg1TemplateBuilderLiveTest.java | 2 +- .../org/jclouds/gogrid/GoGridApiMetadata.java | 2 +- .../functions/GenericResponseContainer.java | 2 +- ...rNameToCredentialsMapFromJsonResponse.java | 2 +- .../gogrid/GoGridLiveTestDisabled.java | 2 +- .../binders/BindIdsToQueryParamsTest.java | 2 +- .../compute/GoGridComputeServiceLiveTest.java | 2 +- .../GoGridTemplateBuilderLiveTest.java | 2 +- .../services/BaseGoGridClientLiveTest.java | 2 +- ...aElementVCloudTemplateBuilderLiveTest.java | 2 +- ...HPCloudComputeTemplateBuilderLiveTest.java | 2 +- .../HPCloudObjectStorageApiMetadata.java | 2 +- .../HPCloudObjectStorageAsyncClient.java | 2 +- .../HPCloudObjectStorageClient.java | 2 +- .../extensions/HPCloudCDNAsyncClient.java | 2 +- .../extensions/HPCloudCDNClient.java | 2 +- .../HPCloudObjectStorageClientLiveTest.java | 2 +- ...inefoldComputeTemplateBuilderLiveTest.java | 4 +- ...enHostingEast1TemplateBuilderLiveTest.java | 2 +- .../miro/RimuHostingApiMetadata.java | 2 +- .../miro/domain/NewServerResponse.java | 2 +- .../domain/internal/RimuHostingResponse.java | 2 +- .../miro/RimuHostingClientLiveTest.java | 2 +- .../RimuHostingTemplateBuilderLiveTest.java | 2 +- ...loveManchesterTemplateBuilderLiveTest.java | 2 +- ...iCloudMalaysiaTemplateBuilderLiveTest.java | 2 +- .../slicehost/SlicehostApiMetadata.java | 2 +- .../slicehost/SlicehostAsyncClient.java | 2 +- .../jclouds/slicehost/SlicehostClient.java | 2 +- .../slicehost/SlicehostClientLiveTest.java | 2 +- .../SlicehostTemplateBuilderLiveTest.java | 2 +- .../softlayer/SoftLayerApiMetadata.java | 2 +- ...oftLayerComputeServiceAdapterLiveTest.java | 6 +- .../SoftLayerTemplateBuilderLiveTest.java | 16 ++-- .../features/BaseSoftLayerClientLiveTest.java | 2 +- .../features/VirtualGuestClientLiveTest.java | 2 +- ...nVCloudMyCloudTemplateBuilderLiveTest.java | 2 +- ...TerremarkECloudComputeServiceLiveTest.java | 2 +- ...erremarkECloudTemplateBuilderLiveTest.java | 2 +- .../InternetServiceLiveTest.java | 2 +- ...rkVCloudExpressComputeServiceLiveTest.java | 2 +- ...kVCloudExpressTemplateBuilderLiveTest.java | 2 +- .../TryStackNovaTemplateBuilderLiveTest.java | 2 +- .../ServerManagerApiMetadata.java | 2 +- 240 files changed, 762 insertions(+), 763 deletions(-) rename core/src/main/java/org/jclouds/{Wrapper.java => View.java} (77%) rename core/src/main/java/org/jclouds/internal/{BaseWrapper.java => BaseView.java} (71%) rename core/src/test/java/org/jclouds/apis/{BaseWrapperLiveTest.java => BaseViewLiveTest.java} (76%) rename core/src/test/java/org/jclouds/internal/{BaseWrapperTest.java => BaseViewTest.java} (85%) diff --git a/antcontrib/src/main/java/org/jclouds/tools/ant/taskdefs/compute/ComputeTaskUtils.java b/antcontrib/src/main/java/org/jclouds/tools/ant/taskdefs/compute/ComputeTaskUtils.java index f08db34618..9c6d41afb5 100644 --- a/antcontrib/src/main/java/org/jclouds/tools/ant/taskdefs/compute/ComputeTaskUtils.java +++ b/antcontrib/src/main/java/org/jclouds/tools/ant/taskdefs/compute/ComputeTaskUtils.java @@ -82,7 +82,7 @@ public class ComputeTaskUtils { return ContextBuilder.newBuilder(provider) .credentials(creds.identity, creds.credential) .modules(modules) - .overrides(props).buildAndWrapWith(ComputeServiceContext.class); + .overrides(props).buildView(ComputeServiceContext.class); } }); diff --git a/apis/atmos/src/main/java/org/jclouds/atmos/AtmosApiMetadata.java b/apis/atmos/src/main/java/org/jclouds/atmos/AtmosApiMetadata.java index c4f6f01201..82d97ed8de 100644 --- a/apis/atmos/src/main/java/org/jclouds/atmos/AtmosApiMetadata.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/AtmosApiMetadata.java @@ -85,7 +85,7 @@ public class AtmosApiMetadata extends BaseRestApiMetadata { .version("1.4.0") .defaultEndpoint("https://accesspoint.atmosonline.com") .defaultProperties(AtmosApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(BlobStoreContext.class)) + .view(TypeToken.of(BlobStoreContext.class)) .defaultModules(ImmutableSet.>of(AtmosRestClientModule.class, AtmosBlobStoreContextModule.class)); } diff --git a/apis/atmos/src/test/java/org/jclouds/atmos/AtmosClientLiveTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/AtmosClientLiveTest.java index 7c380006a7..04e9675a04 100644 --- a/apis/atmos/src/test/java/org/jclouds/atmos/AtmosClientLiveTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/AtmosClientLiveTest.java @@ -57,7 +57,7 @@ import com.google.common.collect.Sets; public class AtmosClientLiveTest extends BaseBlobStoreIntegrationTest { public AtmosClient getApi() { - return wrapper.unwrap(AtmosApiMetadata.CONTEXT_TOKEN).getApi(); + return view.unwrap(AtmosApiMetadata.CONTEXT_TOKEN).getApi(); } private static final class HeadMatches implements Runnable { diff --git a/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosLiveTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosLiveTest.java index c6e989b24c..d826318341 100644 --- a/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosLiveTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosLiveTest.java @@ -34,6 +34,6 @@ public class AtmosLiveTest extends BaseBlobLiveTest { } protected void checkMD5(String container, String name, byte[] md5) { // atmos does not support content-md5 yet - assertEquals(wrapper.getBlobStore().blobMetadata(container, name).getContentMetadata().getContentMD5(), null); + assertEquals(view.getBlobStore().blobMetadata(container, name).getContentMetadata().getContentMD5(), null); } } diff --git a/apis/byon/src/main/java/org/jclouds/byon/BYONApiMetadata.java b/apis/byon/src/main/java/org/jclouds/byon/BYONApiMetadata.java index 1aa7293702..9f8539ae7b 100644 --- a/apis/byon/src/main/java/org/jclouds/byon/BYONApiMetadata.java +++ b/apis/byon/src/main/java/org/jclouds/byon/BYONApiMetadata.java @@ -70,7 +70,7 @@ public class BYONApiMetadata extends BaseApiMetadata { .documentation(URI.create("https://github.com/jclouds/jclouds/tree/master/apis/byon")) .version(String.format("%s.%s", JcloudsVersion.get().majorVersion, JcloudsVersion.get().minorVersion)) .buildVersion(JcloudsVersion.get().toString()) - .wrapper(ComputeServiceContext.class) + .view(ComputeServiceContext.class) .defaultModules(ImmutableSet.>of(YamlNodeStoreModule.class, BYONComputeServiceContextModule.class)); } diff --git a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesApiMetadata.java b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesApiMetadata.java index 85bbdd6fd0..d2211b8395 100644 --- a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesApiMetadata.java +++ b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesApiMetadata.java @@ -83,7 +83,7 @@ public class CloudFilesApiMetadata extends BaseRestApiMetadata { .documentation(URI.create("http://docs.rackspacecloud.com/files/api/v1/cfdevguide_d5/content/ch01.html")) .version(OpenStackAuthAsyncClient.VERSION) .defaultProperties(CloudFilesApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(BlobStoreContext.class)) + .view(TypeToken.of(BlobStoreContext.class)) .defaultModules(ImmutableSet.>of(CloudFilesRestClientModule.class, CloudFilesBlobStoreContextModule.class)); } diff --git a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesAsyncClient.java b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesAsyncClient.java index 7960a92c86..14e3b28f5f 100644 --- a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesAsyncClient.java +++ b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesAsyncClient.java @@ -55,7 +55,7 @@ import com.google.common.util.concurrent.ListenableFuture; * Provides asynchronous access to Cloud Files via their REST API. *

* All commands return a ListenableFuture of the result from Cloud Files. Any exceptions incurred - * during processing will be wrapped in an {@link ExecutionException} as documented in + * during processing will be backend in an {@link ExecutionException} as documented in * {@link ListenableFuture#get()}. * * @see CloudFilesClient diff --git a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesClient.java b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesClient.java index de7a030363..e74ca1ec54 100644 --- a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesClient.java +++ b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesClient.java @@ -33,7 +33,7 @@ import org.jclouds.openstack.swift.CommonSwiftClient; * Provides access to Cloud Files via their REST API. *

* All commands return a Future of the result from Cloud Files. Any exceptions incurred during - * processing will be wrapped in an {@link ExecutionException} as documented in {@link Future#get()}. + * processing will be backend in an {@link ExecutionException} as documented in {@link Future#get()}. * * @see * @author Adrian Cole diff --git a/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/CloudFilesClientLiveTest.java b/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/CloudFilesClientLiveTest.java index 38fa4b8d3b..7d4a2282fd 100644 --- a/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/CloudFilesClientLiveTest.java +++ b/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/CloudFilesClientLiveTest.java @@ -47,7 +47,7 @@ public class CloudFilesClientLiveTest extends CommonSwiftClientLiveTest>of(CloudLoadBalancersRestClientModule.class, CloudLoadBalancersLoadBalancerContextModule.class)); } diff --git a/apis/cloudloadbalancers/src/test/java/org/jclouds/cloudloadbalancers/internal/BaseCloudLoadBalancersClientLiveTest.java b/apis/cloudloadbalancers/src/test/java/org/jclouds/cloudloadbalancers/internal/BaseCloudLoadBalancersClientLiveTest.java index 684aecb26f..72e734af0c 100644 --- a/apis/cloudloadbalancers/src/test/java/org/jclouds/cloudloadbalancers/internal/BaseCloudLoadBalancersClientLiveTest.java +++ b/apis/cloudloadbalancers/src/test/java/org/jclouds/cloudloadbalancers/internal/BaseCloudLoadBalancersClientLiveTest.java @@ -20,7 +20,7 @@ package org.jclouds.cloudloadbalancers.internal; import java.util.concurrent.TimeUnit; -import org.jclouds.apis.BaseWrapperLiveTest; +import org.jclouds.apis.BaseViewLiveTest; import org.jclouds.cloudloadbalancers.CloudLoadBalancersAsyncClient; import org.jclouds.cloudloadbalancers.CloudLoadBalancersClient; import org.jclouds.cloudloadbalancers.domain.LoadBalancer; @@ -42,7 +42,7 @@ import com.google.inject.Injector; * * @author Adrian Cole */ -public class BaseCloudLoadBalancersClientLiveTest extends BaseWrapperLiveTest { +public class BaseCloudLoadBalancersClientLiveTest extends BaseViewLiveTest { public BaseCloudLoadBalancersClientLiveTest() { provider = "cloudloadbalancers"; @@ -61,7 +61,7 @@ public class BaseCloudLoadBalancersClientLiveTest extends BaseWrapperLiveTest wrapperType() { + protected TypeToken viewType() { return TypeToken.of(LoadBalancerServiceContext.class); } diff --git a/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersApiMetadata.java b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersApiMetadata.java index 208fb51b30..954355dfbe 100644 --- a/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersApiMetadata.java +++ b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersApiMetadata.java @@ -77,7 +77,7 @@ public class CloudServersApiMetadata extends BaseRestApiMetadata { .version(OpenStackAuthAsyncClient.VERSION) .defaultEndpoint("https://auth.api.rackspacecloud.com") .defaultProperties(CloudServersApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(ComputeServiceContext.class)) + .view(TypeToken.of(ComputeServiceContext.class)) .defaultModules(ImmutableSet.>of(CloudServersRestClientModule.class, CloudServersComputeServiceContextModule.class)); } diff --git a/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersAsyncClient.java b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersAsyncClient.java index 86a326e42d..9a9f31ca40 100644 --- a/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersAsyncClient.java +++ b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersAsyncClient.java @@ -69,7 +69,7 @@ import com.google.common.util.concurrent.ListenableFuture; * Provides asynchronous access to Cloud Servers via their REST API. *

* All commands return a ListenableFuture of the result from Cloud Servers. Any exceptions incurred - * during processing will be wrapped in an {@link ExecutionException} as documented in + * during processing will be backend in an {@link ExecutionException} as documented in * {@link ListenableFuture#get()}. * * @see CloudServersClient diff --git a/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersClient.java b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersClient.java index 54f2207575..517104fd93 100644 --- a/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersClient.java +++ b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersClient.java @@ -44,7 +44,7 @@ import org.jclouds.rest.ResourceNotFoundException; * Provides access to Cloud Servers via their REST API. *

* All commands return a Future of the result from Cloud Servers. Any exceptions incurred during - * processing will be wrapped in an {@link ExecutionException} as documented in {@link Future#get()}. + * processing will be backend in an {@link ExecutionException} as documented in {@link Future#get()}. * * @see CloudServersAsyncClient * @see diff --git a/apis/cloudservers/src/test/java/org/jclouds/cloudservers/CloudServersClientLiveTest.java b/apis/cloudservers/src/test/java/org/jclouds/cloudservers/CloudServersClientLiveTest.java index 45e6e2ad26..eca7ef3d62 100644 --- a/apis/cloudservers/src/test/java/org/jclouds/cloudservers/CloudServersClientLiveTest.java +++ b/apis/cloudservers/src/test/java/org/jclouds/cloudservers/CloudServersClientLiveTest.java @@ -85,7 +85,7 @@ public class CloudServersClientLiveTest extends BaseComputeServiceContextLiveTes @Override public void setupContext() { super.setupContext(); - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); client = injector.getInstance(CloudServersClient.class); sshFactory = injector.getInstance(SshClient.Factory.class); SocketOpen socketOpen = injector.getInstance(SocketOpen.class); diff --git a/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/CloudSigmaApiMetadata.java b/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/CloudSigmaApiMetadata.java index 28be12c28c..6ea2798e47 100644 --- a/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/CloudSigmaApiMetadata.java +++ b/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/CloudSigmaApiMetadata.java @@ -82,7 +82,7 @@ public class CloudSigmaApiMetadata extends BaseRestApiMetadata { .version("1.0") .defaultEndpoint("https://api.cloudsigma.com") .defaultProperties(CloudSigmaApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(ComputeServiceContext.class)) + .view(TypeToken.of(ComputeServiceContext.class)) .defaultModules(ImmutableSet.>of(CloudSigmaRestClientModule.class, CloudSigmaComputeServiceContextModule.class)); } diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/CloudSigmaClientLiveTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/CloudSigmaClientLiveTest.java index ef1a4438c9..e8b0a729ff 100644 --- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/CloudSigmaClientLiveTest.java +++ b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/CloudSigmaClientLiveTest.java @@ -89,7 +89,7 @@ public class CloudSigmaClientLiveTest extends BaseComputeServiceContextLiveTest @Override public void setupContext() { super.setupContext(); - cloudSigmaContext = wrapper.unwrap(); + cloudSigmaContext = view.unwrap(); client = cloudSigmaContext.getApi(); driveNotClaimed = new RetryablePredicate(Predicates.not(new DriveClaimed(client)), maxDriveImageTime, @@ -98,7 +98,7 @@ public class CloudSigmaClientLiveTest extends BaseComputeServiceContextLiveTest TimeUnit.SECONDS); if (Strings.emptyToNull(imageId) == null) { - imageId = wrapper.getComputeService().templateBuilder().build().getImage().getId(); + imageId = view.getComputeService().templateBuilder().build().getImage().getId(); } } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApiMetadata.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApiMetadata.java index ac6981292f..cdb671f895 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApiMetadata.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApiMetadata.java @@ -89,7 +89,7 @@ public class CloudStackApiMetadata extends BaseRestApiMetadata { .documentation(URI.create("http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html")) .defaultEndpoint("http://localhost:8080/client/api") .version("2.2") - .wrapper(TypeToken.of(CloudStackContext.class)) + .view(TypeToken.of(CloudStackContext.class)) .defaultProperties(CloudStackApiMetadata.defaultProperties()) .defaultModules(ImmutableSet.>of(CloudStackRestClientModule.class, CloudStackComputeServiceContextModule.class)); } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseAsyncJobsFromHttpResponse.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseAsyncJobsFromHttpResponse.java index 0cfeae650f..7c7e4515a6 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseAsyncJobsFromHttpResponse.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseAsyncJobsFromHttpResponse.java @@ -46,10 +46,10 @@ public class ParseAsyncJobsFromHttpResponse implements Function>>>( - checkNotNull(gsonWrapper, "gsonWrapper"), + checkNotNull(gsonView, "gsonView"), new TypeLiteral>>>() { }, "asyncjobs"); } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseEventTypesFromHttpResponse.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseEventTypesFromHttpResponse.java index 341b578ef0..bf2e6ece0a 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseEventTypesFromHttpResponse.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseEventTypesFromHttpResponse.java @@ -54,8 +54,8 @@ public class ParseEventTypesFromHttpResponse implements Function>(checkNotNull(gsonWrapper, "gsonWrapper"), + public ParseEventTypesFromHttpResponse(GsonWrapper gsonView) { + this.parser = new ParseFirstJsonValueNamed>(checkNotNull(gsonView, "gsonView"), new TypeLiteral>() { }, "eventtype"); } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseIdToNameFromHttpResponse.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseIdToNameFromHttpResponse.java index fdd1aa8718..70ff9506a4 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseIdToNameFromHttpResponse.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseIdToNameFromHttpResponse.java @@ -78,8 +78,8 @@ public class ParseIdToNameFromHttpResponse implements Function>(checkNotNull(gsonWrapper, "gsonWrapper"), + public ParseIdToNameFromHttpResponse(GsonWrapper gsonView) { + this.parser = new ParseFirstJsonValueNamed>(checkNotNull(gsonView, "gsonView"), new TypeLiteral>() { }, "oscategory"); } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseLoginResponseFromHttpResponse.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseLoginResponseFromHttpResponse.java index 107e7d86ef..41f9635493 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseLoginResponseFromHttpResponse.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseLoginResponseFromHttpResponse.java @@ -23,7 +23,7 @@ public class ParseLoginResponseFromHttpResponse implements Function(checkNotNull(gson, "gsonWrapper"), + this.parser = new ParseFirstJsonValueNamed(checkNotNull(gson, "gsonView"), new TypeLiteral(){}, "loginresponse"); } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseNamesFromHttpResponse.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseNamesFromHttpResponse.java index 16b8af5984..2f09a47245 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseNamesFromHttpResponse.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/functions/ParseNamesFromHttpResponse.java @@ -73,8 +73,8 @@ public class ParseNamesFromHttpResponse implements Function>(checkNotNull(gsonWrapper, "gsonWrapper"), + public ParseNamesFromHttpResponse(GsonWrapper gsonView) { + this.parser = new ParseFirstJsonValueNamed>(checkNotNull(gsonView, "gsonView"), new TypeLiteral>() { }, "hypervisor"); } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/internal/CloudStackContextImpl.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/internal/CloudStackContextImpl.java index 9cc4e615cc..118bc7c8dc 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/internal/CloudStackContextImpl.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/internal/CloudStackContextImpl.java @@ -46,11 +46,11 @@ public class CloudStackContextImpl extends ComputeServiceContextImpl implements private final RestContext globalContext; @Inject - public CloudStackContextImpl(@Provider Context wrapped, @Provider TypeToken wrappedType, + public CloudStackContextImpl(@Provider Context backend, @Provider TypeToken backendType, ComputeService computeService, Utils utils, RestContext domainContext, RestContext globalContext) { - super(wrapped, wrappedType, computeService, utils); + super(backend, backendType, computeService, utils); this.domainContext = domainContext; this.globalContext = globalContext; } diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/compute/CloudStackComputeServiceAdapterLiveTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/compute/CloudStackComputeServiceAdapterLiveTest.java index 240f0a6509..41a32cc956 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/compute/CloudStackComputeServiceAdapterLiveTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/compute/CloudStackComputeServiceAdapterLiveTest.java @@ -157,7 +157,7 @@ public class CloudStackComputeServiceAdapterLiveTest extends BaseCloudStackClien public void testCreateNodeWithGroupEncodedIntoName() throws InterruptedException { String group = prefix + "-foo"; String name = group + "-node-" + new Random().nextInt(); - Template template = wrapper.getComputeService().templateBuilder().build(); + Template template = view.getComputeService().templateBuilder().build(); if (!client .getTemplateClient() diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/compute/CloudStackExperimentLiveTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/compute/CloudStackExperimentLiveTest.java index 63ff72926a..2f0f6d9842 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/compute/CloudStackExperimentLiveTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/compute/CloudStackExperimentLiveTest.java @@ -90,9 +90,9 @@ public class CloudStackExperimentLiveTest extends BaseCloudStackClientLiveTest { Network network = null; Set nodes = null; try { - assert wrapper.getComputeService().listAssignableLocations().size() > 0; + assert view.getComputeService().listAssignableLocations().size() > 0; - Template template = wrapper.getComputeService().templateBuilder().build(); + Template template = view.getComputeService().templateBuilder().build(); // get the zone we are launching into long zoneId = Long.parseLong(template.getLocation().getId()); @@ -115,7 +115,7 @@ public class CloudStackExperimentLiveTest extends BaseCloudStackClientLiveTest { template.getOptions().as(CloudStackTemplateOptions.class).networkId(network.getId()); // launch the VM - nodes = wrapper.getComputeService().createNodesInGroup(group, 1, template); + nodes = view.getComputeService().createNodesInGroup(group, 1, template); assert nodes.size() > 0; @@ -124,7 +124,7 @@ public class CloudStackExperimentLiveTest extends BaseCloudStackClientLiveTest { nodes = newTreeSet(concat(e.getSuccessfulNodes(), e.getNodeErrors().keySet())); } finally { if (nodes != null) - wrapper.getComputeService().destroyNodesMatching(NodePredicates.inGroup(group)); + view.getComputeService().destroyNodesMatching(NodePredicates.inGroup(group)); if (network != null) domainAdminContext.getApi().getNetworkClient().deleteNetwork(network.getId()); } @@ -143,14 +143,14 @@ public class CloudStackExperimentLiveTest extends BaseCloudStackClientLiveTest { SshKeyPair keyPair = client.getSSHKeyPairClient().createSSHKeyPair(keyPairName); String group = prefix + "-windows-test"; - Template template = wrapper.getComputeService().templateBuilder() + Template template = view.getComputeService().templateBuilder() .imageId("290").locationId("1") .options(new CloudStackTemplateOptions().setupStaticNat(false).keyPair(keyPairName)) .build(); NodeMetadata node = null; try { - node = getOnlyElement(wrapper.getComputeService() + node = getOnlyElement(view.getComputeService() .createNodesInGroup(group, 1, template)); String encryptedPassword = client.getVirtualMachineClient() @@ -165,7 +165,7 @@ public class CloudStackExperimentLiveTest extends BaseCloudStackClientLiveTest { } finally { if (node != null) { - wrapper.getComputeService().destroyNode(node.getId()); + view.getComputeService().destroyNode(node.getId()); } } diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/BaseCloudStackClientLiveTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/BaseCloudStackClientLiveTest.java index 23992bd69c..f750cca75c 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/BaseCloudStackClientLiveTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/BaseCloudStackClientLiveTest.java @@ -85,7 +85,7 @@ public class BaseCloudStackClientLiveTest extends BaseGenericComputeServiceConte } @Override - protected TypeToken wrapperType() { + protected TypeToken viewType() { return TypeToken.of(CloudStackContext.class); } @@ -199,14 +199,14 @@ public class BaseCloudStackClientLiveTest extends BaseGenericComputeServiceConte @Override public void setupContext() { super.setupContext(); - computeClient = wrapper.getComputeService(); - cloudStackContext = wrapper.unwrap(); + computeClient = view.getComputeService(); + cloudStackContext = view.unwrap(); client = cloudStackContext.getApi(); user = verifyCurrentUserIsOfType(cloudStackContext, Account.Type.USER); domainAdminEnabled = setupDomainAdminProperties() != null; if (domainAdminEnabled) { - domainAdminComputeContext = createWrapper(setupDomainAdminProperties(), setupModules()); + domainAdminComputeContext = createView(setupDomainAdminProperties(), setupModules()); domainAdminContext = domainAdminComputeContext.getDomainContext(); domainAdminClient = domainAdminContext.getApi(); domainAdminUser = verifyCurrentUserIsOfType(domainAdminContext, Account.Type.DOMAIN_ADMIN); @@ -215,7 +215,7 @@ public class BaseCloudStackClientLiveTest extends BaseGenericComputeServiceConte globalAdminEnabled = setupGlobalAdminProperties() != null; if (globalAdminEnabled) { - globalAdminComputeContext = createWrapper(setupGlobalAdminProperties(), setupModules()); + globalAdminComputeContext = createView(setupGlobalAdminProperties(), setupModules()); globalAdminContext = globalAdminComputeContext.getGlobalContext(); globalAdminClient = globalAdminContext.getApi(); globalAdminUser = verifyCurrentUserIsOfType(globalAdminContext, Account.Type.ADMIN); diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalUserClientLiveTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalUserClientLiveTest.java index 988e831024..87f4aab4f1 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalUserClientLiveTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalUserClientLiveTest.java @@ -84,7 +84,7 @@ public class GlobalUserClientLiveTest extends BaseCloudStackClientLiveTest { } private void checkAuthAsUser(ApiKeyPair keyPair) { - ComputeServiceContext context = createWrapper(credentialsAsProperties(keyPair), setupModules()); + ComputeServiceContext context = createView(credentialsAsProperties(keyPair), setupModules()); CloudStackClient client = context.unwrap(CloudStackApiMetadata.CONTEXT_TOKEN).getApi(); Set accounts = client.getAccountClient().listAccounts(); diff --git a/apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/CloudWatchApiMetadataTest.java b/apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/CloudWatchApiMetadataTest.java index ad68f537f7..baaabf636c 100644 --- a/apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/CloudWatchApiMetadataTest.java +++ b/apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/CloudWatchApiMetadataTest.java @@ -18,7 +18,7 @@ */ package org.jclouds.cloudwatch; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.rest.internal.BaseRestApiMetadataTest; import org.testng.annotations.Test; @@ -34,6 +34,6 @@ public class CloudWatchApiMetadataTest extends BaseRestApiMetadataTest { // no monitoring abstraction, yet public CloudWatchApiMetadataTest() { - super(new CloudWatchApiMetadata(), ImmutableSet.> of()); + super(new CloudWatchApiMetadata(), ImmutableSet.> of()); } } diff --git a/apis/deltacloud/src/main/java/org/jclouds/deltacloud/DeltacloudApiMetadata.java b/apis/deltacloud/src/main/java/org/jclouds/deltacloud/DeltacloudApiMetadata.java index 8908404e72..1b90cb3ec5 100644 --- a/apis/deltacloud/src/main/java/org/jclouds/deltacloud/DeltacloudApiMetadata.java +++ b/apis/deltacloud/src/main/java/org/jclouds/deltacloud/DeltacloudApiMetadata.java @@ -75,7 +75,7 @@ public class DeltacloudApiMetadata extends BaseRestApiMetadata { .version("0.3.0") .defaultEndpoint("http://localhost:3001/api") .defaultProperties(DeltacloudApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(ComputeServiceContext.class)) + .view(TypeToken.of(ComputeServiceContext.class)) .defaultModules(ImmutableSet.>of(DeltacloudRestClientModule.class, DeltacloudComputeServiceContextModule.class)); } diff --git a/apis/deltacloud/src/test/java/org/jclouds/deltacloud/ReadOnlyDeltacloudClientLiveTest.java b/apis/deltacloud/src/test/java/org/jclouds/deltacloud/ReadOnlyDeltacloudClientLiveTest.java index 785997633f..c87a0e852e 100644 --- a/apis/deltacloud/src/test/java/org/jclouds/deltacloud/ReadOnlyDeltacloudClientLiveTest.java +++ b/apis/deltacloud/src/test/java/org/jclouds/deltacloud/ReadOnlyDeltacloudClientLiveTest.java @@ -71,7 +71,7 @@ public class ReadOnlyDeltacloudClientLiveTest extends BaseComputeServiceContextL @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.unwrap(DeltacloudApiMetadata.CONTEXT_TOKEN).getApi(); + client = view.unwrap(DeltacloudApiMetadata.CONTEXT_TOKEN).getApi(); socketTester = new RetryablePredicate(new InetSocketAddressConnect(), 180, 1, TimeUnit.SECONDS); stateChanges = ImmutableMap.> of(// Instance.State.RUNNING, new RetryablePredicate(new InstanceRunning(client), 600, 1, diff --git a/apis/deltacloud/src/test/java/org/jclouds/deltacloud/compute/DeltacloudTemplateBuilderLiveTest.java b/apis/deltacloud/src/test/java/org/jclouds/deltacloud/compute/DeltacloudTemplateBuilderLiveTest.java index 9788ba9a75..acbda95347 100644 --- a/apis/deltacloud/src/test/java/org/jclouds/deltacloud/compute/DeltacloudTemplateBuilderLiveTest.java +++ b/apis/deltacloud/src/test/java/org/jclouds/deltacloud/compute/DeltacloudTemplateBuilderLiveTest.java @@ -70,7 +70,7 @@ public class DeltacloudTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTe @Test public void testTemplateBuilder() { - Template defaultTemplate = this.wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = this.view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "10.04"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/EC2ApiMetadata.java b/apis/ec2/src/main/java/org/jclouds/ec2/EC2ApiMetadata.java index 2964886a7b..8a67a39445 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/EC2ApiMetadata.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/EC2ApiMetadata.java @@ -104,7 +104,7 @@ public class EC2ApiMetadata extends BaseRestApiMetadata { .version(EC2AsyncClient.VERSION) .defaultProperties(EC2ApiMetadata.defaultProperties()) .context(CONTEXT_TOKEN) - .wrapper(EC2ComputeServiceContext.class) + .view(EC2ComputeServiceContext.class) .defaultModules(ImmutableSet.>of(EC2RestClientModule.class, EC2ResolveImagesModule.class, EC2ComputeServiceContextModule.class)); } diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/compute/internal/EC2ComputeServiceContextImpl.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/internal/EC2ComputeServiceContextImpl.java index 0b05f90d71..69099d233d 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/compute/internal/EC2ComputeServiceContextImpl.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/internal/EC2ComputeServiceContextImpl.java @@ -36,9 +36,9 @@ import com.google.common.reflect.TypeToken; @Singleton public class EC2ComputeServiceContextImpl extends ComputeServiceContextImpl implements EC2ComputeServiceContext { @Inject - public EC2ComputeServiceContextImpl(@Provider Context wrapped, @Provider TypeToken wrappedType, + public EC2ComputeServiceContextImpl(@Provider Context backend, @Provider TypeToken backendType, EC2ComputeService computeService, Utils utils) { - super(wrapped, wrappedType, computeService, utils); + super(backend, backendType, computeService, utils); } @Override diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/CloudApplicationArchitecturesEC2ClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/CloudApplicationArchitecturesEC2ClientLiveTest.java index cb2bc8dd5a..69e4ef37b4 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/CloudApplicationArchitecturesEC2ClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/CloudApplicationArchitecturesEC2ClientLiveTest.java @@ -95,7 +95,7 @@ public class CloudApplicationArchitecturesEC2ClientLiveTest extends BaseComputeS @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); client = injector.getInstance(EC2Client.class); sshFactory = injector.getInstance(SshClient.Factory.class); runningTester = new RetryablePredicate(new InstanceStateRunning(client), 180, 5, diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/EBSBootEC2ClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/EBSBootEC2ClientLiveTest.java index 2eb3b27cce..9f6f126bbd 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/EBSBootEC2ClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/EBSBootEC2ClientLiveTest.java @@ -126,7 +126,7 @@ public class EBSBootEC2ClientLiveTest extends BaseComputeServiceContextLiveTest @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); client = injector.getInstance(EC2Client.class); sshFactory = injector.getInstance(SshClient.Factory.class); SocketOpen socketOpen = injector.getInstance(SocketOpen.class); diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2ComputeServiceLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2ComputeServiceLiveTest.java index 795c549110..cb8fa386ff 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2ComputeServiceLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2ComputeServiceLiveTest.java @@ -102,13 +102,13 @@ public class EC2ComputeServiceLiveTest extends BaseComputeServiceLiveTest { @Test(enabled = true, dependsOnMethods = "testCompareSizes") public void testExtendedOptionsAndLogin() throws Exception { - SecurityGroupClient securityGroupClient = EC2Client.class.cast(wrapper.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi()) + SecurityGroupClient securityGroupClient = EC2Client.class.cast(view.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi()) .getSecurityGroupServices(); - KeyPairClient keyPairClient = EC2Client.class.cast(wrapper.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi()) + KeyPairClient keyPairClient = EC2Client.class.cast(view.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi()) .getKeyPairServices(); - InstanceClient instanceClient = EC2Client.class.cast(wrapper.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi()) + InstanceClient instanceClient = EC2Client.class.cast(view.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi()) .getInstanceServices(); String group = this.group + "o"; @@ -181,7 +181,7 @@ public class EC2ComputeServiceLiveTest extends BaseComputeServiceLiveTest { Properties overrides = setupProperties(); overrides.setProperty(EC2Constants.PROPERTY_EC2_AUTO_ALLOCATE_ELASTIC_IPS, "true"); - context = createWrapper(overrides, setupModules()); + context = createView(overrides, setupModules()); // create a node Set nodes = @@ -233,19 +233,19 @@ public class EC2ComputeServiceLiveTest extends BaseComputeServiceLiveTest { @Test(enabled = true) public void testMapEBS() throws Exception { - InstanceClient instanceClient = EC2Client.class.cast(wrapper.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi()) + InstanceClient instanceClient = EC2Client.class.cast(view.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi()) .getInstanceServices(); - ElasticBlockStoreClient ebsClient = EC2Client.class.cast(wrapper.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi()) + ElasticBlockStoreClient ebsClient = EC2Client.class.cast(view.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi()) .getElasticBlockStoreServices(); String group = this.group + "e"; int volumeSize = 8; - final Template template = wrapper.getComputeService().templateBuilder().hardwareId(InstanceType.M1_SMALL) + final Template template = view.getComputeService().templateBuilder().hardwareId(InstanceType.M1_SMALL) .osFamily(OsFamily.UBUNTU).osVersionMatches("10.04").imageDescriptionMatches(".*ebs.*").build(); - Location zone = Iterables.find(wrapper.getComputeService().listAssignableLocations(), new Predicate() { + Location zone = Iterables.find(view.getComputeService().listAssignableLocations(), new Predicate() { @Override public boolean apply(Location arg0) { diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderLiveTest.java index 3bbcf0c66d..7e5e09f875 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderLiveTest.java @@ -50,7 +50,7 @@ public abstract class EC2TemplateBuilderLiveTest extends BaseTemplateBuilderLive @Test public void testTemplateBuilderCanUseImageIdWithoutFetchingAllImages() throws Exception { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); String defaultImageId = defaultTemplate.getImage().getId(); String defaultImageProviderId = defaultTemplate.getImage().getProviderId(); @@ -58,7 +58,7 @@ public abstract class EC2TemplateBuilderLiveTest extends BaseTemplateBuilderLive try { // Track http commands final List commandsInvoked = Lists.newArrayList(); - context = createWrapper( + context = createView( setupProperties(), ImmutableSet. of(new Log4JLoggingModule(), TrackingJavaUrlHttpCommandExecutorService.newTrackingModule(commandsInvoked))); diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/compute/TestCanRecreateGroupLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/TestCanRecreateGroupLiveTest.java index 967b808d82..3856ed28c5 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/compute/TestCanRecreateGroupLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/TestCanRecreateGroupLiveTest.java @@ -39,18 +39,18 @@ public class TestCanRecreateGroupLiveTest extends BaseComputeServiceContextLiveT public void testCanRecreateGroup() throws Exception { String tag = PREFIX + "recreate"; - wrapper.getComputeService().destroyNodesMatching(NodePredicates.inGroup(tag)); + view.getComputeService().destroyNodesMatching(NodePredicates.inGroup(tag)); try { - Template template = wrapper.getComputeService().templateBuilder().build(); - wrapper.getComputeService().createNodesInGroup(tag, 1, template); - wrapper.getComputeService().destroyNodesMatching(NodePredicates.inGroup(tag)); - wrapper.getComputeService().createNodesInGroup(tag, 1, template); + Template template = view.getComputeService().templateBuilder().build(); + view.getComputeService().createNodesInGroup(tag, 1, template); + view.getComputeService().destroyNodesMatching(NodePredicates.inGroup(tag)); + view.getComputeService().createNodesInGroup(tag, 1, template); } catch (RunNodesException e) { System.err.println(e.getNodeErrors().keySet()); Throwables.propagate(e); } finally { - wrapper.getComputeService().destroyNodesMatching(NodePredicates.inGroup(tag)); + view.getComputeService().destroyNodesMatching(NodePredicates.inGroup(tag)); } } diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionClientLiveTest.java index b68cc8c5e2..64b3b695f7 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionClientLiveTest.java @@ -56,7 +56,7 @@ public class AvailabilityZoneAndRegionClientLiveTest extends BaseComputeServiceC @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi().getAvailabilityZoneAndRegionServices(); + client = view.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi().getAvailabilityZoneAndRegionServices(); } public void testDescribeAvailabilityZones() { diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticBlockStoreClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticBlockStoreClientLiveTest.java index 4945931110..b2618f72c9 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticBlockStoreClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticBlockStoreClientLiveTest.java @@ -61,12 +61,12 @@ public class ElasticBlockStoreClientLiveTest extends BaseComputeServiceContextLi @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi().getElasticBlockStoreServices(); + client = view.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi().getElasticBlockStoreServices(); } @Test void testDescribeVolumes() { - for (String region : wrapper.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi().getAvailabilityZoneAndRegionServices().describeRegions().keySet()) { + for (String region : view.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi().getAvailabilityZoneAndRegionServices().describeRegions().keySet()) { SortedSet allResults = Sets.newTreeSet(client.describeVolumesInRegion(region)); assertNotNull(allResults); if (allResults.size() >= 1) { diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticIPAddressClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticIPAddressClientLiveTest.java index c623bb7968..e353312235 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticIPAddressClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticIPAddressClientLiveTest.java @@ -50,7 +50,7 @@ public class ElasticIPAddressClientLiveTest extends BaseComputeServiceContextLiv @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi().getElasticIPAddressServices(); + client = view.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi().getElasticIPAddressServices(); } @Test diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/services/InstanceClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/InstanceClientLiveTest.java index 5927c60077..dbc4fff096 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/services/InstanceClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/InstanceClientLiveTest.java @@ -49,7 +49,7 @@ public class InstanceClientLiveTest extends BaseComputeServiceContextLiveTest { @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi().getInstanceServices(); + client = view.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi().getInstanceServices(); } @Test diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/services/KeyPairClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/KeyPairClientLiveTest.java index 13e5811157..5bb966d0a1 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/services/KeyPairClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/KeyPairClientLiveTest.java @@ -51,7 +51,7 @@ public class KeyPairClientLiveTest extends BaseComputeServiceContextLiveTest { @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi().getKeyPairServices(); + client = view.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi().getKeyPairServices(); } @Test diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/services/SecurityGroupClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/SecurityGroupClientLiveTest.java index 8b4fc8db8f..369118a1e9 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/services/SecurityGroupClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/SecurityGroupClientLiveTest.java @@ -60,7 +60,7 @@ public class SecurityGroupClientLiveTest extends BaseComputeServiceContextLiveTe @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi().getSecurityGroupServices(); + client = view.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi().getSecurityGroupServices(); } @Test @@ -281,6 +281,6 @@ public class SecurityGroupClientLiveTest extends BaseComputeServiceContextLiveTe @AfterTest public void shutdown() { - wrapper.close(); + view.close(); } } diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/services/WindowsClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/WindowsClientLiveTest.java index 9cf1fc1383..0b7cecc82b 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/services/WindowsClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/WindowsClientLiveTest.java @@ -76,8 +76,8 @@ public class WindowsClientLiveTest extends BaseComputeServiceContextLiveTest { @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi().getWindowsServices(); - computeService = wrapper.getComputeService(); + client = view.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi().getWindowsServices(); + computeService = view.getComputeService(); } @@ -141,7 +141,7 @@ public class WindowsClientLiveTest extends BaseComputeServiceContextLiveTest { node.getCredentials().getPrivateKey()); // And apply it to the decryption function - WindowsLoginCredentialsFromEncryptedData f = wrapper.getUtils().getInjector().getInstance(WindowsLoginCredentialsFromEncryptedData.class); + WindowsLoginCredentialsFromEncryptedData f = view.getUtils().getInjector().getInstance(WindowsLoginCredentialsFromEncryptedData.class); LoginCredentials credentials = f.apply(dataAndKey); assertEquals(credentials.getUser(), "Administrator"); diff --git a/apis/elasticstack/src/main/java/org/jclouds/elasticstack/ElasticStackApiMetadata.java b/apis/elasticstack/src/main/java/org/jclouds/elasticstack/ElasticStackApiMetadata.java index c76b0cf3d0..847e05cc0d 100644 --- a/apis/elasticstack/src/main/java/org/jclouds/elasticstack/ElasticStackApiMetadata.java +++ b/apis/elasticstack/src/main/java/org/jclouds/elasticstack/ElasticStackApiMetadata.java @@ -85,7 +85,7 @@ public class ElasticStackApiMetadata extends BaseRestApiMetadata { .version("1.0") .defaultEndpoint("https://api.lon-p.elastichosts.com") .defaultProperties(ElasticStackApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(ComputeServiceContext.class)) + .view(TypeToken.of(ComputeServiceContext.class)) .defaultModules(ImmutableSet.>of(ElasticStackRestClientModule.class, ElasticStackComputeServiceContextModule.class)); } diff --git a/apis/elasticstack/src/test/java/org/jclouds/elasticstack/ElasticStackClientLiveTest.java b/apis/elasticstack/src/test/java/org/jclouds/elasticstack/ElasticStackClientLiveTest.java index a454360888..5365d502c7 100644 --- a/apis/elasticstack/src/test/java/org/jclouds/elasticstack/ElasticStackClientLiveTest.java +++ b/apis/elasticstack/src/test/java/org/jclouds/elasticstack/ElasticStackClientLiveTest.java @@ -88,7 +88,7 @@ public class ElasticStackClientLiveTest @Override public void setupContext() { super.setupContext(); - cloudStackContext = wrapper.unwrap(); + cloudStackContext = view.unwrap(); client = cloudStackContext.getApi(); driveNotClaimed = new RetryablePredicate(Predicates.not(new DriveClaimed(client)), maxDriveImageTime, @@ -97,7 +97,7 @@ public class ElasticStackClientLiveTest TimeUnit.SECONDS); if (Strings.emptyToNull(imageId) == null) { - imageId = wrapper.getComputeService().templateBuilder().build().getImage().getId(); + imageId = view.getComputeService().templateBuilder().build().getImage().getId(); } } diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/FilesystemApiMetadata.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/FilesystemApiMetadata.java index 3ea463e4f9..fc5425fd38 100644 --- a/apis/filesystem/src/main/java/org/jclouds/filesystem/FilesystemApiMetadata.java +++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/FilesystemApiMetadata.java @@ -63,7 +63,7 @@ public class FilesystemApiMetadata extends BaseApiMetadata { .defaultCredential("bar") .version("1") .documentation(URI.create("http://www.jclouds.org/documentation/userguide/blobstore-guide")) - .wrapper(BlobStoreContext.class) + .view(BlobStoreContext.class) .defaultModule(FilesystemBlobStoreContextModule.class); } diff --git a/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemContainerIntegrationTestDisabled.java b/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemContainerIntegrationTestDisabled.java index b78f1704b1..2b8aeed82a 100644 --- a/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemContainerIntegrationTestDisabled.java +++ b/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemContainerIntegrationTestDisabled.java @@ -62,14 +62,14 @@ public class FilesystemContainerIntegrationTestDisabled extends BaseContainerInt // NOTE all metadata in jclouds comes out as lowercase, in an effort to normalize the // providers. - Blob object = wrapper.getBlobStore().blobBuilder(key).userMetadata(ImmutableMap.of("Adrian", "powderpuff")) + Blob object = view.getBlobStore().blobBuilder(key).userMetadata(ImmutableMap.of("Adrian", "powderpuff")) .payload(TEST_STRING).contentType(MediaType.TEXT_PLAIN).build(); String containerName = getContainerName(); try { addBlobToContainer(containerName, object); validateContent(containerName, key); - PageSet container = wrapper.getBlobStore().list(containerName, maxResults(1)); + PageSet container = view.getBlobStore().list(containerName, maxResults(1)); BlobMetadata metadata = (BlobMetadata) Iterables.getOnlyElement(container); // transient container should be lenient and not return metadata on undetailed listing. diff --git a/apis/nova/src/main/java/org/jclouds/openstack/nova/NovaApiMetadata.java b/apis/nova/src/main/java/org/jclouds/openstack/nova/NovaApiMetadata.java index 60540982d9..86d34c8ac7 100644 --- a/apis/nova/src/main/java/org/jclouds/openstack/nova/NovaApiMetadata.java +++ b/apis/nova/src/main/java/org/jclouds/openstack/nova/NovaApiMetadata.java @@ -76,7 +76,7 @@ public class NovaApiMetadata extends BaseRestApiMetadata { .version("1.1") .defaultEndpoint("http://localhost:5000") .defaultProperties(NovaApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(ComputeServiceContext.class)) + .view(TypeToken.of(ComputeServiceContext.class)) .defaultModules(ImmutableSet.>of(NovaRestClientModule.class, NovaComputeServiceContextModule.class)); } diff --git a/apis/nova/src/main/java/org/jclouds/openstack/nova/NovaAsyncClient.java b/apis/nova/src/main/java/org/jclouds/openstack/nova/NovaAsyncClient.java index 2fbfa44b0f..6096ec6ba8 100644 --- a/apis/nova/src/main/java/org/jclouds/openstack/nova/NovaAsyncClient.java +++ b/apis/nova/src/main/java/org/jclouds/openstack/nova/NovaAsyncClient.java @@ -62,7 +62,7 @@ import com.google.common.util.concurrent.ListenableFuture; * Provides asynchronous access to OpenStack Nova via their REST API. *

* All commands return a ListenableFuture of the result from OpenStack Nova. Any exceptions incurred - * during processing will be wrapped in an {@link ExecutionException} as documented in + * during processing will be backend in an {@link ExecutionException} as documented in * {@link ListenableFuture#get()}. * * @author Adrian Cole diff --git a/apis/nova/src/main/java/org/jclouds/openstack/nova/NovaClient.java b/apis/nova/src/main/java/org/jclouds/openstack/nova/NovaClient.java index 62f76adc67..9ce05aff95 100644 --- a/apis/nova/src/main/java/org/jclouds/openstack/nova/NovaClient.java +++ b/apis/nova/src/main/java/org/jclouds/openstack/nova/NovaClient.java @@ -40,7 +40,7 @@ import org.jclouds.rest.ResourceNotFoundException; * Provides access to OpenStack Nova via their REST API. *

* All commands return a Future of the result from OpenStack Nova. Any exceptions incurred - * during processing will be wrapped in an {@link ExecutionException} as documented in + * during processing will be backend in an {@link ExecutionException} as documented in * {@link Future#get()}. * * @see NovaAsyncClient diff --git a/apis/nova/src/test/java/org/jclouds/openstack/nova/NovaClientLiveTest.java b/apis/nova/src/test/java/org/jclouds/openstack/nova/NovaClientLiveTest.java index de9a7d15de..ccbdeb509d 100644 --- a/apis/nova/src/test/java/org/jclouds/openstack/nova/NovaClientLiveTest.java +++ b/apis/nova/src/test/java/org/jclouds/openstack/nova/NovaClientLiveTest.java @@ -78,7 +78,7 @@ public class NovaClientLiveTest extends BaseComputeServiceContextLiveTest { @Override public void setupContext() { super.setupContext(); - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); client = injector.getInstance(NovaClient.class); sshFactory = injector.getInstance(SshClient.Factory.class); SocketOpen socketOpen = injector.getInstance(SocketOpen.class); diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v1_1/NovaApiMetadata.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v1_1/NovaApiMetadata.java index de321c2366..efe4e7a773 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v1_1/NovaApiMetadata.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v1_1/NovaApiMetadata.java @@ -94,7 +94,7 @@ public class NovaApiMetadata extends BaseRestApiMetadata { .version("1.1") .defaultEndpoint("http://localhost:5000") .defaultProperties(NovaApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(ComputeServiceContext.class)) + .view(TypeToken.of(ComputeServiceContext.class)) .defaultModules(ImmutableSet.>of(NovaRestClientModule.class, NovaComputeServiceContextModule.class)); } diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v1_1/compute/NovaComputeService.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v1_1/compute/NovaComputeService.java index f95732648a..0481a1bf09 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v1_1/compute/NovaComputeService.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v1_1/compute/NovaComputeService.java @@ -151,8 +151,8 @@ public class NovaComputeService extends BaseComputeService { Optional keyPairClient = novaClient.getKeyPairExtensionForZone(zoneId); if (keyPairClient.isPresent()) { for (String group : groups) { - for (Map wrapper : keyPairClient.get().listKeyPairs()) { - for (KeyPair pair : Iterables.filter(wrapper.values(), + for (Map view : keyPairClient.get().listKeyPairs()) { + for (KeyPair pair : Iterables.filter(view.values(), KeyPairPredicates.nameMatches(namingConvention.create().containsGroup(group)))) { ZoneAndName zoneAndName = ZoneAndName.fromZoneAndName(zoneId, pair.getName()); logger.debug(">> deleting keypair(%s)", zoneAndName); diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v1_1/config/NovaParserModule.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v1_1/config/NovaParserModule.java index e2a50efcc8..dbe79c90a0 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v1_1/config/NovaParserModule.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v1_1/config/NovaParserModule.java @@ -55,13 +55,13 @@ public class NovaParserModule extends AbstractModule { @Singleton public static class HostResourceUsageAdapter implements JsonSerializer, JsonDeserializer { - public HostResourceUsage apply(HostResourceUsageWrapper in) { + public HostResourceUsage apply(HostResourceUsageView in) { return in.resource.toBuilder().build(); } @Override public HostResourceUsage deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context) throws JsonParseException { - return apply((HostResourceUsageWrapper) context.deserialize(jsonElement, HostResourceUsageWrapper.class)); + return apply((HostResourceUsageView) context.deserialize(jsonElement, HostResourceUsageView.class)); } @Override @@ -69,7 +69,7 @@ public class NovaParserModule extends AbstractModule { return context.serialize(hostResourceUsage); } - private static class HostResourceUsageWrapper { + private static class HostResourceUsageView { protected HostResourceUsageInternal resource; } private static class HostResourceUsageInternal extends HostResourceUsage { diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/internal/BaseNovaClientLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/internal/BaseNovaClientLiveTest.java index 44ce91a594..ca8089bf7f 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/internal/BaseNovaClientLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/internal/BaseNovaClientLiveTest.java @@ -48,7 +48,7 @@ public class BaseNovaClientLiveTest extends BaseComputeServiceContextLiveTest { @Override public void setupContext() { super.setupContext(); - novaContext = wrapper.unwrap(); + novaContext = view.unwrap(); } @Override diff --git a/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java b/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java index ae09127794..93a05fdef3 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java +++ b/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java @@ -108,7 +108,7 @@ public class S3ApiMetadata extends BaseRestApiMetadata { .version(S3AsyncClient.VERSION) .defaultProperties(S3ApiMetadata.defaultProperties()) .context(CONTEXT_TOKEN) - .wrapper(TypeToken.of(S3BlobStoreContext.class)) + .view(TypeToken.of(S3BlobStoreContext.class)) .defaultModules(ImmutableSet.>of(S3RestClientModule.class, S3BlobStoreContextModule.class)); } diff --git a/apis/s3/src/main/java/org/jclouds/s3/S3AsyncClient.java b/apis/s3/src/main/java/org/jclouds/s3/S3AsyncClient.java index 122970450a..b29b572747 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/S3AsyncClient.java +++ b/apis/s3/src/main/java/org/jclouds/s3/S3AsyncClient.java @@ -95,7 +95,7 @@ import com.google.inject.Provides; * Provides asynchronous access to S3 via their REST API. *

* All commands return a ListenableFuture of the result from S3. Any exceptions incurred during - * processing will be wrapped in an {@link ExecutionException} as documented in + * processing will be backend in an {@link ExecutionException} as documented in * {@link ListenableFuture#get()}. * * @author Adrian Cole diff --git a/apis/s3/src/main/java/org/jclouds/s3/S3Client.java b/apis/s3/src/main/java/org/jclouds/s3/S3Client.java index a393d40d78..84dd24a71c 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/S3Client.java +++ b/apis/s3/src/main/java/org/jclouds/s3/S3Client.java @@ -44,7 +44,7 @@ import com.google.inject.Provides; * Provides access to S3 via their REST API. *

* All commands return a Future of the result from S3. Any exceptions incurred during - * processing will be wrapped in an {@link ExecutionException} as documented in + * processing will be backend in an {@link ExecutionException} as documented in * {@link Future#get()}. * * @author Adrian Cole diff --git a/apis/s3/src/main/java/org/jclouds/s3/blobstore/internal/S3BlobStoreContextImpl.java b/apis/s3/src/main/java/org/jclouds/s3/blobstore/internal/S3BlobStoreContextImpl.java index 5bd193b88f..2b3e4b2ae4 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/blobstore/internal/S3BlobStoreContextImpl.java +++ b/apis/s3/src/main/java/org/jclouds/s3/blobstore/internal/S3BlobStoreContextImpl.java @@ -44,11 +44,11 @@ import com.google.common.reflect.TypeToken; public class S3BlobStoreContextImpl extends BlobStoreContextImpl implements S3BlobStoreContext { @Inject - public S3BlobStoreContextImpl(@Provider Context wrapped, @Provider TypeToken wrappedType, + public S3BlobStoreContextImpl(@Provider Context backend, @Provider TypeToken backendType, BlobMap.Factory blobMapFactory, Utils utils, ConsistencyModel consistencyModel, InputStreamMap.Factory inputStreamMapFactory, AsyncBlobStore ablobStore, BlobStore blobStore, BlobRequestSigner blobRequestSigner) { - super(wrapped, wrappedType, blobMapFactory, utils, consistencyModel, inputStreamMapFactory, ablobStore, + super(backend, backendType, blobMapFactory, utils, consistencyModel, inputStreamMapFactory, ablobStore, blobStore, blobRequestSigner); } diff --git a/apis/s3/src/test/java/org/jclouds/s3/S3ClientLiveTest.java b/apis/s3/src/test/java/org/jclouds/s3/S3ClientLiveTest.java index f143f75059..774871ee65 100644 --- a/apis/s3/src/test/java/org/jclouds/s3/S3ClientLiveTest.java +++ b/apis/s3/src/test/java/org/jclouds/s3/S3ClientLiveTest.java @@ -68,7 +68,7 @@ public class S3ClientLiveTest extends BaseBlobStoreIntegrationTest { } public S3Client getApi() { - return wrapper.unwrap(S3ApiMetadata.CONTEXT_TOKEN).getApi(); + return view.unwrap(S3ApiMetadata.CONTEXT_TOKEN).getApi(); } /** diff --git a/apis/s3/src/test/java/org/jclouds/s3/services/BucketsLiveTest.java b/apis/s3/src/test/java/org/jclouds/s3/services/BucketsLiveTest.java index 566bcc338a..ea22c1f3ff 100644 --- a/apis/s3/src/test/java/org/jclouds/s3/services/BucketsLiveTest.java +++ b/apis/s3/src/test/java/org/jclouds/s3/services/BucketsLiveTest.java @@ -71,7 +71,7 @@ public class BucketsLiveTest extends BaseBlobStoreIntegrationTest { } public S3Client getApi() { - return (S3Client) wrapper.unwrap(S3ApiMetadata.CONTEXT_TOKEN).getApi(); + return (S3Client) view.unwrap(S3ApiMetadata.CONTEXT_TOKEN).getApi(); } /** diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java index c628ae65c8..2dae10ea7c 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java @@ -83,7 +83,7 @@ public class SwiftApiMetadata extends BaseRestApiMetadata { .documentation(URI.create("http://api.openstack.org/")) .version(OpenStackAuthAsyncClient.VERSION) .defaultProperties(SwiftApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(BlobStoreContext.class)) + .view(TypeToken.of(BlobStoreContext.class)) .defaultModules(ImmutableSet.>of(SwiftRestClientModule.class, SwiftBlobStoreContextModule.class)); } diff --git a/apis/swift/src/test/java/org/jclouds/openstack/swift/SwiftClientLiveTest.java b/apis/swift/src/test/java/org/jclouds/openstack/swift/SwiftClientLiveTest.java index 6b53f0af03..6a06670bc9 100644 --- a/apis/swift/src/test/java/org/jclouds/openstack/swift/SwiftClientLiveTest.java +++ b/apis/swift/src/test/java/org/jclouds/openstack/swift/SwiftClientLiveTest.java @@ -33,7 +33,7 @@ public class SwiftClientLiveTest extends CommonSwiftClientLiveTest @Override public SwiftClient getApi() { - return wrapper.unwrap(SwiftApiMetadata.CONTEXT_TOKEN).getApi(); + return view.unwrap(SwiftApiMetadata.CONTEXT_TOKEN).getApi(); } } diff --git a/apis/swift/src/test/java/org/jclouds/openstack/swift/blobstore/integration/SwiftBlobIntegrationLiveTest.java b/apis/swift/src/test/java/org/jclouds/openstack/swift/blobstore/integration/SwiftBlobIntegrationLiveTest.java index 3bfac51d6d..aaddb68017 100644 --- a/apis/swift/src/test/java/org/jclouds/openstack/swift/blobstore/integration/SwiftBlobIntegrationLiveTest.java +++ b/apis/swift/src/test/java/org/jclouds/openstack/swift/blobstore/integration/SwiftBlobIntegrationLiveTest.java @@ -89,7 +89,7 @@ public class SwiftBlobIntegrationLiveTest extends BaseBlobIntegrationTest { String containerName = getContainerName(); try { - BlobStore blobStore = wrapper.getBlobStore(); + BlobStore blobStore = view.getBlobStore(); blobStore.createContainerInLocation(null, containerName); Blob blob = blobStore.blobBuilder("const.txt") .payload(new File("target/const.txt")).contentMD5(oneHundredOneConstitutionsMD5).build(); diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudApiMetadata.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudApiMetadata.java index eeb118be97..191d14ae5d 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudApiMetadata.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudApiMetadata.java @@ -96,7 +96,7 @@ public class VCloudApiMetadata extends BaseRestApiMetadata { .documentation(URI.create("http://www.vmware.com/support/pubs/vcd_pubs.html")) .version("1.0") .defaultProperties(VCloudApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(ComputeServiceContext.class)) + .view(TypeToken.of(ComputeServiceContext.class)) .defaultModules(ImmutableSet.>of(VCloudRestClientModule.class, VCloudComputeServiceContextModule.class)); } diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/features/CatalogClientLiveTest.java b/apis/vcloud/src/test/java/org/jclouds/vcloud/features/CatalogClientLiveTest.java index d35eba8a73..54c5021ad8 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/features/CatalogClientLiveTest.java +++ b/apis/vcloud/src/test/java/org/jclouds/vcloud/features/CatalogClientLiveTest.java @@ -49,7 +49,7 @@ public class CatalogClientLiveTest extends BaseVCloudClientLiveTest { public void testFindCatalogIsWriteableIfNotVersion1_5() throws Exception { // when we are in vCloud 1.0.0 public catalogs don't work, so our default // catalog is private - if (!wrapper.utils().injector().getInstance(Key.get(String.class, ApiVersion.class)).startsWith("1.5")) + if (!view.utils().injector().getInstance(Key.get(String.class, ApiVersion.class)).startsWith("1.5")) assertTrue(getVCloudApi().getCatalogClient().findCatalogInOrgNamed(null, null).isReadOnly()); } } \ No newline at end of file diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/internal/BaseVCloudClientLiveTest.java b/apis/vcloud/src/test/java/org/jclouds/vcloud/internal/BaseVCloudClientLiveTest.java index 7b103ab142..40c68aff3d 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/internal/BaseVCloudClientLiveTest.java +++ b/apis/vcloud/src/test/java/org/jclouds/vcloud/internal/BaseVCloudClientLiveTest.java @@ -45,14 +45,14 @@ public abstract class BaseVCloudClientLiveTest extends BaseComputeServiceContext } protected VCloudClient getVCloudApi() { - return VCloudClient.class.cast(wrapper.unwrap(VCloudApiMetadata.CONTEXT_TOKEN).getApi()); + return VCloudClient.class.cast(view.unwrap(VCloudApiMetadata.CONTEXT_TOKEN).getApi()); } @Override @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.getComputeService(); + client = view.getComputeService(); } @Override diff --git a/blobstore/src/main/java/org/jclouds/blobstore/BlobStoreContext.java b/blobstore/src/main/java/org/jclouds/blobstore/BlobStoreContext.java index c30a7adb7d..0be3c4d23d 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/BlobStoreContext.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/BlobStoreContext.java @@ -20,7 +20,7 @@ package org.jclouds.blobstore; import java.io.Closeable; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.blobstore.attr.ConsistencyModel; import org.jclouds.blobstore.internal.BlobStoreContextImpl; import org.jclouds.blobstore.options.ListContainerOptions; @@ -37,7 +37,7 @@ import com.google.inject.ImplementedBy; * */ @ImplementedBy(BlobStoreContextImpl.class) -public interface BlobStoreContext extends Closeable, Wrapper { +public interface BlobStoreContext extends Closeable, View { /** * * Generates signed requests for blobs. useful in other tools such as backup utilities. @@ -119,8 +119,8 @@ public interface BlobStoreContext extends Closeable, Wrapper { /** * will be removed in jclouds 1.6 * - * @see Wrapper#getInputType - * @see Wrapper#unwrap + * @see View#getInputType + * @see View#unwrap */ @Deprecated RestContext getProviderSpecificContext(); diff --git a/blobstore/src/main/java/org/jclouds/blobstore/TransientApiMetadata.java b/blobstore/src/main/java/org/jclouds/blobstore/TransientApiMetadata.java index 88f9fc1d07..82256b19ac 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/TransientApiMetadata.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/TransientApiMetadata.java @@ -61,7 +61,7 @@ public class TransientApiMetadata extends BaseApiMetadata { .defaultIdentity(System.getProperty("user.name")) .defaultCredential("bar") .version("1") - .wrapper(BlobStoreContext.class) + .view(BlobStoreContext.class) .defaultModule(TransientBlobStoreContextModule.class) .documentation(URI.create("http://www.jclouds.org/documentation/userguide/blobstore-guide")); } diff --git a/blobstore/src/main/java/org/jclouds/blobstore/internal/BlobStoreContextImpl.java b/blobstore/src/main/java/org/jclouds/blobstore/internal/BlobStoreContextImpl.java index ff949ff39d..64ab7f718f 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/internal/BlobStoreContextImpl.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/internal/BlobStoreContextImpl.java @@ -32,7 +32,7 @@ import org.jclouds.blobstore.BlobStoreContext; import org.jclouds.blobstore.InputStreamMap; import org.jclouds.blobstore.attr.ConsistencyModel; import org.jclouds.blobstore.options.ListContainerOptions; -import org.jclouds.internal.BaseWrapper; +import org.jclouds.internal.BaseView; import org.jclouds.location.Provider; import org.jclouds.rest.RestContext; import org.jclouds.rest.Utils; @@ -44,7 +44,7 @@ import com.google.common.reflect.TypeToken; * @author Adrian Cole */ @Singleton -public class BlobStoreContextImpl extends BaseWrapper implements BlobStoreContext { +public class BlobStoreContextImpl extends BaseView implements BlobStoreContext { private final BlobMap.Factory blobMapFactory; private final InputStreamMap.Factory inputStreamMapFactory; private final AsyncBlobStore ablobStore; @@ -54,11 +54,11 @@ public class BlobStoreContextImpl extends BaseWrapper implements BlobStoreContex private final BlobRequestSigner blobRequestSigner; @Inject - public BlobStoreContextImpl(@Provider Context wrapped, @Provider TypeToken wrappedType, + public BlobStoreContextImpl(@Provider Context backend, @Provider TypeToken backendType, BlobMap.Factory blobMapFactory, Utils utils, ConsistencyModel consistencyModel, InputStreamMap.Factory inputStreamMapFactory, AsyncBlobStore ablobStore, BlobStore blobStore, BlobRequestSigner blobRequestSigner) { - super(wrapped, wrappedType); + super(backend, backendType); this.consistencyModel = checkNotNull(consistencyModel, "consistencyModel"); this.blobMapFactory = checkNotNull(blobMapFactory, "blobMapFactory"); this.inputStreamMapFactory = checkNotNull(inputStreamMapFactory, "inputStreamMapFactory"); diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/TransientContainerIntegrationTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/TransientContainerIntegrationTest.java index 991cc4a365..ee01ee3206 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/TransientContainerIntegrationTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/TransientContainerIntegrationTest.java @@ -53,7 +53,7 @@ public class TransientContainerIntegrationTest extends BaseContainerIntegrationT String key = "hello"; // NOTE all metadata in jclouds comes out as lowercase, in an effort to normalize the // providers. - Blob blob = wrapper.getBlobStore().blobBuilder("hello").userMetadata(ImmutableMap.of("Adrian", "powderpuff")) + Blob blob = view.getBlobStore().blobBuilder("hello").userMetadata(ImmutableMap.of("Adrian", "powderpuff")) .payload(TEST_STRING).contentType(MediaType.TEXT_PLAIN).build(); String containerName = getContainerName(); @@ -61,7 +61,7 @@ public class TransientContainerIntegrationTest extends BaseContainerIntegrationT addBlobToContainer(containerName, blob); validateContent(containerName, key); - PageSet container = wrapper.getBlobStore().list(containerName, maxResults(1)); + PageSet container = view.getBlobStore().list(containerName, maxResults(1)); BlobMetadata metadata = (BlobMetadata) getOnlyElement(container); // transient container should be lenient and not return metadata on undetailed listing. @@ -75,7 +75,7 @@ public class TransientContainerIntegrationTest extends BaseContainerIntegrationT @Test(groups = { "integration", "live" }) public void testDuplicateCreateContainer() { - BlobStore blobStore = wrapper.getBlobStore(); + BlobStore blobStore = view.getBlobStore(); Location location = null; String container = "container"; boolean created; 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 e5ce9ae03a..753d27bb2f 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java @@ -141,15 +141,15 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { @Override public Void call() throws Exception { String name = blobCount.incrementAndGet() + ""; - Blob blob = wrapper.getBlobStore().blobBuilder(name).payload(testPayload).build(); - wrapper.getBlobStore().putBlob(container, blob); + Blob blob = view.getBlobStore().blobBuilder(name).payload(testPayload).build(); + view.getBlobStore().putBlob(container, blob); assertConsistencyAwareBlobExists(container, name); - blob = wrapper.getBlobStore().getBlob(container, name); + blob = view.getBlobStore().getBlob(container, name); assert Arrays.equals(CryptoStreams.md5(blob.getPayload()), md5) : String.format( "md5 didn't match on %s/%s", container, name); - wrapper.getBlobStore().removeBlob(container, name); + view.getBlobStore().removeBlob(container, name); assertConsistencyAwareBlobDoesntExist(container, name); return null; } @@ -176,7 +176,7 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { Map> responses = Maps.newHashMap(); for (int i = 0; i < 10; i++) { - responses.put(i, Futures.compose(wrapper.getAsyncBlobStore().getBlob(container, name), + responses.put(i, Futures.compose(view.getAsyncBlobStore().getBlob(container, name), new Function() { @Override @@ -204,9 +204,9 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { } private void uploadConstitution(String container, String name, String contentDisposition) throws IOException { - wrapper.getBlobStore().putBlob( + view.getBlobStore().putBlob( container, - wrapper.getBlobStore().blobBuilder(name).payload(oneHundredOneConstitutions.getInput()).contentType( + view.getBlobStore().blobBuilder(name).payload(oneHundredOneConstitutions.getInput()).contentType( "text/plain").contentMD5(oneHundredOneConstitutionsMD5).contentLength( oneHundredOneConstitutionsLength).contentDisposition(contentDisposition).build()); } @@ -224,11 +224,11 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { addObjectAndValidateContent(container, name); Date after = new Date(System.currentTimeMillis() + 1000); - wrapper.getBlobStore().getBlob(container, name, ifModifiedSince(before)); + view.getBlobStore().getBlob(container, name, ifModifiedSince(before)); validateContent(container, name); try { - wrapper.getBlobStore().getBlob(container, name, ifModifiedSince(after)); + view.getBlobStore().getBlob(container, name, ifModifiedSince(after)); validateContent(container, name); } catch (HttpResponseException ex) { assertEquals(ex.getResponse().getStatusCode(), 304); @@ -250,11 +250,11 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { addObjectAndValidateContent(container, name); Date after = new Date(System.currentTimeMillis() + 1000); - wrapper.getBlobStore().getBlob(container, name, ifUnmodifiedSince(after)); + view.getBlobStore().getBlob(container, name, ifUnmodifiedSince(after)); validateContent(container, name); try { - wrapper.getBlobStore().getBlob(container, name, ifUnmodifiedSince(before)); + view.getBlobStore().getBlob(container, name, ifUnmodifiedSince(before)); validateContent(container, name); } catch (HttpResponseException ex) { assertEquals(ex.getResponse().getStatusCode(), 412); @@ -273,11 +273,11 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { String goodETag = addObjectAndValidateContent(container, name); - wrapper.getBlobStore().getBlob(container, name, ifETagMatches(goodETag)); + view.getBlobStore().getBlob(container, name, ifETagMatches(goodETag)); validateContent(container, name); try { - wrapper.getBlobStore().getBlob(container, name, ifETagMatches("powerfrisbee")); + view.getBlobStore().getBlob(container, name, ifETagMatches("powerfrisbee")); validateContent(container, name); } catch (HttpResponseException ex) { assertEquals(ex.getResponse().getStatusCode(), 412); @@ -296,11 +296,11 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { String goodETag = addObjectAndValidateContent(container, name); - wrapper.getBlobStore().getBlob(container, name, ifETagDoesntMatch("powerfrisbee")); + view.getBlobStore().getBlob(container, name, ifETagDoesntMatch("powerfrisbee")); validateContent(container, name); try { - wrapper.getBlobStore().getBlob(container, name, ifETagDoesntMatch(goodETag)); + view.getBlobStore().getBlob(container, name, ifETagDoesntMatch(goodETag)); } catch (HttpResponseException ex) { assertEquals(ex.getResponse().getStatusCode(), 304); } @@ -317,11 +317,11 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { String name = "apples"; addObjectAndValidateContent(container, name); - Blob blob1 = wrapper.getBlobStore().getBlob(container, name, range(0, 5)); + Blob blob1 = view.getBlobStore().getBlob(container, name, range(0, 5)); validateMetadata(blob1.getMetadata(), container, name); assertEquals(getContentAsStringOrNullAndClose(blob1), TEST_STRING.substring(0, 6)); - Blob blob2 = wrapper.getBlobStore().getBlob(container, name, range(6, TEST_STRING.length())); + Blob blob2 = view.getBlobStore().getBlob(container, name, range(6, TEST_STRING.length())); validateMetadata(blob2.getMetadata(), container, name); assertEquals(getContentAsStringOrNullAndClose(blob2), TEST_STRING.substring(6, TEST_STRING.length())); } finally { @@ -337,7 +337,7 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { String name = "apples"; addObjectAndValidateContent(container, name); - Blob blob = wrapper.getBlobStore().getBlob(container, name, range(0, 5).range(6, TEST_STRING.length())); + Blob blob = view.getBlobStore().getBlob(container, name, range(0, 5).range(6, TEST_STRING.length())); validateMetadata(blob.getMetadata(), container, name); assertEquals(getContentAsStringOrNullAndClose(blob), TEST_STRING); } finally { @@ -401,7 +401,7 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { String container = getContainerName(); String name = "test"; try { - wrapper.getBlobStore().removeBlob(container, name); + view.getBlobStore().removeBlob(container, name); } finally { returnContainer(container); } @@ -412,7 +412,7 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { String container = getContainerName(); String name = "test"; try { - assert !wrapper.getBlobStore().blobExists(container, name); + assert !view.getBlobStore().blobExists(container, name); } finally { returnContainer(container); } @@ -429,7 +429,7 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { String container = getContainerName(); try { addBlobToContainer(container, name, name, MediaType.TEXT_PLAIN); - wrapper.getBlobStore().removeBlob(container, name); + view.getBlobStore().removeBlob(container, name); assertContainerEmptyDeleting(container, name); } finally { returnContainer(container); @@ -437,7 +437,7 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { } private void assertContainerEmptyDeleting(String container, String name) { - Iterable listing = Iterables.filter(wrapper.getBlobStore().list(container), + Iterable listing = Iterables.filter(view.getBlobStore().list(container), new Predicate() { @Override @@ -454,7 +454,7 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { @Test(groups = { "integration", "live" }) public void deleteObjectNoContainer() { try { - wrapper.getBlobStore().removeBlob("donb", "test"); + view.getBlobStore().removeBlob("donb", "test"); } catch (HttpResponseException e) { assertEquals(e.getResponse().getStatusCode(), 404); } catch (ContainerNotFoundException e) { @@ -475,7 +475,7 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { @Test(groups = { "integration", "live" }, dataProvider = "putTests") public void testPutObject(String name, String type, Object content, Object realObject) throws InterruptedException, IOException { - PayloadBlobBuilder blobBuilder = wrapper.getBlobStore().blobBuilder(name).payload(Payloads.newPayload(content)) + PayloadBlobBuilder blobBuilder = view.getBlobStore().blobBuilder(name).payload(Payloads.newPayload(content)) .contentType(type); addContentMetadata(blobBuilder); if (content instanceof InputStream) { @@ -484,14 +484,14 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { Blob blob = blobBuilder.build(); String container = getContainerName(); try { - assertNotNull(wrapper.getBlobStore().putBlob(container, blob)); - blob = wrapper.getBlobStore().getBlob(container, blob.getMetadata().getName()); + assertNotNull(view.getBlobStore().putBlob(container, blob)); + blob = view.getBlobStore().getBlob(container, blob.getMetadata().getName()); validateMetadata(blob.getMetadata(), container, name); checkContentMetadata(blob); String returnedString = getContentAsStringOrNullAndClose(blob); assertEquals(returnedString, realObject); - PageSet set = wrapper.getBlobStore().list(container); + PageSet set = view.getBlobStore().list(container); assert set.size() == 1 : set; } finally { returnContainer(container); @@ -500,7 +500,7 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { @Test(groups = { "integration", "live" }) public void testPutObjectStream() throws InterruptedException, IOException, ExecutionException { - PayloadBlobBuilder blobBuilder = wrapper.getBlobStore().blobBuilder("streaming").payload( + PayloadBlobBuilder blobBuilder = view.getBlobStore().blobBuilder("streaming").payload( new StreamingPayload(new WriteTo() { @Override public void writeTo(OutputStream outstream) throws IOException { @@ -514,14 +514,14 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { String container = getContainerName(); try { - assertNotNull(wrapper.getBlobStore().putBlob(container, blob)); + assertNotNull(view.getBlobStore().putBlob(container, blob)); - blob = wrapper.getBlobStore().getBlob(container, blob.getMetadata().getName()); + blob = view.getBlobStore().getBlob(container, blob.getMetadata().getName()); String returnedString = getContentAsStringOrNullAndClose(blob); assertEquals(returnedString, "foo"); validateMetadata(blob.getMetadata(), container, blob.getMetadata().getName()); checkContentMetadata(blob); - PageSet set = wrapper.getBlobStore().list(container); + PageSet set = view.getBlobStore().list(container); assert set.size() == 1 : set; } finally { returnContainer(container); @@ -588,11 +588,11 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { // NOTE all metadata in jclouds comes out as lowercase, in an effort to // normalize the // providers. - Blob blob = wrapper.getBlobStore().blobBuilder(name).userMetadata(ImmutableMap.of("Adrian", "powderpuff")) + Blob blob = view.getBlobStore().blobBuilder(name).userMetadata(ImmutableMap.of("Adrian", "powderpuff")) .payload(TEST_STRING).contentType(MediaType.TEXT_PLAIN).calculateMD5().build(); String container = getContainerName(); try { - assertNull(wrapper.getBlobStore().blobMetadata(container, "powderpuff")); + assertNull(view.getBlobStore().blobMetadata(container, "powderpuff")); addBlobToContainer(container, blob); Blob newObject = validateContent(container, name); @@ -601,7 +601,7 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { validateMetadata(metadata); validateMetadata(metadata, container, name); - validateMetadata(wrapper.getBlobStore().blobMetadata(container, name)); + validateMetadata(view.getBlobStore().blobMetadata(container, name)); // write 2 items with the same name to ensure that provider doesn't // accept dupes @@ -609,7 +609,7 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { blob.getMetadata().getUserMetadata().put("Adrian", "powderpuff"); addBlobToContainer(container, blob); - validateMetadata(wrapper.getBlobStore().blobMetadata(container, name)); + validateMetadata(view.getBlobStore().blobMetadata(container, name)); } finally { returnContainer(container); 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 0f96bcca11..f781526a64 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobLiveTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobLiveTest.java @@ -51,18 +51,18 @@ public class BaseBlobLiveTest extends BaseBlobStoreIntegrationTest { httpStreamMD5 = checkNotNull(httpStreamMD5 != null ? httpStreamMD5 : sysHttpStreamMD5, "httpStreamMd5"); - HttpResponse response = wrapper.utils().http().invoke( + HttpResponse response = view.utils().http().invoke( HttpRequest.builder().method("GET").endpoint(URI.create(httpStreamUrl)).build()); long length = response.getPayload().getContentMetadata().getContentLength(); String name = "hello"; byte[] md5 = CryptoStreams.hex(httpStreamMD5); - Blob blob = wrapper.getBlobStore().blobBuilder(name).payload(response.getPayload()).contentLength(length) + Blob blob = view.getBlobStore().blobBuilder(name).payload(response.getPayload()).contentLength(length) .contentMD5(md5).build(); String container = getContainerName(); try { - wrapper.getBlobStore().putBlob(container, blob); + view.getBlobStore().putBlob(container, blob); checkMD5(container, name, md5); } finally { returnContainer(container); @@ -70,7 +70,7 @@ public class BaseBlobLiveTest extends BaseBlobStoreIntegrationTest { } protected void checkMD5(String container, String name, byte[] md5) { - assertEquals(wrapper.getBlobStore().blobMetadata(container, name).getContentMetadata().getContentMD5(), md5); + assertEquals(view.getBlobStore().blobMetadata(container, name).getContentMetadata().getContentMD5(), md5); } } \ No newline at end of file diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobMapIntegrationTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobMapIntegrationTest.java index 149c6f53b5..adcc70132b 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobMapIntegrationTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobMapIntegrationTest.java @@ -73,7 +73,7 @@ public abstract class BaseBlobMapIntegrationTest extends BaseMapIntegrationTest< public void testValues() throws IOException, InterruptedException { String bucketName = getContainerName(); try { - BlobMap map = createMap(wrapper, bucketName); + BlobMap map = createMap(view, bucketName); putFiveStrings(map); putFiveStringsUnderPath(map); @@ -95,7 +95,7 @@ public abstract class BaseBlobMapIntegrationTest extends BaseMapIntegrationTest< public void testRemove() throws InterruptedException, ExecutionException, TimeoutException, IOException { String bucketName = getContainerName(); try { - Map map = createMap(wrapper, bucketName); + Map map = createMap(view, bucketName); putStringWithMD5(map, "one", "two"); assertConsistencyAwareContentEquals(map, "one", "two"); // TODO track how often this occurs and potentially update map implementation @@ -126,7 +126,7 @@ public abstract class BaseBlobMapIntegrationTest extends BaseMapIntegrationTest< public void testEntrySet() throws IOException, InterruptedException { String bucketName = getContainerName(); try { - final BlobMap map = createMap(wrapper, bucketName); + final BlobMap map = createMap(view, bucketName); putFiveStrings(map); assertConsistencyAwareMapSize(map, 5); Set> entries = map.entrySet(); @@ -159,9 +159,9 @@ public abstract class BaseBlobMapIntegrationTest extends BaseMapIntegrationTest< public void testContains() throws InterruptedException, ExecutionException, TimeoutException, IOException { String bucketName = getContainerName(); try { - Map map = createMap(wrapper, bucketName); + Map map = createMap(view, bucketName); putStringWithMD5(map, "one", "apple"); - Blob blob = wrapper.getBlobStore().blobBuilder("one").payload("apple").calculateMD5().build(); + Blob blob = view.getBlobStore().blobBuilder("one").payload("apple").calculateMD5().build(); assertConsistencyAwareContainsValue(map, blob); } finally { returnContainer(bucketName); @@ -185,8 +185,8 @@ public abstract class BaseBlobMapIntegrationTest extends BaseMapIntegrationTest< public void testPut() throws IOException, InterruptedException { String bucketName = getContainerName(); try { - Map map = createMap(wrapper, bucketName); - Blob blob = wrapper.getBlobStore().blobBuilder("one").payload(Strings2.toInputStream("apple")).calculateMD5() + Map map = createMap(view, bucketName); + Blob blob = view.getBlobStore().blobBuilder("one").payload(Strings2.toInputStream("apple")).calculateMD5() .build(); Blob old = map.put(blob.getMetadata().getName(), blob); getOneReturnsAppleAndOldValueIsNull(map, old); @@ -203,12 +203,12 @@ public abstract class BaseBlobMapIntegrationTest extends BaseMapIntegrationTest< public void testPutAll() throws InterruptedException, ExecutionException, TimeoutException { String bucketName = getContainerName(); try { - Map map = createMap(wrapper, bucketName); + Map map = createMap(view, bucketName); ImmutableMap.Builder newMap = ImmutableMap.builder(); for (String key : fiveInputs.keySet()) { newMap.put( key, - wrapper.getBlobStore().blobBuilder(key).payload(fiveInputs.get(key)) + view.getBlobStore().blobBuilder(key).payload(fiveInputs.get(key)) .contentLength((long) fiveBytes.get(key).length).build()); } map.putAll(newMap.build()); @@ -226,7 +226,7 @@ public abstract class BaseBlobMapIntegrationTest extends BaseMapIntegrationTest< return; String bucketName = getContainerName(); try { - BlobMap map = createMap(wrapper, bucketName); + BlobMap map = createMap(view, bucketName); Builder keySet = ImmutableSet.builder(); for (int i = 0; i < maxResultsForTestListings() + 1; i++) { keySet.add(i + ""); @@ -250,7 +250,7 @@ public abstract class BaseBlobMapIntegrationTest extends BaseMapIntegrationTest< @Override protected void putStringWithMD5(Map map, String key, String text) throws IOException { - map.put(key, wrapper.getBlobStore().blobBuilder(key).payload(text).calculateMD5().build()); + map.put(key, view.getBlobStore().blobBuilder(key).payload(text).calculateMD5().build()); } protected void putFiveStrings(BlobMap map) { @@ -277,7 +277,7 @@ public abstract class BaseBlobMapIntegrationTest extends BaseMapIntegrationTest< @Override protected void addTenObjectsUnderPrefix(String containerName, String prefix) throws InterruptedException { - BlobMap blobMap = createMap(wrapper, containerName, inDirectory(prefix)); + BlobMap blobMap = createMap(view, containerName, inDirectory(prefix)); for (int i = 0; i < 10; i++) { blobMap.put(i + "", blobMap.blobBuilder().payload(i + "content").build()); } @@ -285,7 +285,7 @@ public abstract class BaseBlobMapIntegrationTest extends BaseMapIntegrationTest< @Override protected void addTenObjectsUnderRoot(String containerName) throws InterruptedException { - BlobMap blobMap = createMap(wrapper, containerName, ListContainerOptions.NONE); + BlobMap blobMap = createMap(view, containerName, ListContainerOptions.NONE); for (int i = 0; i < 10; i++) { blobMap.put(i + "", blobMap.blobBuilder().payload(i + "content").build()); } diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java index b67571a98a..9b9a1402af 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java @@ -41,15 +41,15 @@ public class BaseBlobSignerLiveTest extends BaseBlobStoreIntegrationTest { String name = "hello"; String text = "fooooooooooooooooooooooo"; - Blob blob = wrapper.getBlobStore().blobBuilder(name).payload(text).contentType("text/plain").build(); + Blob blob = view.getBlobStore().blobBuilder(name).payload(text).contentType("text/plain").build(); String container = getContainerName(); try { - wrapper.getBlobStore().putBlob(container, blob); + view.getBlobStore().putBlob(container, blob); assertConsistencyAwareContainerSize(container, 1); - HttpRequest request = wrapper.getSigner().signRemoveBlob(container, name); + HttpRequest request = view.getSigner().signRemoveBlob(container, name); assertEquals(request.getFilters().size(), 0); - wrapper.utils().http().invoke(request); - assert !wrapper.getBlobStore().blobExists(container, name); + view.utils().http().invoke(request); + assert !view.getBlobStore().blobExists(container, name); } finally { returnContainer(container); } @@ -60,14 +60,14 @@ public class BaseBlobSignerLiveTest extends BaseBlobStoreIntegrationTest { String name = "hello"; String text = "fooooooooooooooooooooooo"; - Blob blob = wrapper.getBlobStore().blobBuilder(name).payload(text).contentType("text/plain").build(); + Blob blob = view.getBlobStore().blobBuilder(name).payload(text).contentType("text/plain").build(); String container = getContainerName(); try { - wrapper.getBlobStore().putBlob(container, blob); + view.getBlobStore().putBlob(container, blob); assertConsistencyAwareContainerSize(container, 1); - HttpRequest request = wrapper.getSigner().signGetBlob(container, name); + HttpRequest request = view.getSigner().signGetBlob(container, name); assertEquals(request.getFilters().size(), 0); - assertEquals(Strings2.toStringAndClose(wrapper.utils().http().invoke(request).getPayload().getInput()), text); + assertEquals(Strings2.toStringAndClose(view.utils().http().invoke(request).getPayload().getInput()), text); } finally { returnContainer(container); } @@ -78,14 +78,14 @@ public class BaseBlobSignerLiveTest extends BaseBlobStoreIntegrationTest { String name = "hello"; String text = "fooooooooooooooooooooooo"; - Blob blob = wrapper.getBlobStore().blobBuilder(name).payload(text).contentType("text/plain").build(); + Blob blob = view.getBlobStore().blobBuilder(name).payload(text).contentType("text/plain").build(); String container = getContainerName(); try { - wrapper.getBlobStore().putBlob(container, blob); + view.getBlobStore().putBlob(container, blob); assertConsistencyAwareContainerSize(container, 1); - HttpRequest request = wrapper.getSigner().signGetBlob(container, name, range(0, 1)); + HttpRequest request = view.getSigner().signGetBlob(container, name, range(0, 1)); assertEquals(request.getFilters().size(), 0); - assertEquals(Strings2.toStringAndClose(wrapper.utils().http().invoke(request).getPayload().getInput()), "fo"); + assertEquals(Strings2.toStringAndClose(view.utils().http().invoke(request).getPayload().getInput()), "fo"); } finally { returnContainer(container); } @@ -96,12 +96,12 @@ public class BaseBlobSignerLiveTest extends BaseBlobStoreIntegrationTest { String name = "hello"; String text = "fooooooooooooooooooooooo"; - Blob blob = wrapper.getBlobStore().blobBuilder(name).payload(text).contentType("text/plain").build(); + Blob blob = view.getBlobStore().blobBuilder(name).payload(text).contentType("text/plain").build(); String container = getContainerName(); try { - HttpRequest request = wrapper.getSigner().signPutBlob(container, blob); + HttpRequest request = view.getSigner().signPutBlob(container, blob); assertEquals(request.getFilters().size(), 0); - Strings2.toStringAndClose(wrapper.utils().http().invoke(request).getPayload().getInput()); + Strings2.toStringAndClose(view.utils().http().invoke(request).getPayload().getInput()); assertConsistencyAwareContainerSize(container, 1); } finally { returnContainer(container); diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java index 486eee452c..9445f01835 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java @@ -36,7 +36,7 @@ import java.util.concurrent.atomic.AtomicInteger; import javax.ws.rs.core.MediaType; -import org.jclouds.apis.BaseWrapperLiveTest; +import org.jclouds.apis.BaseViewLiveTest; import org.jclouds.blobstore.BlobStoreContext; import org.jclouds.blobstore.attr.ConsistencyModel; import org.jclouds.blobstore.domain.Blob; @@ -59,7 +59,7 @@ import com.google.common.collect.Sets; import com.google.common.reflect.TypeToken; import com.google.inject.Module; -public class BaseBlobStoreIntegrationTest extends BaseWrapperLiveTest { +public class BaseBlobStoreIntegrationTest extends BaseViewLiveTest { protected static final String LOCAL_ENCODING = System.getProperty("file.encoding"); protected static final String XML_STRING_FORMAT = " "; protected static final String TEST_STRING = String.format(XML_STRING_FORMAT, "apple"); @@ -90,9 +90,9 @@ public class BaseBlobStoreIntegrationTest extends BaseWrapperLiveTest setupModules() { @@ -119,7 +119,7 @@ public class BaseBlobStoreIntegrationTest extends BaseWrapperLiveTest entry : Iterables.concat(fiveStrings.entrySet(), fiveStringsUnderPath.entrySet())) { - Blob sourceObject = wrapper.getBlobStore().blobBuilder(entry.getKey()).payload(entry.getValue()) + Blob sourceObject = view.getBlobStore().blobBuilder(entry.getKey()).payload(entry.getValue()) .contentType("text/xml").build(); addBlobToContainer(sourceContainer, sourceObject); } } protected String addBlobToContainer(String sourceContainer, Blob object) { - return wrapper.getBlobStore().putBlob(sourceContainer, object); + return view.getBlobStore().putBlob(sourceContainer, object); } protected T validateMetadata(T md, String container, String name) { @@ -269,7 +269,7 @@ public class BaseBlobStoreIntegrationTest extends BaseWrapperLiveTest() { public String apply(StorageMetadata from) { @@ -307,9 +307,9 @@ public class BaseBlobStoreIntegrationTest extends BaseWrapperLiveTest() { + view.getBlobStore().list(containerName), new Function() { public String apply(StorageMetadata from) { return from.getName(); @@ -328,7 +328,7 @@ public class BaseBlobStoreIntegrationTest extends BaseWrapperLiveTest() { + if (!Iterables.any(view.getBlobStore().list(), new Predicate() { public boolean apply(StorageMetadata md) { return containerName.equals(md.getName()); } @@ -382,7 +382,7 @@ public class BaseBlobStoreIntegrationTest extends BaseWrapperLiveTest wrapperType() { + protected TypeToken viewType() { return TypeToken.of(BlobStoreContext.class); } diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerIntegrationTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerIntegrationTest.java index 589f8f18f5..ec55d601a5 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerIntegrationTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerIntegrationTest.java @@ -49,21 +49,21 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { @Test(groups = { "integration", "live" }) public void containerDoesntExist() { - assert !wrapper.getBlobStore().containerExists("forgetaboutit"); - assert !wrapper.getBlobStore().containerExists("cloudcachestorefunctionalintegrationtest-first"); + assert !view.getBlobStore().containerExists("forgetaboutit"); + assert !view.getBlobStore().containerExists("cloudcachestorefunctionalintegrationtest-first"); } @Test(groups = { "integration", "live" }) public void testPutTwiceIsOkAndDoesntOverwrite() throws InterruptedException { String containerName = getContainerName(); try { - wrapper.getBlobStore().createContainerInLocation(null, containerName); + view.getBlobStore().createContainerInLocation(null, containerName); - Blob blob = wrapper.getBlobStore().blobBuilder("hello").payload(TEST_STRING).build(); - wrapper.getBlobStore().putBlob(containerName, blob); + Blob blob = view.getBlobStore().blobBuilder("hello").payload(TEST_STRING).build(); + view.getBlobStore().putBlob(containerName, blob); - wrapper.getBlobStore().createContainerInLocation(null, containerName); - assertEquals(wrapper.getBlobStore().countBlobs(containerName), 1); + view.getBlobStore().createContainerInLocation(null, containerName); + assertEquals(view.getBlobStore().countBlobs(containerName), 1); } finally { returnContainer(containerName); } @@ -77,11 +77,11 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { addBlobToContainer(containerName, // NOTE all metadata in jclouds comes out as lowercase, in an effort to // normalize the providers. - wrapper.getBlobStore().blobBuilder(key).userMetadata(ImmutableMap.of("Adrian", "powderpuff")) + view.getBlobStore().blobBuilder(key).userMetadata(ImmutableMap.of("Adrian", "powderpuff")) .payload(TEST_STRING).contentType(MediaType.TEXT_PLAIN).calculateMD5().build()); validateContent(containerName, key); - PageSet container = wrapper.getBlobStore().list(containerName, + PageSet container = view.getBlobStore().list(containerName, maxResults(1).withDetails()); BlobMetadata metadata = BlobMetadata.class.cast(get(container, 0)); @@ -105,7 +105,7 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { String containerName = getContainerName(); try { add5BlobsUnderPathAnd5UnderRootToContainer(containerName); - wrapper.getBlobStore().clearContainer(containerName); + view.getBlobStore().clearContainer(containerName); assertConsistencyAwareContainerSize(containerName, 0); } finally { returnContainer(containerName); @@ -118,13 +118,13 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { try { addAlphabetUnderRoot(containerName); - PageSet container = wrapper.getBlobStore().list(containerName, maxResults(1)); + PageSet container = view.getBlobStore().list(containerName, maxResults(1)); assert container.getNextMarker() != null; assertEquals(container.size(), 1); String marker = container.getNextMarker(); - container = wrapper.getBlobStore().list(containerName, afterMarker(marker)); + container = view.getBlobStore().list(containerName, afterMarker(marker)); assertEquals(container.getNextMarker(), null); assert container.size() == 25 : String.format("size should have been 25, but was %d: %s", container.size(), container); @@ -142,7 +142,7 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { String prefix = "rootdelimeter"; addTenObjectsUnderPrefix(containerName, prefix); add15UnderRoot(containerName); - PageSet container = wrapper.getBlobStore().list(containerName); + PageSet container = view.getBlobStore().list(containerName); assert container.getNextMarker() == null; assertEquals(container.size(), 16); } finally { @@ -157,17 +157,17 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { try { String directory = "directory"; - assert !wrapper.getBlobStore().directoryExists(containerName, directory); + assert !view.getBlobStore().directoryExists(containerName, directory); - wrapper.getBlobStore().createDirectory(containerName, directory); + view.getBlobStore().createDirectory(containerName, directory); - assert wrapper.getBlobStore().directoryExists(containerName, directory); - PageSet container = wrapper.getBlobStore().list(containerName); + assert view.getBlobStore().directoryExists(containerName, directory); + PageSet container = view.getBlobStore().list(containerName); // we should have only the directory under root assert container.getNextMarker() == null; assert container.size() == 1 : container; - container = wrapper.getBlobStore().list(containerName, inDirectory(directory)); + container = view.getBlobStore().list(containerName, inDirectory(directory)); // we should have nothing in the directory assert container.getNextMarker() == null; @@ -175,50 +175,50 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { addTenObjectsUnderPrefix(containerName, directory); - container = wrapper.getBlobStore().list(containerName); + container = view.getBlobStore().list(containerName); // we should still have only the directory under root assert container.getNextMarker() == null; assert container.size() == 1 : container; - container = wrapper.getBlobStore().list(containerName, inDirectory(directory)); + container = view.getBlobStore().list(containerName, inDirectory(directory)); // we should have only the 10 items under the directory assert container.getNextMarker() == null; assert container.size() == 10 : container; // try 2 level deep directory - assert !wrapper.getBlobStore().directoryExists(containerName, directory + "/" + directory); - wrapper.getBlobStore().createDirectory(containerName, directory + "/" + directory); - assert wrapper.getBlobStore().directoryExists(containerName, directory + "/" + directory); + assert !view.getBlobStore().directoryExists(containerName, directory + "/" + directory); + view.getBlobStore().createDirectory(containerName, directory + "/" + directory); + assert view.getBlobStore().directoryExists(containerName, directory + "/" + directory); - wrapper.getBlobStore().clearContainer(containerName, inDirectory(directory)); - assert wrapper.getBlobStore().directoryExists(containerName, directory); - assert wrapper.getBlobStore().directoryExists(containerName, directory + "/" + directory); + view.getBlobStore().clearContainer(containerName, inDirectory(directory)); + assert view.getBlobStore().directoryExists(containerName, directory); + assert view.getBlobStore().directoryExists(containerName, directory + "/" + directory); // should have only the 2 level-deep directory above - container = wrapper.getBlobStore().list(containerName, inDirectory(directory)); + container = view.getBlobStore().list(containerName, inDirectory(directory)); assert container.getNextMarker() == null; assert container.size() == 1 : container; - wrapper.getBlobStore().createDirectory(containerName, directory + "/" + directory); + view.getBlobStore().createDirectory(containerName, directory + "/" + directory); - container = wrapper.getBlobStore().list(containerName, inDirectory(directory).recursive()); + container = view.getBlobStore().list(containerName, inDirectory(directory).recursive()); assert container.getNextMarker() == null; assert container.size() == 1 : container; - wrapper.getBlobStore().clearContainer(containerName, inDirectory(directory).recursive()); + view.getBlobStore().clearContainer(containerName, inDirectory(directory).recursive()); // should no longer have the 2 level-deep directory above - container = wrapper.getBlobStore().list(containerName, inDirectory(directory)); + container = view.getBlobStore().list(containerName, inDirectory(directory)); assert container.getNextMarker() == null; assert container.size() == 0 : container; - container = wrapper.getBlobStore().list(containerName); + container = view.getBlobStore().list(containerName); // should only have the directory assert container.getNextMarker() == null; assert container.size() == 1 : container; - wrapper.getBlobStore().deleteDirectory(containerName, directory); + view.getBlobStore().deleteDirectory(containerName, directory); - container = wrapper.getBlobStore().list(containerName); + container = view.getBlobStore().list(containerName); // now should be completely empty assert container.getNextMarker() == null; assert container.size() == 0 : container; @@ -236,7 +236,7 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { addTenObjectsUnderPrefix(containerName, prefix); add15UnderRoot(containerName); - PageSet container = wrapper.getBlobStore().list(containerName, inDirectory(prefix)); + PageSet container = view.getBlobStore().list(containerName, inDirectory(prefix)); assert container.getNextMarker() == null; assertEquals(container.size(), 10); } finally { @@ -251,7 +251,7 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { try { addAlphabetUnderRoot(containerName); - PageSet container = wrapper.getBlobStore().list(containerName, maxResults(5)); + PageSet container = view.getBlobStore().list(containerName, maxResults(5)); assertEquals(container.size(), 5); assert container.getNextMarker() != null; } finally { @@ -263,7 +263,7 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { public void containerExists() throws InterruptedException { String containerName = getContainerName(); try { - assert wrapper.getBlobStore().containerExists(containerName); + assert view.getBlobStore().containerExists(containerName); } finally { returnContainer(containerName); } @@ -274,7 +274,7 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { String containerName = getContainerName(); try { addBlobToContainer(containerName, "test"); - wrapper.getBlobStore().deleteContainer(containerName); + view.getBlobStore().deleteContainer(containerName); assertNotExists(containerName); } finally { recycleContainer(containerName); @@ -285,7 +285,7 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { public void deleteContainerIfEmpty() throws InterruptedException { final String containerName = getContainerName(); try { - wrapper.getBlobStore().deleteContainer(containerName); + view.getBlobStore().deleteContainer(containerName); assertNotExists(containerName); } finally { // this container is now deleted, so we can't reuse it directly @@ -298,7 +298,7 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { String containerName = getContainerName(); try { add15UnderRoot(containerName); - Set container = wrapper.getBlobStore().list(containerName); + Set container = view.getBlobStore().list(containerName); assertEquals(container.size(), 15); } finally { returnContainer(containerName); @@ -308,8 +308,8 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { protected void addAlphabetUnderRoot(String containerName) throws InterruptedException { for (char letter = 'a'; letter <= 'z'; letter++) { - wrapper.getBlobStore().putBlob(containerName, - wrapper.getBlobStore().blobBuilder(letter + "").payload(letter + "content").build()); + view.getBlobStore().putBlob(containerName, + view.getBlobStore().blobBuilder(letter + "").payload(letter + "content").build()); } assertContainerSize(containerName, 26); @@ -319,7 +319,7 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { assertConsistencyAware(new Runnable() { public void run() { try { - assertEquals(wrapper.getBlobStore().countBlobs(containerName), size); + assertEquals(view.getBlobStore().countBlobs(containerName), size); } catch (Exception e) { propagateIfPossible(e); } @@ -329,15 +329,15 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { protected void add15UnderRoot(String containerName) throws InterruptedException { for (int i = 0; i < 15; i++) { - wrapper.getBlobStore().putBlob(containerName, - wrapper.getBlobStore().blobBuilder(i + "").payload(i + "content").build()); + view.getBlobStore().putBlob(containerName, + view.getBlobStore().blobBuilder(i + "").payload(i + "content").build()); } } protected void addTenObjectsUnderPrefix(String containerName, String prefix) throws InterruptedException { for (int i = 0; i < 10; i++) { - wrapper.getBlobStore().putBlob(containerName, - wrapper.getBlobStore().blobBuilder(prefix + "/" + i).payload(i + "content").build()); + view.getBlobStore().putBlob(containerName, + view.getBlobStore().blobBuilder(prefix + "/" + i).payload(i + "content").build()); } } } \ No newline at end of file diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerLiveTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerLiveTest.java index e717403e45..68fa3d8738 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerLiveTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerLiveTest.java @@ -38,18 +38,18 @@ public class BaseContainerLiveTest extends BaseBlobStoreIntegrationTest { public void testPublicAccess() throws InterruptedException, MalformedURLException, IOException { final String containerName = getScratchContainerName(); try { - wrapper.getBlobStore().createContainerInLocation(null, containerName, publicRead()); + view.getBlobStore().createContainerInLocation(null, containerName, publicRead()); assertConsistencyAwareContainerSize(containerName, 0); - wrapper.getBlobStore().putBlob(containerName, - wrapper.getBlobStore().blobBuilder("hello").payload(TEST_STRING).build()); + view.getBlobStore().putBlob(containerName, + view.getBlobStore().blobBuilder("hello").payload(TEST_STRING).build()); assertConsistencyAwareContainerSize(containerName, 1); - BlobMetadata metadata = wrapper.getBlobStore().blobMetadata(containerName, "hello"); + BlobMetadata metadata = view.getBlobStore().blobMetadata(containerName, "hello"); assert metadata.getPublicUri() != null : metadata; - assertEquals(Strings2.toStringAndClose(wrapper.utils().http().get(metadata.getPublicUri())), TEST_STRING); + assertEquals(Strings2.toStringAndClose(view.utils().http().get(metadata.getPublicUri())), TEST_STRING); } finally { // this container is now public, so we can't reuse it directly diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseInputStreamMapIntegrationTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseInputStreamMapIntegrationTest.java index 1372ecf383..153a4118d1 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseInputStreamMapIntegrationTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseInputStreamMapIntegrationTest.java @@ -53,7 +53,7 @@ public abstract class BaseInputStreamMapIntegrationTest extends BaseMapIntegrati public void testValues() throws InterruptedException, IOException { String containerName = getContainerName(); try { - Map map = createMap(wrapper, containerName); + Map map = createMap(view, containerName); map.putAll(this.fiveInputs); // this will cause us to block until the bucket updates. assertConsistencyAwareMapSize(map, 5); @@ -74,7 +74,7 @@ public abstract class BaseInputStreamMapIntegrationTest extends BaseMapIntegrati public void testPutMoreThanSingleListing() throws InterruptedException, ExecutionException, TimeoutException { String containerName = getContainerName(); try { - InputStreamMap map = createMap(wrapper, containerName); + InputStreamMap map = createMap(view, containerName); Set keySet = Sets.newLinkedHashSet(); for (int i = 0; i < maxResultsForTestListings() + 1; i++) { keySet.add(i + ""); @@ -100,7 +100,7 @@ public abstract class BaseInputStreamMapIntegrationTest extends BaseMapIntegrati public void testRemove() throws InterruptedException, IOException { String containerName = getContainerName(); try { - Map map = createMap(wrapper, containerName); + Map map = createMap(view, containerName); putStringWithMD5(map, "one", "two"); InputStream old = map.remove("one"); assertEquals(Strings2.toStringAndClose(old), "two"); @@ -120,7 +120,7 @@ public abstract class BaseInputStreamMapIntegrationTest extends BaseMapIntegrati public void testEntrySet() throws InterruptedException, IOException { String containerName = getContainerName(); try { - Map map = createMap(wrapper, containerName); + Map map = createMap(view, containerName); ((InputStreamMap) map).putAllStrings(this.fiveStrings); // this will cause us to block until the bucket updates. assertConsistencyAwareKeySize(map, 5); @@ -143,7 +143,7 @@ public abstract class BaseInputStreamMapIntegrationTest extends BaseMapIntegrati public void testContainsStringValue() throws InterruptedException, ExecutionException, TimeoutException { String containerName = getContainerName(); try { - Map map = createMap(wrapper, containerName); + Map map = createMap(view, containerName); ((InputStreamMap) map).putString("one", String.format(XML_STRING_FORMAT, "apple")); assertConsistencyAwareContainsValue(map, fiveStrings.get("one")); } finally { @@ -155,7 +155,7 @@ public abstract class BaseInputStreamMapIntegrationTest extends BaseMapIntegrati public void testContainsFileValue() throws InterruptedException, ExecutionException, TimeoutException { String containerName = getContainerName(); try { - Map map = createMap(wrapper, containerName); + Map map = createMap(view, containerName); ((InputStreamMap) map).putString("one", String.format(XML_STRING_FORMAT, "apple")); assertConsistencyAwareContainsValue(map, fiveFiles.get("one")); } finally { @@ -167,7 +167,7 @@ public abstract class BaseInputStreamMapIntegrationTest extends BaseMapIntegrati public void testContainsInputStreamValue() throws InterruptedException, ExecutionException, TimeoutException { String containerName = getContainerName(); try { - Map map = createMap(wrapper, containerName); + Map map = createMap(view, containerName); ((InputStreamMap) map).putString("one", String.format(XML_STRING_FORMAT, "apple")); assertConsistencyAwareContainsValue(map, this.fiveInputs.get("one")); } finally { @@ -179,7 +179,7 @@ public abstract class BaseInputStreamMapIntegrationTest extends BaseMapIntegrati public void testContainsBytesValue() throws InterruptedException, ExecutionException, TimeoutException { String containerName = getContainerName(); try { - Map map = createMap(wrapper, containerName); + Map map = createMap(view, containerName); ((InputStreamMap) map).putString("one", String.format(XML_STRING_FORMAT, "apple")); assertConsistencyAwareContainsValue(map, this.fiveBytes.get("one")); } finally { @@ -192,7 +192,7 @@ public abstract class BaseInputStreamMapIntegrationTest extends BaseMapIntegrati public void testPutAll() throws InterruptedException { String containerName = getContainerName(); try { - Map map = createMap(wrapper, containerName); + Map map = createMap(view, containerName); map.putAll(this.fiveInputs); assertConsistencyAwareMapSize(map, 5); assertConsistencyAwareKeySetEquals(map, new TreeSet(fiveInputs.keySet())); @@ -206,7 +206,7 @@ public abstract class BaseInputStreamMapIntegrationTest extends BaseMapIntegrati public void testPutAllBytes() throws InterruptedException { String containerName = getContainerName(); try { - Map map = createMap(wrapper, containerName); + Map map = createMap(view, containerName); ((InputStreamMap) map).putAllBytes(this.fiveBytes); assertConsistencyAwareMapSize(map, 5); @@ -221,7 +221,7 @@ public abstract class BaseInputStreamMapIntegrationTest extends BaseMapIntegrati public void testPutAllFiles() throws InterruptedException { String containerName = getContainerName(); try { - Map map = createMap(wrapper, containerName); + Map map = createMap(view, containerName); ((InputStreamMap) map).putAllFiles(this.fiveFiles); assertConsistencyAwareMapSize(map, 5); @@ -236,7 +236,7 @@ public abstract class BaseInputStreamMapIntegrationTest extends BaseMapIntegrati public void testPutAllStrings() throws InterruptedException { String containerName = getContainerName(); try { - Map map = createMap(wrapper, containerName); + Map map = createMap(view, containerName); ((InputStreamMap) map).putAllStrings(this.fiveStrings); assertConsistencyAwareMapSize(map, 5); @@ -251,7 +251,7 @@ public abstract class BaseInputStreamMapIntegrationTest extends BaseMapIntegrati public void testPutString() throws InterruptedException, IOException { String containerName = getContainerName(); try { - Map map = createMap(wrapper, containerName); + Map map = createMap(view, containerName); InputStream old = ((InputStreamMap) map).putString("one", fiveStrings.get("one")); getOneReturnsAppleAndOldValueIsNull(map, old); @@ -280,7 +280,7 @@ public abstract class BaseInputStreamMapIntegrationTest extends BaseMapIntegrati public void testPutFile() throws IOException, InterruptedException { String containerName = getContainerName(); try { - Map map = createMap(wrapper, containerName); + Map map = createMap(view, containerName); InputStream old = ((InputStreamMap) map).putFile("one", fiveFiles.get("one")); getOneReturnsAppleAndOldValueIsNull(map, old); @@ -295,7 +295,7 @@ public abstract class BaseInputStreamMapIntegrationTest extends BaseMapIntegrati public void testPutBytes() throws InterruptedException, IOException { String containerName = getContainerName(); try { - Map map = createMap(wrapper, containerName); + Map map = createMap(view, containerName); InputStream old = ((InputStreamMap) map).putBytes("one", fiveBytes.get("one")); getOneReturnsAppleAndOldValueIsNull(map, old); @@ -310,7 +310,7 @@ public abstract class BaseInputStreamMapIntegrationTest extends BaseMapIntegrati public void testPut() throws InterruptedException, IOException { String containerName = getContainerName(); try { - Map map = createMap(wrapper, containerName); + Map map = createMap(view, containerName); InputStream old = map.put("one", fiveInputs.get("one")); getOneReturnsAppleAndOldValueIsNull(map, old); diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseMapIntegrationTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseMapIntegrationTest.java index d71391393f..b85a3a6dc9 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseMapIntegrationTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseMapIntegrationTest.java @@ -106,7 +106,7 @@ public abstract class BaseMapIntegrationTest extends BaseBlobStoreIntegration public void testClear() throws InterruptedException, ExecutionException, TimeoutException, IOException { String containerNameName = getContainerName(); try { - Map map = createMap(wrapper, containerNameName); + Map map = createMap(view, containerNameName); assertConsistencyAwareMapSize(map, 0); putStringWithMD5(map, "one", "apple"); assertConsistencyAwareMapSize(map, 1); @@ -124,7 +124,7 @@ public abstract class BaseMapIntegrationTest extends BaseBlobStoreIntegration public void testKeySet() throws InterruptedException, ExecutionException, TimeoutException, IOException { String containerNameName = getContainerName(); try { - Map map = createMap(wrapper, containerNameName); + Map map = createMap(view, containerNameName); assertConsistencyAwareKeySize(map, 0); putStringWithMD5(map, "one", "two"); assertConsistencyAwareKeySize(map, 1); @@ -136,15 +136,15 @@ public abstract class BaseMapIntegrationTest extends BaseBlobStoreIntegration protected void addTenObjectsUnderPrefix(String containerName, String prefix) throws InterruptedException { for (int i = 0; i < 10; i++) { - wrapper.getBlobStore().putBlob(containerName, - wrapper.getBlobStore().blobBuilder(prefix + "/" + i).payload(i + "content").build()); + view.getBlobStore().putBlob(containerName, + view.getBlobStore().blobBuilder(prefix + "/" + i).payload(i + "content").build()); } } protected void addTenObjectsUnderRoot(String containerName) throws InterruptedException { for (int i = 0; i < 10; i++) { - wrapper.getBlobStore().putBlob(containerName, - wrapper.getBlobStore().blobBuilder(i + "").payload(i + "content").build()); + view.getBlobStore().putBlob(containerName, + view.getBlobStore().blobBuilder(i + "").payload(i + "content").build()); } } @@ -152,13 +152,13 @@ public abstract class BaseMapIntegrationTest extends BaseBlobStoreIntegration public void testDirectory() throws InterruptedException { String containerName = getContainerName(); String directory = "apps"; - Map rootMap = createMap(wrapper, containerName); - Map rootRecursiveMap = createMap(wrapper, containerName, recursive()); - Map inDirectoryMap = createMap(wrapper, containerName, inDirectory(directory)); - Map inDirectoryRecursiveMap = createMap(wrapper, containerName, inDirectory(directory).recursive()); + Map rootMap = createMap(view, containerName); + Map rootRecursiveMap = createMap(view, containerName, recursive()); + Map inDirectoryMap = createMap(view, containerName, inDirectory(directory)); + Map inDirectoryRecursiveMap = createMap(view, containerName, inDirectory(directory).recursive()); try { - wrapper.getBlobStore().createDirectory(containerName, directory); + view.getBlobStore().createDirectory(containerName, directory); addTenObjectsUnderRoot(containerName); assertEquals(rootMap.size(), 10); assertEquals(ImmutableSortedSet.copyOf(rootMap.keySet()), @@ -184,7 +184,7 @@ public abstract class BaseMapIntegrationTest extends BaseBlobStoreIntegration assertEquals(ImmutableSortedSet.copyOf(inDirectoryRecursiveMap.keySet()), ImmutableSortedSet.of("0", "1", "2", "3", "4", "5", "6", "7", "8", "9")); - wrapper.getBlobStore().createDirectory(containerName, directory + "/" + directory); + view.getBlobStore().createDirectory(containerName, directory + "/" + directory); assertEquals(rootMap.size(), 10); assertEquals(rootRecursiveMap.size(), 20); assertEquals(inDirectoryMap.size(), 10); @@ -252,7 +252,7 @@ public abstract class BaseMapIntegrationTest extends BaseBlobStoreIntegration public void testContainsKey() throws InterruptedException, ExecutionException, TimeoutException, IOException { String containerNameName = getContainerName(); try { - Map map = createMap(wrapper, containerNameName); + Map map = createMap(view, containerNameName); assertConsistencyAwareDoesntContainKey(map); putStringWithMD5(map, "one", "apple"); assertConsistencyAwareContainsKey(map); @@ -294,7 +294,7 @@ public abstract class BaseMapIntegrationTest extends BaseBlobStoreIntegration public void testIsEmpty() throws InterruptedException, ExecutionException, TimeoutException, IOException { String containerNameName = getContainerName(); try { - Map map = createMap(wrapper, containerNameName); + Map map = createMap(view, containerNameName); assertConsistencyAwareEmpty(map); putStringWithMD5(map, "one", "apple"); assertConsistencyAwareNotEmpty(map); @@ -343,7 +343,7 @@ public abstract class BaseMapIntegrationTest extends BaseBlobStoreIntegration public void testListContainer() throws InterruptedException, ExecutionException, TimeoutException { String containerNameName = getContainerName(); try { - ListableMap map = (ListableMap) createMap(wrapper, containerNameName); + ListableMap map = (ListableMap) createMap(view, containerNameName); assertConsistencyAwareListContainer(map, containerNameName); } finally { returnContainer(containerNameName); diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseServiceIntegrationTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseServiceIntegrationTest.java index d207a475e2..3e61b5f821 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseServiceIntegrationTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseServiceIntegrationTest.java @@ -41,24 +41,24 @@ public class BaseServiceIntegrationTest extends BaseBlobStoreIntegrationTest { @Test(groups = { "integration", "live" }) void containerDoesntExist() { - Set list = wrapper.getBlobStore().list(); + Set list = view.getBlobStore().list(); assert !list.contains(new MutableStorageMetadataImpl()); } @Test(groups = { "integration", "live" }) public void testAllLocations() throws InterruptedException { - for (final Location location : wrapper.getBlobStore().listAssignableLocations()) { + for (final Location location : view.getBlobStore().listAssignableLocations()) { final String containerName = getScratchContainerName(); try { System.err.printf(" >> creating container in location %s%n", location); - wrapper.getBlobStore().createContainerInLocation(location, containerName); + view.getBlobStore().createContainerInLocation(location, containerName); System.err.printf(" << call complete.. checking%n"); assertConsistencyAware(new Runnable() { @Override public void run() { - PageSet list = wrapper.getBlobStore().list(); + PageSet list = view.getBlobStore().list(); assert Iterables.any(list, new Predicate() { public boolean apply(StorageMetadata md) { return containerName.equals(md.getName()) && location.equals(md.getLocation()); @@ -79,9 +79,9 @@ public class BaseServiceIntegrationTest extends BaseBlobStoreIntegrationTest { @Test(groups = { "integration", "live" }) public void testGetAssignableLocations() throws Exception { - if (wrapper.unwrap() instanceof Location) - assertProvider(Location.class.cast(wrapper.unwrap())); - for (Location location : wrapper.getBlobStore().listAssignableLocations()) { + if (view.unwrap() instanceof Location) + assertProvider(Location.class.cast(view.unwrap())); + for (Location location : view.getBlobStore().listAssignableLocations()) { System.err.printf("location %s%n", location); assert location.getId() != null : location; assert location != location.getParent() : location; diff --git a/blobstore/src/test/java/org/jclouds/blobstore/internal/BaseBlobStoreApiMetadataTest.java b/blobstore/src/test/java/org/jclouds/blobstore/internal/BaseBlobStoreApiMetadataTest.java index fcb31cdbe3..541aa86c08 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/internal/BaseBlobStoreApiMetadataTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/internal/BaseBlobStoreApiMetadataTest.java @@ -18,7 +18,7 @@ */ package org.jclouds.blobstore.internal; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.apis.ApiMetadata; import org.jclouds.apis.internal.BaseApiMetadataTest; import org.jclouds.blobstore.BlobStoreContext; @@ -35,7 +35,7 @@ import com.google.common.reflect.TypeToken; public abstract class BaseBlobStoreApiMetadataTest extends BaseApiMetadataTest { public BaseBlobStoreApiMetadataTest(ApiMetadata toTest) { - super(toTest, ImmutableSet.>of(TypeToken.of(BlobStoreContext.class))); + super(toTest, ImmutableSet.>of(TypeToken.of(BlobStoreContext.class))); } } \ No newline at end of file diff --git a/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/internal/TerremarkVCloudApiMetadata.java b/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/internal/TerremarkVCloudApiMetadata.java index cf132779ed..b35140b7d1 100644 --- a/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/internal/TerremarkVCloudApiMetadata.java +++ b/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/internal/TerremarkVCloudApiMetadata.java @@ -56,7 +56,7 @@ public abstract class TerremarkVCloudApiMetadata extends BaseRestApiMetadata { .credentialName("Password") .version("0.8") .defaultProperties(TerremarkVCloudApiMetadata.defaultProperties()) - .wrapper(ComputeServiceContext.class); + .view(ComputeServiceContext.class); } @Override diff --git a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/TerremarkClientLiveTest.java b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/TerremarkClientLiveTest.java index 45c4e7bbe3..f6308b9841 100644 --- a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/TerremarkClientLiveTest.java +++ b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/TerremarkClientLiveTest.java @@ -482,7 +482,7 @@ public abstract class TerremarkClientLiveTest(injector.getInstance(SocketOpen.class), 300, 10, TimeUnit.SECONDS);// make @@ -492,7 +492,7 @@ public abstract class TerremarkClientLiveTest(injector.getInstance(TaskSuccess.class), 650, 10, TimeUnit.SECONDS); - connection = (S) RestContext.class.cast(wrapper.unwrap()).getApi(); + connection = (S) RestContext.class.cast(view.unwrap()).getApi(); orgs = listOrgs(); } @@ -514,7 +514,7 @@ public abstract class TerremarkClientLiveTest newContext = null; try { - newContext = createWrapper( + newContext = createView( overrideDefaults(ImmutableMap.of(VCloudConstants.PROPERTY_VCLOUD_DEFAULT_ORG, org.getName())), setupModules()).unwrap(); assertEquals(newContext.getApi().findOrgNamed(null), org); @@ -549,7 +549,7 @@ public abstract class TerremarkClientLiveTest newContext = null; try { - newContext = createWrapper( + newContext = createView( overrideDefaults(ImmutableMap.of(VCloudConstants.PROPERTY_VCLOUD_DEFAULT_ORG, org.getName(), VCloudConstants.PROPERTY_VCLOUD_DEFAULT_CATALOG, cat.getName())), setupModules()) .unwrap(); @@ -592,7 +592,7 @@ public abstract class TerremarkClientLiveTest newContext = null; try { - newContext = createWrapper( + newContext = createView( overrideDefaults(ImmutableMap.of(VCloudConstants.PROPERTY_VCLOUD_DEFAULT_ORG, org.getName(), VCloudConstants.PROPERTY_VCLOUD_DEFAULT_VDC, vdc.getName(), VCloudConstants.PROPERTY_VCLOUD_DEFAULT_NETWORK, net.getName())), setupModules()) @@ -671,7 +671,7 @@ public abstract class TerremarkClientLiveTest newContext = null; try { - newContext = createWrapper( + newContext = createView( overrideDefaults(ImmutableMap.of(VCloudConstants.PROPERTY_VCLOUD_DEFAULT_ORG, org.getName(), VCloudConstants.PROPERTY_VCLOUD_DEFAULT_VDC, vdc.getName())), setupModules()) .unwrap(); @@ -703,7 +703,7 @@ public abstract class TerremarkClientLiveTest newContext = null; try { - newContext = createWrapper( + newContext = createView( overrideDefaults(ImmutableMap.of(VCloudConstants.PROPERTY_VCLOUD_DEFAULT_ORG, org.getName(), VCloudConstants.PROPERTY_VCLOUD_DEFAULT_TASKSLIST, tasksList.getName())), setupModules()) .unwrap(); @@ -737,7 +737,7 @@ public abstract class TerremarkClientLiveTest listOrgs() { diff --git a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/compute/suppliers/VAppTemplatesInOrgsLiveTest.java b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/compute/suppliers/VAppTemplatesInOrgsLiveTest.java index 4832de853d..b5f931d3c4 100644 --- a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/compute/suppliers/VAppTemplatesInOrgsLiveTest.java +++ b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/compute/suppliers/VAppTemplatesInOrgsLiveTest.java @@ -54,7 +54,7 @@ extends BaseComputeServiceContextLiveTest { @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); tmClient = injector.getInstance(TerremarkVCloudClient.class); allCatalogItemsInOrg = injector.getInstance(AllCatalogItemsInOrg.class); diff --git a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/internal/BaseTerremarkClientLiveTest.java b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/internal/BaseTerremarkClientLiveTest.java index 85eb23316f..2d16b21584 100644 --- a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/internal/BaseTerremarkClientLiveTest.java +++ b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/internal/BaseTerremarkClientLiveTest.java @@ -60,10 +60,10 @@ public abstract class BaseTerremarkClientLiveTest(new InetSocketAddressConnect(), 300, 1, TimeUnit.SECONDS); sshFactory = injector.getInstance(Factory.class); - connection = (S) RestContext.class.cast(wrapper.unwrap()).getApi(); + connection = (S) RestContext.class.cast(view.unwrap()).getApi(); } protected Module getSshModule() { diff --git a/compute/src/main/java/org/jclouds/compute/ComputeServiceContext.java b/compute/src/main/java/org/jclouds/compute/ComputeServiceContext.java index 771656f1a7..df6f6d3152 100644 --- a/compute/src/main/java/org/jclouds/compute/ComputeServiceContext.java +++ b/compute/src/main/java/org/jclouds/compute/ComputeServiceContext.java @@ -21,7 +21,7 @@ package org.jclouds.compute; import java.io.Closeable; import java.util.Map; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.compute.internal.ComputeServiceContextImpl; import org.jclouds.domain.Credentials; import org.jclouds.rest.RestContext; @@ -37,7 +37,7 @@ import com.google.inject.ImplementedBy; * */ @ImplementedBy(ComputeServiceContextImpl.class) -public interface ComputeServiceContext extends Closeable, Wrapper { +public interface ComputeServiceContext extends Closeable, View { ComputeService getComputeService(); @@ -69,8 +69,8 @@ public interface ComputeServiceContext extends Closeable, Wrapper { /** * will be removed in jclouds 1.6 * - * @see Wrapper#getInputType - * @see Wrapper#unwrap + * @see View#getInputType + * @see View#unwrap */ @Deprecated RestContext getProviderSpecificContext(); diff --git a/compute/src/main/java/org/jclouds/compute/internal/ComputeServiceContextImpl.java b/compute/src/main/java/org/jclouds/compute/internal/ComputeServiceContextImpl.java index 2b4380dd63..a2c3235bdd 100644 --- a/compute/src/main/java/org/jclouds/compute/internal/ComputeServiceContextImpl.java +++ b/compute/src/main/java/org/jclouds/compute/internal/ComputeServiceContextImpl.java @@ -30,7 +30,7 @@ import org.jclouds.compute.ComputeService; import org.jclouds.compute.ComputeServiceContext; import org.jclouds.compute.Utils; import org.jclouds.domain.Credentials; -import org.jclouds.internal.BaseWrapper; +import org.jclouds.internal.BaseView; import org.jclouds.location.Provider; import org.jclouds.rest.RestContext; @@ -40,14 +40,14 @@ import com.google.common.reflect.TypeToken; * @author Adrian Cole */ @Singleton -public class ComputeServiceContextImpl extends BaseWrapper implements ComputeServiceContext { +public class ComputeServiceContextImpl extends BaseView implements ComputeServiceContext { private final ComputeService computeService; private final Utils utils; @Inject - public ComputeServiceContextImpl(@Provider Context wrapped, @Provider TypeToken wrappedType, + public ComputeServiceContextImpl(@Provider Context backend, @Provider TypeToken backendType, ComputeService computeService, Utils utils) { - super(wrapped, wrappedType); + super(backend, backendType); this.computeService = checkNotNull(computeService, "computeService"); this.utils = checkNotNull(utils, "utils"); } diff --git a/compute/src/main/java/org/jclouds/compute/stub/StubApiMetadata.java b/compute/src/main/java/org/jclouds/compute/stub/StubApiMetadata.java index c08c89ab6f..c746563a21 100644 --- a/compute/src/main/java/org/jclouds/compute/stub/StubApiMetadata.java +++ b/compute/src/main/java/org/jclouds/compute/stub/StubApiMetadata.java @@ -62,7 +62,7 @@ public class StubApiMetadata extends BaseApiMetadata { .defaultCredential("stub") .defaultEndpoint("stub") .documentation(URI.create("http://www.jclouds.org/documentation/userguide/compute")) - .wrapper(ComputeServiceContext.class) + .view(ComputeServiceContext.class) .defaultModule(StubComputeServiceContextModule.class); } diff --git a/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceApiMetadataTest.java b/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceApiMetadataTest.java index 2079f0ef67..8766df08bd 100644 --- a/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceApiMetadataTest.java +++ b/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceApiMetadataTest.java @@ -1,6 +1,6 @@ package org.jclouds.compute.internal; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.apis.ApiMetadata; import org.jclouds.apis.internal.BaseApiMetadataTest; import org.jclouds.compute.ComputeServiceContext; @@ -17,7 +17,7 @@ import com.google.common.reflect.TypeToken; public abstract class BaseComputeServiceApiMetadataTest extends BaseApiMetadataTest { public BaseComputeServiceApiMetadataTest(ApiMetadata toTest) { - super(toTest, ImmutableSet.>of(TypeToken.of(ComputeServiceContext.class))); + super(toTest, ImmutableSet.>of(TypeToken.of(ComputeServiceContext.class))); } } \ No newline at end of file diff --git a/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceContextLiveTest.java b/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceContextLiveTest.java index e1580f1ce4..c6db584d3b 100644 --- a/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceContextLiveTest.java +++ b/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceContextLiveTest.java @@ -28,7 +28,7 @@ import com.google.common.reflect.TypeToken; public abstract class BaseComputeServiceContextLiveTest extends BaseGenericComputeServiceContextLiveTest { @Override - protected TypeToken wrapperType() { + protected TypeToken viewType() { return TypeToken.of(ComputeServiceContext.class); } diff --git a/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java b/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java index a9d23e9e3d..33fa6243d6 100644 --- a/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java +++ b/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java @@ -150,7 +150,7 @@ public abstract class BaseComputeServiceLiveTest extends BaseComputeServiceConte protected void buildSocketTester() { - SocketOpen socketOpen = wrapper.utils().injector().getInstance(SocketOpen.class); + SocketOpen socketOpen = view.utils().injector().getInstance(SocketOpen.class); socketTester = new RetryablePredicate(socketOpen, 60, 1, TimeUnit.SECONDS); // wait a maximum of 60 seconds for port 8080 to open. long maxWait = TimeUnit.SECONDS.toMillis(60); @@ -162,7 +162,7 @@ public abstract class BaseComputeServiceLiveTest extends BaseComputeServiceConte @Override protected void initializeContext() { super.initializeContext(); - client = wrapper.getComputeService(); + client = view.getComputeService(); } // wait up to 5 seconds for an auth exception @@ -320,7 +320,7 @@ public abstract class BaseComputeServiceLiveTest extends BaseComputeServiceConte } protected void checkHttpGet(NodeMetadata node) { - ComputeTestUtils.checkHttpGet(wrapper.utils().http(), node, 8080); + ComputeTestUtils.checkHttpGet(view.utils().http(), node, 8080); } @Test(enabled = true, dependsOnMethods = "testCompareSizes") @@ -416,7 +416,7 @@ public abstract class BaseComputeServiceLiveTest extends BaseComputeServiceConte public void testCredentialsCache() throws Exception { initializeContext(); for (NodeMetadata node : nodes) - assert (wrapper.utils().credentialStore().get("node#" + node.getId()) != null) : "credentials for " + node.getId(); + assert (view.utils().credentialStore().get("node#" + node.getId()) != null) : "credentials for " + node.getId(); } protected Map runScriptWithCreds(final String group, OperatingSystem os, @@ -431,7 +431,7 @@ public abstract class BaseComputeServiceLiveTest extends BaseComputeServiceConte assertNotNull(node.getGroup()); assertEquals(node.getGroup(), group); assertEquals(node.getState(), NodeState.RUNNING); - Credentials fromStore = wrapper.utils().credentialStore().get("node#" + node.getId()); + Credentials fromStore = view.utils().credentialStore().get("node#" + node.getId()); assertEquals(fromStore, node.getCredentials()); assert node.getPublicAddresses().size() >= 1 || node.getPrivateAddresses().size() >= 1 : "no ips in" + node; assertNotNull(node.getCredentials()); @@ -548,7 +548,7 @@ public abstract class BaseComputeServiceLiveTest extends BaseComputeServiceConte assertEquals(toDestroy, destroyed.size()); for (NodeMetadata node : filter(client.listNodesDetailsMatching(all()), inGroup(group))) { assert node.getState() == NodeState.TERMINATED : node; - assert wrapper.utils().credentialStore().get("node#" + node.getId()) == null : "credential should have been null for " + assert view.utils().credentialStore().get("node#" + node.getId()) == null : "credential should have been null for " + "node#" + node.getId(); } } @@ -650,7 +650,7 @@ public abstract class BaseComputeServiceLiveTest extends BaseComputeServiceConte format("ls %s/bundles/org/jboss/as/osgi/configadmin/main|sed -e 's/.*-//g' -e 's/.jar//g'", JBOSS_HOME)), configureSeconds)); - trackAvailabilityOfProcessOnNode(wrapper.utils().userExecutor().submit(new Callable() { + trackAvailabilityOfProcessOnNode(view.utils().userExecutor().submit(new Callable() { @Override public ExecResponse call() { return client.runScriptOnNode(nodeId, startJBoss(configuration), runAsRoot(false).blockOnComplete(false) @@ -666,7 +666,7 @@ public abstract class BaseComputeServiceLiveTest extends BaseComputeServiceConte client.runScriptOnNode(nodeId, "/tmp/init-jboss stop", runAsRoot(false).wrapInInitScript(false)); - trackAvailabilityOfProcessOnNode(wrapper.utils().userExecutor().submit(new Callable() { + trackAvailabilityOfProcessOnNode(view.utils().userExecutor().submit(new Callable() { @Override public ExecResponse call() { @@ -814,7 +814,7 @@ public abstract class BaseComputeServiceLiveTest extends BaseComputeServiceConte } protected void doCheckJavaIsInstalledViaSsh(NodeMetadata node, String taskName) throws IOException { - SshClient ssh = wrapper.utils().sshForNode().apply(node); + SshClient ssh = view.utils().sshForNode().apply(node); try { ssh.connect(); ExecResponse hello = ssh.exec("echo hello"); diff --git a/compute/src/test/java/org/jclouds/compute/internal/BaseGenericComputeServiceContextLiveTest.java b/compute/src/test/java/org/jclouds/compute/internal/BaseGenericComputeServiceContextLiveTest.java index 8ef4329885..c26b11f93d 100644 --- a/compute/src/test/java/org/jclouds/compute/internal/BaseGenericComputeServiceContextLiveTest.java +++ b/compute/src/test/java/org/jclouds/compute/internal/BaseGenericComputeServiceContextLiveTest.java @@ -22,7 +22,7 @@ import java.io.InputStream; import java.util.Properties; import java.util.concurrent.ConcurrentHashMap; -import org.jclouds.apis.BaseWrapperLiveTest; +import org.jclouds.apis.BaseViewLiveTest; import org.jclouds.compute.ComputeServiceContext; import org.jclouds.domain.LoginCredentials; import org.jclouds.domain.LoginCredentials.Builder; @@ -39,7 +39,7 @@ import com.google.inject.util.Modules; /** * @author Jason King, Adrian Cole */ -public abstract class BaseGenericComputeServiceContextLiveTest extends BaseWrapperLiveTest { +public abstract class BaseGenericComputeServiceContextLiveTest extends BaseViewLiveTest { protected String imageId; protected String loginUser; diff --git a/compute/src/test/java/org/jclouds/compute/internal/BaseImageExtensionLiveTest.java b/compute/src/test/java/org/jclouds/compute/internal/BaseImageExtensionLiveTest.java index db04c449ee..3bb31df3bf 100644 --- a/compute/src/test/java/org/jclouds/compute/internal/BaseImageExtensionLiveTest.java +++ b/compute/src/test/java/org/jclouds/compute/internal/BaseImageExtensionLiveTest.java @@ -53,13 +53,13 @@ public abstract class BaseImageExtensionLiveTest extends BaseComputeServiceConte * @return */ public Template getNodeTemplate() { - return wrapper.getComputeService().templateBuilder().any().build(); + return view.getComputeService().templateBuilder().any().build(); } @Test(groups = { "integration", "live" }, singleThreaded = true) public void testCreateImage() throws RunNodesException, InterruptedException { - ComputeService computeService = wrapper.getComputeService(); + ComputeService computeService = view.getComputeService(); Optional imageExtension = computeService.getImageExtension(); assertTrue("image extension was not present", imageExtension.isPresent()); @@ -87,20 +87,20 @@ public abstract class BaseImageExtensionLiveTest extends BaseComputeServiceConte @Test(groups = { "integration", "live" }, singleThreaded = true, dependsOnMethods = "testCreateImage") public void testSpawnNodeFromImage() throws RunNodesException { - ComputeService computeService = wrapper.getComputeService(); + ComputeService computeService = view.getComputeService(); Template template = computeService.templateBuilder().fromImage(getImage().get()).build(); NodeMetadata node = Iterables.getOnlyElement(computeService.createNodesInGroup("test-create-image", 1, template)); - SshClient client = wrapper.utils().sshForNode().apply(node); + SshClient client = view.utils().sshForNode().apply(node); client.connect(); ExecResponse hello = client.exec("echo hello"); assertEquals(hello.getOutput().trim(), "hello"); - wrapper.getComputeService().destroyNode(node.getId()); + view.getComputeService().destroyNode(node.getId()); } @@ -108,7 +108,7 @@ public abstract class BaseImageExtensionLiveTest extends BaseComputeServiceConte "testSpawnNodeFromImage" }) public void testDeleteImage() { - ComputeService computeService = wrapper.getComputeService(); + ComputeService computeService = view.getComputeService(); Optional imageExtension = computeService.getImageExtension(); assertTrue("image extension was not present", imageExtension.isPresent()); @@ -123,7 +123,7 @@ public abstract class BaseImageExtensionLiveTest extends BaseComputeServiceConte } private Optional getImage() { - return Iterables.tryFind(wrapper.getComputeService().listImages(), new Predicate() { + return Iterables.tryFind(view.getComputeService().listImages(), new Predicate() { @Override public boolean apply(Image input) { return input.getId().contains("test-create-image"); diff --git a/compute/src/test/java/org/jclouds/compute/internal/BaseTemplateBuilderLiveTest.java b/compute/src/test/java/org/jclouds/compute/internal/BaseTemplateBuilderLiveTest.java index 7c2fc39fa7..d79e9e5ea0 100644 --- a/compute/src/test/java/org/jclouds/compute/internal/BaseTemplateBuilderLiveTest.java +++ b/compute/src/test/java/org/jclouds/compute/internal/BaseTemplateBuilderLiveTest.java @@ -66,11 +66,11 @@ import com.google.inject.Module; public abstract class BaseTemplateBuilderLiveTest extends BaseComputeServiceContextLiveTest { public void testCompareSizes() throws Exception { - Hardware defaultSize = wrapper.getComputeService().templateBuilder().build().getHardware(); + Hardware defaultSize = view.getComputeService().templateBuilder().build().getHardware(); - Hardware smallest = wrapper.getComputeService().templateBuilder().smallest().build().getHardware(); - Hardware fastest = wrapper.getComputeService().templateBuilder().fastest().build().getHardware(); - Hardware biggest = wrapper.getComputeService().templateBuilder().biggest().build().getHardware(); + Hardware smallest = view.getComputeService().templateBuilder().smallest().build().getHardware(); + Hardware fastest = view.getComputeService().templateBuilder().fastest().build().getHardware(); + Hardware biggest = view.getComputeService().templateBuilder().biggest().build().getHardware(); System.out.printf("smallest %s%n", smallest); System.out.printf("fastest %s%n", fastest); @@ -89,8 +89,8 @@ public abstract class BaseTemplateBuilderLiveTest extends BaseComputeServiceCont } public void testFromTemplate() { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); - assertEquals(wrapper.getComputeService().templateBuilder().fromTemplate(defaultTemplate).build().toString(), + Template defaultTemplate = view.getComputeService().templateBuilder().build(); + assertEquals(view.getComputeService().templateBuilder().fromTemplate(defaultTemplate).build().toString(), defaultTemplate.toString()); } @@ -134,7 +134,7 @@ public abstract class BaseTemplateBuilderLiveTest extends BaseComputeServiceCont @Test(dataProvider = "osSupported") public void testTemplateBuilderCanFind(OsFamilyVersion64Bit matrix) throws InterruptedException { - TemplateBuilder builder = wrapper.getComputeService().templateBuilder().osFamily(matrix.family) + TemplateBuilder builder = view.getComputeService().templateBuilder().osFamily(matrix.family) .os64Bit(matrix.is64Bit); if (!matrix.version.equals("")) builder.osVersionMatches("^" + matrix.version + "$"); @@ -147,7 +147,7 @@ public abstract class BaseTemplateBuilderLiveTest extends BaseComputeServiceCont @Test(dataProvider = "osNotSupported", expectedExceptions = NoSuchElementException.class) public void testTemplateBuilderCannotFind(OsFamilyVersion64Bit matrix) throws InterruptedException { - TemplateBuilder builder = wrapper.getComputeService().templateBuilder().osFamily(matrix.family) + TemplateBuilder builder = view.getComputeService().templateBuilder().osFamily(matrix.family) .os64Bit(matrix.is64Bit); if (!matrix.version.equals("")) builder.osVersionMatches("^" + matrix.version + "$"); @@ -156,18 +156,18 @@ public abstract class BaseTemplateBuilderLiveTest extends BaseComputeServiceCont @Test public void testTemplateBuilderCanUseImageId() throws Exception { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); - wrapper.close(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); + view.close(); setupContext(); - Template template = wrapper.getComputeService().templateBuilder().imageId(defaultTemplate.getImage().getId()) + Template template = view.getComputeService().templateBuilder().imageId(defaultTemplate.getImage().getId()) .locationId(defaultTemplate.getLocation().getId()).build(); assertEquals(template.getImage(), defaultTemplate.getImage()); } @Test public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); assert defaultTemplate.getImage().getOperatingSystem().getVersion().matches("1[012].[10][04]") : defaultTemplate .getImage().getOperatingSystem().getVersion(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); @@ -179,8 +179,8 @@ public abstract class BaseTemplateBuilderLiveTest extends BaseComputeServiceCont @Test(groups = { "integration", "live" }) public void testGetAssignableLocations() throws Exception { - assertProvider(wrapper.unwrap()); - for (Location location : wrapper.getComputeService().listAssignableLocations()) { + assertProvider(view.unwrap()); + for (Location location : view.getComputeService().listAssignableLocations()) { System.err.printf("location %s%n", location); assert location.getId() != null : location; assert location != location.getParent() : location; @@ -218,14 +218,14 @@ public abstract class BaseTemplateBuilderLiveTest extends BaseComputeServiceCont @Test public void testTemplateBuilderWithImageIdSpecified() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); ComputeServiceContext context = null; try { Properties overrides = setupProperties(); overrides.setProperty("jclouds.image-id", defaultTemplate.getImage().getId()); - context = createWrapper(overrides, setupModules()); + context = createView(overrides, setupModules()); assertEquals(context.getComputeService().templateBuilder().build().toString(), defaultTemplate.toString()); } finally { @@ -238,7 +238,7 @@ public abstract class BaseTemplateBuilderLiveTest extends BaseComputeServiceCont Properties overrides = setupProperties(); overrides.setProperty(provider + ".image-id", defaultTemplate.getImage().getId()); - context = createWrapper(overrides, setupModules()); + context = createView(overrides, setupModules()); assertEquals(context.getComputeService().templateBuilder().build().toString(), defaultTemplate.toString()); } finally { @@ -266,7 +266,7 @@ public abstract class BaseTemplateBuilderLiveTest extends BaseComputeServiceCont boolean auth = authenticateSudo != null ? Boolean.valueOf(authenticateSudo) : true; overrides.setProperty(propertyKey + ".image.authenticate-sudo", auth + ""); - context = createWrapper(overrides, ImmutableSet.of(credentialStoreModule)); + context = createView(overrides, ImmutableSet.of(credentialStoreModule)); Iterable userPass = Splitter.on(':').split(login); String user = Iterables.get(userPass, 0); diff --git a/core/src/main/java/org/jclouds/ContextBuilder.java b/core/src/main/java/org/jclouds/ContextBuilder.java index b9a710e3c4..eed4b9c408 100644 --- a/core/src/main/java/org/jclouds/ContextBuilder.java +++ b/core/src/main/java/org/jclouds/ContextBuilder.java @@ -486,37 +486,37 @@ public class ContextBuilder { } /** - * @see #buildAndWrapWith(Class) + * @see #buildView(Class) */ - public W build(Class wrapperType) { - return buildAndWrapWith(checkNotNull(wrapperType, "wrapperType")); + public V build(Class viewType) { + return buildView(checkNotNull(viewType, "viewType")); } /** - * @see #buildAndWrapWith(TypeToken) + * @see #buildView(TypeToken) */ - public W buildAndWrapWith(Class wrapperType) { - return buildAndWrapWith(TypeToken.of(checkNotNull(wrapperType, "wrapperType"))); + public V buildView(Class viewType) { + return buildView(TypeToken.of(checkNotNull(viewType, "viewType"))); } /** - * this will build any {@link ApiMetadata#getWrappers() wrapper} supported by the ApiMetadata. + * this will build any {@link ApiMetadata#getViews() view} supported by the ApiMetadata. * * ex. {@code builder.build(BlobStoreContext.class) } will work, if {@code TypeToken} - * is a configured {@link ApiMetadata#getWrappers() wrapper} of this api. + * is a configured {@link ApiMetadata#getViews() view} of this api. * */ @SuppressWarnings("unchecked") - public W buildAndWrapWith(TypeToken wrapperType) { - TypeToken returnType; + public V buildView(TypeToken viewType) { + TypeToken returnType; try { - returnType = (TypeToken) Apis.findWrapper(apiMetadata, checkNotNull(wrapperType, "wrapperType")); + returnType = (TypeToken) Apis.findView(apiMetadata, checkNotNull(viewType, "viewType")); } catch (NoSuchElementException e) { throw new IllegalArgumentException(String.format( - "api %s not wrappable as %s; context: %s, wrappers: %s", apiMetadata, - wrapperType, apiMetadata.getContext(), apiMetadata.getWrappers())); + "api %s not wrappable as %s; context: %s, views: %s", apiMetadata, + viewType, apiMetadata.getContext(), apiMetadata.getViews())); } - return (W) buildInjector().getInstance(Key.get(TypeLiteral.get(returnType.getType()))); + return (V) buildInjector().getInstance(Key.get(TypeLiteral.get(returnType.getType()))); } /** diff --git a/core/src/main/java/org/jclouds/Wrapper.java b/core/src/main/java/org/jclouds/View.java similarity index 77% rename from core/src/main/java/org/jclouds/Wrapper.java rename to core/src/main/java/org/jclouds/View.java index 1695081b49..e61a51a599 100644 --- a/core/src/main/java/org/jclouds/Wrapper.java +++ b/core/src/main/java/org/jclouds/View.java @@ -22,10 +22,10 @@ import com.google.common.annotations.Beta; import com.google.common.reflect.TypeToken; /** - * {@link Wrapper} allows access to the provider-specific, or library-driven api - * behind an abstraction. One wrapped context can support multiple wrappers. + * {@link View} allows access to the provider-specific, or library-driven api + * behind an abstraction. One backend context can support multiple views. *

- * For example, the {@code CloudStackContext} can be wrapped by both + * For example, the {@code CloudStackContext} can be backend by both * {@code ComputeServiceContext} and {@code LoadBalancerServiceContext}, as the * api covers these features. * @@ -33,27 +33,27 @@ import com.google.common.reflect.TypeToken; * */ @Beta -public interface Wrapper { +public interface View { /** * * @return type of the context powering the current one. */ - TypeToken getWrappedType(); + TypeToken getBackendType(); /** - * Return an object of the specified type to allow access to the wrapped - * context. If the wrapped context is not assignable from the supplied type, + * Return an object of the specified type to allow access to the backend + * context. If the backend context is not assignable from the supplied type, * an {@link IllegalArgumentException} is thrown. * * @param type - * the type of the context to be returned. The wrapped context must + * the type of the context to be returned. The backend context must * be assignable from this type. * @return an instance of the specified type * @throws IllegalArgumentException - * if the wrapped context is not assignable from the specified + * if the backend context is not assignable from the specified * class. - * @see #getWrappedType() + * @see #getBackendType() */ C unwrap(TypeToken type) throws IllegalArgumentException; @@ -69,7 +69,7 @@ public interface Wrapper { * * @throws ClassCastException * if the user supplied {@code C} param is not assignableFrom - * {@link #getWrappedType()} + * {@link #getBackendType()} */ C unwrap() throws ClassCastException; diff --git a/core/src/main/java/org/jclouds/apis/ApiMetadata.java b/core/src/main/java/org/jclouds/apis/ApiMetadata.java index ddf396ea7e..4798c0dcc5 100644 --- a/core/src/main/java/org/jclouds/apis/ApiMetadata.java +++ b/core/src/main/java/org/jclouds/apis/ApiMetadata.java @@ -24,7 +24,7 @@ import java.util.Properties; import java.util.Set; import org.jclouds.Context; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.javax.annotation.Nullable; import com.google.common.annotations.Beta; @@ -59,19 +59,19 @@ public interface ApiMetadata extends Serializable { Builder context(TypeToken context); /** - * @see ApiMetadata#getWrappers() + * @see ApiMetadata#getViews() */ - Builder wrapper(Class wrapper); + Builder view(Class view); /** - * @see ApiMetadata#getWrappers() + * @see ApiMetadata#getViews() */ - Builder wrapper(TypeToken wrapper); + Builder view(TypeToken view); /** - * @see ApiMetadata#getWrappers() + * @see ApiMetadata#getViews() */ - Builder wrappers(Set> wrappers); + Builder views(Set> views); /** * @see ApiMetadata#getEndpointName() @@ -267,6 +267,6 @@ public interface ApiMetadata extends Serializable { /** * @return types of contexts this can be transformed into, for example {@code BlobStoreContext} */ - Set> getWrappers(); + Set> getViews(); } \ No newline at end of file diff --git a/core/src/main/java/org/jclouds/apis/ApiPredicates.java b/core/src/main/java/org/jclouds/apis/ApiPredicates.java index 2e9327ec5f..45fbc620a8 100644 --- a/core/src/main/java/org/jclouds/apis/ApiPredicates.java +++ b/core/src/main/java/org/jclouds/apis/ApiPredicates.java @@ -20,7 +20,7 @@ package org.jclouds.apis; import static com.google.common.base.Preconditions.checkNotNull; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.rest.RestApiMetadata; import org.jclouds.util.Preconditions2; @@ -139,7 +139,7 @@ public class ApiPredicates { * * @return the apis with contexts transformable to the given type */ - public static Predicate contextWrappableAs(final TypeToken type) { + public static Predicate viewableAs(final TypeToken type) { checkNotNull(type, "context must be defined"); return new Predicate() { /** @@ -147,7 +147,7 @@ public class ApiPredicates { */ @Override public boolean apply(ApiMetadata apiMetadata) { - for (TypeToken to : apiMetadata.getWrappers()) + for (TypeToken to : apiMetadata.getViews()) if (type.isAssignableFrom(to)) return true; return false; @@ -158,7 +158,7 @@ public class ApiPredicates { */ @Override public String toString() { - return "contextWrappableAs(" + type + ")"; + return "viewableAs(" + type + ")"; } }; } diff --git a/core/src/main/java/org/jclouds/apis/Apis.java b/core/src/main/java/org/jclouds/apis/Apis.java index 35e36af2d9..fbb4c14282 100644 --- a/core/src/main/java/org/jclouds/apis/Apis.java +++ b/core/src/main/java/org/jclouds/apis/Apis.java @@ -25,7 +25,7 @@ import static com.google.common.collect.Iterables.find; import java.util.NoSuchElementException; import java.util.ServiceLoader; -import org.jclouds.Wrapper; +import org.jclouds.View; import com.google.common.base.Function; import com.google.common.base.Predicate; @@ -107,12 +107,12 @@ public class Apis { * * @return the apis with contexts assignable from given type */ - public static Iterable contextWrappableAs(TypeToken type) { - return filter(all(), ApiPredicates.contextWrappableAs(type)); + public static Iterable viewableAs(TypeToken type) { + return filter(all(), ApiPredicates.viewableAs(type)); } - public static Iterable contextWrappableAs(Class type) { - return filter(all(), ApiPredicates.contextWrappableAs(TypeToken.of(type))); + public static Iterable viewableAs(Class type) { + return filter(all(), ApiPredicates.viewableAs(TypeToken.of(type))); } /** @@ -123,15 +123,15 @@ public class Apis { * * @return the apis with contexts transformable to the given type */ - public static TypeToken findWrapper(final ApiMetadata apiMetadata, final TypeToken wrapper) + public static TypeToken findView(final ApiMetadata apiMetadata, final TypeToken view) throws NoSuchElementException { checkNotNull(apiMetadata, "apiMetadata must be defined"); - checkNotNull(wrapper, "context must be defined"); - return Iterables.find(apiMetadata.getWrappers(), new Predicate>() { + checkNotNull(view, "context must be defined"); + return Iterables.find(apiMetadata.getViews(), new Predicate>() { @Override public boolean apply(TypeToken input) { - return wrapper.isAssignableFrom(input); + return view.isAssignableFrom(input); } }); diff --git a/core/src/main/java/org/jclouds/apis/internal/BaseApiMetadata.java b/core/src/main/java/org/jclouds/apis/internal/BaseApiMetadata.java index 01b24ccfb4..0864370f23 100644 --- a/core/src/main/java/org/jclouds/apis/internal/BaseApiMetadata.java +++ b/core/src/main/java/org/jclouds/apis/internal/BaseApiMetadata.java @@ -38,7 +38,7 @@ import java.util.Properties; import java.util.Set; import org.jclouds.Context; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.apis.ApiMetadata; import com.google.common.base.Objects; @@ -82,7 +82,7 @@ public abstract class BaseApiMetadata implements ApiMetadata { public static class Builder implements ApiMetadata.Builder { protected String id; protected String name; - protected Set> wrappers = ImmutableSet.of(); + protected Set> views = ImmutableSet.of(); protected String endpointName = "https endpoint"; protected String identityName; protected Optional credentialName = Optional.absent(); @@ -119,24 +119,24 @@ public abstract class BaseApiMetadata implements ApiMetadata { * {@inheritDoc} */ @Override - public Builder wrapper(Class wrapper) { - return wrapper(TypeToken.of(checkNotNull(wrapper, "wrapper"))); + public Builder view(Class view) { + return view(TypeToken.of(checkNotNull(view, "view"))); } /** * {@inheritDoc} */ @Override - public Builder wrapper(TypeToken wrapper) { - return wrappers(ImmutableSet.>of(checkNotNull(wrapper, "wrapper"))); + public Builder view(TypeToken view) { + return views(ImmutableSet.>of(checkNotNull(view, "view"))); } /** * {@inheritDoc} */ @Override - public Builder wrappers(Set> wrappers) { - this.wrappers = ImmutableSet.copyOf(checkNotNull(wrappers, "wrappers")); + public Builder views(Set> views) { + this.views = ImmutableSet.copyOf(checkNotNull(views, "views")); return this; } @@ -257,7 +257,7 @@ public abstract class BaseApiMetadata implements ApiMetadata { } public Builder fromApiMetadata(ApiMetadata in) { - return id(in.getId()).wrappers(in.getWrappers()).name(in.getName()).endpointName(in.getEndpointName()).identityName( + return id(in.getId()).views(in.getViews()).name(in.getName()).endpointName(in.getEndpointName()).identityName( in.getIdentityName()).credentialName(in.getCredentialName().orNull()).version(in.getVersion()) .buildVersion(in.getBuildVersion().orNull()).defaultEndpoint(in.getDefaultEndpoint().orNull()) .defaultIdentity(in.getDefaultIdentity().orNull()).defaultCredential( @@ -277,7 +277,7 @@ public abstract class BaseApiMetadata implements ApiMetadata { protected final String id; protected final String name; - protected final Set> wrappers; + protected final Set> views; protected final String endpointName; protected final String identityName; protected final Optional credentialName; @@ -292,20 +292,20 @@ public abstract class BaseApiMetadata implements ApiMetadata { protected final Set> defaultModules; protected BaseApiMetadata(Builder builder) { - this(builder.id, builder.name, builder.wrappers, builder.endpointName, builder.identityName, builder.credentialName, + this(builder.id, builder.name, builder.views, builder.endpointName, builder.identityName, builder.credentialName, builder.version, builder.buildVersion, builder.defaultEndpoint, builder.defaultIdentity, builder.defaultCredential, builder.defaultProperties, builder.documentation, builder.context, builder.defaultModules); } - public BaseApiMetadata(String id, String name, Set> wrappers, String endpointName, String identityName, + public BaseApiMetadata(String id, String name, Set> views, String endpointName, String identityName, Optional credentialName, String version, Optional buildVersion, Optional defaultEndpoint, Optional defaultIdentity, Optional defaultCredential, Properties defaultProperties, URI documentation, TypeToken context, Set> defaultModules) { this.id = checkNotNull(id, "id"); this.name = checkNotNull(name, "name"); - this.wrappers = ImmutableSet.copyOf(checkNotNull(wrappers, "wrappers")); + this.views = ImmutableSet.copyOf(checkNotNull(views, "views")); this.endpointName = checkNotNull(endpointName, "endpointName"); this.identityName = checkNotNull(identityName, "identityName"); this.credentialName = checkNotNull(credentialName, "credentialName"); @@ -330,12 +330,12 @@ public abstract class BaseApiMetadata implements ApiMetadata { return false; ApiMetadata that = ApiMetadata.class.cast(o); return equal(this.getId(), that.getId()) && equal(this.getName(), that.getName()) - && equal(this.getWrappers(), that.getWrappers()); + && equal(this.getViews(), that.getViews()); } @Override public int hashCode() { - return Objects.hashCode(getId(), getName(), getWrappers()); + return Objects.hashCode(getId(), getName(), getViews()); } @Override @@ -344,7 +344,7 @@ public abstract class BaseApiMetadata implements ApiMetadata { } protected ToStringHelper string() { - return Objects.toStringHelper("").add("id", getId()).add("name", getName()).add("wrappers", getWrappers()).add( + return Objects.toStringHelper("").add("id", getId()).add("name", getName()).add("views", getViews()).add( "endpointName", getEndpointName()).add("identityName", getIdentityName()).add("credentialName", getCredentialName()).add("documentation", getDocumentation()); } @@ -369,8 +369,8 @@ public abstract class BaseApiMetadata implements ApiMetadata { * {@inheritDoc} */ @Override - public Set> getWrappers() { - return wrappers; + public Set> getViews() { + return views; } /** diff --git a/core/src/main/java/org/jclouds/internal/BaseWrapper.java b/core/src/main/java/org/jclouds/internal/BaseView.java similarity index 71% rename from core/src/main/java/org/jclouds/internal/BaseWrapper.java rename to core/src/main/java/org/jclouds/internal/BaseView.java index 745dd5d214..b58ebd32a4 100644 --- a/core/src/main/java/org/jclouds/internal/BaseWrapper.java +++ b/core/src/main/java/org/jclouds/internal/BaseView.java @@ -24,7 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import javax.inject.Singleton; import org.jclouds.Context; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.location.Provider; import com.google.common.base.Objects; @@ -36,21 +36,21 @@ import com.google.common.reflect.TypeToken; * @author Adrian Cole */ @Singleton -public abstract class BaseWrapper extends ForwardingObject implements Wrapper { +public abstract class BaseView extends ForwardingObject implements View { - private final Context wrapped; - private final TypeToken wrappedType; + private final Context backend; + private final TypeToken backendType; - protected BaseWrapper(@Provider Context wrapped, @Provider TypeToken wrappedType) { - this.wrapped = checkNotNull(wrapped, "wrapped"); - this.wrappedType = checkNotNull(wrappedType, "wrappedType"); + protected BaseView(@Provider Context backend, @Provider TypeToken backendType) { + this.backend = checkNotNull(backend, "backend"); + this.backendType = checkNotNull(backendType, "backendType"); } @SuppressWarnings("unchecked") @Override public C unwrap(TypeToken type) { - checkArgument(checkNotNull(type, "type").isAssignableFrom(wrappedType), "wrapped type: %s not assignable from %s", wrappedType, type); - return (C) wrapped; + checkArgument(checkNotNull(type, "type").isAssignableFrom(backendType), "backend type: %s not assignable from %s", backendType, type); + return (C) backend; } @Override @@ -59,19 +59,19 @@ public abstract class BaseWrapper extends ForwardingObject implements Wrapper { } @Override - public TypeToken getWrappedType() { - return wrappedType; + public TypeToken getBackendType() { + return backendType; } @SuppressWarnings("unchecked") @Override public C unwrap() throws ClassCastException { - return (C) unwrap(getWrappedType()); + return (C) unwrap(getBackendType()); } @Override protected Context delegate() { - return wrapped; + return backend; } @Override @@ -80,13 +80,13 @@ public abstract class BaseWrapper extends ForwardingObject implements Wrapper { return true; if (o == null || getClass() != o.getClass()) return false; - BaseWrapper that = BaseWrapper.class.cast(o); - return equal(this.delegate(), that.delegate()) && equal(this.getWrappedType(), that.getWrappedType()); + BaseView that = BaseView.class.cast(o); + return equal(this.delegate(), that.delegate()) && equal(this.getBackendType(), that.getBackendType()); } @Override public int hashCode() { - return Objects.hashCode(delegate(), getWrappedType()); + return Objects.hashCode(delegate(), getBackendType()); } @Override @@ -95,8 +95,7 @@ public abstract class BaseWrapper extends ForwardingObject implements Wrapper { } protected ToStringHelper string() { - return Objects.toStringHelper("").add("wrapped", delegate()).add("wrappedType", getWrappedType()); + return Objects.toStringHelper("").add("backend", delegate()).add("backendType", getBackendType()); } - } diff --git a/core/src/main/java/org/jclouds/providers/ProviderPredicates.java b/core/src/main/java/org/jclouds/providers/ProviderPredicates.java index 5079189422..8bb7899139 100644 --- a/core/src/main/java/org/jclouds/providers/ProviderPredicates.java +++ b/core/src/main/java/org/jclouds/providers/ProviderPredicates.java @@ -19,7 +19,7 @@ package org.jclouds.providers; import org.jclouds.Context; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.apis.ApiMetadata; import org.jclouds.apis.ApiPredicates; import org.jclouds.util.Preconditions2; @@ -62,9 +62,9 @@ public class ProviderPredicates { } public static class TransformableTo implements Predicate { - private final TypeToken type; + private final TypeToken type; - public TransformableTo(TypeToken type) { + public TransformableTo(TypeToken type) { Preconditions.checkNotNull(type, "context must be defined"); this.type = type; } @@ -74,7 +74,7 @@ public class ProviderPredicates { */ @Override public boolean apply(ProviderMetadata providerMetadata) { - return ApiPredicates.contextWrappableAs(type).apply(providerMetadata.getApiMetadata()); + return ApiPredicates.viewableAs(type).apply(providerMetadata.getApiMetadata()); } /** @@ -82,7 +82,7 @@ public class ProviderPredicates { */ @Override public String toString() { - return "contextWrappableAs(" + type + ")"; + return "viewableAs(" + type + ")"; } } @@ -272,7 +272,7 @@ public class ProviderPredicates { * * @return the providers with an context transformable to from the given type. */ - public static Predicate contextWrappableAs(final TypeToken type) { + public static Predicate viewableAs(final TypeToken type) { return new TransformableTo(type); } diff --git a/core/src/main/java/org/jclouds/providers/Providers.java b/core/src/main/java/org/jclouds/providers/Providers.java index 8ec2ffb4ae..da69a11e63 100644 --- a/core/src/main/java/org/jclouds/providers/Providers.java +++ b/core/src/main/java/org/jclouds/providers/Providers.java @@ -25,7 +25,7 @@ import java.util.NoSuchElementException; import java.util.ServiceLoader; import org.jclouds.Context; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.apis.ApiMetadata; import com.google.common.base.Function; @@ -101,19 +101,19 @@ public class Providers { } /** - * Returns the providers that are of the provided contextWrappableAs. + * Returns the providers that are of the provided viewableAs. * - * @param contextWrappableAs - * the contextWrappableAs to providers to return + * @param viewableAs + * the viewableAs to providers to return * - * @return the providers of the provided contextWrappableAs + * @return the providers of the provided viewableAs */ - public static Iterable contextWrappableAs(TypeToken contextWrappableAs) { - return filter(all(), ProviderPredicates.contextWrappableAs(contextWrappableAs)); + public static Iterable viewableAs(TypeToken viewableAs) { + return filter(all(), ProviderPredicates.viewableAs(viewableAs)); } - public static Iterable contextWrappableAs(Class contextWrappableAs) { - return filter(all(), ProviderPredicates.contextWrappableAs(TypeToken.of(contextWrappableAs))); + public static Iterable viewableAs(Class viewableAs) { + return filter(all(), ProviderPredicates.viewableAs(TypeToken.of(viewableAs))); } /** @@ -145,7 +145,7 @@ public class Providers { /** * Returns the providers that are bound to the same location as the given ISO 3166 code - * regardless of contextWrappableAs. + * regardless of viewableAs. * * @param isoCode * the ISO 3166 code to filter providers by @@ -158,29 +158,29 @@ public class Providers { /** * Returns the providers that are bound to the same location as the given ISO 3166 code and of - * the given contextWrappableAs. + * the given viewableAs. * * @param iso3166Code * the ISO 3166 code to filter providers by - * @param contextWrappableAs - * the contextWrappableAs to filter providers by + * @param viewableAs + * the viewableAs to filter providers by * - * @return the providers bound by the given ISO 3166 code and of the proper contextWrappableAs + * @return the providers bound by the given ISO 3166 code and of the proper viewableAs */ public static Iterable boundedByIso3166Code(String iso3166Code, - TypeToken contextWrappableAs) { + TypeToken viewableAs) { return filter(all(), Predicates.and(ProviderPredicates.boundedByIso3166Code(iso3166Code), ProviderPredicates - .contextWrappableAs(contextWrappableAs))); + .viewableAs(viewableAs))); } public static Iterable boundedByIso3166Code(String iso3166Code, - Class contextWrappableAs) { - return boundedByIso3166Code(iso3166Code, TypeToken.of(contextWrappableAs)); + Class viewableAs) { + return boundedByIso3166Code(iso3166Code, TypeToken.of(viewableAs)); } /** * Returns the providers that have at least one common ISO 3166 code in common regardless of - * contextWrappableAs. + * viewableAs. * * @param providerMetadata * the provider metadata to use to filter providers by @@ -193,24 +193,24 @@ public class Providers { /** * Returns the providers that have at least one common ISO 3166 code and are of the given - * contextWrappableAs. + * viewableAs. * * @param providerMetadata * the provider metadata to use to filter providers by - * @param contextWrappableAs - * the contextWrappableAs to filter providers by + * @param viewableAs + * the viewableAs to filter providers by * * @return the providers that share at least one common ISO 3166 code and of the given - * contextWrappableAs + * viewableAs */ public static Iterable collocatedWith(ProviderMetadata providerMetadata, - TypeToken contextWrappableAs) { + TypeToken viewableAs) { return filter(all(), Predicates.and(ProviderPredicates.intersectingIso3166Code(providerMetadata), - ProviderPredicates.contextWrappableAs(contextWrappableAs))); + ProviderPredicates.viewableAs(viewableAs))); } public static Iterable collocatedWith(ProviderMetadata providerMetadata, - Class contextWrappableAs) { - return collocatedWith(providerMetadata, TypeToken.of(contextWrappableAs)); + Class viewableAs) { + return collocatedWith(providerMetadata, TypeToken.of(viewableAs)); } } diff --git a/core/src/main/java/org/jclouds/providers/config/BindProviderMetadataContextAndCredentials.java b/core/src/main/java/org/jclouds/providers/config/BindProviderMetadataContextAndCredentials.java index 140902c685..cbba82f485 100644 --- a/core/src/main/java/org/jclouds/providers/config/BindProviderMetadataContextAndCredentials.java +++ b/core/src/main/java/org/jclouds/providers/config/BindProviderMetadataContextAndCredentials.java @@ -90,8 +90,8 @@ public class BindProviderMetadataContextAndCredentials extends AbstractModule { @Provides @Provider @Singleton - protected Context wrapped(Injector i, @Provider TypeToken wrappedType) { - return Context.class.cast(i.getInstance(Key.get(TypeLiteral.get(wrappedType.getType())))); + protected Context backend(Injector i, @Provider TypeToken backendType) { + return Context.class.cast(i.getInstance(Key.get(TypeLiteral.get(backendType.getType())))); } } \ No newline at end of file diff --git a/core/src/main/java/org/jclouds/rest/Providers.java b/core/src/main/java/org/jclouds/rest/Providers.java index 3a157c7f50..200aef7f63 100644 --- a/core/src/main/java/org/jclouds/rest/Providers.java +++ b/core/src/main/java/org/jclouds/rest/Providers.java @@ -19,7 +19,7 @@ package org.jclouds.rest; import org.jclouds.Context; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.apis.Apis; import com.google.common.collect.ImmutableSet; @@ -39,7 +39,7 @@ public class Providers { * Gets a set of supported providers. Idea stolen from pallets (supported-clouds). */ public static Iterable getSupportedProviders() { - return getSupportedProvidersOfType(TypeToken.of(Wrapper.class)); + return getSupportedProvidersOfType(TypeToken.of(View.class)); } /** @@ -47,10 +47,10 @@ public class Providers { * (supported-clouds). * */ - public static Iterable getSupportedProvidersOfType(TypeToken type) { + public static Iterable getSupportedProvidersOfType(TypeToken type) { Builder builder = ImmutableSet. builder(); - builder.addAll(Iterables.transform(Apis.contextWrappableAs(type), Apis.idFunction())); - builder.addAll(Iterables.transform(org.jclouds.providers.Providers.contextWrappableAs(type), + builder.addAll(Iterables.transform(Apis.viewableAs(type), Apis.idFunction())); + builder.addAll(Iterables.transform(org.jclouds.providers.Providers.viewableAs(type), org.jclouds.providers.Providers.idFunction())); return builder.build(); } diff --git a/core/src/main/java/org/jclouds/rest/RestContextFactory.java b/core/src/main/java/org/jclouds/rest/RestContextFactory.java index b1f3ff0f98..49d3dbd698 100644 --- a/core/src/main/java/org/jclouds/rest/RestContextFactory.java +++ b/core/src/main/java/org/jclouds/rest/RestContextFactory.java @@ -22,7 +22,7 @@ import java.util.NoSuchElementException; import java.util.Properties; import org.jclouds.ContextBuilder; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.apis.Apis; import org.jclouds.javax.annotation.Nullable; import org.jclouds.providers.ProviderMetadata; @@ -122,8 +122,8 @@ public class RestContextFactory { Object context = builder.build(); if (context instanceof RestContext) { return RestContext.class.cast(context); - } else if (context instanceof Wrapper) { - Wrapper tctx = Wrapper.class.cast(context); + } else if (context instanceof View) { + View tctx = View.class.cast(context); return (RestContext) tctx.unwrap(TypeToken.of(RestContext.class)); } else { throw new IllegalArgumentException("provider " + providerOrApi + " contains an unknown context type: " diff --git a/core/src/main/java/org/jclouds/rest/internal/AsyncRestClientProxy.java b/core/src/main/java/org/jclouds/rest/internal/AsyncRestClientProxy.java index 71ef6f089a..4a80df1814 100644 --- a/core/src/main/java/org/jclouds/rest/internal/AsyncRestClientProxy.java +++ b/core/src/main/java/org/jclouds/rest/internal/AsyncRestClientProxy.java @@ -99,7 +99,7 @@ public class AsyncRestClientProxy implements InvocationHandler { private final Factory commandFactory; /** - * maximum duration of an unwrapped http Request + * maximum duration of an unbackend http Request */ @Inject(optional = true) @Named(Constants.PROPERTY_REQUEST_TIMEOUT) diff --git a/core/src/test/java/org/jclouds/apis/ApisTest.java b/core/src/test/java/org/jclouds/apis/ApisTest.java index 211837360c..97a75c669c 100644 --- a/core/src/test/java/org/jclouds/apis/ApisTest.java +++ b/core/src/test/java/org/jclouds/apis/ApisTest.java @@ -55,13 +55,13 @@ public class ApisTest { @Test public void testTransformableTo() { - Iterable apisMetadata = Apis.contextWrappableAs(Storage.class); + Iterable apisMetadata = Apis.viewableAs(Storage.class); for (ApiMetadata apiMetadata : apisMetadata) { assertEquals(testBlobstoreApi, apiMetadata); } - apisMetadata = Apis.contextWrappableAs(Compute.class); + apisMetadata = Apis.viewableAs(Compute.class); for (ApiMetadata apiMetadata : apisMetadata) { if (apiMetadata.getName().equals(testComputeApi.getName())) { @@ -71,7 +71,7 @@ public class ApisTest { } } - apisMetadata = Apis.contextWrappableAs(Balancer.class); + apisMetadata = Apis.viewableAs(Balancer.class); assertEquals(false, apisMetadata.iterator().hasNext()); } diff --git a/core/src/test/java/org/jclouds/apis/Balancer.java b/core/src/test/java/org/jclouds/apis/Balancer.java index 93c8d5cd5e..6fd42be146 100644 --- a/core/src/test/java/org/jclouds/apis/Balancer.java +++ b/core/src/test/java/org/jclouds/apis/Balancer.java @@ -19,7 +19,7 @@ package org.jclouds.apis; import org.jclouds.Context; -import org.jclouds.internal.BaseWrapper; +import org.jclouds.internal.BaseView; import org.jclouds.location.Provider; import com.google.common.reflect.TypeToken; @@ -28,7 +28,7 @@ import com.google.inject.Inject; /** * For tests */ -public class Balancer extends BaseWrapper { +public class Balancer extends BaseView { @Inject public Balancer(@Provider Context ctx, @Provider TypeToken inputType) { diff --git a/core/src/test/java/org/jclouds/apis/BaseWrapperLiveTest.java b/core/src/test/java/org/jclouds/apis/BaseViewLiveTest.java similarity index 76% rename from core/src/test/java/org/jclouds/apis/BaseWrapperLiveTest.java rename to core/src/test/java/org/jclouds/apis/BaseViewLiveTest.java index 8a90d06894..b6513ca8c0 100644 --- a/core/src/test/java/org/jclouds/apis/BaseWrapperLiveTest.java +++ b/core/src/test/java/org/jclouds/apis/BaseViewLiveTest.java @@ -21,7 +21,7 @@ package org.jclouds.apis; import java.util.Properties; import org.jclouds.Context; -import org.jclouds.Wrapper; +import org.jclouds.View; import com.google.common.io.Closeables; import com.google.common.reflect.TypeToken; @@ -31,26 +31,26 @@ import com.google.inject.Module; * * @author Adrian Cole */ -public abstract class BaseWrapperLiveTest extends BaseContextLiveTest{ +public abstract class BaseViewLiveTest extends BaseContextLiveTest{ - protected volatile W wrapper; + protected volatile V view; @Override protected void initializeContext() { Closeables.closeQuietly(context); - wrapper = createWrapper(setupProperties(), setupModules()); - context = wrapper.unwrap(); + view = createView(setupProperties(), setupModules()); + context = view.unwrap(); } - protected abstract TypeToken wrapperType(); + protected abstract TypeToken viewType(); @Override protected TypeToken contextType() { return TypeToken.of(Context.class); } - protected W createWrapper(Properties props, Iterable modules) { - return newBuilder().modules(modules).overrides(props).buildAndWrapWith(wrapperType()); + protected V createView(Properties props, Iterable modules) { + return newBuilder().modules(modules).overrides(props).buildView(viewType()); } } diff --git a/core/src/test/java/org/jclouds/apis/Compute.java b/core/src/test/java/org/jclouds/apis/Compute.java index 1f6e53b0a0..f725b9784d 100644 --- a/core/src/test/java/org/jclouds/apis/Compute.java +++ b/core/src/test/java/org/jclouds/apis/Compute.java @@ -19,7 +19,7 @@ package org.jclouds.apis; import org.jclouds.Context; -import org.jclouds.internal.BaseWrapper; +import org.jclouds.internal.BaseView; import org.jclouds.location.Provider; import com.google.common.reflect.TypeToken; @@ -27,7 +27,7 @@ import com.google.common.reflect.TypeToken; /** * For tests */ -public class Compute extends BaseWrapper { +public class Compute extends BaseView { public Compute(@Provider Context ctx, @Provider TypeToken inputType) { super(ctx, inputType); diff --git a/core/src/test/java/org/jclouds/apis/JcloudsTestBlobStoreApiMetadata.java b/core/src/test/java/org/jclouds/apis/JcloudsTestBlobStoreApiMetadata.java index ad9fab58cd..d67646956a 100644 --- a/core/src/test/java/org/jclouds/apis/JcloudsTestBlobStoreApiMetadata.java +++ b/core/src/test/java/org/jclouds/apis/JcloudsTestBlobStoreApiMetadata.java @@ -58,7 +58,7 @@ public class JcloudsTestBlobStoreApiMetadata extends BaseRestApiMetadata { protected Builder(){ super(IntegrationTestClient.class, IntegrationTestAsyncClient.class); id("test-blobstore-api") - .wrapper(Storage.class) + .view(Storage.class) .name("Test Blobstore Api") .identityName("user") .credentialName("password") diff --git a/core/src/test/java/org/jclouds/apis/JcloudsTestComputeApiMetadata.java b/core/src/test/java/org/jclouds/apis/JcloudsTestComputeApiMetadata.java index 990ca48d01..16e2868b1d 100644 --- a/core/src/test/java/org/jclouds/apis/JcloudsTestComputeApiMetadata.java +++ b/core/src/test/java/org/jclouds/apis/JcloudsTestComputeApiMetadata.java @@ -56,7 +56,7 @@ public class JcloudsTestComputeApiMetadata extends BaseRestApiMetadata { protected Builder(){ super(IntegrationTestClient.class, IntegrationTestAsyncClient.class); id("test-compute-api") - .wrapper(Compute.class) + .view(Compute.class) .name("Test Compute Api") .identityName("user") .credentialName("password") diff --git a/core/src/test/java/org/jclouds/apis/JcloudsTestYetAnotherComputeApiMetadata.java b/core/src/test/java/org/jclouds/apis/JcloudsTestYetAnotherComputeApiMetadata.java index 530629d212..ac10bd4b8a 100644 --- a/core/src/test/java/org/jclouds/apis/JcloudsTestYetAnotherComputeApiMetadata.java +++ b/core/src/test/java/org/jclouds/apis/JcloudsTestYetAnotherComputeApiMetadata.java @@ -56,7 +56,7 @@ public class JcloudsTestYetAnotherComputeApiMetadata extends BaseRestApiMetadata protected Builder(){ super(IntegrationTestClient.class, IntegrationTestAsyncClient.class); id("test-yet-another-compute-api") - .wrapper(Compute.class) + .view(Compute.class) .name("Test Yet Another Compute Api") .identityName("user") .credentialName("password") diff --git a/core/src/test/java/org/jclouds/apis/Storage.java b/core/src/test/java/org/jclouds/apis/Storage.java index c4f0f8f8cf..9ebe7c5b60 100644 --- a/core/src/test/java/org/jclouds/apis/Storage.java +++ b/core/src/test/java/org/jclouds/apis/Storage.java @@ -19,7 +19,7 @@ package org.jclouds.apis; import org.jclouds.Context; -import org.jclouds.internal.BaseWrapper; +import org.jclouds.internal.BaseView; import org.jclouds.location.Provider; import com.google.common.reflect.TypeToken; @@ -28,7 +28,7 @@ import com.google.inject.Inject; /** * For tests */ -public class Storage extends BaseWrapper { +public class Storage extends BaseView { @Inject public Storage(@Provider Context ctx, @Provider TypeToken inputType) { diff --git a/core/src/test/java/org/jclouds/apis/internal/BaseApiMetadataTest.java b/core/src/test/java/org/jclouds/apis/internal/BaseApiMetadataTest.java index e8c95de2ed..e0bd3a19cb 100644 --- a/core/src/test/java/org/jclouds/apis/internal/BaseApiMetadataTest.java +++ b/core/src/test/java/org/jclouds/apis/internal/BaseApiMetadataTest.java @@ -22,7 +22,7 @@ import static org.testng.Assert.assertEquals; import java.util.Set; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.apis.ApiMetadata; import org.jclouds.apis.Apis; import org.testng.annotations.Test; @@ -38,11 +38,11 @@ import com.google.common.reflect.TypeToken; public abstract class BaseApiMetadataTest { protected final ApiMetadata toTest; - protected final Set> wrappers; + protected final Set> views; - public BaseApiMetadataTest(ApiMetadata toTest, Set> wrappers) { + public BaseApiMetadataTest(ApiMetadata toTest, Set> views) { this.toTest = toTest; - this.wrappers = wrappers; + this.views = views; } @Test @@ -55,10 +55,10 @@ public abstract class BaseApiMetadataTest { // it is ok to have multiple services in the same classpath (ex. ec2 vs elb) @Test public void testTransformableToContains() { - for (TypeToken wrapper : wrappers) { - ImmutableSet ofType = ImmutableSet.copyOf(Apis.contextWrappableAs(wrapper)); + for (TypeToken view : views) { + ImmutableSet ofType = ImmutableSet.copyOf(Apis.viewableAs(view)); assert ofType.contains(toTest) : String.format("%s not found in %s for %s", toTest, ofType, - wrapper); + view); } } diff --git a/core/src/test/java/org/jclouds/internal/BaseWrapperTest.java b/core/src/test/java/org/jclouds/internal/BaseViewTest.java similarity index 85% rename from core/src/test/java/org/jclouds/internal/BaseWrapperTest.java rename to core/src/test/java/org/jclouds/internal/BaseViewTest.java index e2746f2c02..506899d066 100644 --- a/core/src/test/java/org/jclouds/internal/BaseWrapperTest.java +++ b/core/src/test/java/org/jclouds/internal/BaseViewTest.java @@ -34,8 +34,8 @@ import com.google.common.reflect.TypeToken; /** * @author Adrian Cole */ -@Test(groups = "unit", testName = "BaseWrapperTest") -public class BaseWrapperTest { +@Test(groups = "unit", testName = "BaseViewTest") +public class BaseViewTest { private static class Water extends ContextImpl { protected Water() { @@ -68,7 +68,7 @@ public class BaseWrapperTest { } } - private static class Wine extends BaseWrapper { + private static class Wine extends BaseView { protected Wine() { super(new Water(), TypeToken.of(Water.class)); @@ -77,19 +77,19 @@ public class BaseWrapperTest { public void testWaterTurnedIntoWine() { Wine wine = new Wine(); - assertEquals(wine.getWrappedType(), TypeToken.of(Water.class)); + assertEquals(wine.getBackendType(), TypeToken.of(Water.class)); assertEquals(wine.unwrap(TypeToken.of(Water.class)), new Water()); assertEquals(wine.unwrap(), new Water()); } public void testPeanutButterDidntTurnIntoWine() { Wine wine = new Wine(); - assertNotEquals(wine.getWrappedType(), TypeToken.of(PeanutButter.class)); + assertNotEquals(wine.getBackendType(), TypeToken.of(PeanutButter.class)); try { wine.unwrap(TypeToken.of(PeanutButter.class)); assertFalse(true); } catch (IllegalArgumentException e) { - assertEquals(e.getMessage(), "wrapped type: org.jclouds.internal.BaseWrapperTest$Water not assignable from org.jclouds.internal.BaseWrapperTest$PeanutButter"); + assertEquals(e.getMessage(), "backend type: org.jclouds.internal.BaseViewTest$Water not assignable from org.jclouds.internal.BaseViewTest$PeanutButter"); } } diff --git a/core/src/test/java/org/jclouds/providers/ProvidersTest.java b/core/src/test/java/org/jclouds/providers/ProvidersTest.java index 465421ee62..0432219b99 100644 --- a/core/src/test/java/org/jclouds/providers/ProvidersTest.java +++ b/core/src/test/java/org/jclouds/providers/ProvidersTest.java @@ -63,13 +63,13 @@ public class ProvidersTest { @Test public void testTransformableTo() { - Iterable providersMetadata = Providers.contextWrappableAs(Storage.class); + Iterable providersMetadata = Providers.viewableAs(Storage.class); for (ProviderMetadata providerMetadata : providersMetadata) { assertEquals(testBlobstoreProvider, providerMetadata); } - providersMetadata = Providers.contextWrappableAs(Compute.class); + providersMetadata = Providers.viewableAs(Compute.class); for (ProviderMetadata providerMetadata : providersMetadata) { if (providerMetadata.getName().equals(testComputeProvider.getName())) { @@ -79,7 +79,7 @@ public class ProvidersTest { } } - providersMetadata = Providers.contextWrappableAs(Balancer.class); + providersMetadata = Providers.viewableAs(Balancer.class); assertEquals(false, providersMetadata.iterator().hasNext()); } diff --git a/core/src/test/java/org/jclouds/providers/config/BindProviderMetadataContextAndCredentialsTest.java b/core/src/test/java/org/jclouds/providers/config/BindProviderMetadataContextAndCredentialsTest.java index 1a0d071fa2..8a345016f9 100644 --- a/core/src/test/java/org/jclouds/providers/config/BindProviderMetadataContextAndCredentialsTest.java +++ b/core/src/test/java/org/jclouds/providers/config/BindProviderMetadataContextAndCredentialsTest.java @@ -60,7 +60,7 @@ public class BindProviderMetadataContextAndCredentialsTest { @SuppressWarnings("unused") private static class ExpectedBindings { - private final javax.inject.Provider wrapped; + private final javax.inject.Provider backend; private final ProviderMetadata providerMetadata; private final Credentials creds; private final String identity; @@ -72,13 +72,13 @@ public class BindProviderMetadataContextAndCredentialsTest { private final String buildVersion; @Inject - private ExpectedBindings(@Provider javax.inject.Provider wrapped, ProviderMetadata providerMetadata, + private ExpectedBindings(@Provider javax.inject.Provider backend, ProviderMetadata providerMetadata, @Provider Credentials creds, @Identity String identity, @Nullable @Credential String credential, @Provider String providerId, @Iso3166 Set iso3166Codes, @Api String apiId, @ApiVersion String apiVersion, @Nullable @BuildVersion String buildVersion, - @Provider TypeToken wrappedToken, FilterStringsBoundToInjectorByName filter) { - this.wrapped = wrapped; - assertEquals(wrappedToken, providerMetadata.getApiMetadata().getContext()); + @Provider TypeToken backendToken, FilterStringsBoundToInjectorByName filter) { + this.backend = backend; + assertEquals(backendToken, providerMetadata.getApiMetadata().getContext()); this.providerMetadata = providerMetadata; Properties props = new Properties(); props.putAll(filter.apply(Predicates. alwaysTrue())); diff --git a/core/src/test/java/org/jclouds/providers/internal/BaseProviderMetadataTest.java b/core/src/test/java/org/jclouds/providers/internal/BaseProviderMetadataTest.java index 70d0e1d412..96cef94607 100644 --- a/core/src/test/java/org/jclouds/providers/internal/BaseProviderMetadataTest.java +++ b/core/src/test/java/org/jclouds/providers/internal/BaseProviderMetadataTest.java @@ -24,7 +24,7 @@ import static org.testng.Assert.assertEquals; import java.util.Set; import java.util.logging.Logger; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.apis.ApiMetadata; import org.jclouds.providers.ProviderMetadata; import org.jclouds.providers.Providers; @@ -42,12 +42,12 @@ public abstract class BaseProviderMetadataTest { private final ProviderMetadata toTest; private final ApiMetadata expectedApi; - private final Set> wrappers; + private final Set> views; public BaseProviderMetadataTest(ProviderMetadata toTest, ApiMetadata expectedApi) { this.toTest = checkNotNull(toTest, "toTest must be defined"); this.expectedApi = checkNotNull(expectedApi, "expectedApi must be defined"); - this.wrappers = expectedApi.getWrappers(); + this.views = expectedApi.getViews(); } @Test @@ -68,10 +68,10 @@ public abstract class BaseProviderMetadataTest { @Test public void testTransformableToContains() { - for (TypeToken wrapper : wrappers) { - ImmutableSet ofType = ImmutableSet.copyOf(Providers.contextWrappableAs(wrapper)); + for (TypeToken view : views) { + ImmutableSet ofType = ImmutableSet.copyOf(Providers.viewableAs(view)); assert ofType.contains(toTest) : String.format("%s not found in %s for %s", toTest, ofType, - wrapper); + view); } } diff --git a/core/src/test/java/org/jclouds/rest/internal/BaseRestApiMetadataTest.java b/core/src/test/java/org/jclouds/rest/internal/BaseRestApiMetadataTest.java index 702e9fe873..e16a760c28 100644 --- a/core/src/test/java/org/jclouds/rest/internal/BaseRestApiMetadataTest.java +++ b/core/src/test/java/org/jclouds/rest/internal/BaseRestApiMetadataTest.java @@ -20,7 +20,7 @@ package org.jclouds.rest.internal; import java.util.Set; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.apis.ApiMetadata; import org.jclouds.apis.Apis; import org.jclouds.apis.internal.BaseApiMetadataTest; @@ -38,8 +38,8 @@ import com.google.common.reflect.TypeToken; @Test(groups = "unit") public abstract class BaseRestApiMetadataTest extends BaseApiMetadataTest { - public BaseRestApiMetadataTest(RestApiMetadata toTest, Set> wrappers) { - super(toTest, wrappers); + public BaseRestApiMetadataTest(RestApiMetadata toTest, Set> views) { + super(toTest, views); } @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 bf21b33c32..f4a5b6439d 100644 --- a/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java +++ b/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java @@ -939,7 +939,7 @@ public class RestAnnotationProcessorTest extends BaseRestClientTest { @Path("/{foo}") @MapBinder(BindToJsonPayload.class) @Consumes(MediaType.APPLICATION_JSON) - Wrapper putWithMethodBinderConsumes(@PathParam("foo") @PayloadParam("fooble") String path); + View putWithMethodBinderConsumes(@PathParam("foo") @PayloadParam("fooble") String path); @GET @Path("/") @@ -1017,7 +1017,7 @@ public class RestAnnotationProcessorTest extends BaseRestClientTest { ListenableFuture rowdy(@PathParam("id") int path); } - static class Wrapper { + static class View { String foo; } @@ -1069,7 +1069,7 @@ public class RestAnnotationProcessorTest extends BaseRestClientTest { assertResponseParserClassEquals(method, request, ParseJson.class); // now test that it works! - Function parser = (Function) RestAnnotationProcessor + Function parser = (Function) RestAnnotationProcessor .createResponseParser(parserFactory, injector, method, request); assertEquals(parser.apply(new HttpResponse(200, "ok", newStringPayload("{ foo:\"bar\"}"))).foo, "bar"); diff --git a/labs/elb/src/main/java/org/jclouds/elb/ELBApiMetadata.java b/labs/elb/src/main/java/org/jclouds/elb/ELBApiMetadata.java index 53ed7685f9..31dc402184 100644 --- a/labs/elb/src/main/java/org/jclouds/elb/ELBApiMetadata.java +++ b/labs/elb/src/main/java/org/jclouds/elb/ELBApiMetadata.java @@ -81,7 +81,7 @@ public class ELBApiMetadata extends BaseRestApiMetadata { .defaultProperties(ELBApiMetadata.defaultProperties()) .defaultEndpoint("https://elasticloadbalancing.us-east-1.amazonaws.com") .documentation(URI.create("http://docs.amazonwebservices.com/ElasticLoadBalancing/latest/APIReference")) - .wrapper(LoadBalancerServiceContext.class) + .view(LoadBalancerServiceContext.class) .defaultModules(ImmutableSet.>of(ELBRestClientModule.class, ELBLoadBalancerContextModule.class)); } diff --git a/labs/glesys/src/main/java/org/jclouds/glesys/GleSYSApiMetadata.java b/labs/glesys/src/main/java/org/jclouds/glesys/GleSYSApiMetadata.java index a258b0a973..7dbfcf25c0 100644 --- a/labs/glesys/src/main/java/org/jclouds/glesys/GleSYSApiMetadata.java +++ b/labs/glesys/src/main/java/org/jclouds/glesys/GleSYSApiMetadata.java @@ -80,7 +80,7 @@ public class GleSYSApiMetadata extends BaseRestApiMetadata { .version("1") .defaultEndpoint("https://api.glesys.com") .defaultProperties(GleSYSApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(ComputeServiceContext.class)) + .view(TypeToken.of(ComputeServiceContext.class)) .defaultModules(ImmutableSet.>of(GleSYSComputeServiceContextModule.class, GleSYSRestClientModule.class)); } diff --git a/labs/glesys/src/main/java/org/jclouds/glesys/functions/ParseTemplatesFromHttpResponse.java b/labs/glesys/src/main/java/org/jclouds/glesys/functions/ParseTemplatesFromHttpResponse.java index be87e2adfd..c03f109e27 100644 --- a/labs/glesys/src/main/java/org/jclouds/glesys/functions/ParseTemplatesFromHttpResponse.java +++ b/labs/glesys/src/main/java/org/jclouds/glesys/functions/ParseTemplatesFromHttpResponse.java @@ -44,9 +44,9 @@ public class ParseTemplatesFromHttpResponse implements Function>> parser; @Inject - public ParseTemplatesFromHttpResponse(GsonWrapper gsonWrapper) { - this.parser = new ParseFirstJsonValueNamed>>(checkNotNull(gsonWrapper, - "gsonWrapper"), new TypeLiteral>>() { + public ParseTemplatesFromHttpResponse(GsonWrapper gsonView) { + this.parser = new ParseFirstJsonValueNamed>>(checkNotNull(gsonView, + "gsonView"), new TypeLiteral>>() { }, "templates"); } diff --git a/labs/glesys/src/test/java/org/jclouds/glesys/compute/GleSYSTemplateBuilderLiveTest.java b/labs/glesys/src/test/java/org/jclouds/glesys/compute/GleSYSTemplateBuilderLiveTest.java index 6318ade9b0..918aed8a49 100644 --- a/labs/glesys/src/test/java/org/jclouds/glesys/compute/GleSYSTemplateBuilderLiveTest.java +++ b/labs/glesys/src/test/java/org/jclouds/glesys/compute/GleSYSTemplateBuilderLiveTest.java @@ -81,7 +81,7 @@ public class GleSYSTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest { @Test public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getId(), "Ubuntu 11.04 64-bit"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.04"); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); diff --git a/labs/glesys/src/test/java/org/jclouds/glesys/internal/BaseGleSYSClientLiveTest.java b/labs/glesys/src/test/java/org/jclouds/glesys/internal/BaseGleSYSClientLiveTest.java index 6dabd932d4..8db9fff181 100644 --- a/labs/glesys/src/test/java/org/jclouds/glesys/internal/BaseGleSYSClientLiveTest.java +++ b/labs/glesys/src/test/java/org/jclouds/glesys/internal/BaseGleSYSClientLiveTest.java @@ -61,7 +61,7 @@ public class BaseGleSYSClientLiveTest extends BaseComputeServiceContextLiveTest @Override public void setupContext() { super.setupContext(); - gleContext = wrapper.unwrap(); + gleContext = view.unwrap(); } protected void createDomain(String domain) { diff --git a/labs/nodepool/src/test/java/org/jclouds/nodepool/AppTest.java b/labs/nodepool/src/test/java/org/jclouds/nodepool/AppTest.java index 4c1668e43f..7977cc8e58 100644 --- a/labs/nodepool/src/test/java/org/jclouds/nodepool/AppTest.java +++ b/labs/nodepool/src/test/java/org/jclouds/nodepool/AppTest.java @@ -195,7 +195,7 @@ public class AppTest extends TestCase { this.compute = ContextBuilder.newBuilder(providerName) .credentials(identity, credential) .modules(modules) - .overrides(overrides).buildAndWrapWith(ComputeServiceContext.class).getComputeService(); + .overrides(overrides).buildView(ComputeServiceContext.class).getComputeService(); } private void createAndStartPool() { diff --git a/labs/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/SwiftApiMetadataTest.java b/labs/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/SwiftApiMetadataTest.java index 2cd22db3c8..469225ca2b 100644 --- a/labs/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/SwiftApiMetadataTest.java +++ b/labs/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/SwiftApiMetadataTest.java @@ -18,7 +18,7 @@ */ package org.jclouds.openstack.swift.v1; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.apis.internal.BaseApiMetadataTest; import org.testng.annotations.Test; @@ -33,6 +33,6 @@ import com.google.common.reflect.TypeToken; // public class SwiftApiMetadataTest extends BaseBlobStoreApiMetadataTest { public class SwiftApiMetadataTest extends BaseApiMetadataTest { public SwiftApiMetadataTest() { - super(new SwiftApiMetadata(), ImmutableSet.> of()); + super(new SwiftApiMetadata(), ImmutableSet.> of()); } } diff --git a/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/OpSourceServersApiMetadata.java b/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/OpSourceServersApiMetadata.java index c96b3d3beb..f890283ebe 100644 --- a/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/OpSourceServersApiMetadata.java +++ b/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/OpSourceServersApiMetadata.java @@ -73,7 +73,7 @@ public class OpSourceServersApiMetadata extends BaseRestApiMetadata { .defaultEndpoint("https://api.opsourcecloud.net/oec/${jclouds.api-version}") .defaultProperties(OpSourceServersApiMetadata.defaultProperties()) .defaultModule(OpSourceServersRestClientModule.class); -// .wrapper(TypeToken.of(ComputeServiceContext.class)) +// .view(TypeToken.of(ComputeServiceContext.class)) // .defaultModules(ImmutableSet.>of(OpSourceServersRestClientModule.class, OpSourceServersComputeServiceContextModule.class)); } diff --git a/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/VPDCApiMetadata.java b/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/VPDCApiMetadata.java index 912297047c..9c14210227 100644 --- a/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/VPDCApiMetadata.java +++ b/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/VPDCApiMetadata.java @@ -82,7 +82,7 @@ public class VPDCApiMetadata extends BaseRestApiMetadata { .buildVersion("2.3") .defaultEndpoint("https://api.savvis.net/vpdc") .defaultProperties(VPDCApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(ComputeServiceContext.class)) + .view(TypeToken.of(ComputeServiceContext.class)) .defaultModules(ImmutableSet.>of(VPDCRestClientModule.class, VPDCComputeServiceContextModule.class)); } diff --git a/labs/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/compute/VPDCTemplateBuilderLiveTest.java b/labs/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/compute/VPDCTemplateBuilderLiveTest.java index 326d0588ae..19e7184024 100644 --- a/labs/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/compute/VPDCTemplateBuilderLiveTest.java +++ b/labs/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/compute/VPDCTemplateBuilderLiveTest.java @@ -69,7 +69,7 @@ public class VPDCTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest { @Override public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "5"); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.RHEL); diff --git a/labs/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/VMClientLiveTest.java b/labs/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/VMClientLiveTest.java index 0e8c8426e9..0afcd54aeb 100644 --- a/labs/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/VMClientLiveTest.java +++ b/labs/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/VMClientLiveTest.java @@ -279,7 +279,7 @@ public class VMClientLiveTest extends BaseVPDCClientLiveTest { protected void checkSSH(IPSocket socket) { socketTester.apply(socket); - SshClient client = wrapper.utils().sshFactory() + SshClient client = view.utils().sshFactory() .create(socket, LoginCredentials.builder().user(username).password(password).build()); try { client.connect(); diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorApiMetadata.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorApiMetadata.java index a4d70cd388..384cf1ad6c 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorApiMetadata.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorApiMetadata.java @@ -92,7 +92,7 @@ public class VCloudDirectorApiMetadata extends BaseRestApiMetadata { .defaultProperties(VCloudDirectorApiMetadata.defaultProperties()) .context(TypeToken.of(VCloudDirectorContext.class)) .defaultModule(VCloudDirectorRestClientModule.class); -// .wrapper(TypeToken.of(ComputeServiceContext.class)) +// .view(TypeToken.of(ComputeServiceContext.class)) // .defaultModules(ImmutableSet.>of(VCloudDirectorRestClientModule.class, VCloudDirectorComputeServiceContextModule.class)); } diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Capabilities.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Capabilities.java index c3d17c753f..df0b3c2473 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Capabilities.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Capabilities.java @@ -25,7 +25,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import java.util.Set; import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElementView; import javax.xml.bind.annotation.XmlType; import com.google.common.base.Objects; @@ -106,7 +106,7 @@ public class Capabilities { } - @XmlElementWrapper(name = "SupportedHardwareVersions") + @XmlElementView(name = "SupportedHardwareVersions") @XmlElement(name = "SupportedHardwareVersion") protected Set supportedHardwareVersions = Sets.newLinkedHashSet(); diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Catalog.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Catalog.java index cd82435e3d..9759cb3e06 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Catalog.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Catalog.java @@ -24,7 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import java.util.Set; import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElementView; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; @@ -129,7 +129,7 @@ public class Catalog extends Entity { @XmlElement(name = "Owner") private Owner owner; - @XmlElementWrapper(name = "CatalogItems") + @XmlElementView(name = "CatalogItems") @XmlElement(name = "CatalogItem") private Set catalogItems; @XmlElement(name = "IsPublished") diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Entity.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Entity.java index 43e8559c9e..d0ef6fbe72 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Entity.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Entity.java @@ -25,7 +25,7 @@ import java.util.List; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElementView; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; @@ -124,7 +124,7 @@ public class Entity extends Resource { @XmlElement(name = "Description") private String description; - @XmlElementWrapper(name = "Tasks") + @XmlElementView(name = "Tasks") @XmlElement(name = "Task") private List tasks; @XmlAttribute diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Group.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Group.java index 713f11a5e8..4b0b6e39e9 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Group.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Group.java @@ -24,7 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import java.util.Set; import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElementView; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; @@ -135,7 +135,7 @@ public class Group extends Entity { @XmlElement(name = "NameInSource") protected String nameInSource; - @XmlElementWrapper(name = "UsersList") + @XmlElementView(name = "UsersList") @XmlElement(name = "UserReference") protected Set usersList = Sets.newLinkedHashSet(); @XmlElement(name = "Role") diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ResourceEntity.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ResourceEntity.java index fd889a449d..3d120a7804 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ResourceEntity.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ResourceEntity.java @@ -26,7 +26,7 @@ import java.util.Set; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElementView; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; @@ -171,7 +171,7 @@ public abstract class ResourceEntity extends Entity { } } - @XmlElementWrapper(name = "Files") + @XmlElementView(name = "Files") @XmlElement(name = "File") private Set files; @XmlAttribute diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/User.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/User.java index b794c1c71e..c573b5c3e0 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/User.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/User.java @@ -24,7 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import java.util.List; import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElementView; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; @@ -348,7 +348,7 @@ public class User extends Entity { private Reference role; @XmlElement(name = "Password") private String password; - @XmlElementWrapper(name = "GroupReferences") + @XmlElementView(name = "GroupReferences") private List groups; protected User(Builder builder) { diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppTemplate.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppTemplate.java index 7c90d7a29c..c8db687608 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppTemplate.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppTemplate.java @@ -28,7 +28,7 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElementView; import javax.xml.bind.annotation.XmlRootElement; import org.jclouds.dmtf.ovf.DeploymentOptionSection; @@ -146,7 +146,7 @@ public class VAppTemplate extends ResourceEntity { @XmlElement(name = "Owner") private Owner owner; - @XmlElementWrapper(name = "Children") + @XmlElementView(name = "Children") @XmlElement(name = "Vm") private Set children = Sets.newLinkedHashSet(); @XmlElementRefs({ diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Vdc.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Vdc.java index fbf51762ea..d6ba587b0e 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Vdc.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Vdc.java @@ -25,7 +25,7 @@ import java.util.Set; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElementView; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; @@ -223,10 +223,10 @@ public class Vdc extends Entity { private CapacityWithUsage storageCapacity; @XmlElement(name = "ComputeCapacity", required = true) private ComputeCapacity computeCapacity; - @XmlElementWrapper(name = "ResourceEntities") + @XmlElementView(name = "ResourceEntities") @XmlElement(name = "ResourceEntity") private Set resourceEntities = Sets.newLinkedHashSet(); - @XmlElementWrapper(name = "AvailableNetworks") + @XmlElementView(name = "AvailableNetworks") @XmlElement(name = "Network") protected Set availableNetworks = Sets.newLinkedHashSet(); @XmlElement(name = "Capabilities") diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/AdminOrg.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/AdminOrg.java index e92df61ba5..2c1187e368 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/AdminOrg.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/AdminOrg.java @@ -24,7 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import java.util.Set; import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElementView; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; @@ -208,19 +208,19 @@ public class AdminOrg extends Org { @XmlElement(name = "Settings", required = true) private OrgSettings settings; - @XmlElementWrapper(name = "Users") + @XmlElementView(name = "Users") @XmlElement(name = "UserReference") protected Set users = Sets.newLinkedHashSet(); - @XmlElementWrapper(name = "Groups") + @XmlElementView(name = "Groups") @XmlElement(name = "GroupReference") protected Set groups = Sets.newLinkedHashSet(); - @XmlElementWrapper(name = "Catalogs") + @XmlElementView(name = "Catalogs") @XmlElement(name = "CatalogReference") private Set catalogs = Sets.newLinkedHashSet(); - @XmlElementWrapper(name = "Vdcs") + @XmlElementView(name = "Vdcs") @XmlElement(name = "Vdc") protected Set vdcs = Sets.newLinkedHashSet(); - @XmlElementWrapper(name = "Networks") + @XmlElementView(name = "Networks") @XmlElement(name = "Network") protected Set networks = Sets.newLinkedHashSet(); diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/ControlAccessParams.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/ControlAccessParams.java index dd1c66f3c9..d337a1ef36 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/ControlAccessParams.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/ControlAccessParams.java @@ -26,7 +26,7 @@ import java.util.List; import java.util.Set; import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElementView; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; @@ -143,7 +143,7 @@ public class ControlAccessParams { protected Boolean sharedToEveryone; @XmlElement(name = "EveryoneAccessLevel") protected String everyoneAccessLevel; - @XmlElementWrapper(name = "AccessSettings") + @XmlElementView(name = "AccessSettings") @XmlElement(name = "AccessSetting") protected List accessSettings; diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorApiMetadataTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorApiMetadataTest.java index 75b501fd07..cb2ce5c443 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorApiMetadataTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorApiMetadataTest.java @@ -18,7 +18,7 @@ */ package org.jclouds.vcloud.director.v1_5; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.rest.internal.BaseRestApiMetadataTest; import org.testng.annotations.Test; @@ -34,6 +34,6 @@ import com.google.common.reflect.TypeToken; public class VCloudDirectorApiMetadataTest extends BaseRestApiMetadataTest { public VCloudDirectorApiMetadataTest() { - super(new VCloudDirectorApiMetadata(), ImmutableSet.>of()); + super(new VCloudDirectorApiMetadata(), ImmutableSet.>of()); } } diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/internal/BaseVCloudDirectorClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/internal/BaseVCloudDirectorClientLiveTest.java index 6489316f66..29148e5ff0 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/internal/BaseVCloudDirectorClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/internal/BaseVCloudDirectorClientLiveTest.java @@ -208,7 +208,7 @@ public abstract class BaseVCloudDirectorClientLiveTest extends BaseContextLiveTe public static Reference getRoleReferenceFor(String name, RestContext adminContext) { RoleReferences roles = adminContext.getApi().getQueryClient().roleReferencesQueryAll(); - // wrapped in a builder to strip out unwanted xml cruft that the api chokes on + // backend in a builder to strip out unwanted xml cruft that the api chokes on return Reference.builder().fromReference(Iterables.find(roles.getReferences(), ReferencePredicates.nameEquals(name))).build(); } diff --git a/labs/virtualbox/src/main/java/org/jclouds/virtualbox/VirtualBoxApiMetadata.java b/labs/virtualbox/src/main/java/org/jclouds/virtualbox/VirtualBoxApiMetadata.java index 7a6d3cdec3..00d3069fda 100644 --- a/labs/virtualbox/src/main/java/org/jclouds/virtualbox/VirtualBoxApiMetadata.java +++ b/labs/virtualbox/src/main/java/org/jclouds/virtualbox/VirtualBoxApiMetadata.java @@ -105,7 +105,7 @@ public class VirtualBoxApiMetadata extends BaseApiMetadata { .version("4.1.4") .buildVersion("4.1.8r75467") .defaultProperties(VirtualBoxApiMetadata.defaultProperties()) - .wrapper(ComputeServiceContext.class) + .view(ComputeServiceContext.class) .defaultModules(ImmutableSet.>of(DefaultCacheNodeStoreModule.class, VirtualBoxComputeServiceContextModule.class)); } diff --git a/labs/virtualbox/src/main/java/org/jclouds/virtualbox/domain/ErrorCode.java b/labs/virtualbox/src/main/java/org/jclouds/virtualbox/domain/ErrorCode.java index 96255ac145..d8ba972968 100644 --- a/labs/virtualbox/src/main/java/org/jclouds/virtualbox/domain/ErrorCode.java +++ b/labs/virtualbox/src/main/java/org/jclouds/virtualbox/domain/ErrorCode.java @@ -76,9 +76,9 @@ public enum ErrorCode { * @return an ErrorCode representing the given fault code. */ public static ErrorCode valueOf(VBoxException vboxException) { - final Throwable wrapped = vboxException.getWrapped(); - if (wrapped instanceof RuntimeFaultMsg) { - final RuntimeFaultMsg faultCode = (RuntimeFaultMsg) wrapped; + final Throwable backend = vboxException.getWrapped(); + if (backend instanceof RuntimeFaultMsg) { + final RuntimeFaultMsg faultCode = (RuntimeFaultMsg) backend; final int resultCode = faultCode.getFaultInfo().getResultCode(); final ErrorCode errorCode = table.get(unsignedIntToLong(resultCode)); if (errorCode != null) { diff --git a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/BaseVirtualBoxClientLiveTest.java b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/BaseVirtualBoxClientLiveTest.java index 85a8124610..44f21bca60 100644 --- a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/BaseVirtualBoxClientLiveTest.java +++ b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/BaseVirtualBoxClientLiveTest.java @@ -137,7 +137,7 @@ public class BaseVirtualBoxClientLiveTest extends BaseComputeServiceContextLiveT @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - wrapper.utils().injector().injectMembers(this); + view.utils().injector().injectMembers(this); YamlImage image = getDefaultImage(); @@ -145,13 +145,13 @@ public class BaseVirtualBoxClientLiveTest extends BaseComputeServiceContextLiveT masterVmName = VIRTUALBOX_IMAGE_PREFIX + image.id; isosDir = workingDir + File.separator + "isos"; - hostVersion = Iterables.get(Splitter.on('r').split(wrapper.utils().injector().getInstance(Key.get(String.class, BuildVersion.class))), 0); + hostVersion = Iterables.get(Splitter.on('r').split(view.utils().injector().getInstance(Key.get(String.class, BuildVersion.class))), 0); operatingSystemIso = String.format("%s/%s.iso", isosDir, image.name); guestAdditionsIso = String.format("%s/VBoxGuestAdditions_%s.iso", isosDir, hostVersion); // try and get a master from the cache, this will initialize the config/download isos and // prepare everything IF a master is not available, subsequent calls should be pretty fast - Template template = wrapper.getComputeService().templateBuilder().build(); + Template template = view.getComputeService().templateBuilder().build(); checkNotNull(mastersCache.apply(template.getImage())); } @@ -195,7 +195,7 @@ public class BaseVirtualBoxClientLiveTest extends BaseComputeServiceContextLiveT VmSpec sourceVmSpec = VmSpec.builder().id(masterName).name(masterName).osTypeId("").memoryMB(512) .cleanUpMode(CleanupMode.Full).controller(ideController).forceOverwrite(true).build(); - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); Function configProperties = injector.getInstance(ValueOfConfigurationKeyOrNull.class); IsoSpec isoSpec = IsoSpec .builder() @@ -226,8 +226,8 @@ public class BaseVirtualBoxClientLiveTest extends BaseComputeServiceContextLiveT @AfterClass(groups = "live") protected void tearDown() throws Exception { - if (wrapper != null) - wrapper.close(); + if (view != null) + view.close(); } @AfterSuite diff --git a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/compute/VirtualBoxComputeServiceAdapterLiveTest.java b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/compute/VirtualBoxComputeServiceAdapterLiveTest.java index 1ab7cdb455..ad5d2144a4 100644 --- a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/compute/VirtualBoxComputeServiceAdapterLiveTest.java +++ b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/compute/VirtualBoxComputeServiceAdapterLiveTest.java @@ -52,7 +52,7 @@ public class VirtualBoxComputeServiceAdapterLiveTest extends BaseVirtualBoxClien public void testCreatedNodeHasExpectedNameAndWeCanConnectViaSsh() { String group = "foo"; String name = "foo-ef4"; - Template template = wrapper.getComputeService().templateBuilder().build(); + Template template = view.getComputeService().templateBuilder().build(); machine = adapter.createNodeWithGroupEncodedIntoName(group, name, template); assertTrue(machine.getNode().getName().contains(group)); assertTrue(machine.getNode().getName().contains(name)); @@ -61,7 +61,7 @@ public class VirtualBoxComputeServiceAdapterLiveTest extends BaseVirtualBoxClien } protected void doConnectViaSsh(IMachine machine, LoginCredentials creds) { - SshClient ssh = wrapper.utils().injector().getInstance(IMachineToSshClient.class).apply(machine); + SshClient ssh = view.utils().injector().getInstance(IMachineToSshClient.class).apply(machine); try { ssh.connect(); ExecResponse hello = ssh.exec("echo hello"); diff --git a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/functions/CloneAndRegisterMachineFromIMachineIfNotAlreadyExistsLiveTest.java b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/functions/CloneAndRegisterMachineFromIMachineIfNotAlreadyExistsLiveTest.java index 1eede069af..e159029794 100644 --- a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/functions/CloneAndRegisterMachineFromIMachineIfNotAlreadyExistsLiveTest.java +++ b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/functions/CloneAndRegisterMachineFromIMachineIfNotAlreadyExistsLiveTest.java @@ -75,7 +75,7 @@ public class CloneAndRegisterMachineFromIMachineIfNotAlreadyExistsLiveTest exten VmSpec instanceVmSpec = VmSpec.builder().id(instanceName).name(instanceName).osTypeId("").memoryMB(512) .cleanUpMode(CleanupMode.Full).controller(ideController).forceOverwrite(true).build(); - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); Function configProperties = injector.getInstance(ValueOfConfigurationKeyOrNull.class); IsoSpec isoSpec = IsoSpec .builder() @@ -108,7 +108,7 @@ public class CloneAndRegisterMachineFromIMachineIfNotAlreadyExistsLiveTest exten private IMachine getVmWithGuestAdditionsInstalled() { MasterSpec masterSpecForTest = super.getMasterSpecForTest(); try { - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); return injector.getInstance(CreateAndInstallVm.class).apply(masterSpecForTest); } catch (IllegalStateException e) { // already created diff --git a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/functions/CreateAndInstallVmLiveTest.java b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/functions/CreateAndInstallVmLiveTest.java index d16e4ecb1d..b3b22ffc3a 100644 --- a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/functions/CreateAndInstallVmLiveTest.java +++ b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/functions/CreateAndInstallVmLiveTest.java @@ -133,7 +133,7 @@ public class CreateAndInstallVmLiveTest extends BaseVirtualBoxClientLiveTest { VmSpec instanceVmSpec = VmSpec.builder().id(instanceName).name(instanceName).osTypeId("").memoryMB(512) .cleanUpMode(CleanupMode.Full).controller(ideController).forceOverwrite(true).build(); - injector = wrapper.utils().injector(); + injector = view.utils().injector(); Function configProperties = injector.getInstance(ValueOfConfigurationKeyOrNull.class); IsoSpec isoSpec = IsoSpec .builder() @@ -190,7 +190,7 @@ public class CreateAndInstallVmLiveTest extends BaseVirtualBoxClientLiveTest { private IMachine getVmWithGuestAdditionsInstalled() { MasterSpec masterSpecForTest = super.getMasterSpecForTest(); try { - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); return injector.getInstance(CreateAndInstallVm.class).apply(masterSpecForTest); } catch (IllegalStateException e) { // already created diff --git a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/functions/CreateAndRegisterMachineFromIsoIfNotAlreadyExistsLiveTest.java b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/functions/CreateAndRegisterMachineFromIsoIfNotAlreadyExistsLiveTest.java index f37a23dcb1..72c9aff546 100644 --- a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/functions/CreateAndRegisterMachineFromIsoIfNotAlreadyExistsLiveTest.java +++ b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/functions/CreateAndRegisterMachineFromIsoIfNotAlreadyExistsLiveTest.java @@ -84,7 +84,7 @@ public class CreateAndRegisterMachineFromIsoIfNotAlreadyExistsLiveTest extends B .iso(IsoSpec.builder().sourcePath(operatingSystemIso).installationScript("").build()).vm(vmSpec) .network(networkSpec).build(); // undoVm(vmSpec); - IMachine debianNode = wrapper.utils().injector() + IMachine debianNode = view.utils().injector() .getInstance(CreateAndRegisterMachineFromIsoIfNotAlreadyExists.class).apply(machineSpec); IMachine machine = manager.get().getVBox().findMachine(vmName); assertEquals(debianNode.getName(), machine.getName()); @@ -107,7 +107,7 @@ public class CreateAndRegisterMachineFromIsoIfNotAlreadyExistsLiveTest extends B NetworkSpec networkSpec = NetworkSpec.builder().build(); MasterSpec machineSpec = MasterSpec.builder().iso(isoSpec).vm(vmSpec).network(networkSpec).build(); try { - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); injector.getInstance(CreateAndRegisterMachineFromIsoIfNotAlreadyExists.class).apply(machineSpec); fail(); } catch (VBoxException e) { diff --git a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/predicates/GuestAdditionsInstallerLiveTest.java b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/predicates/GuestAdditionsInstallerLiveTest.java index 1016756301..8c79df17fb 100644 --- a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/predicates/GuestAdditionsInstallerLiveTest.java +++ b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/predicates/GuestAdditionsInstallerLiveTest.java @@ -72,7 +72,7 @@ public class GuestAdditionsInstallerLiveTest extends BaseVirtualBoxClientLiveTes @BeforeClass(groups = "live") public void setupContext() { super.setupContext(); - injector = wrapper.utils().injector(); + injector = view.utils().injector(); String instanceName = VIRTUALBOX_IMAGE_PREFIX + CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_HYPHEN, getClass().getSimpleName()); @@ -152,7 +152,7 @@ public class GuestAdditionsInstallerLiveTest extends BaseVirtualBoxClientLiveTes private IMachine getVmWithGuestAdditionsInstalled() { MasterSpec masterSpecForTest = super.getMasterSpecForTest(); try { - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); return injector.getInstance(CreateAndInstallVm.class).apply(masterSpecForTest); } catch (IllegalStateException e) { // already created diff --git a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/predicates/IMachinePredicatesLiveTest.java b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/predicates/IMachinePredicatesLiveTest.java index 8602a15d33..1b2295a124 100644 --- a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/predicates/IMachinePredicatesLiveTest.java +++ b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/predicates/IMachinePredicatesLiveTest.java @@ -79,7 +79,7 @@ public class IMachinePredicatesLiveTest extends BaseVirtualBoxClientLiveTest { VmSpec instanceVmSpec = VmSpec.builder().id(instanceName).name(instanceName).osTypeId("").memoryMB(512) .cleanUpMode(CleanupMode.Full).controller(ideController).forceOverwrite(true).build(); - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); Function configProperties = injector.getInstance(ValueOfConfigurationKeyOrNull.class); IsoSpec isoSpec = IsoSpec .builder() @@ -111,7 +111,7 @@ public class IMachinePredicatesLiveTest extends BaseVirtualBoxClientLiveTest { private IMachine getVmWithGuestAdditionsInstalled() { MasterSpec masterSpecForTest = super.getMasterSpecForTest(); try { - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); return injector.getInstance(CreateAndInstallVm.class).apply(masterSpecForTest); } catch (IllegalStateException e) { // already created diff --git a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/util/MachineControllerLiveTest.java b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/util/MachineControllerLiveTest.java index 6c2051c818..2291d625c7 100644 --- a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/util/MachineControllerLiveTest.java +++ b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/util/MachineControllerLiveTest.java @@ -76,7 +76,7 @@ public class MachineControllerLiveTest extends BaseVirtualBoxClientLiveTest { VmSpec instanceVmSpec = VmSpec.builder().id(instanceName).name(instanceName).osTypeId("").memoryMB(512) .cleanUpMode(CleanupMode.Full).controller(ideController).forceOverwrite(true).build(); - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); Function configProperties = injector.getInstance(ValueOfConfigurationKeyOrNull.class); IsoSpec isoSpec = IsoSpec .builder() @@ -121,7 +121,7 @@ public class MachineControllerLiveTest extends BaseVirtualBoxClientLiveTest { private IMachine getVmWithGuestAdditionsInstalled() { MasterSpec masterSpecForTest = super.getMasterSpecForTest(); try { - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); return injector.getInstance(CreateAndInstallVm.class).apply(masterSpecForTest); } catch (IllegalStateException e) { // already created diff --git a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/util/MachineUtilsLiveTest.java b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/util/MachineUtilsLiveTest.java index 94bbf8c23b..39bac6d52f 100644 --- a/labs/virtualbox/src/test/java/org/jclouds/virtualbox/util/MachineUtilsLiveTest.java +++ b/labs/virtualbox/src/test/java/org/jclouds/virtualbox/util/MachineUtilsLiveTest.java @@ -76,7 +76,7 @@ public class MachineUtilsLiveTest extends BaseVirtualBoxClientLiveTest { VmSpec instanceVmSpec = VmSpec.builder().id(instanceName).name(instanceName).osTypeId("").memoryMB(512) .cleanUpMode(CleanupMode.Full).controller(ideController).forceOverwrite(true).build(); - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); Function configProperties = injector.getInstance(ValueOfConfigurationKeyOrNull.class); IsoSpec isoSpec = IsoSpec .builder() @@ -123,7 +123,7 @@ public class MachineUtilsLiveTest extends BaseVirtualBoxClientLiveTest { private IMachine getVmWithGuestAdditionsInstalled() { MasterSpec masterSpecForTest = super.getMasterSpecForTest(); try { - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); return injector.getInstance(CreateAndInstallVm.class).apply(masterSpecForTest); } catch (IllegalStateException e) { // already created diff --git a/loadbalancer/src/main/java/org/jclouds/loadbalancer/LoadBalancerServiceContext.java b/loadbalancer/src/main/java/org/jclouds/loadbalancer/LoadBalancerServiceContext.java index 4940137d9f..395ff30658 100644 --- a/loadbalancer/src/main/java/org/jclouds/loadbalancer/LoadBalancerServiceContext.java +++ b/loadbalancer/src/main/java/org/jclouds/loadbalancer/LoadBalancerServiceContext.java @@ -20,7 +20,7 @@ package org.jclouds.loadbalancer; import java.io.Closeable; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.loadbalancer.internal.LoadBalancerServiceContextImpl; import org.jclouds.rest.RestContext; import org.jclouds.rest.Utils; @@ -35,7 +35,7 @@ import com.google.inject.ImplementedBy; * */ @ImplementedBy(LoadBalancerServiceContextImpl.class) -public interface LoadBalancerServiceContext extends Closeable, Wrapper { +public interface LoadBalancerServiceContext extends Closeable, View { LoadBalancerService getLoadBalancerService(); @@ -50,8 +50,8 @@ public interface LoadBalancerServiceContext extends Closeable, Wrapper { /** * will be removed in jclouds 1.6 * - * @see Wrapper#getInputType - * @see Wrapper#unwrap + * @see View#getInputType + * @see View#unwrap */ @Deprecated RestContext getProviderSpecificContext(); diff --git a/loadbalancer/src/main/java/org/jclouds/loadbalancer/internal/LoadBalancerServiceContextImpl.java b/loadbalancer/src/main/java/org/jclouds/loadbalancer/internal/LoadBalancerServiceContextImpl.java index 2401fb6dd3..47b295cddf 100644 --- a/loadbalancer/src/main/java/org/jclouds/loadbalancer/internal/LoadBalancerServiceContextImpl.java +++ b/loadbalancer/src/main/java/org/jclouds/loadbalancer/internal/LoadBalancerServiceContextImpl.java @@ -24,7 +24,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import org.jclouds.Context; -import org.jclouds.internal.BaseWrapper; +import org.jclouds.internal.BaseView; import org.jclouds.loadbalancer.LoadBalancerService; import org.jclouds.loadbalancer.LoadBalancerServiceContext; import org.jclouds.location.Provider; @@ -38,14 +38,14 @@ import com.google.common.reflect.TypeToken; * @author Adrian Cole */ @Singleton -public class LoadBalancerServiceContextImpl extends BaseWrapper implements LoadBalancerServiceContext { +public class LoadBalancerServiceContextImpl extends BaseView implements LoadBalancerServiceContext { private final LoadBalancerService loadBalancerService; private final Utils utils; @Inject - public LoadBalancerServiceContextImpl(@Provider Context wrapped, - @Provider TypeToken wrappedType, LoadBalancerService loadBalancerService, Utils utils) { - super(wrapped, wrappedType); + public LoadBalancerServiceContextImpl(@Provider Context backend, + @Provider TypeToken backendType, LoadBalancerService loadBalancerService, Utils utils) { + super(backend, backendType); this.utils = utils; this.loadBalancerService = checkNotNull(loadBalancerService, "loadBalancerService"); } diff --git a/loadbalancer/src/test/java/org/jclouds/loadbalancer/BaseLoadBalancerServiceLiveTest.java b/loadbalancer/src/test/java/org/jclouds/loadbalancer/BaseLoadBalancerServiceLiveTest.java index 65f26cee35..9ae48242e5 100644 --- a/loadbalancer/src/test/java/org/jclouds/loadbalancer/BaseLoadBalancerServiceLiveTest.java +++ b/loadbalancer/src/test/java/org/jclouds/loadbalancer/BaseLoadBalancerServiceLiveTest.java @@ -30,7 +30,7 @@ import java.util.concurrent.TimeoutException; import org.jclouds.Constants; import org.jclouds.ContextBuilder; -import org.jclouds.apis.BaseWrapperLiveTest; +import org.jclouds.apis.BaseViewLiveTest; import org.jclouds.compute.ComputeServiceContext; import org.jclouds.compute.RunNodesException; import org.jclouds.compute.domain.NodeMetadata; @@ -58,7 +58,7 @@ import com.google.inject.Module; * @author Adrian Cole */ @Test(groups = "live", singleThreaded = true) -public abstract class BaseLoadBalancerServiceLiveTest extends BaseWrapperLiveTest { +public abstract class BaseLoadBalancerServiceLiveTest extends BaseViewLiveTest { protected String imageId; protected String loginUser; @@ -185,7 +185,7 @@ public abstract class BaseLoadBalancerServiceLiveTest extends BaseWrapperLiveTes } @Override - protected TypeToken wrapperType() { + protected TypeToken viewType() { return TypeToken.of(LoadBalancerServiceContext.class); } } diff --git a/loadbalancer/src/test/java/org/jclouds/loadbalancer/internal/BaseLoadBalancerServiceApiMetadataTest.java b/loadbalancer/src/test/java/org/jclouds/loadbalancer/internal/BaseLoadBalancerServiceApiMetadataTest.java index 4f054772ea..4745c311ae 100644 --- a/loadbalancer/src/test/java/org/jclouds/loadbalancer/internal/BaseLoadBalancerServiceApiMetadataTest.java +++ b/loadbalancer/src/test/java/org/jclouds/loadbalancer/internal/BaseLoadBalancerServiceApiMetadataTest.java @@ -18,7 +18,7 @@ */ package org.jclouds.loadbalancer.internal; -import org.jclouds.Wrapper; +import org.jclouds.View; import org.jclouds.apis.ApiMetadata; import org.jclouds.apis.internal.BaseApiMetadataTest; import org.jclouds.loadbalancer.LoadBalancerServiceContext; @@ -35,7 +35,7 @@ import com.google.common.reflect.TypeToken; public abstract class BaseLoadBalancerServiceApiMetadataTest extends BaseApiMetadataTest { public BaseLoadBalancerServiceApiMetadataTest(ApiMetadata toTest) { - super(toTest, ImmutableSet.>of(TypeToken.of(LoadBalancerServiceContext.class))); + super(toTest, ImmutableSet.>of(TypeToken.of(LoadBalancerServiceContext.class))); } } \ No newline at end of file diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ApiMetadata.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ApiMetadata.java index 86053927bf..b0b90a5e89 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ApiMetadata.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ApiMetadata.java @@ -83,7 +83,7 @@ public class AWSEC2ApiMetadata extends EC2ApiMetadata { id("aws-ec2") .version(AWSEC2AsyncClient.VERSION) .name("Amazon-specific EC2 API") - .wrapper(AWSEC2ComputeServiceContext.class) + .view(AWSEC2ComputeServiceContext.class) .context(CONTEXT_TOKEN) .defaultProperties(AWSEC2ApiMetadata.defaultProperties()) .defaultModules(ImmutableSet.>of(AWSEC2RestClientModule.class, EC2ResolveImagesModule.class, AWSEC2ComputeServiceContextModule.class)); diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/compute/internal/AWSEC2ComputeServiceContextImpl.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/compute/internal/AWSEC2ComputeServiceContextImpl.java index 76ab793207..aab0f34dae 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/compute/internal/AWSEC2ComputeServiceContextImpl.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/compute/internal/AWSEC2ComputeServiceContextImpl.java @@ -37,9 +37,9 @@ import com.google.common.reflect.TypeToken; public class AWSEC2ComputeServiceContextImpl extends EC2ComputeServiceContextImpl implements AWSEC2ComputeServiceContext { @Inject - public AWSEC2ComputeServiceContextImpl(@Provider Context wrapped, - @Provider TypeToken wrappedType, AWSEC2ComputeService computeService, Utils utils) { - super(wrapped, wrappedType, computeService, utils); + public AWSEC2ComputeServiceContextImpl(@Provider Context backend, + @Provider TypeToken backendType, AWSEC2ComputeService computeService, Utils utils) { + super(backend, backendType, computeService, utils); } @Override diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2ComputeServiceLiveTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2ComputeServiceLiveTest.java index e5ce2d3566..7ef63ee4aa 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2ComputeServiceLiveTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2ComputeServiceLiveTest.java @@ -93,12 +93,12 @@ public class AWSEC2ComputeServiceLiveTest extends EC2ComputeServiceLiveTest { String region = "us-west-2"; AWSSecurityGroupClient securityGroupClient = AWSEC2Client.class.cast( - wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi()).getSecurityGroupServices(); + view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi()).getSecurityGroupServices(); - KeyPairClient keyPairClient = EC2Client.class.cast(wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi()) + KeyPairClient keyPairClient = EC2Client.class.cast(view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi()) .getKeyPairServices(); - InstanceClient instanceClient = EC2Client.class.cast(wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi()) + InstanceClient instanceClient = EC2Client.class.cast(view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi()) .getInstanceServices(); String group = this.group + "o"; @@ -230,13 +230,13 @@ public class AWSEC2ComputeServiceLiveTest extends EC2ComputeServiceLiveTest { } private void runIncidentalResourcesGetCleanedUpOnlyOnLastInstanceDestroy(Function destroyer) throws Exception { - AWSSecurityGroupClient securityGroupClient = AWSEC2Client.class.cast(wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi()) + AWSSecurityGroupClient securityGroupClient = AWSEC2Client.class.cast(view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi()) .getSecurityGroupServices(); - KeyPairClient keyPairClient = EC2Client.class.cast(wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi()) + KeyPairClient keyPairClient = EC2Client.class.cast(view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi()) .getKeyPairServices(); - InstanceClient instanceClient = EC2Client.class.cast(wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi()) + InstanceClient instanceClient = EC2Client.class.cast(view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi()) .getInstanceServices(); String group = this.group + "incidental"; diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2TemplateBuilderLiveTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2TemplateBuilderLiveTest.java index bb0e5efdf8..057a5a33ab 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2TemplateBuilderLiveTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2TemplateBuilderLiveTest.java @@ -96,7 +96,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest { @Test public void testTemplateBuilderM1MEDIUMWithNegativeLookaroundDoesntMatchTestImages() { - Template template = wrapper.getComputeService().templateBuilder().hardwareId(InstanceType.M1_MEDIUM) + Template template = view.getComputeService().templateBuilder().hardwareId(InstanceType.M1_MEDIUM) // need to select versions with double-digits so that lexicographic // doesn't end up prefering 9.x vs 11.x .osVersionMatches("1[012].[10][04]") @@ -122,7 +122,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest { @Test public void testUbuntuInstanceStoreGoesM1SmallNegativeLookaroundDoesntMatchTestImages() { - Template template = wrapper.getComputeService().templateBuilder() + Template template = view.getComputeService().templateBuilder() .imageMatches(EC2ImagePredicates.rootDeviceType(RootDeviceType.INSTANCE_STORE)) // need to select versions with double-digits so that lexicographic // doesn't end up prefering 9.x vs 11.x @@ -148,7 +148,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest { @Test public void testTemplateBuilderCanUseImageIdAndhardwareIdAndAZ() { - Template template = wrapper.getComputeService().templateBuilder().imageId("us-east-1/ami-ccb35ea5") + Template template = view.getComputeService().templateBuilder().imageId("us-east-1/ami-ccb35ea5") .hardwareId(InstanceType.M2_2XLARGE).locationId("us-east-1a").build(); System.out.println(template.getHardware()); @@ -168,7 +168,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest { @Test public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); assert (defaultTemplate.getImage().getProviderId().startsWith("ami-")) : defaultTemplate; assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "pv-2012.03.rc-0"); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); @@ -182,7 +182,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest { @Test public void testAmazonLinuxInstanceStore() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().osFamily(OsFamily.AMZN_LINUX) + Template defaultTemplate = view.getComputeService().templateBuilder().osFamily(OsFamily.AMZN_LINUX) .imageMatches(EC2ImagePredicates.rootDeviceType(RootDeviceType.INSTANCE_STORE)).build(); assert (defaultTemplate.getImage().getProviderId().startsWith("ami-")) : defaultTemplate; assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "pv-2012.03.rc-0"); @@ -196,7 +196,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest { @Test public void testFastestTemplateBuilder() throws IOException { - Template fastestTemplate = wrapper.getComputeService().templateBuilder().fastest().osFamily(OsFamily.AMZN_LINUX) + Template fastestTemplate = view.getComputeService().templateBuilder().fastest().osFamily(OsFamily.AMZN_LINUX) .build(); assert (fastestTemplate.getImage().getProviderId().startsWith("ami-")) : fastestTemplate; assertEquals(fastestTemplate.getHardware().getProviderId(), InstanceType.CC2_8XLARGE); @@ -208,7 +208,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest { assertEquals(getCores(fastestTemplate.getHardware()), 16.0d); assertEquals(fastestTemplate.getImage().getOperatingSystem().getArch(), "hvm"); - fastestTemplate = wrapper.getComputeService().templateBuilder().fastest().build(); + fastestTemplate = view.getComputeService().templateBuilder().fastest().build(); System.out.println(fastestTemplate.getImage()); assert (fastestTemplate.getImage().getProviderId().startsWith("ami-")) : fastestTemplate; assertEquals(fastestTemplate.getHardware().getProviderId(), InstanceType.CC2_8XLARGE); @@ -224,7 +224,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest { @Test public void testTemplateBuilderMicro() throws IOException { - Template microTemplate = wrapper.getComputeService().templateBuilder().hardwareId(InstanceType.T1_MICRO) + Template microTemplate = view.getComputeService().templateBuilder().hardwareId(InstanceType.T1_MICRO) .osFamily(OsFamily.UBUNTU).osVersionMatches("10.10").os64Bit(true).build(); assert (microTemplate.getImage().getProviderId().startsWith("ami-")) : microTemplate; @@ -246,7 +246,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest { overrides.setProperty(AWSEC2Constants.PROPERTY_EC2_AMI_QUERY, ""); overrides.setProperty(AWSEC2Constants.PROPERTY_EC2_CC_AMI_QUERY, ""); - context = createWrapper(overrides, setupModules()); + context = createView(overrides, setupModules()); assertEquals(context.getComputeService().listImages().size(), 0); @@ -280,7 +280,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest { overrides.setProperty(EC2Constants.PROPERTY_EC2_AMI_OWNERS, ""); overrides.setProperty(AWSEC2Constants.PROPERTY_EC2_CC_AMI_QUERY, ""); - context = createWrapper(overrides, setupModules()); + context = createView(overrides, setupModules()); assertEquals(context.getComputeService().listImages().size(), 0); @@ -318,17 +318,17 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest { final List commandsInvoked = Lists.newArrayList(); - context = createWrapper( + context = createView( overrides, ImmutableSet. of(new Log4JLoggingModule(), TrackingJavaUrlHttpCommandExecutorService.newTrackingModule(commandsInvoked))); - assert context.getComputeService().listAssignableLocations().size() < this.wrapper.getComputeService() + assert context.getComputeService().listAssignableLocations().size() < this.view.getComputeService() .listAssignableLocations().size(); assertOnlyOneRegionQueriedForAvailabilityZone(commandsInvoked); - assert context.getComputeService().listImages().size() < this.wrapper.getComputeService().listImages().size(); + assert context.getComputeService().listImages().size() < this.view.getComputeService().listImages().size(); Template template = context.getComputeService().templateBuilder().imageId("eu-west-1/ami-a33b06d7").build(); assert (template.getImage().getProviderId().startsWith("ami-")) : template; @@ -362,7 +362,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest { // This is the id of a public image, not owned by one of the four default // owners String imageId = "us-east-1/ami-44d02f2d"; - Template defaultTemplate = wrapper.getComputeService().templateBuilder().imageId(imageId) + Template defaultTemplate = view.getComputeService().templateBuilder().imageId(imageId) .imageMatches(EC2ImagePredicates.rootDeviceType(RootDeviceType.INSTANCE_STORE)).build(); assert (defaultTemplate.getImage().getProviderId().startsWith("ami-")) : defaultTemplate; assertEquals(defaultTemplate.getImage().getId(), imageId); @@ -370,8 +370,8 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest { @Test public void testAssignability() { - wrapper.unwrap(EC2ApiMetadata.CONTEXT_TOKEN); - wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN); + view.unwrap(EC2ApiMetadata.CONTEXT_TOKEN); + view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN); } @Override diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/AMIClientLiveTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/AMIClientLiveTest.java index 4e8e482025..9cf363c4ee 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/AMIClientLiveTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/AMIClientLiveTest.java @@ -79,7 +79,7 @@ public class AMIClientLiveTest extends BaseComputeServiceContextLiveTest { @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getAMIServices(); + client = view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getAMIServices(); } public void testDescribeImageNotExists() { @@ -92,7 +92,7 @@ public class AMIClientLiveTest extends BaseComputeServiceContextLiveTest { } public void testDescribeImages() { - for (String region : wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getAvailabilityZoneAndRegionServices().describeRegions().keySet()) { + for (String region : view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getAvailabilityZoneAndRegionServices().describeRegions().keySet()) { Set allResults = client.describeImagesInRegion(region); assertNotNull(allResults); assert allResults.size() >= 2 : allResults.size(); @@ -153,7 +153,7 @@ public class AMIClientLiveTest extends BaseComputeServiceContextLiveTest { @Test public void testNewlyRegisteredImageCanBeListed() throws Exception { - ComputeService computeService = wrapper.getComputeService(); + ComputeService computeService = view.getComputeService(); Snapshot snapshot = createSnapshot(computeService); // List of images before... @@ -184,10 +184,10 @@ public class AMIClientLiveTest extends BaseComputeServiceContextLiveTest { Set nodes = computeService.createNodesInGroup("jcloudstest", 1, options); try { String instanceId = Iterables.getOnlyElement(nodes).getProviderId(); - Reservation reservation = Iterables.getOnlyElement(wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getInstanceServices().describeInstancesInRegion(null, instanceId)); + Reservation reservation = Iterables.getOnlyElement(view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getInstanceServices().describeInstancesInRegion(null, instanceId)); RunningInstance instance = Iterables.getOnlyElement(reservation); BlockDevice device = instance.getEbsBlockDevices().get("/dev/sda1"); - Snapshot snapshot = wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getElasticBlockStoreServices().createSnapshotInRegion(null, device.getVolumeId()); + Snapshot snapshot = view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getElasticBlockStoreServices().createSnapshotInRegion(null, device.getVolumeId()); snapshotsToDelete.add(snapshot.getId()); return snapshot; } finally { @@ -269,7 +269,7 @@ public class AMIClientLiveTest extends BaseComputeServiceContextLiveTest { for (String imageId : imagesToDeregister) client.deregisterImageInRegion(null, imageId); for (String snapshotId : snapshotsToDelete) - wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getElasticBlockStoreServices().deleteSnapshotInRegion(null, snapshotId); + view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getElasticBlockStoreServices().deleteSnapshotInRegion(null, snapshotId); } } diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/AWSAMIClientLiveTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/AWSAMIClientLiveTest.java index 76169fb838..739e843f4b 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/AWSAMIClientLiveTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/AWSAMIClientLiveTest.java @@ -63,7 +63,7 @@ public class AWSAMIClientLiveTest extends BaseComputeServiceContextLiveTest { @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getAMIServices(); + client = view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getAMIServices(); } public void testDescribeImageNotExists() { @@ -76,7 +76,7 @@ public class AWSAMIClientLiveTest extends BaseComputeServiceContextLiveTest { } public void testDescribeImages() { - for (String region : wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getAvailabilityZoneAndRegionServices().describeRegions().keySet()) { + for (String region : view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getAvailabilityZoneAndRegionServices().describeRegions().keySet()) { Set allResults = Sets.newLinkedHashSet(client.describeImagesInRegion(region)); assertNotNull(allResults); assert allResults.size() >= 2 : allResults.size(); diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/AWSInstanceClientLiveTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/AWSInstanceClientLiveTest.java index 64ce87c2db..bc5643f7e0 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/AWSInstanceClientLiveTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/AWSInstanceClientLiveTest.java @@ -48,12 +48,12 @@ public class AWSInstanceClientLiveTest extends BaseComputeServiceContextLiveTest @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getInstanceServices(); + client = view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getInstanceServices(); } @Test void testDescribeInstances() { - for (String region : wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getAvailabilityZoneAndRegionServices().describeRegions().keySet()) { + for (String region : view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getAvailabilityZoneAndRegionServices().describeRegions().keySet()) { Set> allResults = client.describeInstancesInRegion(region); assertNotNull(allResults); assert allResults.size() >= 0 : allResults.size(); diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/AWSKeyPairClientLiveTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/AWSKeyPairClientLiveTest.java index 25614ea38d..eb4f4f8ddf 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/AWSKeyPairClientLiveTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/AWSKeyPairClientLiveTest.java @@ -71,25 +71,25 @@ public class AWSKeyPairClientLiveTest extends BaseComputeServiceContextLiveTest @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getKeyPairServices(); + client = view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getKeyPairServices(); } public void testNoSsh() throws Exception { Map keyPair = ComputeTestUtils.setupKeyPair(); - AWSInstanceClient instanceClient = AWSEC2Client.class.cast(wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi()).getInstanceServices(); + AWSInstanceClient instanceClient = AWSEC2Client.class.cast(view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi()).getInstanceServices(); String group = PREFIX + "unssh"; - wrapper.getComputeService().destroyNodesMatching(inGroup(group)); + view.getComputeService().destroyNodesMatching(inGroup(group)); - TemplateOptions options = wrapper.getComputeService().templateOptions(); + TemplateOptions options = view.getComputeService().templateOptions(); options.authorizePublicKey(keyPair.get("public")).as(AWSEC2TemplateOptions.class); ComputeServiceContext noSshContext = null; try { - noSshContext = createWrapper(setupProperties(), ImmutableSet. of(new Log4JLoggingModule())); + noSshContext = createView(setupProperties(), ImmutableSet. of(new Log4JLoggingModule())); Set nodes = noSshContext.getComputeService().createNodesInGroup(group, 1, options); @@ -104,7 +104,7 @@ public class AWSKeyPairClientLiveTest extends BaseComputeServiceContextLiveTest assertEquals(instance.getKeyName(), "jclouds#" + group); - Map responses = wrapper.getComputeService() + Map responses = view.getComputeService() .runScriptOnNodesMatching( runningInGroup(group), exec("echo hello"), @@ -117,7 +117,7 @@ public class AWSKeyPairClientLiveTest extends BaseComputeServiceContextLiveTest } finally { noSshContext.close(); - wrapper.getComputeService().destroyNodesMatching(inGroup(group)); + view.getComputeService().destroyNodesMatching(inGroup(group)); } } diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/MonitoringClientLiveTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/MonitoringClientLiveTest.java index 5a2a6a1379..e5bc34ffb3 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/MonitoringClientLiveTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/MonitoringClientLiveTest.java @@ -47,7 +47,7 @@ public class MonitoringClientLiveTest extends BaseComputeServiceContextLiveTest @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getMonitoringServices(); + client = view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getMonitoringServices(); } @Test(enabled = false) diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/PlacementGroupClientLiveTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/PlacementGroupClientLiveTest.java index 4c11dd4c1d..facb340cf0 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/PlacementGroupClientLiveTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/PlacementGroupClientLiveTest.java @@ -72,7 +72,7 @@ public class PlacementGroupClientLiveTest extends BaseComputeServiceContextLiveT @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi(); + client = view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi(); availableTester = new RetryablePredicate(new PlacementGroupAvailable(client), 60, 1, TimeUnit.SECONDS); @@ -129,7 +129,7 @@ public class PlacementGroupClientLiveTest extends BaseComputeServiceContextLiveT public void testStartCCInstance() throws Exception { - Template template = wrapper.getComputeService().templateBuilder().fastest().osFamily(OsFamily.AMZN_LINUX).build(); + Template template = view.getComputeService().templateBuilder().fastest().osFamily(OsFamily.AMZN_LINUX).build(); assert template != null : "The returned template was null, but it should have a value."; assertEquals(template.getHardware().getProviderId(), InstanceType.CC2_8XLARGE); assertEquals(template.getImage().getUserMetadata().get("rootDeviceType"), "ebs"); @@ -140,12 +140,12 @@ public class PlacementGroupClientLiveTest extends BaseComputeServiceContextLiveT Statements.newStatementList(AdminAccess.standard(), InstallJDK.fromOpenJDK())); String group = PREFIX + "cccluster"; - wrapper.getComputeService().destroyNodesMatching(NodePredicates.inGroup(group)); + view.getComputeService().destroyNodesMatching(NodePredicates.inGroup(group)); // TODO make this not lookup an explicit region client.getPlacementGroupServices().deletePlacementGroupInRegion(null, "jclouds#" + group + "#us-east-1"); try { - Set nodes = wrapper.getComputeService().createNodesInGroup(group, 1, template); + Set nodes = view.getComputeService().createNodesInGroup(group, 1, template); NodeMetadata node = getOnlyElement(nodes); getOnlyElement(getOnlyElement(client.getInstanceServices().describeInstancesInRegion(null, @@ -155,7 +155,7 @@ public class PlacementGroupClientLiveTest extends BaseComputeServiceContextLiveT System.err.println(e.getNodeErrors().keySet()); Throwables.propagate(e); } finally { - wrapper.getComputeService().destroyNodesMatching(NodePredicates.inGroup(group)); + view.getComputeService().destroyNodesMatching(NodePredicates.inGroup(group)); } } diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/SpotInstanceClientLiveTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/SpotInstanceClientLiveTest.java index 335bbe7f6f..7bbc22c6ee 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/SpotInstanceClientLiveTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/SpotInstanceClientLiveTest.java @@ -70,7 +70,7 @@ public class SpotInstanceClientLiveTest extends BaseComputeServiceContextLiveTe @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi(); + client = view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi(); activeTester = new RetryablePredicate(new SpotInstanceRequestActive(client), SPOT_DELAY_SECONDS, 1, 1, TimeUnit.SECONDS); } diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/TagClientLiveTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/TagClientLiveTest.java index dbf1ce4d7b..42286e54a5 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/TagClientLiveTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/TagClientLiveTest.java @@ -56,22 +56,22 @@ public class TagClientLiveTest extends BaseComputeServiceContextLiveTest { @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - client = wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getTagServices(); + client = view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getTagServices(); try { - testGroup = wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getSecurityGroupServices().createSecurityGroupInRegionAndReturnId(null, + testGroup = view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getSecurityGroupServices().createSecurityGroupInRegionAndReturnId(null, "test-group", "test-group"); } catch (IllegalStateException e) { // already exists testGroup = Iterables.get( - wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getSecurityGroupServices().describeSecurityGroupsInRegion(null, "test-group"), 0) + view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getSecurityGroupServices().describeSecurityGroupsInRegion(null, "test-group"), 0) .getId(); } } @AfterGroups(groups = { "live" }) public void deleteSecurityGroup() { - wrapper.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getSecurityGroupServices().deleteSecurityGroupInRegionById(null, testGroup); + view.unwrap(AWSEC2ApiMetadata.CONTEXT_TOKEN).getApi().getSecurityGroupServices().deleteSecurityGroupInRegionById(null, testGroup); } public static final String PREFIX = System.getProperty("user.name") + "-ec2"; diff --git a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ApiMetadata.java b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ApiMetadata.java index b05dff5764..f2ef41f58a 100644 --- a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ApiMetadata.java +++ b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ApiMetadata.java @@ -74,7 +74,7 @@ public class AWSS3ApiMetadata extends S3ApiMetadata { .name("Amazon-specific S3 API") .defaultProperties(AWSS3ApiMetadata.defaultProperties()) .context(CONTEXT_TOKEN) - .wrapper(TypeToken.of(AWSS3BlobStoreContext.class)) + .view(TypeToken.of(AWSS3BlobStoreContext.class)) .defaultModules(ImmutableSet.>of(AWSS3RestClientModule.class, AWSS3BlobStoreContextModule.class)); } diff --git a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/internal/AWSS3BlobStoreContextImpl.java b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/internal/AWSS3BlobStoreContextImpl.java index 870366f6d9..ded88c5c6c 100644 --- a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/internal/AWSS3BlobStoreContextImpl.java +++ b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/internal/AWSS3BlobStoreContextImpl.java @@ -44,11 +44,11 @@ import com.google.common.reflect.TypeToken; public class AWSS3BlobStoreContextImpl extends S3BlobStoreContextImpl implements AWSS3BlobStoreContext { @Inject - public AWSS3BlobStoreContextImpl(@Provider Context wrapped, @Provider TypeToken wrappedType, + public AWSS3BlobStoreContextImpl(@Provider Context backend, @Provider TypeToken backendType, BlobMap.Factory blobMapFactory, Utils utils, ConsistencyModel consistencyModel, InputStreamMap.Factory inputStreamMapFactory, AsyncBlobStore ablobStore, BlobStore blobStore, BlobRequestSigner blobRequestSigner) { - super(wrapped, wrappedType, blobMapFactory, utils, consistencyModel, inputStreamMapFactory, ablobStore, + super(backend, backendType, blobMapFactory, utils, consistencyModel, inputStreamMapFactory, ablobStore, blobStore, blobRequestSigner); } diff --git a/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ClientLiveTest.java b/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ClientLiveTest.java index a387dde397..cde3e84eab 100644 --- a/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ClientLiveTest.java +++ b/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ClientLiveTest.java @@ -71,7 +71,7 @@ public class AWSS3ClientLiveTest extends S3ClientLiveTest { @Override public AWSS3Client getApi() { - return (AWSS3Client) wrapper.unwrap(AWSS3ApiMetadata.CONTEXT_TOKEN).getApi(); + return (AWSS3Client) view.unwrap(AWSS3ApiMetadata.CONTEXT_TOKEN).getApi(); } @BeforeClass(groups = { "integration", "live" }) @@ -150,7 +150,7 @@ public class AWSS3ClientLiveTest extends S3ClientLiveTest { String containerName = getContainerName(); try { - BlobStore blobStore = wrapper.getBlobStore(); + BlobStore blobStore = view.getBlobStore(); blobStore.createContainerInLocation(null, containerName); Blob blob = blobStore.blobBuilder("const.txt") .payload(new File("target/const.txt")).build(); @@ -165,14 +165,14 @@ public class AWSS3ClientLiveTest extends S3ClientLiveTest { String containerName = getContainerName(); try { String blobName = "test-rrs"; - BlobStore blobStore = wrapper.getBlobStore(); + BlobStore blobStore = view.getBlobStore(); blobStore.createContainerInLocation(null, containerName); Blob blob = blobStore.blobBuilder(blobName).payload("something").build(); blobStore.putBlob(containerName, blob, storageClass(StorageClass.REDUCED_REDUNDANCY)); - S3Client s3Client = S3Client.class.cast(wrapper.unwrap(AWSS3ApiMetadata.CONTEXT_TOKEN).getApi()); + S3Client s3Client = S3Client.class.cast(view.unwrap(AWSS3ApiMetadata.CONTEXT_TOKEN).getApi()); ListBucketResponse response = s3Client.listBucket(containerName, withPrefix(blobName)); ObjectMetadata metadata = response.iterator().next(); diff --git a/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobApiMetadata.java b/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobApiMetadata.java index 4dcf4de114..8d47ff23d6 100644 --- a/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobApiMetadata.java +++ b/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobApiMetadata.java @@ -81,7 +81,7 @@ public class AzureBlobApiMetadata extends BaseRestApiMetadata { .defaultEndpoint("https://${jclouds.identity}.blob.core.windows.net") .documentation(URI.create("http://msdn.microsoft.com/en-us/library/dd135733.aspx")) .defaultProperties(AzureBlobApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(BlobStoreContext.class)) + .view(TypeToken.of(BlobStoreContext.class)) .defaultModules(ImmutableSet.>of(AzureBlobRestClientModule.class, AzureBlobStoreContextModule.class)); } diff --git a/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobAsyncClient.java b/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobAsyncClient.java index 3fce0b5b38..af2d429beb 100644 --- a/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobAsyncClient.java +++ b/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobAsyncClient.java @@ -75,7 +75,7 @@ import com.google.inject.Provides; * Provides asynchronous access to Azure Blob via their REST API. *

* All commands return a ListenableFuture of the result from Azure Blob. Any exceptions incurred - * during processing will be wrapped in an {@link ExecutionException} as documented in + * during processing will be backend in an {@link ExecutionException} as documented in * {@link ListenableFuture#get()}. * * @see diff --git a/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobClient.java b/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobClient.java index 9f0e34ca6c..60765b4032 100644 --- a/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobClient.java +++ b/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobClient.java @@ -41,7 +41,7 @@ import com.google.inject.Provides; * Provides access to Azure Blob via their REST API. *

* All commands return a Future of the result from Azure Blob. Any exceptions incurred during - * processing will be wrapped in an {@link ExecutionException} as documented in {@link Future#get()}. + * processing will be backend in an {@link ExecutionException} as documented in {@link Future#get()}. * * @see * @author Adrian Cole diff --git a/providers/azureblob/src/test/java/org/jclouds/azureblob/AzureBlobClientLiveTest.java b/providers/azureblob/src/test/java/org/jclouds/azureblob/AzureBlobClientLiveTest.java index 016c5317f9..0c1dc5fb31 100644 --- a/providers/azureblob/src/test/java/org/jclouds/azureblob/AzureBlobClientLiveTest.java +++ b/providers/azureblob/src/test/java/org/jclouds/azureblob/AzureBlobClientLiveTest.java @@ -65,7 +65,7 @@ public class AzureBlobClientLiveTest extends BaseBlobStoreIntegrationTest { } public AzureBlobClient getApi() { - return wrapper.unwrap(AzureBlobApiMetadata.CONTEXT_TOKEN).getApi(); + return view.unwrap(AzureBlobApiMetadata.CONTEXT_TOKEN).getApi(); } @Test @@ -99,7 +99,7 @@ public class AzureBlobClientLiveTest extends BaseBlobStoreIntegrationTest { long containerCount = response.size(); assertTrue(containerCount >= 1); ListBlobsResponse list = getApi().listBlobs(privateContainer); - assertEquals(list.getUrl(), URI.create(String.format("https://%s.blob.core.windows.net/%s", wrapper.unwrap( + assertEquals(list.getUrl(), URI.create(String.format("https://%s.blob.core.windows.net/%s", view.unwrap( AzureBlobApiMetadata.CONTEXT_TOKEN).getIdentity(), privateContainer))); // TODO .. check to see the container actually exists } @@ -155,7 +155,7 @@ public class AzureBlobClientLiveTest extends BaseBlobStoreIntegrationTest { } } ListBlobsResponse list = getApi().listBlobs(); - assertEquals(list.getUrl(), URI.create(String.format("https://%s.blob.core.windows.net/$root", wrapper.unwrap( + assertEquals(list.getUrl(), URI.create(String.format("https://%s.blob.core.windows.net/$root", view.unwrap( AzureBlobApiMetadata.CONTEXT_TOKEN).getIdentity()))); } diff --git a/providers/bluelock-vcloud-zone01/src/test/java/org/jclouds/bluelock/vcloud/zone01/compute/BluelockVCloudZone01TemplateBuilderLiveTest.java b/providers/bluelock-vcloud-zone01/src/test/java/org/jclouds/bluelock/vcloud/zone01/compute/BluelockVCloudZone01TemplateBuilderLiveTest.java index 4e979b0990..d0908b0ec0 100644 --- a/providers/bluelock-vcloud-zone01/src/test/java/org/jclouds/bluelock/vcloud/zone01/compute/BluelockVCloudZone01TemplateBuilderLiveTest.java +++ b/providers/bluelock-vcloud-zone01/src/test/java/org/jclouds/bluelock/vcloud/zone01/compute/BluelockVCloudZone01TemplateBuilderLiveTest.java @@ -67,7 +67,7 @@ public class BluelockVCloudZone01TemplateBuilderLiveTest extends BaseTemplateBui @Override public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), ""); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/cloudfiles-uk/src/test/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKClientLiveTest.java b/providers/cloudfiles-uk/src/test/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKClientLiveTest.java index 1edd4ef6a3..b3d5d9c56d 100644 --- a/providers/cloudfiles-uk/src/test/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKClientLiveTest.java +++ b/providers/cloudfiles-uk/src/test/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKClientLiveTest.java @@ -41,7 +41,7 @@ public class CloudFilesUKClientLiveTest extends CloudFilesClientLiveTest { @Override public CloudFilesClient getApi() { - return wrapper.unwrap(CloudFilesApiMetadata.CONTEXT_TOKEN).getApi(); + return view.unwrap(CloudFilesApiMetadata.CONTEXT_TOKEN).getApi(); } @Override diff --git a/providers/cloudservers-uk/src/test/java/org/jclouds/rackspace/cloudservers/compute/CloudServersUKTemplateBuilderLiveTest.java b/providers/cloudservers-uk/src/test/java/org/jclouds/rackspace/cloudservers/compute/CloudServersUKTemplateBuilderLiveTest.java index 4ac3d2dcaa..51949b6285 100644 --- a/providers/cloudservers-uk/src/test/java/org/jclouds/rackspace/cloudservers/compute/CloudServersUKTemplateBuilderLiveTest.java +++ b/providers/cloudservers-uk/src/test/java/org/jclouds/rackspace/cloudservers/compute/CloudServersUKTemplateBuilderLiveTest.java @@ -72,7 +72,7 @@ public class CloudServersUKTemplateBuilderLiveTest extends BaseTemplateBuilderLi @Test public void testTemplateBuilder() { - Template defaultTemplate = this.wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = this.view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.10"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/cloudservers-us/src/test/java/org/jclouds/rackspace/cloudservers/compute/CloudServersUSTemplateBuilderLiveTest.java b/providers/cloudservers-us/src/test/java/org/jclouds/rackspace/cloudservers/compute/CloudServersUSTemplateBuilderLiveTest.java index f034e44582..2604748a71 100644 --- a/providers/cloudservers-us/src/test/java/org/jclouds/rackspace/cloudservers/compute/CloudServersUSTemplateBuilderLiveTest.java +++ b/providers/cloudservers-us/src/test/java/org/jclouds/rackspace/cloudservers/compute/CloudServersUSTemplateBuilderLiveTest.java @@ -72,7 +72,7 @@ public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLi @Test public void testTemplateBuilder() { - Template defaultTemplate = this.wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = this.view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.10"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/cloudsigma-lvs/src/test/java/org/jclouds/cloudsigma/compute/CloudSigmaLasVegasTemplateBuilderLiveTest.java b/providers/cloudsigma-lvs/src/test/java/org/jclouds/cloudsigma/compute/CloudSigmaLasVegasTemplateBuilderLiveTest.java index 4566bf38a3..4c6c3c26ec 100644 --- a/providers/cloudsigma-lvs/src/test/java/org/jclouds/cloudsigma/compute/CloudSigmaLasVegasTemplateBuilderLiveTest.java +++ b/providers/cloudsigma-lvs/src/test/java/org/jclouds/cloudsigma/compute/CloudSigmaLasVegasTemplateBuilderLiveTest.java @@ -76,7 +76,7 @@ public class CloudSigmaLasVegasTemplateBuilderLiveTest extends BaseTemplateBuild @Override public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.04"); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getId(), "6aab1938-71b3-4252-ac1c-a3cb17c284ab"); diff --git a/providers/cloudsigma-zrh/src/test/java/org/jclouds/cloudsigma/compute/CloudSigmaZurichTemplateBuilderLiveTest.java b/providers/cloudsigma-zrh/src/test/java/org/jclouds/cloudsigma/compute/CloudSigmaZurichTemplateBuilderLiveTest.java index 7a5f8639b8..d4bf421e3b 100644 --- a/providers/cloudsigma-zrh/src/test/java/org/jclouds/cloudsigma/compute/CloudSigmaZurichTemplateBuilderLiveTest.java +++ b/providers/cloudsigma-zrh/src/test/java/org/jclouds/cloudsigma/compute/CloudSigmaZurichTemplateBuilderLiveTest.java @@ -72,7 +72,7 @@ public class CloudSigmaZurichTemplateBuilderLiveTest extends BaseTemplateBuilder @Override public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), ""); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getId(), "c9df6b90-420c-4c46-b7f2-8d9e99929a09"); diff --git a/providers/elastichosts-lax-p/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsPeer1LosAngelesTemplateBuilderLiveTest.java b/providers/elastichosts-lax-p/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsPeer1LosAngelesTemplateBuilderLiveTest.java index 602cbf247c..8b6ed20aa6 100644 --- a/providers/elastichosts-lax-p/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsPeer1LosAngelesTemplateBuilderLiveTest.java +++ b/providers/elastichosts-lax-p/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsPeer1LosAngelesTemplateBuilderLiveTest.java @@ -70,7 +70,7 @@ public class ElasticHostsPeer1LosAngelesTemplateBuilderLiveTest extends BaseTemp @Test public void testTemplateBuilder() { - Template defaultTemplate = this.wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = this.view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.10"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/elastichosts-lon-b/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsBlueSquareLondonTemplateBuilderLiveTest.java b/providers/elastichosts-lon-b/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsBlueSquareLondonTemplateBuilderLiveTest.java index ecdab80d22..92f141af69 100644 --- a/providers/elastichosts-lon-b/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsBlueSquareLondonTemplateBuilderLiveTest.java +++ b/providers/elastichosts-lon-b/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsBlueSquareLondonTemplateBuilderLiveTest.java @@ -71,7 +71,7 @@ public class ElasticHostsBlueSquareLondonTemplateBuilderLiveTest extends BaseTem @Test public void testTemplateBuilder() { - Template defaultTemplate = this.wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = this.view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.10"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/elastichosts-lon-p/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsPeer1LondonTemplateBuilderLiveTest.java b/providers/elastichosts-lon-p/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsPeer1LondonTemplateBuilderLiveTest.java index 69fbfa21ce..3afc2db087 100644 --- a/providers/elastichosts-lon-p/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsPeer1LondonTemplateBuilderLiveTest.java +++ b/providers/elastichosts-lon-p/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsPeer1LondonTemplateBuilderLiveTest.java @@ -71,7 +71,7 @@ public class ElasticHostsPeer1LondonTemplateBuilderLiveTest extends BaseTemplate @Test public void testTemplateBuilder() { - Template defaultTemplate = this.wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = this.view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.10"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/elastichosts-sat-p/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsPeer1SanAntonioTemplateBuilderLiveTest.java b/providers/elastichosts-sat-p/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsPeer1SanAntonioTemplateBuilderLiveTest.java index 644d8902e7..1fae6124f6 100644 --- a/providers/elastichosts-sat-p/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsPeer1SanAntonioTemplateBuilderLiveTest.java +++ b/providers/elastichosts-sat-p/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsPeer1SanAntonioTemplateBuilderLiveTest.java @@ -70,7 +70,7 @@ public class ElasticHostsPeer1SanAntonioTemplateBuilderLiveTest extends BaseTemp @Test public void testTemplateBuilder() { - Template defaultTemplate = this.wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = this.view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.10"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/elastichosts-tor-p/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsPeer1TorontoTemplateBuilderLiveTest.java b/providers/elastichosts-tor-p/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsPeer1TorontoTemplateBuilderLiveTest.java index 5f700c6491..55ad26e5f7 100644 --- a/providers/elastichosts-tor-p/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsPeer1TorontoTemplateBuilderLiveTest.java +++ b/providers/elastichosts-tor-p/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsPeer1TorontoTemplateBuilderLiveTest.java @@ -70,7 +70,7 @@ public class ElasticHostsPeer1TorontoTemplateBuilderLiveTest extends BaseTemplat @Test public void testTemplateBuilder() { - Template defaultTemplate = this.wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = this.view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.10"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/eucalyptus-partnercloud-ec2/src/test/java/org/jclouds/epc/compute/EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest.java b/providers/eucalyptus-partnercloud-ec2/src/test/java/org/jclouds/epc/compute/EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest.java index 2b6564445b..e381531755 100644 --- a/providers/eucalyptus-partnercloud-ec2/src/test/java/org/jclouds/epc/compute/EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest.java +++ b/providers/eucalyptus-partnercloud-ec2/src/test/java/org/jclouds/epc/compute/EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest.java @@ -72,7 +72,7 @@ public class EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest extends Bas @Test public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); assert (defaultTemplate.getImage().getProviderId().startsWith("emi-")) : defaultTemplate; assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "10.04"); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); diff --git a/providers/go2cloud-jhb1/src/test/java/org/jclouds/go2cloud/compute/Go2CloudJohannesburg1TemplateBuilderLiveTest.java b/providers/go2cloud-jhb1/src/test/java/org/jclouds/go2cloud/compute/Go2CloudJohannesburg1TemplateBuilderLiveTest.java index a23f9d87a0..9cf62b1455 100644 --- a/providers/go2cloud-jhb1/src/test/java/org/jclouds/go2cloud/compute/Go2CloudJohannesburg1TemplateBuilderLiveTest.java +++ b/providers/go2cloud-jhb1/src/test/java/org/jclouds/go2cloud/compute/Go2CloudJohannesburg1TemplateBuilderLiveTest.java @@ -68,7 +68,7 @@ public class Go2CloudJohannesburg1TemplateBuilderLiveTest extends BaseTemplateBu @Test public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = this.wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = this.view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "10.10"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/GoGridApiMetadata.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/GoGridApiMetadata.java index b85d260968..13abb975ce 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/GoGridApiMetadata.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/GoGridApiMetadata.java @@ -77,7 +77,7 @@ public class GoGridApiMetadata extends BaseRestApiMetadata { .version(GoGridAsyncClient.VERSION) .defaultEndpoint("https://api.gogrid.com/api") .defaultProperties(GoGridApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(ComputeServiceContext.class)) + .view(TypeToken.of(ComputeServiceContext.class)) .defaultModules(ImmutableSet.>of(GoGridRestClientModule.class, GoGridComputeServiceContextModule.class)); } diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/functions/GenericResponseContainer.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/functions/GenericResponseContainer.java index f13711f09d..a675b9d2ed 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/functions/GenericResponseContainer.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/functions/GenericResponseContainer.java @@ -23,7 +23,7 @@ import java.util.SortedSet; /** * General format of GoGrid's response. * - * This is the wrapper for most responses, and the actual result (or error) will + * This is the view for most responses, and the actual result (or error) will * be set to {@link #list}. Note that even the single returned item will be set * to {@link #list} per GoGrid's design. * diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/functions/ParseServerNameToCredentialsMapFromJsonResponse.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/functions/ParseServerNameToCredentialsMapFromJsonResponse.java index c8675017d8..5e8bc81790 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/functions/ParseServerNameToCredentialsMapFromJsonResponse.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/functions/ParseServerNameToCredentialsMapFromJsonResponse.java @@ -46,7 +46,7 @@ public class ParseServerNameToCredentialsMapFromJsonResponse implements this.json = json; } - // incidental wrapper class to assist in getting the correct data + // incidental view class to assist in getting the correct data // deserialized from json private static class Password implements Comparable { @SerializedName("username") diff --git a/providers/gogrid/src/test/java/org/jclouds/gogrid/GoGridLiveTestDisabled.java b/providers/gogrid/src/test/java/org/jclouds/gogrid/GoGridLiveTestDisabled.java index 54871138d1..940858cff0 100644 --- a/providers/gogrid/src/test/java/org/jclouds/gogrid/GoGridLiveTestDisabled.java +++ b/providers/gogrid/src/test/java/org/jclouds/gogrid/GoGridLiveTestDisabled.java @@ -97,7 +97,7 @@ public class GoGridLiveTestDisabled extends BaseComputeServiceContextLiveTest { @Override public void setupContext() { super.setupContext(); - gocontext = wrapper.unwrap(); + gocontext = view.unwrap(); client = gocontext.getApi(); serverLatestJobCompleted = new RetryablePredicate(new ServerLatestJobCompleted(client.getJobServices()), diff --git a/providers/gogrid/src/test/java/org/jclouds/gogrid/binders/BindIdsToQueryParamsTest.java b/providers/gogrid/src/test/java/org/jclouds/gogrid/binders/BindIdsToQueryParamsTest.java index 688af20cf6..e92cd7864a 100644 --- a/providers/gogrid/src/test/java/org/jclouds/gogrid/binders/BindIdsToQueryParamsTest.java +++ b/providers/gogrid/src/test/java/org/jclouds/gogrid/binders/BindIdsToQueryParamsTest.java @@ -40,7 +40,7 @@ import com.sun.jersey.api.uri.UriBuilderImpl; public class BindIdsToQueryParamsTest { @Test - public void testWithWrapper() throws SecurityException, NoSuchMethodException { + public void testWithView() throws SecurityException, NoSuchMethodException { HttpRequest request = new HttpRequest("GET", URI.create("http://momma/")); diff --git a/providers/gogrid/src/test/java/org/jclouds/gogrid/compute/GoGridComputeServiceLiveTest.java b/providers/gogrid/src/test/java/org/jclouds/gogrid/compute/GoGridComputeServiceLiveTest.java index 2a99623bb1..2aba331b6f 100644 --- a/providers/gogrid/src/test/java/org/jclouds/gogrid/compute/GoGridComputeServiceLiveTest.java +++ b/providers/gogrid/src/test/java/org/jclouds/gogrid/compute/GoGridComputeServiceLiveTest.java @@ -71,7 +71,7 @@ public class GoGridComputeServiceLiveTest extends BaseComputeServiceLiveTest { public void testResizeRam() throws Exception { String group = this.group + "ram"; - RestContext providerContext = wrapper.unwrap(); + RestContext providerContext = view.unwrap(); try { client.destroyNodesMatching(inGroup(group)); } catch (Exception e) { diff --git a/providers/gogrid/src/test/java/org/jclouds/gogrid/compute/GoGridTemplateBuilderLiveTest.java b/providers/gogrid/src/test/java/org/jclouds/gogrid/compute/GoGridTemplateBuilderLiveTest.java index 04cb647266..6b3fc3f145 100644 --- a/providers/gogrid/src/test/java/org/jclouds/gogrid/compute/GoGridTemplateBuilderLiveTest.java +++ b/providers/gogrid/src/test/java/org/jclouds/gogrid/compute/GoGridTemplateBuilderLiveTest.java @@ -71,7 +71,7 @@ public class GoGridTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest { @Test public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "10.04"); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/gogrid/src/test/java/org/jclouds/gogrid/services/BaseGoGridClientLiveTest.java b/providers/gogrid/src/test/java/org/jclouds/gogrid/services/BaseGoGridClientLiveTest.java index a92dbf2a57..78f8e32141 100644 --- a/providers/gogrid/src/test/java/org/jclouds/gogrid/services/BaseGoGridClientLiveTest.java +++ b/providers/gogrid/src/test/java/org/jclouds/gogrid/services/BaseGoGridClientLiveTest.java @@ -43,7 +43,7 @@ public class BaseGoGridClientLiveTest extends BaseComputeServiceContextLiveTest @Override public void setupContext() { super.setupContext(); - restContext = wrapper.unwrap(); + restContext = view.unwrap(); } diff --git a/providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/compute/GreenHouseDataElementVCloudTemplateBuilderLiveTest.java b/providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/compute/GreenHouseDataElementVCloudTemplateBuilderLiveTest.java index ba1affe0db..fb1b524699 100644 --- a/providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/compute/GreenHouseDataElementVCloudTemplateBuilderLiveTest.java +++ b/providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/compute/GreenHouseDataElementVCloudTemplateBuilderLiveTest.java @@ -63,7 +63,7 @@ public class GreenHouseDataElementVCloudTemplateBuilderLiveTest extends BaseTemp @Override public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), ""); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/hpcloud-compute/src/test/java/org/jclouds/hpcloud/compute/compute/HPCloudComputeTemplateBuilderLiveTest.java b/providers/hpcloud-compute/src/test/java/org/jclouds/hpcloud/compute/compute/HPCloudComputeTemplateBuilderLiveTest.java index 8824bfa9fa..97ba69bd92 100644 --- a/providers/hpcloud-compute/src/test/java/org/jclouds/hpcloud/compute/compute/HPCloudComputeTemplateBuilderLiveTest.java +++ b/providers/hpcloud-compute/src/test/java/org/jclouds/hpcloud/compute/compute/HPCloudComputeTemplateBuilderLiveTest.java @@ -69,7 +69,7 @@ public class HPCloudComputeTemplateBuilderLiveTest extends BaseTemplateBuilderLi @Test public void testTemplateBuilder() { - Template defaultTemplate = this.wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = this.view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.10"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageApiMetadata.java b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageApiMetadata.java index dee1981245..e39e556d6c 100644 --- a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageApiMetadata.java +++ b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageApiMetadata.java @@ -88,7 +88,7 @@ public class HPCloudObjectStorageApiMetadata extends BaseRestApiMetadata { .version("1.0") .documentation(URI.create("https://build.hpcloud.com/object-storage/api")) .defaultProperties(HPCloudObjectStorageApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(BlobStoreContext.class)) + .view(TypeToken.of(BlobStoreContext.class)) .defaultModules(ImmutableSet.>of(HPCloudObjectStorageRestClientModule.class, HPCloudObjectStorageBlobStoreContextModule.class)); } diff --git a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageAsyncClient.java b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageAsyncClient.java index ab7df1d307..24087f6e56 100644 --- a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageAsyncClient.java +++ b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageAsyncClient.java @@ -56,7 +56,7 @@ import com.google.common.util.concurrent.ListenableFuture; * *

* All commands return a ListenableFuture of the result. Any exceptions incurred during processing - * will be wrapped in an {@link java.util.concurrent.ExecutionException} as documented in + * will be backend in an {@link java.util.concurrent.ExecutionException} as documented in * {@link ListenableFuture#get()}. * * @see HPCloudObjectStorageClient diff --git a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageClient.java b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageClient.java index 5f9de9e8e5..fc7bbdda5e 100644 --- a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageClient.java +++ b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageClient.java @@ -35,7 +35,7 @@ import com.google.common.util.concurrent.ListenableFuture; * *

* All commands return a ListenableFuture of the result. Any exceptions incurred during processing - * will be wrapped in an {@link java.util.concurrent.ExecutionException} as documented in + * will be backend in an {@link java.util.concurrent.ExecutionException} as documented in * {@link ListenableFuture#get()}. * * @see org.jclouds.hpcloud.objectstorage.HPCloudObjectStorageClient diff --git a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/extensions/HPCloudCDNAsyncClient.java b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/extensions/HPCloudCDNAsyncClient.java index c5d3926cb2..9d231dbe5c 100644 --- a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/extensions/HPCloudCDNAsyncClient.java +++ b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/extensions/HPCloudCDNAsyncClient.java @@ -55,7 +55,7 @@ import com.google.common.util.concurrent.ListenableFuture; * Provides asynchronous access to HP Cloud Object Storage via the REST API. * *

All commands return a ListenableFuture of the result. Any exceptions incurred - * during processing will be wrapped in an {@link java.util.concurrent.ExecutionException} as documented in + * during processing will be backend in an {@link java.util.concurrent.ExecutionException} as documented in * {@link ListenableFuture#get()}. * * @see HPCloudObjectStorageClient diff --git a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/extensions/HPCloudCDNClient.java b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/extensions/HPCloudCDNClient.java index 75798333d6..d55090ae3b 100644 --- a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/extensions/HPCloudCDNClient.java +++ b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/extensions/HPCloudCDNClient.java @@ -34,7 +34,7 @@ import com.google.common.util.concurrent.ListenableFuture; * *

* All commands return a ListenableFuture of the result. Any exceptions incurred during processing - * will be wrapped in an {@link java.util.concurrent.ExecutionException} as documented in {@link ListenableFuture#get()}. + * will be backend in an {@link java.util.concurrent.ExecutionException} as documented in {@link ListenableFuture#get()}. * * @see org.jclouds.hpcloud.objectstorage.HPCloudObjectStorageClient * @see HP Cloud Object diff --git a/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageClientLiveTest.java b/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageClientLiveTest.java index 174b1fbe95..707b362f10 100644 --- a/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageClientLiveTest.java +++ b/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageClientLiveTest.java @@ -43,7 +43,7 @@ public class HPCloudObjectStorageClientLiveTest extends CommonSwiftClientLiveTes @Override public HPCloudObjectStorageClient getApi() { - return wrapper.unwrap(HPCloudObjectStorageApiMetadata.CONTEXT_TOKEN).getApi(); + return view.unwrap(HPCloudObjectStorageApiMetadata.CONTEXT_TOKEN).getApi(); } @Override diff --git a/providers/ninefold-compute/src/test/java/org/jclouds/ninefold/compute/compute/NinefoldComputeTemplateBuilderLiveTest.java b/providers/ninefold-compute/src/test/java/org/jclouds/ninefold/compute/compute/NinefoldComputeTemplateBuilderLiveTest.java index 9c6a801ccc..fcdb27538b 100644 --- a/providers/ninefold-compute/src/test/java/org/jclouds/ninefold/compute/compute/NinefoldComputeTemplateBuilderLiveTest.java +++ b/providers/ninefold-compute/src/test/java/org/jclouds/ninefold/compute/compute/NinefoldComputeTemplateBuilderLiveTest.java @@ -70,7 +70,7 @@ public class NinefoldComputeTemplateBuilderLiveTest extends BaseTemplateBuilderL @Test public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = this.wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = this.view.getComputeService().templateBuilder().build(); if (imageId == null) { assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "10.04"); @@ -78,7 +78,7 @@ public class NinefoldComputeTemplateBuilderLiveTest extends BaseTemplateBuilderL assertEquals(defaultTemplate.getLocation().getId(), "1"); assertEquals(getCores(defaultTemplate.getHardware()), 1.0d); } else { - assertEquals(defaultTemplate.getImage(), this.wrapper.getComputeService().templateBuilder().imageId(imageId) + assertEquals(defaultTemplate.getImage(), this.view.getComputeService().templateBuilder().imageId(imageId) .build().getImage()); } } diff --git a/providers/openhosting-east1/src/test/java/org/jclouds/openhosting/compute/OpenHostingEast1TemplateBuilderLiveTest.java b/providers/openhosting-east1/src/test/java/org/jclouds/openhosting/compute/OpenHostingEast1TemplateBuilderLiveTest.java index 04a9ba32e5..81751707e9 100644 --- a/providers/openhosting-east1/src/test/java/org/jclouds/openhosting/compute/OpenHostingEast1TemplateBuilderLiveTest.java +++ b/providers/openhosting-east1/src/test/java/org/jclouds/openhosting/compute/OpenHostingEast1TemplateBuilderLiveTest.java @@ -70,7 +70,7 @@ public class OpenHostingEast1TemplateBuilderLiveTest extends BaseTemplateBuilder @Test public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = this.wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = this.view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "10.04"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingApiMetadata.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingApiMetadata.java index a18b127a65..f1fd61f568 100644 --- a/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingApiMetadata.java +++ b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingApiMetadata.java @@ -87,7 +87,7 @@ public class RimuHostingApiMetadata extends BaseRestApiMetadata { .version("1") .defaultEndpoint("https://api.rimuhosting.com/r") .defaultProperties(RimuHostingApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(ComputeServiceContext.class)) + .view(TypeToken.of(ComputeServiceContext.class)) .defaultModules(ImmutableSet.>of(RimuHostingRestClientModule.class, RimuHostingComputeServiceContextModule.class)); } diff --git a/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/NewServerResponse.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/NewServerResponse.java index b3600fd835..9d7f034daa 100644 --- a/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/NewServerResponse.java +++ b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/NewServerResponse.java @@ -23,7 +23,7 @@ import org.jclouds.rimuhosting.miro.data.NewServerData; import com.google.gson.annotations.SerializedName; /** - * Wrapper object to get back all data from a Instance create. The Password has been populated the NewInstance + * View object to get back all data from a Instance create. The Password has been populated the NewInstance * object. * * @author Ivan Meredith diff --git a/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RimuHostingResponse.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RimuHostingResponse.java index a1d814a150..8c05a8e2a9 100644 --- a/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RimuHostingResponse.java +++ b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RimuHostingResponse.java @@ -19,7 +19,7 @@ package org.jclouds.rimuhosting.miro.domain.internal; /** - * Object that the payload on requests is wrapped in. + * Object that the payload on requests is backend in. * * @author Ivan Meredith */ diff --git a/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingClientLiveTest.java b/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingClientLiveTest.java index 1be0472961..388cabd63a 100644 --- a/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingClientLiveTest.java +++ b/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingClientLiveTest.java @@ -56,7 +56,7 @@ public class RimuHostingClientLiveTest @Override public void setupContext() { super.setupContext(); - restContext = wrapper.unwrap(); + restContext = view.unwrap(); this.connection = restContext.getApi(); } diff --git a/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingTemplateBuilderLiveTest.java b/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingTemplateBuilderLiveTest.java index 631b3b918e..791e461b1f 100644 --- a/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingTemplateBuilderLiveTest.java +++ b/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingTemplateBuilderLiveTest.java @@ -67,7 +67,7 @@ public class RimuHostingTemplateBuilderLiveTest extends BaseTemplateBuilderLiveT @Test public void testTemplateBuilder() { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.04"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/serverlove-z1-man/src/test/java/org/jclouds/serverlove/compute/ServerloveManchesterTemplateBuilderLiveTest.java b/providers/serverlove-z1-man/src/test/java/org/jclouds/serverlove/compute/ServerloveManchesterTemplateBuilderLiveTest.java index e6f9926380..58e85158ef 100644 --- a/providers/serverlove-z1-man/src/test/java/org/jclouds/serverlove/compute/ServerloveManchesterTemplateBuilderLiveTest.java +++ b/providers/serverlove-z1-man/src/test/java/org/jclouds/serverlove/compute/ServerloveManchesterTemplateBuilderLiveTest.java @@ -69,7 +69,7 @@ public class ServerloveManchesterTemplateBuilderLiveTest extends BaseTemplateBui @Test public void testTemplateBuilder() { - Template defaultTemplate = this.wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = this.view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "10.04"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/skalicloud-sdg-my/src/test/java/org/jclouds/skalicloud/compute/SkaliCloudMalaysiaTemplateBuilderLiveTest.java b/providers/skalicloud-sdg-my/src/test/java/org/jclouds/skalicloud/compute/SkaliCloudMalaysiaTemplateBuilderLiveTest.java index af11e464f8..79733cc7bb 100644 --- a/providers/skalicloud-sdg-my/src/test/java/org/jclouds/skalicloud/compute/SkaliCloudMalaysiaTemplateBuilderLiveTest.java +++ b/providers/skalicloud-sdg-my/src/test/java/org/jclouds/skalicloud/compute/SkaliCloudMalaysiaTemplateBuilderLiveTest.java @@ -73,7 +73,7 @@ public class SkaliCloudMalaysiaTemplateBuilderLiveTest @Override public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = this.wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = this.view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "10.10"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/slicehost/src/main/java/org/jclouds/slicehost/SlicehostApiMetadata.java b/providers/slicehost/src/main/java/org/jclouds/slicehost/SlicehostApiMetadata.java index 8ca75dbdc3..082ca9b1df 100644 --- a/providers/slicehost/src/main/java/org/jclouds/slicehost/SlicehostApiMetadata.java +++ b/providers/slicehost/src/main/java/org/jclouds/slicehost/SlicehostApiMetadata.java @@ -77,7 +77,7 @@ public class SlicehostApiMetadata extends BaseRestApiMetadata { .version("https://api.slicehost.com") .defaultEndpoint("https://api.slicehost.com") .defaultProperties(SlicehostApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(ComputeServiceContext.class)) + .view(TypeToken.of(ComputeServiceContext.class)) .defaultModules(ImmutableSet.>of(SlicehostRestClientModule.class, SlicehostComputeServiceContextModule.class)); } diff --git a/providers/slicehost/src/main/java/org/jclouds/slicehost/SlicehostAsyncClient.java b/providers/slicehost/src/main/java/org/jclouds/slicehost/SlicehostAsyncClient.java index f13d630fbb..a71ffdbfdc 100644 --- a/providers/slicehost/src/main/java/org/jclouds/slicehost/SlicehostAsyncClient.java +++ b/providers/slicehost/src/main/java/org/jclouds/slicehost/SlicehostAsyncClient.java @@ -59,7 +59,7 @@ import com.google.common.util.concurrent.ListenableFuture; * Provides asynchronous access to Slicehost via their REST API. *

* All commands return a ListenableFuture of the result from Slicehost. Any exceptions incurred - * during processing will be wrapped in an {@link ExecutionException} as documented in + * during processing will be backend in an {@link ExecutionException} as documented in * {@link ListenableFuture#get()}. * * @see SlicehostClient diff --git a/providers/slicehost/src/main/java/org/jclouds/slicehost/SlicehostClient.java b/providers/slicehost/src/main/java/org/jclouds/slicehost/SlicehostClient.java index 2e367bbfd6..76ef8e48c4 100644 --- a/providers/slicehost/src/main/java/org/jclouds/slicehost/SlicehostClient.java +++ b/providers/slicehost/src/main/java/org/jclouds/slicehost/SlicehostClient.java @@ -34,7 +34,7 @@ import com.google.common.util.concurrent.ListenableFuture; * Provides access to Slicehost via their REST API. *

* All commands return a ListenableFuture of the result from Slicehost. Any exceptions incurred - * during processing will be wrapped in an {@link ExecutionException} as documented in + * during processing will be backend in an {@link ExecutionException} as documented in * {@link ListenableFuture#get()}. * * @see SlicehostAsyncClient diff --git a/providers/slicehost/src/test/java/org/jclouds/slicehost/SlicehostClientLiveTest.java b/providers/slicehost/src/test/java/org/jclouds/slicehost/SlicehostClientLiveTest.java index 6ba6cc4df5..5af27f5e48 100644 --- a/providers/slicehost/src/test/java/org/jclouds/slicehost/SlicehostClientLiveTest.java +++ b/providers/slicehost/src/test/java/org/jclouds/slicehost/SlicehostClientLiveTest.java @@ -68,7 +68,7 @@ public class SlicehostClientLiveTest extends BaseComputeServiceContextLiveTest { @Override public void setupContext() { super.setupContext(); - Injector injector = wrapper.utils().injector(); + Injector injector = view.utils().injector(); client = injector.getInstance(SlicehostClient.class); sshFactory = injector.getInstance(SshClient.Factory.class); diff --git a/providers/slicehost/src/test/java/org/jclouds/slicehost/compute/SlicehostTemplateBuilderLiveTest.java b/providers/slicehost/src/test/java/org/jclouds/slicehost/compute/SlicehostTemplateBuilderLiveTest.java index 53f775560e..228cbcd71a 100644 --- a/providers/slicehost/src/test/java/org/jclouds/slicehost/compute/SlicehostTemplateBuilderLiveTest.java +++ b/providers/slicehost/src/test/java/org/jclouds/slicehost/compute/SlicehostTemplateBuilderLiveTest.java @@ -78,7 +78,7 @@ public class SlicehostTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTes @Test public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.10"); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerApiMetadata.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerApiMetadata.java index 311d7b5b15..6f37cda35d 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerApiMetadata.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerApiMetadata.java @@ -79,7 +79,7 @@ public class SoftLayerApiMetadata extends BaseRestApiMetadata { .version("3") .defaultEndpoint("https://api.softlayer.com/rest") .defaultProperties(SoftLayerApiMetadata.defaultProperties()) - .wrapper(TypeToken.of(ComputeServiceContext.class)) + .view(TypeToken.of(ComputeServiceContext.class)) .defaultModules(ImmutableSet.>of(SoftLayerRestClientModule.class, SoftLayerComputeServiceContextModule.class)); } diff --git a/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/SoftLayerComputeServiceAdapterLiveTest.java b/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/SoftLayerComputeServiceAdapterLiveTest.java index 87862055b5..2b40b84935 100644 --- a/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/SoftLayerComputeServiceAdapterLiveTest.java +++ b/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/SoftLayerComputeServiceAdapterLiveTest.java @@ -52,7 +52,7 @@ public class SoftLayerComputeServiceAdapterLiveTest extends BaseSoftLayerClientL @BeforeGroups(groups = { "live" }) public void setupContext() { super.setupContext(); - adapter = wrapper.utils().injector().getInstance(SoftLayerComputeServiceAdapter.class); + adapter = view.utils().injector().getInstance(SoftLayerComputeServiceAdapter.class); } @Test @@ -67,7 +67,7 @@ public class SoftLayerComputeServiceAdapterLiveTest extends BaseSoftLayerClientL public void testCreateNodeWithGroupEncodedIntoNameThenStoreCredentials() { String group = "foo"; String name = "node" + new Random().nextInt(); - Template template = wrapper.getComputeService().templateBuilder().build(); + Template template = view.getComputeService().templateBuilder().build(); // test passing custom options template.getOptions().as(SoftLayerTemplateOptions.class).domainName("me.org"); @@ -82,7 +82,7 @@ public class SoftLayerComputeServiceAdapterLiveTest extends BaseSoftLayerClientL } protected void doConnectViaSsh(VirtualGuest guest, LoginCredentials creds) { - SshClient ssh = wrapper.utils().sshFactory().create(new IPSocket(guest.getPrimaryIpAddress(), 22), creds); + SshClient ssh = view.utils().sshFactory().create(new IPSocket(guest.getPrimaryIpAddress(), 22), creds); try { ssh.connect(); ExecResponse hello = ssh.exec("echo hello"); diff --git a/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/SoftLayerTemplateBuilderLiveTest.java b/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/SoftLayerTemplateBuilderLiveTest.java index 80ecd83f31..181e380ea7 100644 --- a/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/SoftLayerTemplateBuilderLiveTest.java +++ b/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/SoftLayerTemplateBuilderLiveTest.java @@ -84,7 +84,7 @@ public class SoftLayerTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTes @Test public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "10.04"); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); @@ -103,7 +103,7 @@ public class SoftLayerTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTes Properties overrides = setupProperties(); overrides.setProperty(PROPERTY_SOFTLAYER_VIRTUALGUEST_PORT_SPEED, "1000"); - context = createWrapper(overrides, setupModules()); + context = createView(overrides, setupModules()); // TODO add something to the template about port speed? context.getComputeService().templateBuilder().build(); @@ -121,7 +121,7 @@ public class SoftLayerTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTes Properties overrides = setupProperties(); overrides.setProperty(PROPERTY_SOFTLAYER_VIRTUALGUEST_PORT_SPEED, "100"); - context = createWrapper(overrides, setupModules()); + context = createView(overrides, setupModules()); // TODO add something to the template about port speed? context.getComputeService().templateBuilder().build(); @@ -139,7 +139,7 @@ public class SoftLayerTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTes Properties overrides = setupProperties(); overrides.setProperty(PROPERTY_SOFTLAYER_VIRTUALGUEST_DISK0_TYPE, "SAN"); - context = createWrapper(overrides, setupModules()); + context = createView(overrides, setupModules()); Template template = context.getComputeService().templateBuilder().biggest().build(); assertEquals(getCores(template.getHardware()), 16.0d); @@ -159,7 +159,7 @@ public class SoftLayerTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTes Properties overrides = setupProperties(); overrides.setProperty(PROPERTY_SOFTLAYER_VIRTUALGUEST_CPU_REGEX, "Private [0-9]+ x ([.0-9]+) GHz Core[s]?"); - context = createWrapper(overrides, setupModules()); + context = createView(overrides, setupModules()); Template template = context.getComputeService().templateBuilder().build(); assertEquals(getCores(template.getHardware()), 1.0d); @@ -179,7 +179,7 @@ public class SoftLayerTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTes Properties overrides = setupProperties(); overrides.setProperty(PROPERTY_SOFTLAYER_VIRTUALGUEST_CPU_REGEX, "Private [0-9]+ x ([.0-9]+) GHz Core[s]?"); - context = createWrapper(overrides, setupModules()); + context = createView(overrides, setupModules()); Template template = context.getComputeService().templateBuilder().biggest().build(); assertEquals(getCores(template.getHardware()), 8.0d); @@ -194,7 +194,7 @@ public class SoftLayerTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTes @Test public void testFastestTemplateBuilder() throws IOException { - Template template = wrapper.getComputeService().templateBuilder().fastest().build(); + Template template = view.getComputeService().templateBuilder().fastest().build(); assertEquals(getCores(template.getHardware()), 16.0d); assertEquals(template.getHardware().getRam(), 1); assertEquals(getSpace(template.getHardware()), 25.0d); @@ -203,7 +203,7 @@ public class SoftLayerTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTes @Test public void testBiggestTemplateBuilder() throws IOException { - Template template = wrapper.getComputeService().templateBuilder().biggest().build(); + Template template = view.getComputeService().templateBuilder().biggest().build(); assertEquals(getCores(template.getHardware()), 16.0d); assertEquals(template.getHardware().getRam(), 16); assertEquals(getSpace(template.getHardware()), 100.0d); diff --git a/providers/softlayer/src/test/java/org/jclouds/softlayer/features/BaseSoftLayerClientLiveTest.java b/providers/softlayer/src/test/java/org/jclouds/softlayer/features/BaseSoftLayerClientLiveTest.java index e12ba4eb29..f8c6eab88b 100644 --- a/providers/softlayer/src/test/java/org/jclouds/softlayer/features/BaseSoftLayerClientLiveTest.java +++ b/providers/softlayer/src/test/java/org/jclouds/softlayer/features/BaseSoftLayerClientLiveTest.java @@ -39,7 +39,7 @@ public class BaseSoftLayerClientLiveTest extends BaseComputeServiceContextLiveTe @Override public void setupContext() { super.setupContext(); - socontext = wrapper.unwrap(); + socontext = view.unwrap(); } } diff --git a/providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestClientLiveTest.java b/providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestClientLiveTest.java index 1f2c324699..b01b6e5d41 100644 --- a/providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestClientLiveTest.java +++ b/providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestClientLiveTest.java @@ -116,7 +116,7 @@ public class VirtualGuestClientLiveTest extends BaseSoftLayerClientLiveTest { osToProductItem.get("Ubuntu Linux 8 LTS Hardy Heron - Minimal Install (64 bit)")); Builder prices = ImmutableSet.builder(); - prices.addAll(wrapper.utils().injector().getInstance(Key.get(new TypeLiteral>() { + prices.addAll(view.utils().injector().getInstance(Key.get(new TypeLiteral>() { }))); prices.add(ramPrice); prices.add(cpuPrice); diff --git a/providers/stratogen-vcloud-mycloud/src/test/java/org/jclouds/stratogen/vcloud/mycloud/compute/StratoGenVCloudMyCloudTemplateBuilderLiveTest.java b/providers/stratogen-vcloud-mycloud/src/test/java/org/jclouds/stratogen/vcloud/mycloud/compute/StratoGenVCloudMyCloudTemplateBuilderLiveTest.java index 2f88b12d72..2450b7a321 100644 --- a/providers/stratogen-vcloud-mycloud/src/test/java/org/jclouds/stratogen/vcloud/mycloud/compute/StratoGenVCloudMyCloudTemplateBuilderLiveTest.java +++ b/providers/stratogen-vcloud-mycloud/src/test/java/org/jclouds/stratogen/vcloud/mycloud/compute/StratoGenVCloudMyCloudTemplateBuilderLiveTest.java @@ -70,7 +70,7 @@ public class StratoGenVCloudMyCloudTemplateBuilderLiveTest extends BaseTemplateB @Override public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getName(), "Ubuntu server 11.04 64bit no GUI (base)"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), ""); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); diff --git a/providers/trmk-ecloud/src/test/java/org/jclouds/trmk/ecloud/compute/TerremarkECloudComputeServiceLiveTest.java b/providers/trmk-ecloud/src/test/java/org/jclouds/trmk/ecloud/compute/TerremarkECloudComputeServiceLiveTest.java index 7714dbeb49..ae9bf3e55e 100644 --- a/providers/trmk-ecloud/src/test/java/org/jclouds/trmk/ecloud/compute/TerremarkECloudComputeServiceLiveTest.java +++ b/providers/trmk-ecloud/src/test/java/org/jclouds/trmk/ecloud/compute/TerremarkECloudComputeServiceLiveTest.java @@ -104,7 +104,7 @@ public class TerremarkECloudComputeServiceLiveTest extends BaseComputeServiceLiv assert node.getLocation() != null; assertEquals(node.getType(), ComputeType.NODE); NodeMetadata allData = client.getNodeMetadata(node.getId()); - RestContext tmContext = wrapper.unwrap(); + RestContext tmContext = view.unwrap(); VApp vApp = tmContext.getApi().findVAppInOrgVDCNamed(allData.getLocation().getParent().getDescription(), allData.getLocation().getDescription(), allData.getName()); assertEquals(vApp.getName(), allData.getName()); diff --git a/providers/trmk-ecloud/src/test/java/org/jclouds/trmk/ecloud/compute/TerremarkECloudTemplateBuilderLiveTest.java b/providers/trmk-ecloud/src/test/java/org/jclouds/trmk/ecloud/compute/TerremarkECloudTemplateBuilderLiveTest.java index d5db3d3b23..f25b8e058b 100644 --- a/providers/trmk-ecloud/src/test/java/org/jclouds/trmk/ecloud/compute/TerremarkECloudTemplateBuilderLiveTest.java +++ b/providers/trmk-ecloud/src/test/java/org/jclouds/trmk/ecloud/compute/TerremarkECloudTemplateBuilderLiveTest.java @@ -81,7 +81,7 @@ public class TerremarkECloudTemplateBuilderLiveTest extends BaseTemplateBuilderL @Test public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "10.04"); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/trmk-vcloudexpress/src/test/java/org/jclouds/trmk/vcloudexpress/InternetServiceLiveTest.java b/providers/trmk-vcloudexpress/src/test/java/org/jclouds/trmk/vcloudexpress/InternetServiceLiveTest.java index b68fc80453..f1f6dfbd7e 100644 --- a/providers/trmk-vcloudexpress/src/test/java/org/jclouds/trmk/vcloudexpress/InternetServiceLiveTest.java +++ b/providers/trmk-vcloudexpress/src/test/java/org/jclouds/trmk/vcloudexpress/InternetServiceLiveTest.java @@ -88,7 +88,7 @@ public class InternetServiceLiveTest @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); - tmClient = wrapper.unwrap(TerremarkVCloudExpressApiMetadata.CONTEXT_TOKEN).getApi(); + tmClient = view.unwrap(TerremarkVCloudExpressApiMetadata.CONTEXT_TOKEN).getApi(); } diff --git a/providers/trmk-vcloudexpress/src/test/java/org/jclouds/trmk/vcloudexpress/compute/TerremarkVCloudExpressComputeServiceLiveTest.java b/providers/trmk-vcloudexpress/src/test/java/org/jclouds/trmk/vcloudexpress/compute/TerremarkVCloudExpressComputeServiceLiveTest.java index c27a91567b..050685d77e 100644 --- a/providers/trmk-vcloudexpress/src/test/java/org/jclouds/trmk/vcloudexpress/compute/TerremarkVCloudExpressComputeServiceLiveTest.java +++ b/providers/trmk-vcloudexpress/src/test/java/org/jclouds/trmk/vcloudexpress/compute/TerremarkVCloudExpressComputeServiceLiveTest.java @@ -96,7 +96,7 @@ public class TerremarkVCloudExpressComputeServiceLiveTest extends BaseComputeSer assertEquals(node.getType(), ComputeType.NODE); NodeMetadata allData = client.getNodeMetadata(node.getId()); System.out.println(allData.getHardware()); - RestContext tmContext = wrapper.unwrap(); + RestContext tmContext = view.unwrap(); VApp vApp = tmContext.getApi().findVAppInOrgVDCNamed(null, null, allData.getName()); assertEquals(vApp.getName(), allData.getName()); } diff --git a/providers/trmk-vcloudexpress/src/test/java/org/jclouds/trmk/vcloudexpress/compute/TerremarkVCloudExpressTemplateBuilderLiveTest.java b/providers/trmk-vcloudexpress/src/test/java/org/jclouds/trmk/vcloudexpress/compute/TerremarkVCloudExpressTemplateBuilderLiveTest.java index f350d5be47..6a2f989a6b 100644 --- a/providers/trmk-vcloudexpress/src/test/java/org/jclouds/trmk/vcloudexpress/compute/TerremarkVCloudExpressTemplateBuilderLiveTest.java +++ b/providers/trmk-vcloudexpress/src/test/java/org/jclouds/trmk/vcloudexpress/compute/TerremarkVCloudExpressTemplateBuilderLiveTest.java @@ -68,7 +68,7 @@ public class TerremarkVCloudExpressTemplateBuilderLiveTest extends BaseTemplateB @Test public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "10.04"); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/providers/trystack-nova/src/test/java/org/jclouds/trystack/nova/compute/TryStackNovaTemplateBuilderLiveTest.java b/providers/trystack-nova/src/test/java/org/jclouds/trystack/nova/compute/TryStackNovaTemplateBuilderLiveTest.java index b20006e2e8..2357a2d7fa 100644 --- a/providers/trystack-nova/src/test/java/org/jclouds/trystack/nova/compute/TryStackNovaTemplateBuilderLiveTest.java +++ b/providers/trystack-nova/src/test/java/org/jclouds/trystack/nova/compute/TryStackNovaTemplateBuilderLiveTest.java @@ -64,7 +64,7 @@ public class TryStackNovaTemplateBuilderLiveTest extends BaseTemplateBuilderLive @Test public void testTemplateBuilder() { - Template defaultTemplate = this.wrapper.getComputeService().templateBuilder().build(); + Template defaultTemplate = this.view.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.10"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); diff --git a/skeletons/standalone-compute/src/main/java/org/jclouds/servermanager/ServerManagerApiMetadata.java b/skeletons/standalone-compute/src/main/java/org/jclouds/servermanager/ServerManagerApiMetadata.java index a8fa9e5f35..f7f9a5c446 100644 --- a/skeletons/standalone-compute/src/main/java/org/jclouds/servermanager/ServerManagerApiMetadata.java +++ b/skeletons/standalone-compute/src/main/java/org/jclouds/servermanager/ServerManagerApiMetadata.java @@ -44,7 +44,7 @@ public class ServerManagerApiMetadata extends BaseApiMetadata { .defaultCredential("bar") .defaultEndpoint("http://demo") .documentation(URI.create("http://www.jclouds.org/documentation/userguide/compute")) - .wrapper(ComputeServiceContext.class) + .view(ComputeServiceContext.class) .defaultModule(ServerManagerComputeServiceContextModule.class); }