Author: cgeer
Date: Tue Jun 26 19:24:23 2012
New Revision: 1354184

URL: http://svn.apache.org/viewvc?rev=1354184&view=rev
Log:
RAVE-685 Updated to Shindig 2.5.0-beta2

Modified:
    rave/trunk/pom.xml
    
rave/trunk/rave-integration-tests/rave-default-account-tests/src/main/java/org/apache/rave/integrationtests/steps/PageOperationsSteps.java
    
rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_opensocial.js
    rave/trunk/rave-portal-resources/src/test/javascript/raveOpenSocialSpec.js
    
rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/service/impl/DefaultPersonService.java
    
rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/java/org/apache/rave/opensocial/service/PersonServiceTest.java
    
rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/src/main/resources/rave.shindig.properties

Modified: rave/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/rave/trunk/pom.xml?rev=1354184&r1=1354183&r2=1354184&view=diff
==============================================================================
--- rave/trunk/pom.xml (original)
+++ rave/trunk/pom.xml Tue Jun 26 19:24:23 2012
@@ -42,7 +42,7 @@
     </scm>
 
     <properties>
-        <apache.shindig.version>2.5.0-beta1</apache.shindig.version>
+        <apache.shindig.version>2.5.0-beta2</apache.shindig.version>
         <apache.wookie.version>0.10.0-incubating</apache.wookie.version>
         
<org.springframework.version>3.1.0.RELEASE</org.springframework.version>
         
<org.springframework.mobile.version>1.0.0.M3</org.springframework.mobile.version>

Modified: 
rave/trunk/rave-integration-tests/rave-default-account-tests/src/main/java/org/apache/rave/integrationtests/steps/PageOperationsSteps.java
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-integration-tests/rave-default-account-tests/src/main/java/org/apache/rave/integrationtests/steps/PageOperationsSteps.java?rev=1354184&r1=1354183&r2=1354184&view=diff
==============================================================================
--- 
rave/trunk/rave-integration-tests/rave-default-account-tests/src/main/java/org/apache/rave/integrationtests/steps/PageOperationsSteps.java
 (original)
+++ 
rave/trunk/rave-integration-tests/rave-default-account-tests/src/main/java/org/apache/rave/integrationtests/steps/PageOperationsSteps.java
 Tue Jun 26 19:24:23 2012
