Search in sources :

Example 1 with ServiceRegistryProvider

use of org.apache.jackrabbit.oak.run.osgi.ServiceRegistryProvider in project jackrabbit-oak by apache.

the class RepositoryStartupServlet method configWebConsoleSecurityProvider.

private void configWebConsoleSecurityProvider(Repository repository) {
    if (repository instanceof ServiceRegistryProvider) {
        PojoServiceRegistry registry = ((ServiceRegistryProvider) repository).getServiceRegistry();
        registry.registerService(WebConsoleSecurityProvider.class.getName(), new RepositorySecurityProvider(repository), null);
    }
}
Also used : PojoServiceRegistry(org.apache.felix.connect.launch.PojoServiceRegistry) WebConsoleSecurityProvider(org.apache.felix.webconsole.WebConsoleSecurityProvider) ServiceRegistryProvider(org.apache.jackrabbit.oak.run.osgi.ServiceRegistryProvider)

Example 2 with ServiceRegistryProvider

use of org.apache.jackrabbit.oak.run.osgi.ServiceRegistryProvider in project jackrabbit-oak by apache.

the class WebConsoleSupport method postConstruct.

@PostConstruct
private void postConstruct() throws Exception {
    PojoServiceRegistry reg = ((ServiceRegistryProvider) repository).getServiceRegistry();
    //Configure repository backed SecurityProvider
    reg.registerService(WebConsoleSecurityProvider.class.getName(), new RepositorySecurityProvider(), null);
    //Expose the Spring Application context to Script Console access
    reg.registerService(ApplicationContext.class.getName(), context, null);
}
Also used : PojoServiceRegistry(org.apache.felix.connect.launch.PojoServiceRegistry) ApplicationContext(org.springframework.context.ApplicationContext) WebConsoleSecurityProvider(org.apache.felix.webconsole.WebConsoleSecurityProvider) ServiceRegistryProvider(org.apache.jackrabbit.oak.run.osgi.ServiceRegistryProvider) PostConstruct(javax.annotation.PostConstruct)

Aggregations

PojoServiceRegistry (org.apache.felix.connect.launch.PojoServiceRegistry)2 WebConsoleSecurityProvider (org.apache.felix.webconsole.WebConsoleSecurityProvider)2 ServiceRegistryProvider (org.apache.jackrabbit.oak.run.osgi.ServiceRegistryProvider)2 PostConstruct (javax.annotation.PostConstruct)1 ApplicationContext (org.springframework.context.ApplicationContext)1