Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(708)

Issue 20043: Create opensocial-data-base 'feature', and use this when rewriter succeeds (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years, 11 months ago by awiner
Modified:
16 years, 6 months ago
Reviewers:
Base URL:
https://svn.apache.org/repos/asf/incubator/shindig/trunk/
Visibility:
Public.

Description

This patch: - Extracts opensocial-data-base as a private 'feature' from opensocial-data - Rewrites that JS a bit to hide internal state and APIs where possible - Adds generic functionality for a rewriter to add or remove features from a gadget as MutableContent methods - Changes the PipelineDataContentRewriter to swap out opensocial-data and swap in opensocial-data-base when all pipelines successfully resolve

Patch Set 1 #

Total comments: 6

Patch Set 2 : Incorporate review, add tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+453 lines, -159 lines) Patch
M features/features.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M features/opensocial-base/jsonactivitytest.js View 1 chunk +0 lines, -1 line 0 comments Download
A features/opensocial-data-context/datacontext.js View 1 chunk +184 lines, -0 lines 0 comments Download
A features/opensocial-data-context/datacontexttest.js View 1 chunk +133 lines, -0 lines 0 comments Download
A features/opensocial-data-context/feature.xml View 1 chunk +25 lines, -0 lines 0 comments Download
M features/opensocial-data/data.js View 1 4 chunks +1 line, -151 lines 0 comments Download
M features/opensocial-data/feature.xml View 1 1 chunk +1 line, -0 lines 0 comments Download
M features/opensocial-reference/activitytest.js View 1 chunk +0 lines, -1 line 0 comments Download
M features/opensocial-reference/opensocial.js View 1 chunk +1 line, -1 line 0 comments Download
M features/pom.xml View 1 chunk +1 line, -0 lines 0 comments Download
M java/gadgets/src/main/java/org/apache/shindig/gadgets/Gadget.java View 3 chunks +40 lines, -0 lines 0 comments Download
M java/gadgets/src/main/java/org/apache/shindig/gadgets/render/RenderingContentRewriter.java View 1 4 chunks +6 lines, -5 lines 0 comments Download
M java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/PipelineDataContentRewriter.java View 1 1 chunk +13 lines, -0 lines 0 comments Download
M java/gadgets/src/test/java/org/apache/shindig/gadgets/render/RenderingContentRewriterTest.java View 1 chunk +37 lines, -0 lines 0 comments Download
M java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/PipelineDataContentRewriterTest.java View 4 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 4
awiner
Tests to come before submitting, but this patch makes MutableContent still uglier, so if anyone ...
16 years, 11 months ago (2009-02-21 00:29:43 UTC) #1
louiscryan
The MutableContent change probably makes more sense on o.a.s.gadgets.Gadget. Everything else looks good http://codereview.appspot.com/20043/diff/1/4 File ...
16 years, 11 months ago (2009-02-21 01:37:45 UTC) #2
levik
http://codereview.appspot.com/20043/diff/1/5 File features/features.txt (right): http://codereview.appspot.com/20043/diff/1/5#newcode19 Line 19: features/opensocial-data-base/feature.xml would "data-store" be a better name? -base ...
16 years, 11 months ago (2009-02-21 16:00:55 UTC) #3
awiner
16 years, 11 months ago (2009-02-23 23:37:19 UTC) #4
http://codereview.appspot.com/20043/diff/1/5
File features/features.txt (right):

http://codereview.appspot.com/20043/diff/1/5#newcode19
Line 19: features/opensocial-data-base/feature.xml
On 2009/02/21 16:00:55, levik wrote:
> would "data-store" be a better name? -base conjures up images of SQL :)

Changed to opensocial-data-context

http://codereview.appspot.com/20043/diff/1/4
File
java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/MutableContent.java
(right):

http://codereview.appspot.com/20043/diff/1/4#newcode165
Line 165: public void addFeature(String name) {
On 2009/02/21 01:37:45, louiscryan wrote:
> Gadget is probably a better home for this

Done.

http://codereview.appspot.com/20043/diff/1/4#newcode183
Line 183: return ImmutableSet.<String>of();
On 2009/02/21 01:37:45, louiscryan wrote:
> Collections.emptySet ?

They're (in essence) the same thing - a shared singleton.  I use ImmutableXyz a
fair bit, so this is more consistent for me.  OTOH, Shindig tends to use
Collections.emptySet(), so that's probably better.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b