fyi: https://issues.apache.org/jira/browse/OAK-1721
On Wed, Apr 9, 2014 at 10:42 PM, Tobias Bocanegra <[email protected]> wrote: > Hi, > > for [0] I need to "login" to the content repository - but I don't know > how to acquire it. it seems that it is neither registered as OSGi > service, nor in the global whiteboard (if there would be one). > > so basically I need to do: > > ContentSession session = contentRepository.login(...); > Root root = session.getLatestRoot(); > UserManager userManager = > securityProvider.getConfiguration(UserConfiguration.class) > .getUserManager(root, NamePathMapper.DEFAULT); > > in a service. I think that we probably should register the > ContentRepository in the global whiteboard: > > in Oak.createContentRepository(...): > > @@ -548,13 +548,15 @@ public class Oak { > > - return new ContentRepositoryImpl( > + ContentRepositoryImpl repository = new ContentRepositoryImpl( > store, > CompositeHook.compose(commitHooks), > defaultWorkspaceName, > queryEngineSettings, > indexProvider, > securityProvider); > + whiteboard.register(ContentRepository.class, repository, > Collections.emptyMap()); > + return repository; > } > > WDYT? > > Regards, Toby > > > [0] https://issues.apache.org/jira/browse/OAK-1711
