temporarily disabled twitter

This commit is contained in:
Adrian Cole 2010-06-28 05:12:15 -07:00
parent 27f4f69b4c
commit 18f2ca3225
4 changed files with 30 additions and 39 deletions

View File

@ -41,7 +41,6 @@ import org.jclouds.demo.tweetstore.controller.StoreTweetsController;
import org.jclouds.demo.tweetstore.functions.ServiceToStoredTweetStatuses;
import org.jclouds.gae.config.GoogleAppEngineConfigurationModule;
import org.jclouds.twitter.TwitterClient;
import org.jclouds.twitter.TwitterContextFactory;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -84,7 +83,7 @@ public class SpringServletConfig extends LoggingConfig implements ServletConfigA
Module googleModule = new GoogleAppEngineConfigurationModule();
Set<Module> modules = ImmutableSet.<Module> of(googleModule);
// shared across all blobstores and used to retrieve tweets
twitterClient = TwitterContextFactory.createContext(props, googleModule).getApi();
//TODO twitterClient = TwitterContextFactory.createContext(props, googleModule).getApi();
// common namespace for storing tweets
container = checkNotNull(props.getProperty(PROPERTY_TWEETSTORE_CONTAINER),

View File

@ -20,8 +20,6 @@ package org.jclouds.demo.tweetstore.integration;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER;
import static org.jclouds.twitter.reference.TwitterConstants.PROPERTY_TWITTER_PASSWORD;
import static org.jclouds.twitter.reference.TwitterConstants.PROPERTY_TWITTER_USER;
import java.io.IOException;
import java.io.InputStream;
@ -33,7 +31,6 @@ import java.util.concurrent.TimeoutException;
import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.demo.tweetstore.config.SpringServletConfig;
import org.jclouds.twitter.TwitterPropertiesBuilder;
import org.jclouds.util.Utils;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeTest;
@ -64,12 +61,11 @@ public class TweetStoreLiveTest {
.getProperty(PROPERTY_TWEETSTORE_CONTAINER), PROPERTY_TWEETSTORE_CONTAINER));
// WATCH THIS.. when adding a new context, you must update the string
props.setProperty(SpringServletConfig.PROPERTY_BLOBSTORE_CONTEXTS,
"cloudfiles,s3,azureblob");
props = new TwitterPropertiesBuilder(props).withCredentials(
checkNotNull(System.getProperty(PROPERTY_TWITTER_USER), PROPERTY_TWITTER_USER),
System.getProperty(PROPERTY_TWITTER_PASSWORD, PROPERTY_TWITTER_PASSWORD)).build();
props.setProperty(SpringServletConfig.PROPERTY_BLOBSTORE_CONTEXTS, "cloudfiles,s3,azureblob");
// TODO
// props = new TwitterPropertiesBuilder(props).withCredentials(
// checkNotNull(System.getProperty(PROPERTY_TWITTER_USER), PROPERTY_TWITTER_USER),
// System.getProperty(PROPERTY_TWITTER_PASSWORD, PROPERTY_TWITTER_PASSWORD)).build();
// TODO FIX
// props = new S3PropertiesBuilder(props)

View File

@ -36,7 +36,6 @@ import org.jclouds.demo.tweetstore.controller.AddTweetsController;
import org.jclouds.demo.tweetstore.controller.StoreTweetsController;
import org.jclouds.gae.config.GoogleAppEngineConfigurationModule;
import org.jclouds.twitter.TwitterClient;
import org.jclouds.twitter.TwitterContextFactory;
import com.google.appengine.api.labs.taskqueue.Queue;
import com.google.appengine.api.labs.taskqueue.QueueFactory;
@ -75,12 +74,12 @@ public class GuiceServletConfig extends GuiceServletContextListener {
Module googleModule = new GoogleAppEngineConfigurationModule();
Set<Module> modules = ImmutableSet.<Module> of(googleModule);
// shared across all blobstores and used to retrieve tweets
twitterClient = TwitterContextFactory.createContext(props, googleModule).getApi();
// common namespace for storing tweets
container = checkNotNull(props.getProperty(PROPERTY_TWEETSTORE_CONTAINER),
PROPERTY_TWEETSTORE_CONTAINER);
// // shared across all blobstores and used to retrieve tweets
// twitterClient = TwitterContextFactory.createContext(props, googleModule).getApi();
//
// // common namespace for storing tweets
// container = checkNotNull(props.getProperty(PROPERTY_TWEETSTORE_CONTAINER),
// PROPERTY_TWEETSTORE_CONTAINER);
// instantiate and store references to all blobstores by provider name
providerTypeToBlobStoreMap = Maps.newHashMap();

View File

@ -20,8 +20,6 @@ package org.jclouds.demo.tweetstore.integration;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER;
import static org.jclouds.twitter.reference.TwitterConstants.PROPERTY_TWITTER_PASSWORD;
import static org.jclouds.twitter.reference.TwitterConstants.PROPERTY_TWITTER_USER;
import java.io.IOException;
import java.io.InputStream;
@ -33,7 +31,6 @@ import java.util.concurrent.TimeoutException;
import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.demo.tweetstore.config.GuiceServletConfig;
import org.jclouds.twitter.TwitterPropertiesBuilder;
import org.jclouds.util.Utils;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeTest;
@ -66,9 +63,9 @@ public class TweetStoreLiveTest {
// WATCH THIS.. when adding a new context, you must update the string
props.setProperty(GuiceServletConfig.PROPERTY_BLOBSTORE_CONTEXTS, "cloudfiles,s3,azureblob");
props = new TwitterPropertiesBuilder(props).withCredentials(
checkNotNull(System.getProperty(PROPERTY_TWITTER_USER), PROPERTY_TWITTER_USER),
System.getProperty(PROPERTY_TWITTER_PASSWORD, PROPERTY_TWITTER_PASSWORD)).build();
// props = new TwitterPropertiesBuilder(props).withCredentials(
// checkNotNull(System.getProperty(PROPERTY_TWITTER_USER), PROPERTY_TWITTER_USER),
// System.getProperty(PROPERTY_TWITTER_PASSWORD, PROPERTY_TWITTER_PASSWORD)).build();
// TODO FIX
//
// props = new S3PropertiesBuilder(props)