Skip to content

Commit

Permalink
Version 1.6.12 of the AWS Java SDK
Browse files Browse the repository at this point in the history
This release adds support for Range Inventory Retrieval with Amazon Glacier and introduces a new AmazonS3URI class for working with Amazon S3 URIs.
  • Loading branch information
fulghum committed Jan 8, 2014
1 parent 5ae40bb commit f12db8d
Show file tree
Hide file tree
Showing 94 changed files with 4,628 additions and 3,759 deletions.
2 changes: 1 addition & 1 deletion META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: AWS SDK for Java
Bundle-SymbolicName: com.amazonaws.sdk;singleton:=true
Bundle-Version: 1.6.11
Bundle-Version: 1.6.12
Bundle-Vendor: Amazon Technologies, Inc
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.apache.commons.codec;bundle-version="1.3.0",
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<artifactId>aws-java-sdk</artifactId>
<packaging>jar</packaging>
<name>AWS SDK for Java</name>
<version>1.6.11</version>
<version>1.6.12</version>
<description>The Amazon Web Services SDK for Java provides Java APIs for building software on AWS’ cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).</description>
<url>https://aws.amazon.com/sdkforjava</url>

Expand Down
13 changes: 12 additions & 1 deletion src/main/java/com/amazonaws/AmazonWebServiceClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,20 @@ public void setRegion(Region region) throws IllegalArgumentException {
setEndpoint(serviceEndpoint, serviceName, region.getName());
}

