Search in sources :

Example 1 with InjectableProvider

use of org.neo4j.server.database.InjectableProvider in project neo4j by neo4j.

the class AbstractNeoServer method createDefaultInjectables.

protected Collection<InjectableProvider<?>> createDefaultInjectables() {
    Collection<InjectableProvider<?>> singletons = new ArrayList<>();
    Database database = getDatabase();
    singletons.add(new DatabaseProvider(database));
    singletons.add(new DatabaseActions.Provider(databaseActions));
    singletons.add(new GraphDatabaseServiceProvider(database));
    singletons.add(new NeoServerProvider(this));
    singletons.add(providerForSingleton(new ConfigAdapter(getConfig()), Configuration.class));
    singletons.add(providerForSingleton(getConfig(), Config.class));
    singletons.add(new WebServerProvider(getWebServer()));
    PluginInvocatorProvider pluginInvocatorProvider = new PluginInvocatorProvider(this);
    singletons.add(pluginInvocatorProvider);
    RepresentationFormatRepository repository = new RepresentationFormatRepository(this);
    singletons.add(new InputFormatProvider(repository));
    singletons.add(new OutputFormatProvider(repository));
    singletons.add(new CypherExecutorProvider(cypherExecutor));
    singletons.add(providerForSingleton(transactionFacade, TransactionFacade.class));
    singletons.add(providerFromSupplier(authManagerSupplier, AuthManager.class));
    singletons.add(providerFromSupplier(userManagerSupplier, UserManagerSupplier.class));
    singletons.add(new TransactionFilter(database));
    singletons.add(new LoggingProvider(logProvider));
    singletons.add(providerForSingleton(logProvider.getLog(NeoServer.class), Log.class));
    singletons.add(providerForSingleton(resolveDependency(UsageData.class), UsageData.class));
    return singletons;
}
Also used : DatabaseProvider(org.neo4j.server.database.DatabaseProvider) PluginInvocatorProvider(org.neo4j.server.plugins.PluginInvocatorProvider) TransactionFilter(org.neo4j.server.rest.transactional.TransactionFilter) CypherExecutorProvider(org.neo4j.server.database.CypherExecutorProvider) Configuration(org.apache.commons.configuration.Configuration) UsageData(org.neo4j.udc.UsageData) Config(org.neo4j.kernel.configuration.Config) ArrayList(java.util.ArrayList) UserManagerSupplier(org.neo4j.kernel.api.security.UserManagerSupplier) DatabaseActions(org.neo4j.server.rest.web.DatabaseActions) Database(org.neo4j.server.database.Database) InjectableProvider(org.neo4j.server.database.InjectableProvider) OutputFormatProvider(org.neo4j.server.rest.repr.OutputFormatProvider) InputFormatProvider(org.neo4j.server.rest.repr.InputFormatProvider) ConfigAdapter(org.neo4j.server.plugins.ConfigAdapter) AuthManager(org.neo4j.kernel.api.security.AuthManager) Log(org.neo4j.logging.Log) AsyncRequestLog(org.neo4j.server.web.AsyncRequestLog) TransactionFacade(org.neo4j.server.rest.transactional.TransactionFacade) GraphDatabaseServiceProvider(org.neo4j.server.database.GraphDatabaseServiceProvider) RepresentationFormatRepository(org.neo4j.server.rest.repr.RepresentationFormatRepository) WebServerProvider(org.neo4j.server.web.WebServerProvider)

Example 2 with InjectableProvider

use of org.neo4j.server.database.InjectableProvider in project neo4j by neo4j.

the class JaxRsServletHolderFactory method create.

public ServletHolder create(Collection<InjectableProvider<?>> defaultInjectables, boolean wadlEnabled) {
    Collection<InjectableProvider<?>> injectableProviders = mergeInjectables(defaultInjectables, injectables);
    ServletContainer container = new NeoServletContainer(injectableProviders);
    ServletHolder servletHolder = new ServletHolder(container);
    servletHolder.setInitParameter(ResourceConfig.FEATURE_DISABLE_WADL, String.valueOf(!wadlEnabled));
    configure(servletHolder, toCommaSeparatedList(items));
    servletHolder.setInitParameter(ResourceConfig.PROPERTY_CONTAINER_RESPONSE_FILTERS, AllowAjaxFilter.class.getName());
    servletHolder.setInitParameter(ResourceConfig.PROPERTY_CONTAINER_REQUEST_FILTERS, getRequestFilterConfig());
    return servletHolder;
}
Also used : ServletHolder(org.eclipse.jetty.servlet.ServletHolder) ServletContainer(com.sun.jersey.spi.container.servlet.ServletContainer) InjectableProvider(org.neo4j.server.database.InjectableProvider) AllowAjaxFilter(org.neo4j.server.rest.web.AllowAjaxFilter)

Aggregations

InjectableProvider (org.neo4j.server.database.InjectableProvider)2 ServletContainer (com.sun.jersey.spi.container.servlet.ServletContainer)1 ArrayList (java.util.ArrayList)1 Configuration (org.apache.commons.configuration.Configuration)1 ServletHolder (org.eclipse.jetty.servlet.ServletHolder)1 AuthManager (org.neo4j.kernel.api.security.AuthManager)1 UserManagerSupplier (org.neo4j.kernel.api.security.UserManagerSupplier)1 Config (org.neo4j.kernel.configuration.Config)1 Log (org.neo4j.logging.Log)1 CypherExecutorProvider (org.neo4j.server.database.CypherExecutorProvider)1 Database (org.neo4j.server.database.Database)1 DatabaseProvider (org.neo4j.server.database.DatabaseProvider)1 GraphDatabaseServiceProvider (org.neo4j.server.database.GraphDatabaseServiceProvider)1 ConfigAdapter (org.neo4j.server.plugins.ConfigAdapter)1 PluginInvocatorProvider (org.neo4j.server.plugins.PluginInvocatorProvider)1 InputFormatProvider (org.neo4j.server.rest.repr.InputFormatProvider)1 OutputFormatProvider (org.neo4j.server.rest.repr.OutputFormatProvider)1 RepresentationFormatRepository (org.neo4j.server.rest.repr.RepresentationFormatRepository)1 TransactionFacade (org.neo4j.server.rest.transactional.TransactionFacade)1 TransactionFilter (org.neo4j.server.rest.transactional.TransactionFilter)1