From 3f60d4f707fe953563249e2006355527b82b5e1f Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Thu, 2 Jun 2011 02:13:57 +0200 Subject: [PATCH] Extracted a PROPERTY_TWEETSTORE_BLOBSTORES constant --- .../tweetstore/reference/TweetStoreConstants.java | 13 +++++++------ .../tweetstore/integration/TweetStoreLiveTest.java | 3 ++- .../tweetstore/reference/TweetStoreConstants.java | 5 +++-- .../tweetstore/integration/TweetStoreLiveTest.java | 3 ++- .../tweetstore/reference/TweetStoreConstants.java | 13 +++++++------ .../tweetstore/integration/TweetStoreLiveTest.java | 3 ++- 6 files changed, 23 insertions(+), 17 deletions(-) diff --git a/demos/tweetstore/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java b/demos/tweetstore/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java index 4e75d5a7fa..8cdceeb27d 100644 --- a/demos/tweetstore/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java +++ b/demos/tweetstore/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java @@ -24,10 +24,11 @@ package org.jclouds.demo.tweetstore.reference; * @author Adrian Cole */ public interface TweetStoreConstants { - public static final String PROPERTY_TWEETSTORE_CONTAINER = "jclouds.tweetstore.container"; - /** - * Note that this has to conform to restrictions of all blobstores. for example, azure doesn't - * support periods. - */ - public static final String SENDER_NAME = "sendername"; + static final String PROPERTY_TWEETSTORE_BLOBSTORES = "jclouds.tweetstore.blobstores"; + static final String PROPERTY_TWEETSTORE_CONTAINER = "jclouds.tweetstore.container"; + /** + * Note that this has to conform to restrictions of all blobstores. for + * example, azure doesn't support periods. + */ + static final String SENDER_NAME = "sendername"; } diff --git a/demos/tweetstore/gae-tweetstore-spring/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java b/demos/tweetstore/gae-tweetstore-spring/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java index 6463f73d13..3565071db8 100644 --- a/demos/tweetstore/gae-tweetstore-spring/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java +++ b/demos/tweetstore/gae-tweetstore-spring/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java @@ -19,6 +19,7 @@ package org.jclouds.demo.tweetstore.integration; import static com.google.common.base.Preconditions.checkNotNull; +import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_BLOBSTORES; import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER; import java.io.IOException; @@ -71,7 +72,7 @@ public class TweetStoreLiveTest { private String container; private static final Iterable blobstores = - Splitter.on(',').split(System.getProperty("jclouds.tweetstore.blobstores", + Splitter.on(',').split(System.getProperty(PROPERTY_TWEETSTORE_BLOBSTORES, "cloudfiles-us,aws-s3,azureblob")); private static final Properties props = new Properties(); diff --git a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java index 4e75d5a7fa..4d2eb6b410 100644 --- a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java +++ b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java @@ -24,10 +24,11 @@ package org.jclouds.demo.tweetstore.reference; * @author Adrian Cole */ public interface TweetStoreConstants { - public static final String PROPERTY_TWEETSTORE_CONTAINER = "jclouds.tweetstore.container"; + static final String PROPERTY_TWEETSTORE_BLOBSTORES = "jclouds.tweetstore.blobstores"; + static final String PROPERTY_TWEETSTORE_CONTAINER = "jclouds.tweetstore.container"; /** * Note that this has to conform to restrictions of all blobstores. for example, azure doesn't * support periods. */ - public static final String SENDER_NAME = "sendername"; + static final String SENDER_NAME = "sendername"; } diff --git a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java index ac96008c49..a2d982a7ae 100644 --- a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java +++ b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java @@ -19,6 +19,7 @@ package org.jclouds.demo.tweetstore.integration; import static com.google.common.base.Preconditions.checkNotNull; +import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_BLOBSTORES; import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER; import java.io.IOException; @@ -70,7 +71,7 @@ public class TweetStoreLiveTest { private Map contexts; private String container; private static final Iterable blobstores = - Splitter.on(',').split(System.getProperty("jclouds.tweetstore.blobstores", + Splitter.on(',').split(System.getProperty(PROPERTY_TWEETSTORE_BLOBSTORES, "cloudfiles-us,aws-s3,azureblob")); private static final Properties props = new Properties(); diff --git a/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java b/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java index 4e75d5a7fa..8cdceeb27d 100644 --- a/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java +++ b/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java @@ -24,10 +24,11 @@ package org.jclouds.demo.tweetstore.reference; * @author Adrian Cole */ public interface TweetStoreConstants { - public static final String PROPERTY_TWEETSTORE_CONTAINER = "jclouds.tweetstore.container"; - /** - * Note that this has to conform to restrictions of all blobstores. for example, azure doesn't - * support periods. - */ - public static final String SENDER_NAME = "sendername"; + static final String PROPERTY_TWEETSTORE_BLOBSTORES = "jclouds.tweetstore.blobstores"; + static final String PROPERTY_TWEETSTORE_CONTAINER = "jclouds.tweetstore.container"; + /** + * Note that this has to conform to restrictions of all blobstores. for + * example, azure doesn't support periods. + */ + static final String SENDER_NAME = "sendername"; } diff --git a/demos/tweetstore/runatcloud-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java b/demos/tweetstore/runatcloud-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java index d3830df2a2..f0a837be91 100644 --- a/demos/tweetstore/runatcloud-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java +++ b/demos/tweetstore/runatcloud-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java @@ -19,6 +19,7 @@ package org.jclouds.demo.tweetstore.integration; import static com.google.common.base.Preconditions.checkNotNull; +import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_BLOBSTORES; import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER; import java.io.IOException; @@ -71,7 +72,7 @@ public class TweetStoreLiveTest { private Map contexts; private String container; private static final Iterable blobstores = - Splitter.on(',').split(System.getProperty("jclouds.tweetstore.blobstores", + Splitter.on(',').split(System.getProperty(PROPERTY_TWEETSTORE_BLOBSTORES, "cloudfiles-us,aws-s3,azureblob")); private static final Properties props = new Properties();