You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Erik Bi <bi...@cn.ibm.com> on 2012/08/01 04:48:21 UTC

Re: Review Request: Make RestfulCollection object to be backed by a map with the put and get methods exposed

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5134/
-----------------------------------------------------------

(Updated Aug. 1, 2012, 2:48 a.m.)


Review request for shindig, Ryan Baxter, Dan Dumont, and Stanton Sievers.


Description
-------

There are requirements to expose some specific attributes in the feed result.  These attributes are not specific to any entry i.e. global in scope. for example, it is possible that user may require additional attributes to be passed like "Configuration parameters used by the front end to present Activity entries"
Would like the RestfulCollection object to be backed by a map with the put and get methods exposed, similar to how ActivityEntry and ActivityObject are currently handled. 

The code in Shindig trunk does not pass extra items at the Stream level, only down at the Activity level. This JIRA seeks to migrate this patch back to Shindig such that other feed producers/renders can leverage it as well.

Example: 
{
  // Want to put custom attributes here and have them returned, 
  isAdmin: true,
  ....

  "items" : [
      {
        "published": "2011-02-10T15:04:55Z",
        "foo": "some extension property",
        "generator": {
          "url": "http://example.org/activities-app"
        },
        "provider": {
          "url": "http://example.org/activity-stream"
        },
        "title": "Martin posted a new video to his album.",
        "actor": {
          "url": "http://example.org/martin",
          "objectType": "person",
          "id": "tag:example.org,2011:martin",
          "foo2": "some other extension property",
          "image": {
            "url": "http://example.org/martin/image",
            "width": 250,
            "height": 250
          },
          "displayName": "Martin Smith"
        },
        "verb": "post",
        "object" : {
          "url": "http://example.org/album/my_fluffy_cat.jpg",
          "objectType": "photo",
          "id": "tag:example.org,2011:my_fluffy_cat",
          "image": {
            "url": "http://example.org/album/my_fluffy_cat_thumb.jpg",
            "width": 250,
            "height": 250
          }
        },
        "target": {
          "url": "http://example.org/album/",
          "objectType": "photo-album",
          "id": "tag:example.org,2011:abc123",
          "displayName": "Martin's Photo Album",
          "image": {
            "url": "http://example.org/album/thumbnail.jpg",
            "width": 250,
            "height": 250
          }
        }
      }
    ]
  }


This addresses bug shindig-1779.
    https://issues.apache.org/jira/browse/shindig-1779


Diffs
-----

  http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/JsonSerializer.java 1327432 
  http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/RestfulCollection.java 1339011 
  http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/conversion/BeanXStreamConverter.java 1327432 
  http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/test/java/org/apache/shindig/protocol/RestfulCollectionTest.java 1361065 
  http://svn.apache.org/repos/asf/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/core/util/atom/AtomFeed.java 1339014 

Diff: https://reviews.apache.org/r/5134/diff/


Testing
-------


Thanks,

Erik Bi


Re: Review Request: Make RestfulCollection object to be backed by a map with the put and get methods exposed

Posted by Ryan Baxter <rb...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5134/#review9992
-----------------------------------------------------------

Ship it!


Committed revision 1370555

- Ryan Baxter


