Search in sources :

Example 1 with PathMapper

use of org.apache.sling.jcr.resource.internal.helper.jcr.PathMapper in project sling by apache.

the class MockResolverProvider method getResourceResolver.

public static ResourceResolver getResourceResolver() throws RepositoryException, LoginException {
    final SlingRepository repository = RepositoryProvider.instance().getRepository();
    final BundleContext bundleContext = MockOsgi.newBundleContext();
    bundleContext.registerService(PathMapper.class.getName(), new PathMapper(), null);
    return new MockJcrResourceResolverFactory(repository, bundleContext).getAdministrativeResourceResolver(null);
}
Also used : SlingRepository(org.apache.sling.jcr.api.SlingRepository) PathMapper(org.apache.sling.jcr.resource.internal.helper.jcr.PathMapper) BundleContext(org.osgi.framework.BundleContext)

Aggregations

SlingRepository (org.apache.sling.jcr.api.SlingRepository)1 PathMapper (org.apache.sling.jcr.resource.internal.helper.jcr.PathMapper)1 BundleContext (org.osgi.framework.BundleContext)1