Author: lindner
Date: Tue Nov 16 00:00:56 2010
New Revision: 1035496

URL: http://svn.apache.org/viewvc?rev=1035496&view=rev
Log:
SHINDIG-1469 | Patch from Eric Woods

Modified:
    
shindig/trunk/content/samplecontainer/examples/ActivityStreams/ActivityStreamGadget.xml
    
shindig/trunk/content/samplecontainer/examples/ActivityStreams/OpenSocialWrapper.js
    shindig/trunk/content/sampledata/canonicaldb.json

Modified: 
shindig/trunk/content/samplecontainer/examples/ActivityStreams/ActivityStreamGadget.xml
URL: 
http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/ActivityStreams/ActivityStreamGadget.xml?rev=1035496&r1=1035495&r2=1035496&view=diff
==============================================================================
--- 
shindig/trunk/content/samplecontainer/examples/ActivityStreams/ActivityStreamGadget.xml
 (original)
+++ 
shindig/trunk/content/samplecontainer/examples/ActivityStreams/ActivityStreamGadget.xml
 Tue Nov 16 00:00:56 2010
@@ -76,10 +76,6 @@
                                htmlCreateActivityEntry += "<td><input 
type='text' size=50 id='activityEntryBody'></td>"
                                htmlCreateActivityEntry += "</tr>";
                                htmlCreateActivityEntry += "<tr>";
-                               htmlCreateActivityEntry += "<td>Standard 
Link</td>";
-                               htmlCreateActivityEntry += "<td><input 
type='text' size=50 id='activityEntryStandardLink'></td>"
-                               htmlCreateActivityEntry += "</tr>";
-                               htmlCreateActivityEntry += "<tr>";
                                htmlCreateActivityEntry += "<td>Object 
Name</td>";
                                htmlCreateActivityEntry += "<td><input 
type='text' size=50 id='activityObjectName'></td>"
                                htmlCreateActivityEntry += "</tr>";
@@ -88,17 +84,17 @@
                                htmlCreateActivityEntry += "<td><input 
type='text' size=50 id='activityObjectSummary'></td>"
                                htmlCreateActivityEntry += "</tr>";
                                htmlCreateActivityEntry += "<tr>";
-                               htmlCreateActivityEntry += "<td>Object Image 
URL</td>";
-                               htmlCreateActivityEntry += "<td><input 
type='text' size=50 id='activityObjectImage'></td>"
-                               htmlCreateActivityEntry += "<tr>";
                                htmlCreateActivityEntry += "<td>Object 
Permalink</td>";
                                htmlCreateActivityEntry += "<td><input 
type='text' size=50 id='activityObjectPermalink'></td>"
                                htmlCreateActivityEntry += "</tr>";
                                htmlCreateActivityEntry += "</table>";
                                htmlCreateActivityEntry += "<table>";
+                               htmlCreateActivityEntry += "<tr 
style='color:blue'>";
+                               htmlCreateActivityEntry += "<td colspan='2'> 
Note: Per the ActivityStreams specification, only a single verb and object type 
are now supported.</td>";
+                               htmlCreateActivityEntry += "</tr>";
                                htmlCreateActivityEntry += "<tr>";
                                htmlCreateActivityEntry += "<td>Verbs</td>";
-                               htmlCreateActivityEntry += "<td>Objects 
Types</td>";
+                               htmlCreateActivityEntry += "<td>Object 
Types</td>";
                                htmlCreateActivityEntry += "</tr>";
                                htmlCreateActivityEntry += "<tr>";
                                htmlCreateActivityEntry += "<td><select 
MULTIPLE id='selectVerbs' size=10>";
@@ -166,13 +162,11 @@
                                
                                var title = 
blankToNull(document.getElementById('activityEntryTitle').value);
                                var body = 
blankToNull(document.getElementById('activityEntryBody').value)
-                               var standardLink = 
blankToNull(document.getElementById('activityEntryStandardLink').value);
                                var objectName = 
blankToNull(document.getElementById('activityObjectName').value);
                                var objectSummary = 
blankToNull(document.getElementById('activityObjectSummary').value);
-                               var objectImage = 
blankToNull(document.getElementById('activityObjectImage').value);
                                var objectPermalink = 
