use of com.synopsys.integration.detect.workflow.blackduck.font.OnlineDetectFontLocator in project synopsys-detect by blackducksoftware.
the class DetectFontLoaderFactory method detectFontLoader.
public DetectFontLoader detectFontLoader() {
DetectFontLocator locator;
Optional<File> fontAirGapPath = airGapInspectorPaths.getFontsAirGapDirectory();
if (fontAirGapPath.isPresent()) {
locator = new AirGapFontLocator(airGapInspectorPaths);
} else {
locator = new OnlineDetectFontLocator(new DetectFontInstaller(artifactResolver, installedToolManager, installedToolLocator), directoryManager);
}
return new DetectFontLoader(locator);
}
use of com.synopsys.integration.detect.workflow.blackduck.font.OnlineDetectFontLocator in project synopsys-detect by blackducksoftware.
the class FontLoaderTestIT method createTempDirectory.
@BeforeEach
public void createTempDirectory() throws Exception {
fontDirectory = Files.createTempDirectory("junit_test_font_loader").toFile();
PropertyConfiguration propertyConfiguration = new PropertyConfiguration(Collections.emptyList());
Gson gson = new Gson();
DetectConfigurationFactory detectConfigurationFactory = new DetectConfigurationFactory(new DetectPropertyConfiguration(propertyConfiguration, new SimplePathResolver()), gson);
ConnectionFactory connectionFactory = new ConnectionFactory(detectConfigurationFactory.createConnectionDetails());
ArtifactResolver artifactResolver = new ArtifactResolver(connectionFactory, gson);
InstalledToolManager installedToolManager = new InstalledToolManager();
InstalledToolLocator installedToolLocator = new InstalledToolLocator(Paths.get(""), new Gson());
DetectFontInstaller installer = new DetectFontInstaller(artifactResolver, installedToolManager, installedToolLocator);
DirectoryOptions directoryOptions = new DirectoryOptions(null, null, null, null, fontDirectory.toPath(), null);
DirectoryManager directoryManager = new DirectoryManager(directoryOptions, DetectRunId.createDefault());
detectFontLocator = new OnlineDetectFontLocator(installer, directoryManager);
}
Aggregations