@@ -80,7 +80,7 @@ public class PageOperationsSteps {
     @When("I delete the current page")
     public void deleteCurrentPage() {
         final WebElement activePage =
-                
portal.findElement(By.xpath("//div[@id='pageContent']/nav//li[contains(@class, 
'active')]"));
+                
portal.findElement(By.xpath("//div[@id='pageContent']/nav//li[contains(@class, 
'active')]/a"));
         activePage.click();
         sleep(2000L);
         final WebElement deletePageLink = 
portal.findElement(By.xpath("//li[@id='pageMenuDelete']/a"));

Modified: 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_opensocial.js
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_opensocial.js?rev=1354184&r1=1354183&r2=1354184&view=diff
==============================================================================
--- 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_opensocial.js
 (original)
+++ 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_opensocial.js
 Tue Jun 26 19:24:23 2012
@@ -84,32 +84,31 @@ rave.opensocial = rave.opensocial || (fu
 
     function implementViews() {
 
-        container.views = {
-            'createElementForGadget':function (metadata, rel, opt_view, 
opt_viewTarget, opt_coordinates, parentSite) {
+        container.views.createElementForGadget = function (metadata, rel, 
opt_view, opt_viewTarget, opt_coordinates, parentSite, opt_callback) {
                 if (opt_viewTarget) {
                     return rave.createPopup(opt_viewTarget);
                 }
-            },
+            };
 
 
-            'createElementForEmbeddedExperience':function (rel, 
opt_gadgetInfo, opt_viewTarget, opt_coordinates, parentSite) {
+        container.views.createElementForEmbeddedExperience = function (rel, 
opt_gadgetInfo, opt_viewTarget, opt_coordinates, parentSite, opt_callback) {
                 if (opt_viewTarget) {
                     return rave.createPopup(opt_viewTarget);
                 }
-            },
+            };
 
-            'createElementForUrl':function (rel, opt_viewTarget, 
opt_coordinates, parentSite) {
+        container.views.createElementForUrl = function (rel, opt_viewTarget, 
opt_coordinates, parentSite, opt_callback) {
                 if (opt_viewTarget) {
                     return rave.createPopup(opt_viewTarget);
                 }
-            },
+            };
 
-            'destroyElement':function (site) {
+        container.views.destroyElement = function (site) {
                 var element = site.el_;
                 container.closeGadget(site);
                 rave.destroyPopup(element);
-            }
-        };
+            };
+
     }
 
     /**

Modified: 
rave/trunk/rave-portal-resources/src/test/javascript/raveOpenSocialSpec.js
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/test/javascript/raveOpenSocialSpec.js?rev=1354184&r1=1354183&r2=1354184&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/test/javascript/raveOpenSocialSpec.js 
(original)
+++ rave/trunk/rave-portal-resources/src/test/javascript/raveOpenSocialSpec.js 
Tue Jun 26 19:24:23 2012
@@ -40,6 +40,7 @@ describe("Rave OpenSocial", function() {
                     this.rpcRegister = function(string, func) {
                         rpcHooks[string] = func;
                     };
+                    this.views = {};
                     container = this;
                 }
             }

Modified: 
rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/service/impl/DefaultPersonService.java
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/service/impl/DefaultPersonService.java?rev=1354184&r1=1354183&r2=1354184&view=diff
==============================================================================
--- 
rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/service/impl/DefaultPersonService.java
 (original)
+++ 
rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/service/impl/DefaultPersonService.java
 Tue Jun 26 19:24:23 2012
@@ -84,12 +84,12 @@ public class DefaultPersonService implem
                 return getUniqueListOfConnectedPeople(userIds, 
collectionOptions, token);
             case friends:
                 return getUniqueListOfFriends(userIds, collectionOptions, 
token);
-            case groupId:
-                return getGroupMembersFromRepository(collectionOptions, 
groupId.getGroupId(), token.getAppId());
+            case objectId:
+                return getGroupMembersFromRepository(collectionOptions, 
groupId.getObjectId().toString(), token.getAppId());
             case self:
                 return Lists.newArrayList(getPersonForId(new 
UserId(UserId.Type.me, null), token));
-            case deleted:
-                throw new 
ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Deleted Friends are 
not tracked by the container");
+            case custom:
+                throw new 
ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Custom GroupIDs are 
not tracked by the container");
             default:
                 throw new 
ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Invalid group id 
specified by request");
         }

Modified: 
rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/java/org/apache/rave/opensocial/service/PersonServiceTest.java
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/java/org/apache/rave/opensocial/service/PersonServiceTest.java?rev=1354184&r1=1354183&r2=1354184&view=diff
==============================================================================
--- 
rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/java/org/apache/rave/opensocial/service/PersonServiceTest.java
 (original)
+++ 
rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/java/org/apache/rave/opensocial/service/PersonServiceTest.java
 Tue Jun 26 19:24:23 2012
@@ -174,7 +174,7 @@ public class PersonServiceTest {
         Future<RestfulCollection<Person>> people = service.getPeople(ids, 
groupId, null, null, token);
         assertThat(people, is(not(nullValue())));
         assertThat(people.get().getTotalResults(), is(equalTo(1)));
-        assertThat(people.get().getEntry().get(0).getId(), is(equalTo(self)));
+        assertThat(people.get().getList().get(0).getId(), is(equalTo(self)));
     }
 
     @Test
@@ -190,7 +190,7 @@ public class PersonServiceTest {
 
         Future<RestfulCollection<Person>> people = service.getPeople(ids, 
groupId, null, null, token);
         assertThat(people, is(not(nullValue())));
-        assertThat(people.get().getEntry().get(0), 
is(instanceOf(FieldRestrictingPerson.class)));
+        assertThat(people.get().getList().get(0), 
is(instanceOf(FieldRestrictingPerson.class)));
         assertThat(hasUniqueValues(people), is(true));
         verify(repository);
     }
@@ -212,7 +212,7 @@ public class PersonServiceTest {
 
         Future<RestfulCollection<Person>> people = service.getPeople(ids, 
groupId, null, null, token);
         assertThat(people, is(not(nullValue())));
-        assertThat(people.get().getEntry().get(0), 
is(instanceOf(FieldRestrictingPerson.class)));
+        assertThat(people.get().getList().get(0), 
is(instanceOf(FieldRestrictingPerson.class)));
         assertThat(hasUniqueValues(people), is(true));
         verify(repository);
     }
@@ -220,14 +220,14 @@ public class PersonServiceTest {
     @Test
     public void getPeople_groupId() throws ExecutionException, 
InterruptedException {
         Set<UserId> ids = getUserIdSet();
-        GroupId groupId = new GroupId(GroupId.Type.groupId, GROUP_ID);
+        GroupId groupId = new GroupId(GroupId.Type.objectId, GROUP_ID);
 
         expect(repository.findByGroup(GROUP_ID)).andReturn(getDbPersonList());
         replay(repository);
 
         Future<RestfulCollection<Person>> people = service.getPeople(ids, 
groupId, null, null, token);
         assertThat(people, is(not(nullValue())));
-        assertThat(people.get().getEntry().get(0), 
is(instanceOf(FieldRestrictingPerson.class)));
+        assertThat(people.get().getList().get(0), 
is(instanceOf(FieldRestrictingPerson.class)));
         assertThat(hasUniqueValues(people), is(true));
         verify(repository);
     }
@@ -235,7 +235,7 @@ public class PersonServiceTest {
     @Test
     public void getPeople_GroupFilterField() throws ExecutionException, 
InterruptedException {
         Set<UserId> ids = getUserIdSet();
-        GroupId groupId = new GroupId(GroupId.Type.groupId, GROUP_ID);
+        GroupId groupId = new GroupId(GroupId.Type.objectId, GROUP_ID);
         replay(token);
 
         CollectionOptions options = new CollectionOptions();
@@ -387,7 +387,7 @@ public class PersonServiceTest {
     @Test
     public void getPeople_groupHasAppFilterField() throws ExecutionException, 
InterruptedException {
         Set<UserId> ids = getUserIdSet();
-        GroupId groupId = new GroupId(GroupId.Type.groupId, GROUP_ID);
+        GroupId groupId = new GroupId(GroupId.Type.objectId, GROUP_ID);
         String appId = "5";
         expect(token.getAppId()).andReturn(appId).anyTimes();
         replay(token);
@@ -461,7 +461,7 @@ public class PersonServiceTest {
     @Test
     public void getPeople_groupIsFriendsWith() throws ExecutionException, 
InterruptedException {
         Set<UserId> ids = getUserIdSet();
-        GroupId groupId = new GroupId(GroupId.Type.groupId, GROUP_ID);
+        GroupId groupId = new GroupId(GroupId.Type.objectId, GROUP_ID);
         String appId = "5";
         expect(token.getAppId()).andReturn(appId).anyTimes();
         replay(token);
@@ -479,16 +479,19 @@ public class PersonServiceTest {
         verify(repository);
     }
 
-    @Test(expected = ProtocolException.class)
-    public void getPeople_deleted() throws ExecutionException, 
InterruptedException {
-        String self = ID_1;
-        expect(token.getViewerId()).andReturn(self);
-        replay(token);
-        Set<UserId> ids = getUserIdSet();
-        GroupId groupId = new GroupId(GroupId.Type.deleted, GROUP_ID);
-
-        Future<RestfulCollection<Person>> people = service.getPeople(ids, 
groupId, null, null, token);
-    }
+    /*
+    TODO Deleted has been removed so need to handle custom at some point?
+     */
+//    @Test(expected = ProtocolException.class)
+//    public void getPeople_deleted() throws ExecutionException, 
InterruptedException {
+//        String self = ID_1;
+//        expect(token.getViewerId()).andReturn(self);
+//        replay(token);
+//        Set<UserId> ids = getUserIdSet();
+//        GroupId groupId = new GroupId(GroupId.Type.deleted, GROUP_ID);
+//
+//        Future<RestfulCollection<Person>> people = service.getPeople(ids, 
groupId, null, null, token);
+//    }
 
     private List<org.apache.rave.portal.model.Person> getDbPersonList() {
         return Lists.asList(getDbPerson(), new 
org.apache.rave.portal.model.Person[]{});
@@ -516,7 +519,7 @@ public class PersonServiceTest {
     }
 
     private static boolean hasUniqueValues(Future<RestfulCollection<Person>> 
people) throws ExecutionException, InterruptedException {
-        List<Person> persons = people.get().getEntry();
+        List<Person> persons = people.get().getList();
         Set<String> idSet = new HashSet<String>();
         for(Person p : persons) {
             if(idSet.contains(p.getId())) {

Modified: 
rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/src/main/resources/rave.shindig.properties
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/src/main/resources/rave.shindig.properties?rev=1354184&r1=1354183&r2=1354184&view=diff
==============================================================================
--- 
rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/src/main/resources/rave.shindig.properties
 (original)
+++ 
rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/src/main/resources/rave.shindig.properties
 Tue Jun 26 19:24:23 2012
@@ -92,6 +92,7 @@ shindig.oauth2.viewer-access-tokens-enab
 # Set to true to send extended trace messages to the client.  Probably want 
this to be false for
 # production systems and true for test/development.
 shindig.oauth2.send-trace-to-client=true
+shindig.signing.oauth2.state-key=
 
 # Set to true if you want to allow the use of 3-legged OAuth tokens when 
viewer != owner.
 # This setting is not recommeneded for pages that allow user-controlled 
javascript, since
@@ -139,7 +140,7 @@ shindig.flash.min-version = 9.0.115
 # Configuration for template rewriter
 
shindig.template-rewrite.extension-tag-namespace=http://ns.opensocial.org/2009/extensions
 
-# These values provide default TTLs for HTTP responses that don't use caching 
headers.
+# These values provide default TTLs (in ms) for HTTP responses that don't use 
caching headers.
 shindig.cache.http.defaultTtl=3600000
 shindig.cache.http.negativeCacheTtl=60000
 
@@ -163,7 +164,12 @@ shindig.cache.lru.httpResponses.capacity
 # The location of the EhCache configuration file.
 
shindig.cache.ehcache.config=res://org/apache/shindig/common/cache/ehcache/ehcacheConfig.xml
 
-# True to enable JMX integration with cache stats
+# The location of the filter file for EhCache's SizeOfEngine
+# This gets set as a system property to be consumed by EhCache.
+# Can be a resource on the classpath or a path on the file system.
+shindig.cache.ehcache.sizeof.filter=res://org/apache/shindig/common/cache/ehcache/SizeOfFilter.txt
+
+# true to enable JMX integration.
 shindig.cache.ehcache.jmx.enabled=true
 
 # true to enable JMX stats.
@@ -238,4 +244,7 @@ shindig.closure.compile.level=simple
 # 5 * 60 * 60 * 1000 * 24 = 432000000 = 5 days
 shindig.oauth2.authCodeExpiration=300000
 shindig.oauth2.accessTokenExpiration=18000000
-shindig.oauth2.refreshTokenExpiration=432000000
\ No newline at end of file
+shindig.oauth2.refreshTokenExpiration=432000000
+
+# Allows unauthenticated requests to Shindig
+shindig.allowUnauthenticated=true
\ No newline at end of file


Reply via email to