From d3f94718eb82d70d26fef788be443671f2a630f3 Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 8 Oct 2008 06:17:14 +0000 Subject: TUSCANY-2577 - Applying Haibo's patch to add support for google web albums feeds trough gdata. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@702729 13f79535-47bb-0310-9956-ffa450edef68 --- .../gdata/provider/GdataReferenceBindingProvider.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'java/sca/modules/binding-gdata-runtime-gsoc/src/main') diff --git a/java/sca/modules/binding-gdata-runtime-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/provider/GdataReferenceBindingProvider.java b/java/sca/modules/binding-gdata-runtime-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/provider/GdataReferenceBindingProvider.java index 70bf58a161..ba082e72b6 100644 --- a/java/sca/modules/binding-gdata-runtime-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/provider/GdataReferenceBindingProvider.java +++ b/java/sca/modules/binding-gdata-runtime-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/provider/GdataReferenceBindingProvider.java @@ -128,6 +128,11 @@ class GdataReferenceBindingProvider implements ReferenceBindingProvider { supportsFeedEntries = true; } + String entryURI = this.binding.getURI(); + if(entryURI.contains("picasaweb.google.com/data/feed/api/")){ + entryURI = entryURI.replace("picasaweb.google.com/data/feed/api/", "picasaweb.google.com/data/entry/api/"); + binding.setURI(entryURI); + } return new GdataBindingInvoker.GetInvoker(operation, binding.getURI(), googleService, httpClient, authorizationHeader, this); } else if (operationName.equals("post")) { @@ -136,9 +141,21 @@ class GdataReferenceBindingProvider implements ReferenceBindingProvider { } else if (operationName.equals("put")) { + String entryURI = this.binding.getURI(); + if(entryURI.contains("picasaweb.google.com/data/feed/api/")){ + entryURI = entryURI.replace("picasaweb.google.com/data/feed/api/", "picasaweb.google.com/data/entry/api/"); + binding.setURI(entryURI); + } return new GdataBindingInvoker.PutInvoker(operation, binding.getURI(), googleService, httpClient, authorizationHeader, this); } else if (operationName.equals("delete")) { + + + String entryURI = this.binding.getURI(); + if(entryURI.contains("picasaweb.google.com/data/feed/api/")){ + entryURI = entryURI.replace("picasaweb.google.com/data/feed/api/", "picasaweb.google.com/data/entry/api/"); + binding.setURI(entryURI); + } return new GdataBindingInvoker.DeleteInvoker(operation, binding.getURI(), googleService, httpClient, authorizationHeader, this); } else if (operationName.equals("getFeed") || operationName.equals("getAll")) { -- cgit v1.2.3