You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by hs...@apache.org on 2012/05/25 20:22:51 UTC

svn commit: r1342755 - in /shindig/trunk: content/samplecontainer/examples/embeddedexperiences/ content/sampledata/ features/src/main/javascript/features/embeddedexperiences/ features/src/test/javascript/features/embeddedexperiences/ java/gadgets/src/m...

Author: hsaputra
Date: Fri May 25 18:22:50 2012
New Revision: 1342755

URL: http://svn.apache.org/viewvc?rev=1342755&view=rev
Log:
Checked-in update to ref impl for preferred experience for EE to change display type from link to text and change its property from text to label.

Modified:
    shindig/trunk/content/samplecontainer/examples/embeddedexperiences/EEContainer.js
    shindig/trunk/content/sampledata/canonicaldb.json
    shindig/trunk/features/src/main/javascript/features/embeddedexperiences/constant.js
    shindig/trunk/features/src/main/javascript/features/embeddedexperiences/feature.xml
    shindig/trunk/features/src/test/javascript/features/embeddedexperiences/embedded_experiences_container_test.js
    shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/features/FeatureRegistry.java
    shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonDelete.json
    shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonGroup.json

Modified: shindig/trunk/content/samplecontainer/examples/embeddedexperiences/EEContainer.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/embeddedexperiences/EEContainer.js?rev=1342755&r1=1342754&r2=1342755&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/embeddedexperiences/EEContainer.js (original)
+++ shindig/trunk/content/samplecontainer/examples/embeddedexperiences/EEContainer.js Fri May 25 18:22:50 2012
@@ -171,11 +171,11 @@ function createAccordianEntry(i, entry) 
 }
 
 function getPreferredExperienceLinkText(preferredExperience) {
-  if(preferredExperience && preferredExperience.target) {
-    if(preferredExperience.display.type !== 'link') {
+  if(preferredExperience && preferredExperience.display) {
+    if(preferredExperience.display.type !== osapi.container.ee.DisplayType.TEXT) {
       return null;
     }
-    var linkText = preferredExperience.display.text;
+    var linkText = preferredExperience.display.label;
     return linkText;
   }
 }

Modified: shindig/trunk/content/sampledata/canonicaldb.json
URL: http://svn.apache.org/viewvc/shindig/trunk/content/sampledata/canonicaldb.json?rev=1342755&r1=1342754&r2=1342755&view=diff
==============================================================================
--- shindig/trunk/content/sampledata/canonicaldb.json (original)
+++ shindig/trunk/content/sampledata/canonicaldb.json Fri May 25 18:22:50 2012
@@ -470,7 +470,7 @@
       "provider": {
         "url": "http://example.org/activity-stream"
       },
-      "title": "John post new photo to his blog",
+      "title": "John posted a new photo to his blog",
       "actor": {
         "url": "http://example.org/john",
         "objectType": "person",
@@ -517,8 +517,8 @@
               "view": "embedded_canvas"
             },
             "display": {
-              "type": "link",
-              "text" : "Checkout new photo in John's blog"
+              "type": "text",
+              "label" : "Checkout new photo in John's blog"
             }
           }
         },

