You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Weygandt, Jon" <jw...@ebay.com> on 2009/10/08 19:19:06 UTC

Why - guice from special repository and what about guice-assisted-inject?

I've been working on a patch to get content-rewrite to work according to
the specification. It's impact is threaded through several places in the
code, so let me start with 2 basic questions on guice, and then I'll
explain why I ask.
 
I have noticed that in the top level pom.xml it specifies a special
place to fetch Guice from: http://guice-maven.googlecode.com/svn/trunk/
and it does it as com.google.code.guice. Maybe this is a holdover from
earlier days? It seems it is available from the default:
http://repo1.maven.org/maven2 as com.google.inject.guice, plus the
extensions are there.
 
I have a need for FactoryProvider:
http://google-guice.googlecode.com/svn/trunk/javadoc/index.html?com/goog
le/inject/assistedinject/FactoryProvider.html, which is an extension.
 
Our implementation has a need to do something special when a link is
rewritten for proxy or concat. That is in: HTMLContentRewriter,
SanitizingGadgetRewriter, SanitizingRequestRewriter. Someone started to
do something "guice friendly" with a protected method:
HTMLContentRewriter.createLinkRewriter. But that does not go far enough,
there are "concat rewriters" and SanitizingProxyingLinkRewriter, and
many (one for concat, 3 for proxy) places it is used.
 
What I would like to do is to use the FactoryProvider and create:
 
ConcatLinkRewriterFactory / ConcatLinkRewriter
ProxyingLinkRewriterFactory / ProxyingLinkRewriter (exists as non guice
class)
SanitizingProxyingLinkRewriterFactory / SanitizingProxyingLinkRewriter
(exists as inner non guice class)
These would be "bind" in RewriterModule
 
Comments?
 
Thanks,
Jon