Skip to content

Commit

Permalink
removed apoc.custom references
Browse files Browse the repository at this point in the history
  • Loading branch information
vga91 committed Sep 2, 2024
1 parent 716388c commit fe6c196
Show file tree
Hide file tree
Showing 23 changed files with 216 additions and 5,680 deletions.
10 changes: 5 additions & 5 deletions extended-it/src/test/java/apoc/neo4j/docker/ApocSplitTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ public class ApocSplitTest {
// "apoc.export.xls.data",
// "apoc.export.xls.graph",
// "apoc.export.xls.query",
"apoc.custom.declareProcedure",
"apoc.custom.declareFunction",
"apoc.custom.list",
"apoc.custom.removeProcedure",
"apoc.custom.removeFunction",
// "apoc.custom.declareProcedure",
// "apoc.custom.declareFunction",
// "apoc.custom.list",
// "apoc.custom.removeProcedure",
// "apoc.custom.removeFunction",
"apoc.uuid.install",
"apoc.uuid.remove",
"apoc.uuid.removeAll",
Expand Down

This file was deleted.

22 changes: 3 additions & 19 deletions extended/src/main/java/apoc/ExtendedApocGlobalComponents.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package apoc;

import apoc.custom.CypherProcedures;
import apoc.custom.CypherProceduresHandler;
import apoc.load.LoadDirectory;
import apoc.load.LoadDirectoryHandler;
import apoc.ttl.TTLLifeCycle;
Expand All @@ -17,26 +15,14 @@
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@ServiceProvider
public class ExtendedApocGlobalComponents implements ApocGlobalComponents {

private final Map<GraphDatabaseService,CypherProceduresHandler> cypherProcedureHandlers = new ConcurrentHashMap<>();

@Override
public Map<String, Lifecycle> getServices(GraphDatabaseAPI db, ApocExtensionFactory.Dependencies dependencies) {


CypherProceduresHandler cypherProcedureHandler = new CypherProceduresHandler(
db,
dependencies.scheduler(),
dependencies.apocConfig(),
dependencies.log().getUserLog(CypherProcedures.class),
dependencies.globalProceduresRegistry()
);
cypherProcedureHandlers.put(db, cypherProcedureHandler);

return Map.of(

"ttl", new TTLLifeCycle(dependencies.scheduler(),
Expand All @@ -53,20 +39,18 @@ public Map<String, Lifecycle> getServices(GraphDatabaseAPI db, ApocExtensionFact

"directory", new LoadDirectoryHandler(db,
dependencies.log().getUserLog(LoadDirectory.class),
dependencies.pools()),
dependencies.pools())

"cypherProcedures", cypherProcedureHandler
);
}

@Override
public Collection<Class> getContextClasses() {
return List.of(CypherProceduresHandler.class, UuidHandler.class, LoadDirectoryHandler.class);
return List.of(UuidHandler.class, LoadDirectoryHandler.class);
}

@Override
public Iterable<AvailabilityListener> getListeners(GraphDatabaseAPI db, ApocExtensionFactory.Dependencies dependencies) {
CypherProceduresHandler cypherProceduresHandler = cypherProcedureHandlers.get(db);
return cypherProceduresHandler==null ? Collections.emptyList() : Collections.singleton(cypherProceduresHandler);
return Collections.emptyList();
}
}
3 changes: 0 additions & 3 deletions extended/src/main/java/apoc/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import static apoc.ExtendedApocConfig.APOC_TTL_SCHEDULE;
import static apoc.ExtendedApocConfig.APOC_UUID_ENABLED;
import static apoc.ExtendedApocConfig.APOC_UUID_FORMAT;
import static apoc.custom.CypherProceduresHandler.CUSTOM_PROCEDURES_REFRESH;

/**
* @author mh
Expand Down Expand Up @@ -70,8 +69,6 @@ public class Config {
"apoc.http.timeout.connect",
"apoc.http.timeout.read",

// apoc.custom.
CUSTOM_PROCEDURES_REFRESH,

// apoc.spatial. - other configs can have sensitive credentials
"apoc.spatial.geocode.osm.throttle",
Expand Down
95 changes: 0 additions & 95 deletions extended/src/main/java/apoc/custom/CustomProcedureInfo.java

This file was deleted.

Loading

0 comments on commit fe6c196

Please sign in to comment.