Modified: shindig/trunk/features/src/main/javascript/features/embeddedexperiences/constant.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/embeddedexperiences/constant.js?rev=1342755&r1=1342754&r2=1342755&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/embeddedexperiences/constant.js (original)
+++ shindig/trunk/features/src/main/javascript/features/embeddedexperiences/constant.js Fri May 25 18:22:50 2012
@@ -98,7 +98,7 @@ osapi.container.ee.TargetType = {
  */
 osapi.container.ee.DisplayType = {
     IMAGE: 'image',
-    LINK: 'link'
+    TEXT: 'text'
 };
 
 /**

Modified: shindig/trunk/features/src/main/javascript/features/embeddedexperiences/feature.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/embeddedexperiences/feature.xml?rev=1342755&r1=1342754&r2=1342755&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/embeddedexperiences/feature.xml (original)
+++ shindig/trunk/features/src/main/javascript/features/embeddedexperiences/feature.xml Fri May 25 18:22:50 2012
@@ -56,7 +56,7 @@ specific language governing permissions 
             <exports type="js">osapi.container.ee.TargetType.GADGET</exports>
             <exports type="js">osapi.container.ee.TargetType.URL</exports>
             <exports type="js">osapi.container.ee.DisplayType.IMAGE</exports>
-            <exports type="js">osapi.container.ee.DisplayType.LINK</exports>
+            <exports type="js">osapi.container.ee.DisplayType.TEXT</exports>
             <exports type="js">osapi.container.ee.Context.ASSOCIATED_CONTEXT</exports>
             <exports type="js">osapi.container.ee.Context.OPENSOCIAL</exports>
             <exports type="js">osapi.container.ee.AssociatedContext.ID</exports>

Modified: shindig/trunk/features/src/test/javascript/features/embeddedexperiences/embedded_experiences_container_test.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/test/javascript/features/embeddedexperiences/embedded_experiences_container_test.js?rev=1342755&r1=1342754&r2=1342755&view=diff
==============================================================================
--- shindig/trunk/features/src/test/javascript/features/embeddedexperiences/embedded_experiences_container_test.js (original)
+++ shindig/trunk/features/src/test/javascript/features/embeddedexperiences/embedded_experiences_container_test.js Fri May 25 18:22:50 2012
@@ -100,9 +100,9 @@ EEContainerTest.prototype.testNavigateGa
       this.setupGadgetsRpcRegister();
       var container = new osapi.container.Container({});
       var eeDataModel =
-        {'gadget' : 'http://example.com/gadget.xml', 'context' : {'label' : '123'},
+        {'gadget' : 'http://example.com/gadget.xml', 'context' : {'objectid' : '123'},
           'preferredExperience' : {'target' : {'type' : 'gadget','view' : 'my-ee-view', 'viewTarget' : 'DIALOG'},
-          'display' : {'type' : 'link', 'text' : 'Click me to say Hello World'}}};
+          'display' : {'type' : 'text', 'label' : 'Click me to say Hello World'}}};
 
       this.setupGadgetSite(1, {}, null);
       this.setupPreload();
@@ -110,7 +110,7 @@ EEContainerTest.prototype.testNavigateGa
 
       // verify
       var renderParamDataModel = this.site_navigateTo_renderParams['eeDataModel'];
-      this.assertEquals({"label":"123"}, renderParamDataModel.context);
+      this.assertEquals({"objectid":"123"}, renderParamDataModel.context);
       this.assertEquals('my-ee-view', this.site_navigateTo_renderParams['view']);
 
 };

Modified: shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/features/FeatureRegistry.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/features/FeatureRegistry.java?rev=1342755&r1=1342754&r2=1342755&view=diff
==============================================================================
--- shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/features/FeatureRegistry.java (original)
+++ shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/features/FeatureRegistry.java Fri May 25 18:22:50 2012
@@ -222,7 +222,6 @@ public class FeatureRegistry {
     List<FeatureNode> featureNodes = transitive ?
         getTransitiveDeps(needed, unsupported) : getRequestedNodes(needed, unsupported);
 
-
     ImmutableList.Builder<FeatureBundle> bundlesBuilder =
         new ImmutableList.Builder<FeatureBundle>();
 

Modified: shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonDelete.json
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonDelete.json?rev=1342755&r1=1342754&r2=1342755&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonDelete.json (original)
+++ shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonDelete.json Fri May 25 18:22:50 2012
@@ -65,7 +65,7 @@
     }
   }, {
     "id": "activity3",
-    "title": "John post new photo to his blog",
+    "title": "John posted a new photo to his blog",
     "verb": "post",
     "target": {
       "id": "target3",
@@ -114,8 +114,8 @@
         },
         "preferredExperience": {
           "display": {
-            "type": "link",
-            "text": "Checkout new photo in John's blog"
+            "type": "text",
+            "label": "Checkout new photo in John's blog"
           },
           "target": {
             "type": "gadget",

Modified: shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonGroup.json
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonGroup.json?rev=1342755&r1=1342754&r2=1342755&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonGroup.json (original)
+++ shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonGroup.json Fri May 25 18:22:50 2012
@@ -101,7 +101,7 @@
     }
   }, {
     "id": "activity3",
-    "title": "John post new photo to his blog",
+    "title": "John posted a new photo to his blog",
     "verb": "post",
     "target": {
       "id": "target3",
@@ -150,8 +150,8 @@
         },
         "preferredExperience": {
           "display": {
-            "type": "link",
-            "text": "Checkout new photo in John's blog"
+            "type": "text",
+            "label": "Checkout new photo in John's blog"
           },
           "target": {
             "type": "gadget",