Hi all,

After bearing this idea in my mind for quite some time and only
discussing it in small circles, I would like to open up the discussion
on this.

Point is, that to get a ResourceResolver is currently quite clumsy. You
need to get two services ([Sling]Repository and JcrResourceResolver) and
two method calls ([Sling]Repository.login and
JcrResourceResolver.getResourceResolver) to finally get a
ResourceResolver. In addition you have to tie your code to a package,
you do not really need, since primarily you need a ResourceResolver.

My proposal is to add a first-class Sling service interface called
ResourceResolverFactory which allows you to get a ResourceResolver
instances in one single shot. The proposal also allows for much more
flexibility in building the Resource tree made of ResourceProviders
where each ResourceProvider itself may actually be provided by a
ResourceProviderFactory.

Please find the proposal at [1] and lets start the discussion.

Regards
Felix

[1]
http://cwiki.apache.org/SLING/add-resourceresolverfactory-service-interface.html

Reply via email to