On Jan 5, 2009, at 3:02 PM, Fabio Mancinelli wrote:
Vincent Massol wrote:
The ideal way would be for PageResource to be a component. You could
then have a component map directly injected in PageResource using
Plexus and you wouldn't need to use the xwiki-core dep on web.Utils
which we need to get rif of.
This is a lack of knowledge of mine about plexus...
PageResource (and in general every resource) must extend
org.restlet.resource.Resource. Is it compatible with the plexus
model? I
mean there are no interfaces/implementations involved here, we just
have
classes.
... and I don't know how RESTlet works... :)
Who's instantiating PageResource? Is it us or the RESTlet framework?
If it's us then it's possible to delegate the instantiation to plexus.
What's the lifecycle of PageResource (should there be only 1 instance
during the lifetime of the app or several)?
BTW it's strange that Resource/Handler are not interfaces. Sounds like
a design issue for me. We can overcome this by creating our own
interface for them.
Or maybe you are talking about a factory that is
injected with all the
XWiki parameters and instantiates WikiResources by initializing them
with those parameters?
Sorry but I am not very much into plexus yet.
-Fabio
Thanks
-Vincent
http://xwiki.com
http://massol.net
http://xwiki.org