blankToNull(document.getElementById('activityObjectPermalink').value);
-                               social.postActivityEntry(title, body, 
standardLink, selVerbs, viewer.id, viewer.name.formatted,
-                                                                               
                objectName, objectSummary, objectImage, objectPermalink, 
selTypes,
+                               social.postActivityEntry(title, body, 
selVerbs[0], viewer.id, viewer.name.formatted,
+                                                                               
                objectName, objectSummary, objectPermalink, selTypes[0],
                                                                                
                function(response) {
                                        
render.renderActivityEntries('activityEntries', refresh);
                                });

Modified: 
shindig/trunk/content/samplecontainer/examples/ActivityStreams/OpenSocialWrapper.js
URL: 
http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/ActivityStreams/OpenSocialWrapper.js?rev=1035496&r1=1035495&r2=1035496&view=diff
==============================================================================
--- 
shindig/trunk/content/samplecontainer/examples/ActivityStreams/OpenSocialWrapper.js
 (original)
+++ 
shindig/trunk/content/samplecontainer/examples/ActivityStreams/OpenSocialWrapper.js
 Tue Nov 16 00:00:56 2010
@@ -93,13 +93,12 @@ function OpenSocialWrapper() {
                osapi.activitystreams.get(params).execute(callback);
        }
        
-       this.postActivityEntry = function(title, body, standardLink, verbs, 
actorId, actorName, objectName, objectSummary,
-                                                                         
objectImage, objectPermalink, objectTypes, callback) { 
+       this.postActivityEntry = function(title, body, verb, actorId, 
actorName, objectName, objectSummary,
+                                                                         
objectPermalink, objectType, callback) { 
                var params = {
                        userId: '@viewer',
                        groupId: '@self',
                        activityEntry: {
-                               standardLink: [standardLink],
                                postedTime: '2010-04-27T06:02:36+0000',
                                title: title,
                                body: body,
@@ -107,23 +106,13 @@ function OpenSocialWrapper() {
                                        id: actorId,
                                        displayName: actorName
                                },
-                               verb: verbs,
+                               verb: verb,
                                object: {
                                        id: 'entryId123',
                                        displayName: objectName,
                                        link: objectPermalink,
-                                       type: objectTypes,
-                                       media: {
-                                               target: 
'http://myvideos.com/raftingtrip/raftingvideo.avi',
-                                               type: 
'http://activitystrea.ms/schema/1.0/video',
-                                               width: '400',
-                                               height: '300',
-                                               duration: '93'
-                                       },
-                                       action: {
-                                               target: 
'http://myvideos.com/raftingvideo',
-                                               caption: 'Went white water 
rafting in the great lakes - ga hah!'
-                                       }
+                                       objectType: objectType,
+                                       summary: objectSummary
                                }
                        }
                }

Modified: shindig/trunk/content/sampledata/canonicaldb.json
URL: 
http://svn.apache.org/viewvc/shindig/trunk/content/sampledata/canonicaldb.json?rev=1035496&r1=1035495&r2=1035496&view=diff
==============================================================================
--- shindig/trunk/content/sampledata/canonicaldb.json (original)
+++ shindig/trunk/content/sampledata/canonicaldb.json Tue Nov 16 00:00:56 2010
@@ -351,21 +351,30 @@
 },
 "activityEntries" : {
        "john.doe": [{
-               "id": "myEntryId123",
-               "link": "http://www.myactivityentry.com";,
-               "postedTime": "2010-04-27T06:02:36+0000",
                "title": "This is my ActivityEntry!",
                "body": "ActivityStreams are so much fun!",
+               "postedTime": "2010-04-27T06:02:36+0000",
                "actor": {
                        "id": "john.doe",
                        "displayName": "John Doe"
                },
-               "verb": ["play", "post"],
+               "verb": "post",
                "object": {
-                               "id": "myObjectId123",
-                               "displayName": "My Object",
-                               "permalink": "http://www.myobject.com";,
-                               "objectType": ["article"]
+                       "id": "myObjectId123",
+                       "displayName": "My Object",
+                       "link": "http://www.myobject.com";,
+                       "objectType": "article",
+                       "media": {
+                               "url": 
'http://myvideos.com/raftingtrip/raftingvideo.avi',
+                               "type": 
'http://activitystrea.ms/schema/1.0/video',
+                               "width": '400',
+                               "height": '300',
+                               "duration": '93'
+                       },
+                       "actionLinks": [{
+                               "target": 'http://myvideos.com/raftingvideo',
+                               "caption": 'Went white water rafting in the 
great lakes - ga hah!'
+                       }]
                }
        }]
 },


Reply via email to