newBlob -> blobBuilder...build()

This commit is contained in:
Andrew Phillips 2011-05-29 19:42:54 +01:00
parent 8e2ea83bc1
commit e4216ea1ea
8 changed files with 8 additions and 8 deletions

View File

@ -62,7 +62,7 @@ public class StoreTweetsController extends HttpServlet {
}
public Blob apply(Status from) {
Blob to = map.newBlob(from.getId() + "");
Blob to = map.blobBuilder().name(from.getId() + "").build();
to.setPayload(from.getText());
to.getPayload().getContentMetadata().setContentType(MediaType.TEXT_PLAIN);
to.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, from.getUser().getScreenName());

View File

@ -52,7 +52,7 @@ public class AddTweetsControllerTest {
BlobStoreContext context = new BlobStoreContextFactory().createContext("transient",
"dummy", "dummy");
context.getAsyncBlobStore().createContainerInLocation(null, container).get();
Blob blob = context.getAsyncBlobStore().newBlob("1");
Blob blob = context.getAsyncBlobStore().blobBuilder("1").build();
blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank");
blob.setPayload("I love beans!");
context.getAsyncBlobStore().putBlob(container, blob).get();

View File

@ -48,7 +48,7 @@ public class KeyToStoredTweetStatusTest {
public void testStoreTweets() throws IOException, InterruptedException, ExecutionException {
BlobMap map = createMap();
Blob blob = map.newBlob("1");
Blob blob = map.blobBuilder().name("1").build();
blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank");
blob.setPayload("I love beans!");
map.put("1", blob);

View File

@ -49,7 +49,7 @@ public class ServiceToStoredTweetStatusesTest {
BlobStoreContext context = new BlobStoreContextFactory().createContext("transient",
"dummy", "dummy");
context.getAsyncBlobStore().createContainerInLocation(null, container).get();
Blob blob = context.getAsyncBlobStore().newBlob("1");
Blob blob = context.getAsyncBlobStore().blobBuilder("1").build();
blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank");
blob.setPayload("I love beans!");
context.getAsyncBlobStore().putBlob(container, blob).get();

View File

@ -62,7 +62,7 @@ public class StoreTweetsController extends HttpServlet {
}
public Blob apply(Status from) {
Blob to = map.newBlob(from.getId() + "");
Blob to = map.blobBuilder().name(from.getId() + "").build();
to.setPayload(from.getText());
to.getPayload().getContentMetadata().setContentType(MediaType.TEXT_PLAIN);
to.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, from.getUser().getScreenName());

View File

@ -51,7 +51,7 @@ public class AddTweetsControllerTest {
for (String name : new String[] { "1", "2" }) {
BlobStoreContext context = new BlobStoreContextFactory().createContext("transient", "dummy", "dummy");
context.getAsyncBlobStore().createContainerInLocation(null, container).get();
Blob blob = context.getAsyncBlobStore().newBlob("1");
Blob blob = context.getAsyncBlobStore().blobBuilder("1").build();
blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank");
blob.setPayload("I love beans!");
context.getAsyncBlobStore().putBlob(container, blob).get();

View File

@ -47,7 +47,7 @@ public class KeyToStoredTweetStatusTest {
public void testStoreTweets() throws IOException, InterruptedException, ExecutionException {
BlobMap map = createMap();
Blob blob = map.newBlob("1");
Blob blob = map.blobBuilder().name("1").build();
blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank");
blob.setPayload("I love beans!");
map.put("1", blob);

View File

@ -49,7 +49,7 @@ public class ServiceToStoredTweetStatusesTest {
BlobStoreContext context = new BlobStoreContextFactory().createContext("transient",
"dummy", "dummy");
context.getAsyncBlobStore().createContainerInLocation(null, container).get();
Blob blob = context.getAsyncBlobStore().newBlob("1");
Blob blob = context.getAsyncBlobStore().blobBuilder("1").build();
blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank");
blob.setPayload("I love beans!");
context.getAsyncBlobStore().putBlob(container, blob).get();