moved simpledb code from aws to its own api module

This commit is contained in:
Adrian Cole 2011-01-02 14:21:40 +01:00
parent ae77435da5
commit 0eccc39789
32 changed files with 242 additions and 115 deletions

View File

@ -17,10 +17,10 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb;
package org.jclouds.simpledb;
import static org.jclouds.aws.simpledb.reference.SimpleDBParameters.ACTION;
import static org.jclouds.aws.simpledb.reference.SimpleDBParameters.VERSION;
import static org.jclouds.simpledb.reference.SimpleDBParameters.ACTION;
import static org.jclouds.simpledb.reference.SimpleDBParameters.VERSION;
import java.util.Map;
@ -30,13 +30,6 @@ import javax.ws.rs.POST;
import javax.ws.rs.Path;
import org.jclouds.aws.filters.FormSigner;
import org.jclouds.aws.simpledb.binders.BindAttributesToIndexedFormParams;
import org.jclouds.aws.simpledb.domain.Item;
import org.jclouds.aws.simpledb.domain.AttributePair;
import org.jclouds.aws.simpledb.domain.ListDomainsResponse;
import org.jclouds.aws.simpledb.options.ListDomainsOptions;
import org.jclouds.aws.simpledb.xml.ItemsHandler;
import org.jclouds.aws.simpledb.xml.ListDomainsResponseHandler;
import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.EndpointParam;
@ -44,6 +37,12 @@ import org.jclouds.rest.annotations.FormParams;
import org.jclouds.rest.annotations.RequestFilters;
import org.jclouds.rest.annotations.VirtualHost;
import org.jclouds.rest.annotations.XMLResponseParser;
import org.jclouds.simpledb.binders.BindAttributesToIndexedFormParams;
import org.jclouds.simpledb.domain.Item;
import org.jclouds.simpledb.domain.ListDomainsResponse;
import org.jclouds.simpledb.options.ListDomainsOptions;
import org.jclouds.simpledb.xml.ItemsHandler;
import org.jclouds.simpledb.xml.ListDomainsResponseHandler;
import com.google.common.util.concurrent.ListenableFuture;

View File

