/** * Updates an {@link S3FileTransferRequestParamsDto} instance with proxy host and port retrieved from the configuration. * * @param params the S3FileTransferRequestParamsDto */ private void setProxyHostAndPort(S3FileTransferRequestParamsDto params) { // Get HTTP proxy configuration settings from the configuration. String httpProxyHost = configurationHelper.getProperty(ConfigurationValue.HTTP_PROXY_HOST); Integer httpProxyPort = configurationHelper.getProperty(ConfigurationValue.HTTP_PROXY_PORT, Integer.class); // Update the DTO with the HTTP proxy configuration settings. params.setHttpProxyHost(httpProxyHost); params.setHttpProxyPort(httpProxyPort); } }
/** * Updates an {@link S3FileTransferRequestParamsDto} instance with proxy host and port retrieved from the configuration. * * @param params the S3FileTransferRequestParamsDto */ private void setProxyHostAndPort(S3FileTransferRequestParamsDto params) { // Get HTTP proxy configuration settings from the configuration. String httpProxyHost = configurationHelper.getProperty(ConfigurationValue.HTTP_PROXY_HOST); Integer httpProxyPort = configurationHelper.getProperty(ConfigurationValue.HTTP_PROXY_PORT, Integer.class); // Update the DTO with the HTTP proxy configuration settings. params.setHttpProxyHost(httpProxyHost); params.setHttpProxyPort(httpProxyPort); } }
@Override public void assertS3ObjectKeyDoesNotExist(String bucketName, String key) { S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto = new S3FileTransferRequestParamsDto(); s3FileTransferRequestParamsDto.setS3BucketName(bucketName); s3FileTransferRequestParamsDto.setS3KeyPrefix(key); AwsParamsDto awsParamsDto = awsHelper.getAwsParamsDto(); String httpProxyHost = awsParamsDto.getHttpProxyHost(); s3FileTransferRequestParamsDto.setHttpProxyHost(httpProxyHost); Integer httpProxyPort = awsParamsDto.getHttpProxyPort(); s3FileTransferRequestParamsDto.setHttpProxyPort(httpProxyPort); Assert.isTrue(!s3Dao.s3FileExists(s3FileTransferRequestParamsDto), String.format("A S3 object already exists in bucket \"%s\" and key \"%s\".", bucketName, key)); }
@Override public void assertS3ObjectKeyDoesNotExist(String bucketName, String key) { S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto = new S3FileTransferRequestParamsDto(); s3FileTransferRequestParamsDto.setS3BucketName(bucketName); s3FileTransferRequestParamsDto.setS3KeyPrefix(key); AwsParamsDto awsParamsDto = awsHelper.getAwsParamsDto(); String httpProxyHost = awsParamsDto.getHttpProxyHost(); s3FileTransferRequestParamsDto.setHttpProxyHost(httpProxyHost); Integer httpProxyPort = awsParamsDto.getHttpProxyPort(); s3FileTransferRequestParamsDto.setHttpProxyPort(httpProxyPort); Assert.isTrue(!s3Dao.s3FileExists(s3FileTransferRequestParamsDto), String.format("A S3 object already exists in bucket \"%s\" and key \"%s\".", bucketName, key)); }
s3FileTransferRequestParamsDto.setS3BucketName(s3BucketName); s3FileTransferRequestParamsDto.setS3KeyPrefix(s3KeyPrefix); s3FileTransferRequestParamsDto.setHttpProxyHost(httpProxyHost); s3FileTransferRequestParamsDto.setHttpProxyPort(httpProxyPort);
s3FileTransferRequestParamsDto.setS3BucketName(s3BucketName); s3FileTransferRequestParamsDto.setS3KeyPrefix(s3KeyPrefix); s3FileTransferRequestParamsDto.setHttpProxyHost(httpProxyHost); s3FileTransferRequestParamsDto.setHttpProxyPort(httpProxyPort);
s3FileTransferRequestParamsDto.setS3BucketName(s3BucketName); s3FileTransferRequestParamsDto.setS3KeyPrefix(s3KeyPrefix); s3FileTransferRequestParamsDto.setHttpProxyHost(httpProxyHost); s3FileTransferRequestParamsDto.setHttpProxyPort(httpProxyPort);