use of org.neo4j.server.plugins.ConfigAdapter in project neo4j by neo4j.
the class RestfulGraphDatabaseTest method doBefore.
@BeforeClass
public static void doBefore() throws IOException {
graph = (GraphDatabaseFacade) new TestGraphDatabaseFactory().newImpermanentDatabase();
database = new WrappedDatabase(graph);
helper = new GraphDbHelper(database);
output = new EntityOutputFormat(new JsonFormat(), URI.create(BASE_URI), null);
service = new TransactionWrappingRestfulGraphDatabase(graph, new RestfulGraphDatabase(new JsonFormat(), output, new DatabaseActions(new LeaseManager(Clocks.fakeClock()), true, database.getGraph()), new ConfigAdapter(Config.embeddedDefaults())));
}
use of org.neo4j.server.plugins.ConfigAdapter in project neo4j by neo4j.
the class ExtensionInitializer method initializePackages.
public Collection<Injectable<?>> initializePackages(Iterable<String> packageNames) {
GraphDatabaseAPI graphDatabaseService = neoServer.getDatabase().getGraph();
Config configuration = neoServer.getConfig();
Collection<Injectable<?>> injectables = new HashSet<>();
for (PluginLifecycle lifecycle : lifecycles) {
if (hasPackage(lifecycle, packageNames)) {
if (lifecycle instanceof SPIPluginLifecycle) {
SPIPluginLifecycle lifeCycleSpi = (SPIPluginLifecycle) lifecycle;
injectables.addAll(lifeCycleSpi.start(neoServer));
} else {
injectables.addAll(lifecycle.start(graphDatabaseService, new ConfigAdapter(configuration)));
}
}
}
return injectables;
}
use of org.neo4j.server.plugins.ConfigAdapter 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;
}
Aggregations