Expand my Community achievements bar.

Nomination window for the Adobe Community Advisor Program, Class of 2025, is now open!
SOLVED

How to get hold of CommonResourceResolverFactoryImpl and hence get MapEntries

Avatar

Level 3

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

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

Avatar

Level 3

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