@ -17,23 +17,17 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb;
package org.jclouds.simpledb;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable;
import javax.ws.rs.FormParam;
import org.jclouds.aws.simpledb.domain.Item;
import org.jclouds.aws.simpledb.domain.AttributePair;
import org.jclouds.aws.simpledb.domain.ListDomainsResponse;
import org.jclouds.aws.simpledb.options.ListDomainsOptions;
import org.jclouds.concurrent.Timeout;
import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.EndpointParam;
import com.google.common.util.concurrent.ListenableFuture;
import org.jclouds.simpledb.domain.Item;
import org.jclouds.simpledb.domain.ListDomainsResponse;
import org.jclouds.simpledb.options.ListDomainsOptions;
/**
* Provides access to SimpleDB via their REST API.
@ -78,7 +72,7 @@ public interface SimpleDBClient {
* You can create up to 100 domains per account.
* <p/>
* If you require additional domains, go to
* http://aws.amazon.com/contact-us/simpledb-limit-request/.
* http://amazon.com/contact-us/simpledb-limit-request/.
*
* @param region
* Domains are Region-specific.

View File

@ -17,15 +17,15 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb;
package org.jclouds.simpledb;
import java.util.List;
import java.util.Properties;
import org.jclouds.aws.simpledb.config.SimpleDBRestClientModule;
import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule;
import org.jclouds.logging.jdk.config.JDKLoggingModule;
import org.jclouds.rest.RestContextBuilder;
import org.jclouds.simpledb.config.SimpleDBRestClientModule;
import com.google.inject.Injector;
import com.google.inject.Module;

View File

@ -17,20 +17,25 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb;
package org.jclouds.simpledb;
import static org.jclouds.Constants.PROPERTY_API_VERSION;
import static org.jclouds.Constants.PROPERTY_ENDPOINT;
import static org.jclouds.aws.domain.Region.AP_SOUTHEAST_1;
import static org.jclouds.aws.domain.Region.EU_WEST_1;
import static org.jclouds.aws.domain.Region.US_EAST_1;
import static org.jclouds.aws.domain.Region.US_WEST_1;
import static org.jclouds.aws.reference.AWSConstants.PROPERTY_AUTH_TAG;
import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG;
import static org.jclouds.aws.reference.AWSConstants.PROPERTY_REGIONS;
import java.util.Properties;
import java.util.Set;
import org.jclouds.PropertiesBuilder;
import org.jclouds.aws.domain.Region;
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableSet;
/**
* Builds properties used in SimpleDB Clients
@ -38,23 +43,20 @@ import com.google.common.base.Joiner;
* @author Adrian Cole
*/
public class SimpleDBPropertiesBuilder extends PropertiesBuilder {
public static Set<String> DEFAULT_REGIONS = ImmutableSet.of(EU_WEST_1, US_EAST_1, US_WEST_1, AP_SOUTHEAST_1);
@Override
protected Properties defaultProperties() {
Properties properties = super.defaultProperties();
properties.setProperty(PROPERTY_AUTH_TAG, "AWS");
properties.setProperty(PROPERTY_HEADER_TAG, "amz");
properties.setProperty(PROPERTY_API_VERSION, SimpleDBAsyncClient.VERSION);
properties.setProperty(PROPERTY_REGIONS, Joiner.on(',').join(Region.US_EAST_1,
Region.US_WEST_1, Region.EU_WEST_1, Region.AP_SOUTHEAST_1));
properties.setProperty(PROPERTY_REGIONS, Joiner.on(',').join(DEFAULT_REGIONS));
properties.setProperty(PROPERTY_ENDPOINT, "https://sdb.amazonaws.com");
properties.setProperty(PROPERTY_ENDPOINT + "." + Region.US_EAST_1,
"https://sdb.amazonaws.com");
properties.setProperty(PROPERTY_ENDPOINT + "." + Region.US_WEST_1,
"https://sdb.us-west-1.amazonaws.com");
properties.setProperty(PROPERTY_ENDPOINT + "." + Region.EU_WEST_1,
"https://sdb.eu-west-1.amazonaws.com");
properties.setProperty(PROPERTY_ENDPOINT + "." + Region.AP_SOUTHEAST_1,
"https://sdb.ap-southeast-1.amazonaws.com");
properties.setProperty(PROPERTY_ENDPOINT + "." + US_EAST_1, "https://sdb.amazonaws.com");
properties.setProperty(PROPERTY_ENDPOINT + "." + US_WEST_1, "https://sdb.us-west-1.amazonaws.com");
properties.setProperty(PROPERTY_ENDPOINT + "." + EU_WEST_1, "https://sdb.eu-west-1.amazonaws.com");
properties.setProperty(PROPERTY_ENDPOINT + "." + AP_SOUTHEAST_1, "https://sdb.ap-southeast-1.amazonaws.com");
return properties;
}

View File

@ -1,4 +1,4 @@
package org.jclouds.aws.simpledb.binders;
package org.jclouds.simpledb.binders;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
@ -7,8 +7,8 @@ import static java.lang.String.format;
import java.util.Collection;
import java.util.Iterator;
import org.jclouds.aws.simpledb.domain.AttributePair;
import org.jclouds.aws.simpledb.domain.Item;
import org.jclouds.simpledb.domain.AttributePair;
import org.jclouds.simpledb.domain.Item;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.utils.ModifyRequest;
import org.jclouds.rest.Binder;

View File

@ -17,13 +17,13 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb.config;
package org.jclouds.simpledb.config;
import org.jclouds.aws.config.AWSFormSigningRestClientModule;
import org.jclouds.aws.simpledb.SimpleDBAsyncClient;
import org.jclouds.aws.simpledb.SimpleDBClient;
import org.jclouds.http.RequiresHttp;
import org.jclouds.rest.ConfiguresRestClient;
import org.jclouds.simpledb.SimpleDBAsyncClient;
import org.jclouds.simpledb.SimpleDBClient;
/**
* Configures the SimpleDB connection.

View File

@ -1,7 +1,5 @@
package org.jclouds.aws.simpledb.domain;
package org.jclouds.simpledb.domain;
import java.util.ArrayList;
import java.util.List;
/**

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb.domain;
package org.jclouds.simpledb.domain;
import java.util.Date;

View File

@ -1,4 +1,4 @@
package org.jclouds.aws.simpledb.domain;
package org.jclouds.simpledb.domain;
import javax.annotation.Nullable;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb.domain;
package org.jclouds.simpledb.domain;
import java.util.Set;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb.options;
package org.jclouds.simpledb.options;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
@ -31,7 +31,7 @@ import org.jclouds.http.options.BaseHttpRequestOptions;
* (if needed):
* <p/>
* <code>
* import static org.jclouds.aws.simpledb.options.ListDomainsOptions.Builder.*
* import static org.jclouds.simpledb.options.ListDomainsOptions.Builder.*
* <p/>
* SimpleDBClient connection = // get connection
* Set<String> domains = connection.listDomainsInRegion(maxNumberOfDomains(1));

View File

@ -23,4 +23,4 @@
* @author Adrian Cole
* @author Luís A. Bastião Silva <bastiao@ua.pt>
*/
package org.jclouds.aws.simpledb;
package org.jclouds.simpledb;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb.reference;
package org.jclouds.simpledb.reference;
/**
* Configuration properties and constants used in SimpleDB connections.

View File

@ -21,4 +21,4 @@
* This package contains properties and reference data used in SimpleDB.
* @author Adrian Cole
*/
package org.jclouds.aws.simpledb.reference;
package org.jclouds.simpledb.reference;

View File

@ -17,22 +17,20 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb.xml;
package org.jclouds.simpledb.xml;
import com.google.common.collect.LinkedHashMultimap;
import java.util.Map;
import org.jclouds.aws.simpledb.domain.AttributePair;
import org.jclouds.date.DateService;
import org.jclouds.http.functions.ParseSax;
import org.jclouds.simpledb.domain.AttributePair;
import org.jclouds.simpledb.domain.Item;
import org.xml.sax.Attributes;
import com.google.common.collect.LinkedHashMultimap;
import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
import com.google.inject.Inject;
import java.util.ArrayList;
import java.util.List;
import org.jclouds.aws.simpledb.domain.Item;
import org.xml.sax.Attributes;
/**
*

View File

@ -17,12 +17,12 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb.xml;
package org.jclouds.simpledb.xml;
import java.util.LinkedHashSet;
import java.util.Set;
import org.jclouds.aws.simpledb.domain.ListDomainsResponse;
import org.jclouds.simpledb.domain.ListDomainsResponse;
import org.jclouds.http.functions.ParseSax;
import com.google.common.collect.Iterables;

View File

@ -0,0 +1,41 @@
/**
*
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
*
* ====================================================================
* 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://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
package org.jclouds.simpledb;
import org.jclouds.rest.Providers;
import org.testng.annotations.Test;
import com.google.common.collect.Iterables;
/**
*
* @author Adrian Cole
*
*/
@Test(groups = "unit")
public class ProvidersInPropertiesTest {
@Test
public void testSupportedProviders() {
Iterable<String> providers = Providers.getSupportedProviders();
assert Iterables.contains(providers, "simpledb") : providers;
}
}

View File

@ -17,8 +17,9 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb;
package org.jclouds.simpledb;
import static org.jclouds.simpledb.SimpleDBPropertiesBuilder.DEFAULT_REGIONS;
import static org.testng.Assert.assertEquals;
import java.io.IOException;
@ -26,11 +27,7 @@ import java.lang.reflect.Method;
import java.util.Map;
import java.util.Properties;
import org.jclouds.aws.domain.Region;
import org.jclouds.aws.filters.FormSigner;
import org.jclouds.aws.simpledb.config.SimpleDBRestClientModule;
import org.jclouds.aws.simpledb.options.ListDomainsOptions;
import org.jclouds.aws.simpledb.xml.ListDomainsResponseHandler;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.RequiresHttp;
import org.jclouds.http.functions.ParseSax;
@ -40,6 +37,9 @@ import org.jclouds.rest.RestClientTest;
import org.jclouds.rest.RestContextFactory;
import org.jclouds.rest.RestContextSpec;
import org.jclouds.rest.internal.RestAnnotationProcessor;
import org.jclouds.simpledb.config.SimpleDBRestClientModule;
import org.jclouds.simpledb.options.ListDomainsOptions;
import org.jclouds.simpledb.xml.ListDomainsResponseHandler;
import org.testng.annotations.Test;
import com.google.inject.Module;
@ -100,7 +100,7 @@ public class SimpleDBAsyncClientTest extends RestClientTest<SimpleDBAsyncClient>
@Test(enabled = false)
public void testAllRegions() throws SecurityException, NoSuchMethodException, IOException {
Method method = SimpleDBAsyncClient.class.getMethod("putAttributes", String.class, String.class);
for (String region : Region.ALL_SIMPLEDB) {
for (String region : DEFAULT_REGIONS) {
processor.createRequest(method, region, "domainName");
}
}

View File

@ -17,9 +17,10 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb;
package org.jclouds.simpledb;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.simpledb.SimpleDBPropertiesBuilder.DEFAULT_REGIONS;
import static org.testng.Assert.assertNotNull;
import java.util.Properties;
@ -28,10 +29,10 @@ import java.util.SortedSet;
import org.jclouds.Constants;
import org.jclouds.aws.domain.Region;
import org.jclouds.aws.simpledb.domain.ListDomainsResponse;
import org.jclouds.logging.log4j.config.Log4JLoggingModule;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.RestContextFactory;
import org.jclouds.simpledb.domain.ListDomainsResponse;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeGroups;
import org.testng.annotations.Test;
@ -110,8 +111,7 @@ public class SimpleDBClientLiveTest {
void testCreateDomain() throws InterruptedException {
String domainName = PREFIX + "1";
for (final String region : Lists.newArrayList(null, Region.EU_WEST_1, Region.US_EAST_1, Region.US_WEST_1,
Region.AP_SOUTHEAST_1)) {
for (String region : DEFAULT_REGIONS) {
try {
SortedSet<String> result = Sets.newTreeSet(client.listDomainsInRegion(region));
if (result.size() >= 1) {

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb.config;
package org.jclouds.simpledb.config;
import static org.testng.Assert.assertEquals;
@ -31,8 +31,8 @@ import org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent;
import org.jclouds.http.handlers.DelegatingErrorHandler;
import org.jclouds.http.handlers.DelegatingRetryHandler;
import org.jclouds.logging.config.NullLoggingModule;
import org.jclouds.rest.RestContextFactory;
import org.jclouds.rest.BaseRestClientTest.MockModule;
import org.jclouds.rest.RestContextFactory;
import org.testng.annotations.Test;
import com.google.common.collect.ImmutableMap;

View File

@ -17,10 +17,10 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb.options;
package org.jclouds.simpledb.options;
import static org.jclouds.aws.simpledb.options.ListDomainsOptions.Builder.maxNumberOfDomains;
import static org.jclouds.aws.simpledb.options.ListDomainsOptions.Builder.nextToken;
import static org.jclouds.simpledb.options.ListDomainsOptions.Builder.maxNumberOfDomains;
import static org.jclouds.simpledb.options.ListDomainsOptions.Builder.nextToken;
import static org.testng.Assert.assertEquals;
import java.util.Collections;

View File

@ -17,14 +17,14 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb.xml;
package org.jclouds.simpledb.xml;
import static org.testng.Assert.assertEquals;
import java.io.InputStream;
import org.jclouds.aws.simpledb.domain.ListDomainsResponse;
import org.jclouds.http.functions.BaseHandlerTest;
import org.jclouds.simpledb.domain.ListDomainsResponse;
import org.testng.annotations.Test;
import com.google.common.collect.ImmutableSet;
@ -39,7 +39,7 @@ import com.google.common.collect.ImmutableSet;
public class ListDomainsResponseHandlerTest extends BaseHandlerTest {
public void test() {
InputStream is = getClass().getResourceAsStream("/simpledb/list_domains.xml");
InputStream is = getClass().getResourceAsStream("/list_domains.xml");
ListDomainsResponse result = factory.create(injector.getInstance(ListDomainsResponseHandler.class)).parse(is);

View File

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2010 Cloud Conscious, LLC.
<info@cloudconscious.com>
====================================================================
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://www.apache.org/licenses/LICENSE-2.0 Unless required by
applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions
and limitations under the License.
====================================================================
-->
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<!--
For more configuration infromation and examples see the Apache
Log4j website: http://logging.apache.org/log4j/
-->
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">
<!-- A time/date based rolling appender -->
<appender name="WIREFILE" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="target/test-data/jclouds-wire.log" />
<param name="Append" value="true" />
<!-- Rollover at midnight each day -->
<param name="DatePattern" value="'.'yyyy-MM-dd" />
<param name="Threshold" value="TRACE" />
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" />
<!--
The full pattern: Date MS Priority [Category]
(Thread:NDC) Message\n <param name="ConversionPattern"
value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
-->
</layout>
</appender>
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="target/test-data/jclouds.log" />
<param name="Append" value="true" />
<!-- Rollover at midnight each day -->
<param name="DatePattern" value="'.'yyyy-MM-dd" />
<param name="Threshold" value="TRACE" />
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" />
<!--
The full pattern: Date MS Priority [Category]
(Thread:NDC) Message\n <param name="ConversionPattern"
value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
-->
</layout>
</appender>
<appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
<appender-ref ref="FILE" />
</appender>
<appender name="ASYNCWIRE" class="org.apache.log4j.AsyncAppender">
<appender-ref ref="WIREFILE" />
</appender>
<!-- ================ -->
<!-- Limit categories -->
<!-- ================ -->
<category name="org.jclouds">
<priority value="DEBUG" />
<appender-ref ref="ASYNC" />
</category>
<category name="jclouds.headers">
<priority value="DEBUG" />
<appender-ref ref="ASYNCWIRE" />
</category>
<category name="jclouds.wire">
<priority value="DEBUG" />
<appender-ref ref="ASYNCWIRE" />
</category>
<!-- ======================= -->
<!-- Setup the Root category -->
<!-- ======================= -->
<root>
<priority value="WARN" />
</root>
</log4j:configuration>

View File

@ -84,7 +84,6 @@ public class Region {
*/
public static final String AP_SOUTHEAST_1 = "ap-southeast-1";
public static Set<String> ALL_SIMPLEDB = ImmutableSet.of(EU_WEST_1, US_EAST_1, US_WEST_1, AP_SOUTHEAST_1);
public static Set<String> ALL_S3 = ImmutableSet.of(EU, US_STANDARD, US_WEST_1, AP_SOUTHEAST_1);
public static Set<String> ALL_SQS = ImmutableSet.of(EU_WEST_1, US_STANDARD, US_EAST_1, US_WEST_1, AP_SOUTHEAST_1);
}

View File

@ -37,7 +37,6 @@
<module>createlamp</module>
<module>speedtest-sqs</module>
<module>createandlistbuckets</module>
<module>simpledb</module>
</modules>
<dependencies>

View File

@ -42,10 +42,6 @@
<test.aws.credential>FIXME</test.aws.credential>
<!-- when instances are hung, open a ticket and add here -->
<jclouds.compute.blacklist.nodes>trmkrun-ccc,test.trmk-924</jclouds.compute.blacklist.nodes>
<test.simpledb.endpoint>https://sdb.amazonaws.com</test.simpledb.endpoint>
<test.simpledb.apiversion>2009-04-15</test.simpledb.apiversion>
<test.simpledb.identity>${test.aws.identity}</test.simpledb.identity>
<test.simpledb.credential>${test.aws.credential}</test.simpledb.credential>
<test.s3.endpoint>https://s3.amazonaws.com</test.s3.endpoint>
<test.s3.apiversion>2006-03-01</test.s3.apiversion>
<test.s3.identity>${test.aws.identity}</test.s3.identity>
@ -203,22 +199,6 @@
<name>jclouds.compute.blacklist.nodes</name>
<value>${jclouds.compute.blacklist.nodes}</value>
</property>
<property>
<name>test.simpledb.endpoint</name>
<value>${test.simpledb.endpoint}</value>
</property>
<property>
<name>test.simpledb.apiversion</name>
<value>${test.simpledb.apiversion}</value>
</property>
<property>
<name>test.simpledb.identity</name>
<value>${test.simpledb.identity}</value>
</property>
<property>
<name>test.simpledb.credential</name>
<value>${test.simpledb.credential}</value>
</property>
<property>
<name>test.sqs.endpoint</name>
<value>${test.sqs.endpoint}</value>

View File

@ -35,8 +35,8 @@ sdn.propertiesbuilder=org.jclouds.nirvanix.sdn.SDNPropertiesBuilder
sqs.contextbuilder=org.jclouds.aws.sqs.SQSContextBuilder
sqs.propertiesbuilder=org.jclouds.aws.sqs.SQSPropertiesBuilder
simpledb.contextbuilder=org.jclouds.aws.simpledb.SimpleDBContextBuilder
simpledb.propertiesbuilder=org.jclouds.aws.simpledb.SimpleDBPropertiesBuilder
simpledb.contextbuilder=org.jclouds.simpledb.SimpleDBContextBuilder
simpledb.propertiesbuilder=org.jclouds.simpledb.SimpleDBPropertiesBuilder
elb.contextbuilder=org.jclouds.aws.elb.ELBContextBuilder
elb.propertiesbuilder=org.jclouds.aws.elb.ELBPropertiesBuilder

View File

@ -32,6 +32,7 @@
<packaging>pom</packaging>
<name>jclouds demos project</name>
<modules>
<module>simpledb</module>
<module>speedtest-azurequeue</module>
<module>gae-tweetstore</module>
<module>gae-tweetstore-spring</module>

View File

@ -24,12 +24,20 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-aws-demos-project</artifactId>
<artifactId>jclouds-demos-project</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>jclouds-aws-demo-simpledb</artifactId>
<artifactId>demo-simpledb</artifactId>
<name>jclouds simpledb sample that putAttributes and select it</name>
<description>jclouds simpledb sample that putAttributes and select it</description>
<dependencies>
<dependency>
<groupId>org.jclouds.api</groupId>
<artifactId>simpledb</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
@ -40,7 +48,7 @@
<configuration>
<archive>
<manifest>
<mainClass>org.jclouds.aws.s3.samples.MainApp</mainClass>
<mainClass>org.jclouds.simpledb.samples.MainApp</mainClass>
</manifest>
</archive>
</configuration>
@ -54,7 +62,7 @@
</descriptorRefs>
<archive>
<manifest>
<mainClass>org.jclouds.aws.simpledb.samples.MainApp</mainClass>
<mainClass>org.jclouds.simpledb.samples.MainApp</mainClass>
</manifest>
</archive>
</configuration>

View File

@ -17,20 +17,20 @@
* ====================================================================
*/
package org.jclouds.aws.simpledb.samples;
package org.jclouds.simpledb.samples;
import java.io.IOException;
import java.util.Map;
import java.util.Properties;
import org.jclouds.aws.domain.Region;
import org.jclouds.aws.simpledb.SimpleDBAsyncClient;
import org.jclouds.aws.simpledb.SimpleDBClient;
import org.jclouds.aws.simpledb.domain.AttributePair;
import org.jclouds.aws.simpledb.domain.Item;
import org.jclouds.aws.simpledb.options.ListDomainsOptions;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.RestContextFactory;
import org.jclouds.simpledb.SimpleDBAsyncClient;
import org.jclouds.simpledb.SimpleDBClient;
import org.jclouds.simpledb.domain.AttributePair;
import org.jclouds.simpledb.domain.Item;
import org.jclouds.simpledb.options.ListDomainsOptions;
import com.google.common.collect.LinkedHashMultimap;
import com.google.common.collect.Multimap;