You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "John Hjelmstad (JIRA)" <ji...@apache.org> on 2010/11/08 23:42:25 UTC

[jira] Reopened: (SHINDIG-1456) Extend rewriter capability for Shindig

     [ https://issues.apache.org/jira/browse/SHINDIG-1456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Hjelmstad reopened SHINDIG-1456:
-------------------------------------


Hi Paul:

Fundamental problem here is that rewriter ordering is important: a Set obviously doesn't offer that guarantee.

I'd recommend we rejigger this implementation so that the Set-provided rewriters come as an addendum to those provided as "core" by Shindig. If relative ordering of those Rewriters is important, we can have pre-core and post-core Sets.

Apologies for not having seen this in JIRA; my mailbox has gotten so overstuffed of late that some of the messages get lost in the aether.

Thoughts?

--j
[cross-posted from dev@shindig.apache.org]

> Extend rewriter capability for Shindig
> --------------------------------------
>
>                 Key: SHINDIG-1456
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1456
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Java
>    Affects Versions: 3.0.0
>            Reporter: Kai Feng Zhang
>             Fix For: 3.0.0
>
>         Attachments: multibind_rewriters_20101029.patch, multibind_rewriters_20101102.patch
>
>
> I'd like to add a custom rewriter into Shindig, with requirement of no need to change Shindig rendering gadget server side code directly. I want to add it as a new feature in extras, so when this feature is required by gadget, the custom rewriter will do some special work when rendering gadget at server side.
> But I checked Shindig code, RewriteModule @Provides all predefined rewriters with @Named("shindig.rewriters.gadget") , and then GadgetRewritersProvider will provide all rewriters as per the same @Name when rendering gadget.
> If I create a new Module in shindig extras, and @Provides custom rewriter with same @Name, and startup server, there will be error saying the same @Name is configured already by RewriteModule.
> -----------------------------
> I have a solution to this, using multibinding in Guice, see Please see: http://google-guice.googlecode.com/svn/trunk/latest-javadoc/com/google/inject/multibindings/Multibinder.html
> There are some changes need to be made at RewriteModule to use Multibinder to bind rewriters, and change GadgetRewriter collection type from List to Set in GadgetRewritersProvider, then it's easy to bind any new custom rewriter in extras module.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.