You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Paul Lindner (JIRA)" <ji...@apache.org> on 2010/11/04 21:28:41 UTC

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

    [ https://issues.apache.org/jira/browse/SHINDIG-1456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12928333#action_12928333 ] 

Paul Lindner commented on SHINDIG-1456:
---------------------------------------

Unless there are no objections I will apply this.

It works fine since the order of the bindings is consistent within a module.

> 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.