use of org.neo4j.kernel.impl.util.DependencySatisfier in project neo4j by neo4j.
the class EditionModule method setupSecurityModule.
protected static void setupSecurityModule(PlatformModule platformModule, Log log, Procedures procedures, String key) {
for (SecurityModule candidate : Service.load(SecurityModule.class)) {
if (candidate.matches(key)) {
try {
candidate.setup(new SecurityModule.Dependencies() {
@Override
public LogService logService() {
return platformModule.logging;
}
@Override
public Config config() {
return platformModule.config;
}
@Override
public Procedures procedures() {
return procedures;
}
@Override
public JobScheduler scheduler() {
return platformModule.jobScheduler;
}
@Override
public FileSystemAbstraction fileSystem() {
return platformModule.fileSystem;
}
@Override
public LifeSupport lifeSupport() {
return platformModule.life;
}
@Override
public DependencySatisfier dependencySatisfier() {
return platformModule.dependencies;
}
});
return;
} catch (Exception e) {
String errorMessage = "Failed to load security module.";
log.error(errorMessage);
throw new RuntimeException(errorMessage, e);
}
}
}
String errorMessage = "Failed to load security module with key '" + key + "'.";
log.error(errorMessage);
throw new IllegalArgumentException(errorMessage);
}
Aggregations