How to get hold of CommonResourceResolverFactoryImpl and hence get MapEntries | Community
Skip to main content
Level 2
October 16, 2015
Solved

How to get hold of CommonResourceResolverFactoryImpl and hence get MapEntries

  • October 16, 2015
  • 2 replies
  • 877 views

HI all,

I am in a process of getting MapEntries using CommonResourceResolverFactoryImpl defined in org.apache.sling.resourceresolver.impl. But I didn't succeed in getting hold of CommonResourceResolverFactoryImpl. 

Any advice in this regards highly appreciated.

Thanks in advance

LM

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Peter_Puzanovs

Hi LM,

 

You are trying to get an impl which is normally forbidden in the OSGi world.

Use an interface org/apache/sling/api/resource/ResourceResolver to get the entries you need.

 

Thanks,

Peter

2 replies

Peter_Puzanovs
Community Advisor
Peter_PuzanovsCommunity AdvisorAccepted solution
Community Advisor
October 16, 2015

Hi LM,

 

You are trying to get an impl which is normally forbidden in the OSGi world.

Use an interface org/apache/sling/api/resource/ResourceResolver to get the entries you need.

 

Thanks,

Peter

Live_MoreAuthor
Level 2
October 16, 2015

Hi Peter,

Thanks for your speedy response.

After looking into org.apache.sling.jcr.resource-2.0.6.jar codebase, it looks like JcrResourceResolverWebConsolePlugin class contain an entry like 

MapEntries mapEntries = this.resolverFactory.getMapEntries();. Ultimately I need to get hold of the MapEntries. Looks like

  MapEntries getMapEntries()

  {
    return this.mapEntries;
  }  inside JcrResourceResolverFactoryImpl is of package private scope. 

Please let me know how to tackle situation.

Thanks

LM