use of org.apache.sling.jcr.resource.internal.HelperData in project sling by apache.
the class JcrItemResourceFactoryTest method compareGetItemOrNull.
private void compareGetItemOrNull(String path, String expectedPath) throws RepositoryException {
HelperData helper = new HelperData(new AtomicReference<DynamicClassLoaderManager>());
Item item1 = new JcrItemResourceFactory(session, helper).getItemOrNull(path);
Item item2 = new JcrItemResourceFactory(nonJackrabbitSession, helper).getItemOrNull(path);
if (expectedPath == null) {
assertNull(item1);
assertNull(item2);
} else {
assertNotNull(item1);
assertEquals(expectedPath, item1.getPath());
assertNotNull(item2);
assertEquals(expectedPath, item2.getPath());
}
}
use of org.apache.sling.jcr.resource.internal.HelperData in project sling by apache.
the class JcrProviderStateFactory method createJcrProviderState.
private JcrProviderState createJcrProviderState(@Nonnull final Session s, final boolean logoutSession, @Nonnull final Map<String, Object> authenticationInfo, @Nullable final BundleContext ctx) throws LoginException {
final Session session = handleImpersonation(s, authenticationInfo, logoutSession);
final HelperData data = new HelperData(this.dynamicClassLoaderManagerReference);
return new JcrProviderState(session, data, logoutSession, ctx, ctx == null ? null : repositoryReference);
}
Aggregations