On Aug. 6, 2012, 6 a.m., Erik Bi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5134/
> -----------------------------------------------------------
> 
> (Updated Aug. 6, 2012, 6 a.m.)
> 
> 
> Review request for shindig, Ryan Baxter, Dan Dumont, and Stanton Sievers.
> 
> 
> Description
> -------
> 
> There are requirements to expose some specific attributes in the feed result.  These attributes are not specific to any entry i.e. global in scope. for example, it is possible that user may require additional attributes to be passed like "Configuration parameters used by the front end to present Activity entries"
> Would like the RestfulCollection object to be backed by a map with the put and get methods exposed, similar to how ActivityEntry and ActivityObject are currently handled. 
> 
> The code in Shindig trunk does not pass extra items at the Stream level, only down at the Activity level. This JIRA seeks to migrate this patch back to Shindig such that other feed producers/renders can leverage it as well.
> 
> Example: 
> {
>   // Want to put custom attributes here and have them returned, 
>   isAdmin: true,
>   ....
> 
>   "items" : [
>       {
>         "published": "2011-02-10T15:04:55Z",
>         "foo": "some extension property",
>         "generator": {
>           "url": "http://example.org/activities-app"
>         },
>         "provider": {
>           "url": "http://example.org/activity-stream"
>         },
>         "title": "Martin posted a new video to his album.",
>         "actor": {
>           "url": "http://example.org/martin",
>           "objectType": "person",
>           "id": "tag:example.org,2011:martin",
>           "foo2": "some other extension property",
>           "image": {
>             "url": "http://example.org/martin/image",
>             "width": 250,
>             "height": 250
>           },
>           "displayName": "Martin Smith"
>         },
>         "verb": "post",
>         "object" : {
>           "url": "http://example.org/album/my_fluffy_cat.jpg",
>           "objectType": "photo",
>           "id": "tag:example.org,2011:my_fluffy_cat",
>           "image": {
>             "url": "http://example.org/album/my_fluffy_cat_thumb.jpg",
>             "width": 250,
>             "height": 250
>           }
>         },
>         "target": {
>           "url": "http://example.org/album/",
>           "objectType": "photo-album",
>           "id": "tag:example.org,2011:abc123",
>           "displayName": "Martin's Photo Album",
>           "image": {
>             "url": "http://example.org/album/thumbnail.jpg",
>             "width": 250,
>             "height": 250
>           }
>         }
>       }
>     ]
>   }
> 
> 
> This addresses bug shindig-1779.
>     https://issues.apache.org/jira/browse/shindig-1779
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/RestfulCollection.java 1366998 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/conversion/BeanXStreamConverter.java 1366998 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/test/java/org/apache/shindig/protocol/RestfulCollectionTest.java 1366998 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/core/util/atom/AtomFeed.java 1366998 
> 
> Diff: https://reviews.apache.org/r/5134/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Erik Bi
> 
>


Re: Review Request: Make RestfulCollection object to be backed by a map with the put and get methods exposed

Posted by Erik Bi <bi...@cn.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5134/
-----------------------------------------------------------

(Updated Aug. 6, 2012, 6 a.m.)


Review request for shindig, Ryan Baxter, Dan Dumont, and Stanton Sievers.


Description
-------

There are requirements to expose some specific attributes in the feed result.  These attributes are not specific to any entry i.e. global in scope. for example, it is possible that user may require additional attributes to be passed like "Configuration parameters used by the front end to present Activity entries"
Would like the RestfulCollection object to be backed by a map with the put and get methods exposed, similar to how ActivityEntry and ActivityObject are currently handled. 

The code in Shindig trunk does not pass extra items at the Stream level, only down at the Activity level. This JIRA seeks to migrate this patch back to Shindig such that other feed producers/renders can leverage it as well.

Example: 
{
  // Want to put custom attributes here and have them returned, 
  isAdmin: true,
  ....

  "items" : [
      {
        "published": "2011-02-10T15:04:55Z",
        "foo": "some extension property",
        "generator": {
          "url": "http://example.org/activities-app"
        },
        "provider": {
          "url": "http://example.org/activity-stream"
        },
        "title": "Martin posted a new video to his album.",
        "actor": {
          "url": "http://example.org/martin",
          "objectType": "person",
          "id": "tag:example.org,2011:martin",
          "foo2": "some other extension property",
          "image": {
            "url": "http://example.org/martin/image",
            "width": 250,
            "height": 250
          },
          "displayName": "Martin Smith"
        },
        "verb": "post",
        "object" : {
          "url": "http://example.org/album/my_fluffy_cat.jpg",
          "objectType": "photo",
          "id": "tag:example.org,2011:my_fluffy_cat",
          "image": {
            "url": "http://example.org/album/my_fluffy_cat_thumb.jpg",
            "width": 250,
            "height": 250
          }
        },
        "target": {
          "url": "http://example.org/album/",
          "objectType": "photo-album",
          "id": "tag:example.org,2011:abc123",
          "displayName": "Martin's Photo Album",
          "image": {
            "url": "http://example.org/album/thumbnail.jpg",
            "width": 250,
            "height": 250
          }
        }
      }
    ]
  }


This addresses bug shindig-1779.
    https://issues.apache.org/jira/browse/shindig-1779


Diffs (updated)
-----

  http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/RestfulCollection.java 1366998 
  http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/conversion/BeanXStreamConverter.java 1366998 
  http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/test/java/org/apache/shindig/protocol/RestfulCollectionTest.java 1366998 
  http://svn.apache.org/repos/asf/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/core/util/atom/AtomFeed.java 1366998 

Diff: https://reviews.apache.org/r/5134/diff/


Testing
-------


Thanks,

Erik Bi