Search in sources :

Example 1 with QueryEngineProvider

use of org.neo4j.kernel.impl.query.QueryEngineProvider in project neo4j by neo4j.

the class GraphDatabaseDependencies method newDependencies.

public static GraphDatabaseDependencies newDependencies() {
    List<KernelExtensionFactory<?>> kernelExtensions = new ArrayList<>();
    for (KernelExtensionFactory factory : Service.load(KernelExtensionFactory.class)) {
        kernelExtensions.add(factory);
    }
    Map<String, URLAccessRule> urlAccessRules = new HashMap<>();
    urlAccessRules.put("http", URLAccessRules.alwaysPermitted());
    urlAccessRules.put("https", URLAccessRules.alwaysPermitted());
    urlAccessRules.put("ftp", URLAccessRules.alwaysPermitted());
    urlAccessRules.put("file", URLAccessRules.fileAccess());
    List<QueryEngineProvider> queryEngineProviders = asList(Service.load(QueryEngineProvider.class));
    return new GraphDatabaseDependencies(null, null, new ArrayList<>(), kernelExtensions, urlAccessRules, queryEngineProviders);
}
Also used : QueryEngineProvider(org.neo4j.kernel.impl.query.QueryEngineProvider) URLAccessRule(org.neo4j.graphdb.security.URLAccessRule) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) KernelExtensionFactory(org.neo4j.kernel.extension.KernelExtensionFactory)

Aggregations

ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 URLAccessRule (org.neo4j.graphdb.security.URLAccessRule)1 KernelExtensionFactory (org.neo4j.kernel.extension.KernelExtensionFactory)1 QueryEngineProvider (org.neo4j.kernel.impl.query.QueryEngineProvider)1