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

Paul Lindner closed SHINDIG-1456.
---------------------------------


part of 2.5.0-beta1 release.

                
> 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: 2.5.0-beta1
>            Reporter: Kai Feng Zhang
>            Assignee: Ziv Horesh
>             Fix For: 2.5.0-beta1
>
>         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.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to