/**
* @deprecated by client configuration via the constructor.
* This method will be removed later on.
*/
@Deprecated
public void setConfiguration(ClientConfiguration clientConfiguration) {
AmazonHttpClient existingClient = this.client;
RequestMetricCollector requestMetricCollector = null;
if (existingClient != null) {
requestMetricCollector = existingClient.getRequestMetricCollector();
existingClient.shutdown();
}
this.clientConfiguration = clientConfiguration;
client = new AmazonHttpClient(clientConfiguration);
this.client = new AmazonHttpClient(clientConfiguration, requestMetricCollector);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public AWSCloudTrailClient(AWSCredentials awsCredentials) {
* (ex: proxy settings, retry counts, etc.).
*/
public AWSCloudTrailClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) {
super(clientConfiguration);
super(adjustClientConfiguration(clientConfiguration));

this.awsCredentialsProvider = new StaticCredentialsProvider(awsCredentials);

Expand Down Expand Up @@ -208,7 +208,7 @@ public AWSCloudTrailClient(AWSCredentialsProvider awsCredentialsProvider, Client
public AWSCloudTrailClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
RequestMetricCollector requestMetricCollector) {
super(clientConfiguration, requestMetricCollector);
super(adjustClientConfiguration(clientConfiguration), requestMetricCollector);

this.awsCredentialsProvider = awsCredentialsProvider;

Expand Down Expand Up @@ -239,6 +239,12 @@ private void init() {
"/com/amazonaws/services/cloudtrail/request.handler2s"));
}

private static ClientConfiguration adjustClientConfiguration(ClientConfiguration orig) {
ClientConfiguration config = orig;

return config;
}

/**
* <p>
* Returns a JSON-formatted list of information about the specified
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public AmazonDynamoDBClient(AWSCredentials awsCredentials, ClientConfiguration c
public AmazonDynamoDBClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration,
RequestMetricCollector requestMetricCollector) {
super(clientConfiguration, requestMetricCollector);
super(adjustClientConfiguration(clientConfiguration), requestMetricCollector);
this.awsCredentialsProvider = new StaticCredentialsProvider(
awsCredentials);
init();
Expand Down Expand Up @@ -309,7 +309,7 @@ public AmazonDynamoDBClient(AWSCredentialsProvider awsCredentialsProvider, Clien
public AmazonDynamoDBClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
RequestMetricCollector requestMetricCollector) {
super(clientConfiguration, requestMetricCollector);
super(adjustClientConfiguration(clientConfiguration), requestMetricCollector);
this.awsCredentialsProvider = awsCredentialsProvider;
init();
}
Expand All @@ -330,17 +330,19 @@ private void init() {

signer.setServiceName("dynamodb");


HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain(
"/com/amazonaws/services/dynamodb/request.handlers"));
}


clientConfiguration = new ClientConfiguration(clientConfiguration);
if (clientConfiguration.getRetryPolicy() == com.amazonaws.retry.PredefinedRetryPolicies.DEFAULT) {
clientConfiguration.setRetryPolicy(com.amazonaws.retry.PredefinedRetryPolicies.DYNAMODB_DEFAULT);
private static ClientConfiguration adjustClientConfiguration(ClientConfiguration orig) {
ClientConfiguration config = orig;
if (config.getRetryPolicy() == com.amazonaws.retry.PredefinedRetryPolicies.DEFAULT) {
config = new ClientConfiguration(orig);
config.setRetryPolicy(
com.amazonaws.retry.PredefinedRetryPolicies.DYNAMODB_DEFAULT);
}
setConfiguration(clientConfiguration);
return config;
}

/**
Expand Down Expand Up @@ -943,6 +945,7 @@ public void setEndpoint(String endpoint, String serviceName, String regionId) th
signer.setRegionName(regionId);
}

@Override
protected String getServiceAbbreviation() {
return "dynamodb";
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
/*
* Copyright 2013-2014 Amazon Technologies, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://aws.amazon.com/apache2.0
*
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
* OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and
* limitations under the License.
*/
package com.amazonaws.services.dynamodbv2.datamodeling;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;

import com.amazonaws.services.dynamodbv2.model.AttributeValue;

/**
* A virtual {@code AttributeTransformer} that transforms and untransforms
* attributes by running them through a cascading series of child
* {@code AttributeTransformer} instances.
*/
public class AttributeTransformerChain implements AttributeTransformer {

private final List<AttributeTransformer> transformers;

/**
* Creates a new transformer chain from the given array of transformers.
* When transforming attributes, these transformers are invoked from first
* to last; when untransforming they are invoked in the opposite order.
*
* @param transformers the chain of transformers.
*/
public AttributeTransformerChain(
final AttributeTransformer... transformers) {

this(Arrays.asList(transformers));
}

/**
* Creates a new transformer chain from the given list of transformers.
* When transforming attributes, these transformers are invoked from first
* to last; when untransforming they are invoked in the opposite order.
*
* @param transformers the chain of transformers.
*/
public AttributeTransformerChain(
final List<AttributeTransformer> transformers) {

this.transformers = Collections.unmodifiableList(
new ArrayList<AttributeTransformer>(transformers));
}

/**
* @return the transformers in this chain
*/
public List<AttributeTransformer> getTransformers() {
return transformers;
}

@Override
public Map<String, AttributeValue> transform(
final Parameters<?> parameters) {

ProxyParameters<?> proxy = new ProxyParameters(parameters);

for (int i = 0; i < transformers.size(); ++i) {
proxy.setAttributeValues(transformers.get(i).transform(proxy));
}

return proxy.getAttributeValues();
}

@Override
public Map<String, AttributeValue> untransform(
final Parameters<?> parameters) {

ProxyParameters<?> proxy = new ProxyParameters(parameters);

for (int i = transformers.size() - 1; i >= 0; --i) {
proxy.setAttributeValues(transformers.get(i).untransform(proxy));
}

return proxy.getAttributeValues();
}

@Override
public String toString() {
return transformers.toString();
}

/**
* A {@code Parameters} proxy that intercepts calls to
* {@code getAttributeValues} and overrides the return value.
*/
private static class ProxyParameters<T> implements Parameters<T> {

private final Parameters<T> delegate;
private Map<String, AttributeValue> values;

/**
* Create a new proxy wrapping the given {@code Parameters} object.
*
* @param delegate the parameters object to wrap
*/
public ProxyParameters(final Parameters<T> delegate) {
this.delegate = delegate;
this.values = delegate.getAttributeValues();
}

@Override
public Map<String, AttributeValue> getAttributeValues() {
return values;
}

/**
* Changes the attribute values for this instance.
*
* @param values the new values
*/
public void setAttributeValues(
final Map<String, AttributeValue> values) {
this.values = Collections.unmodifiableMap(values);
}

@Override
public boolean isPartialUpdate() {
return delegate.isPartialUpdate();
}

@Override
public Class<T> getModelClass() {
return delegate.getModelClass();
}

@Override
public DynamoDBMapperConfig getMapperConfig() {
return delegate.getMapperConfig();
}

@Override
public String getTableName() {
return delegate.getTableName();
}

@Override
public String getHashKeyName() {
return delegate.getHashKeyName();
}

@Override
public String getRangeKeyName() {
return delegate.getRangeKeyName();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public AmazonElasticTranscoderClient(AWSCredentials awsCredentials) {
* (ex: proxy settings, retry counts, etc.).
*/
public AmazonElasticTranscoderClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) {
super(clientConfiguration);
super(adjustClientConfiguration(clientConfiguration));

this.awsCredentialsProvider = new StaticCredentialsProvider(awsCredentials);

Expand Down Expand Up @@ -194,7 +194,7 @@ public AmazonElasticTranscoderClient(AWSCredentialsProvider awsCredentialsProvid
public AmazonElasticTranscoderClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
RequestMetricCollector requestMetricCollector) {
super(clientConfiguration, requestMetricCollector);
super(adjustClientConfiguration(clientConfiguration), requestMetricCollector);

this.awsCredentialsProvider = awsCredentialsProvider;

Expand All @@ -221,6 +221,12 @@ private void init() {
"/com/amazonaws/services/elastictranscoder/request.handler2s"));
}

private static ClientConfiguration adjustClientConfiguration(ClientConfiguration orig) {
ClientConfiguration config = orig;

return config;
}

/**
* <p>
* The UpdatePipelineStatus operation pauses or reactivates a pipeline,
Expand Down
Loading

0 comments on commit f12db8d

Please sign in to comment.