@Test public void create() throws Exception { S3ServiceInfo serviceInfo = createServiceInfo(); SpringCloudBlobStoreContext contextBuilder = testCreator.create(serviceInfo, null); assertConnectorProperties(serviceInfo, contextBuilder); }
public SpringCloudBlobStoreContext create(S3ServiceInfo serviceInfo, ServiceConnectorConfig serviceConnectorConfig) { Properties storeProviderInitProperties = new Properties(); storeProviderInitProperties.put(PROPERTY_S3_VIRTUAL_HOST_BUCKETS, serviceInfo.isVirtualHostBuckets()); this.loadProxy(storeProviderInitProperties); storeProviderInitProperties.put(PROPERTY_TRUST_ALL_CERTS, SKIP_SSL_VERIFICATION); ContextBuilder contextBuilder = ContextBuilder.newBuilder("s3"); contextBuilder .overrides(storeProviderInitProperties) .endpoint(serviceInfo.getS3Host()) .credentials(serviceInfo.getAccessKeyId(), serviceInfo.getSecretAccessKey()); return new SpringCloudBlobStoreContext(contextBuilder.buildView(BlobStoreContext.class), serviceInfo.getBucket()); }
S3FactoryCreator extends AbstractServiceConnectorCreator<SpringCloudBlobStoreContext, S3ServiceInfo> { public SpringCloudBlobStoreContext create(S3ServiceInfo serviceInfo, ServiceConnectorConfig serviceConnectorConfig) { Properties storeProviderInitProperties = new Properties(); storeProviderInitProperties.put(PROPERTY_S3_VIRTUAL_HOST_BUCKETS, serviceInfo.isVirtualHostBuckets()); this.loadProxy(storeProviderInitProperties); storeProviderInitProperties.put(PROPERTY_TRUST_ALL_CERTS, SKIP_SSL_VERIFICATION); ContextBuilder contextBuilder = ContextBuilder.newBuilder("s3"); contextBuilder .overrides(storeProviderInitProperties) .endpoint(serviceInfo.getS3Host()) .credentials(serviceInfo.getAccessKeyId(), serviceInfo.getSecretAccessKey()); return new SpringCloudBlobStoreContext(contextBuilder.buildView(BlobStoreContext.class), serviceInfo.getBucket()); } }
S3FactoryCreator extends AbstractServiceConnectorCreator<SpringCloudBlobStoreContext, S3ServiceInfo> { public SpringCloudBlobStoreContext create(S3ServiceInfo serviceInfo, ServiceConnectorConfig serviceConnectorConfig) { Properties storeProviderInitProperties = new Properties(); storeProviderInitProperties.put(PROPERTY_S3_VIRTUAL_HOST_BUCKETS, serviceInfo.isVirtualHostBuckets()); this.loadProxy(storeProviderInitProperties); storeProviderInitProperties.put(PROPERTY_TRUST_ALL_CERTS, SKIP_SSL_VERIFICATION); ContextBuilder contextBuilder = ContextBuilder.newBuilder("s3"); contextBuilder .overrides(storeProviderInitProperties) .endpoint(serviceInfo.getS3Host()) .credentials(serviceInfo.getAccessKeyId(), serviceInfo.getSecretAccessKey()); return new SpringCloudBlobStoreContext(contextBuilder.buildView(BlobStoreContext.class), serviceInfo.getBucket()); }  }
S3FactoryCreator extends AbstractServiceConnectorCreator<SpringCloudBlobStoreContext, S3ServiceInfo> { public SpringCloudBlobStoreContext create(S3ServiceInfo serviceInfo, ServiceConnectorConfig serviceConnectorConfig) { Properties storeProviderInitProperties = new Properties(); storeProviderInitProperties.put(PROPERTY_S3_VIRTUAL_HOST_BUCKETS, serviceInfo.isVirtualHostBuckets()); this.loadProxy(storeProviderInitProperties); storeProviderInitProperties.put(PROPERTY_TRUST_ALL_CERTS, SKIP_SSL_VERIFICATION); ContextBuilder contextBuilder = ContextBuilder.newBuilder("s3"); contextBuilder .overrides(storeProviderInitProperties) .endpoint(serviceInfo.getS3Host()) .credentials(serviceInfo.getAccessKeyId(), serviceInfo.getSecretAccessKey()); return new SpringCloudBlobStoreContext(contextBuilder.buildView(BlobStoreContext.class), serviceInfo.getBucket()); }  SpringCloudBlobStoreContext create(S3ServiceInfo serviceInfo, ServiceConnectorConfig serviceConnectorConfig); void loadProxy(Properties storeProviderInitProperties); }
S3FactoryCreator extends AbstractServiceConnectorCreator<SpringCloudBlobStoreContext, S3ServiceInfo> { public SpringCloudBlobStoreContext create(S3ServiceInfo serviceInfo, ServiceConnectorConfig serviceConnectorConfig) { Properties storeProviderInitProperties = new Properties(); storeProviderInitProperties.put(PROPERTY_S3_VIRTUAL_HOST_BUCKETS, serviceInfo.isVirtualHostBuckets()); this.loadProxy(storeProviderInitProperties); storeProviderInitProperties.put(PROPERTY_TRUST_ALL_CERTS, SKIP_SSL_VERIFICATION); ContextBuilder contextBuilder = ContextBuilder.newBuilder("s3"); contextBuilder .overrides(storeProviderInitProperties) .endpoint(serviceInfo.getS3Host()) .credentials(serviceInfo.getAccessKeyId(), serviceInfo.getSecretAccessKey()); return new SpringCloudBlobStoreContext(contextBuilder.buildView(BlobStoreContext.class), serviceInfo.getBucket()); }  SpringCloudBlobStoreContext create(S3ServiceInfo serviceInfo, ServiceConnectorConfig serviceConnectorConfig); void loadProxy(Properties storeProviderInitProperties);  }