use of com.synopsys.integration.detect.lifecycle.run.step.utility.OperationWrapper in project synopsys-detect by blackducksoftware.
the class SingletonFactory method createUtilitySingletons.
public UtilitySingletons createUtilitySingletons(EventSingletons eventSingletons) throws DetectUserFriendlyException {
ExternalIdFactory externalIdFactory = new ExternalIdFactory();
ConnectionDetails connectionDetails = detectConfigurationFactory.createConnectionDetails();
ConnectionFactory connectionFactory = new ConnectionFactory(connectionDetails);
ArtifactResolver artifactResolver = new ArtifactResolver(connectionFactory, gson);
ArtifactoryZipInstaller artifactoryZipInstaller = new ArtifactoryZipInstaller(artifactResolver);
AirGapPathFinder airGapPathFinder = new AirGapPathFinder();
BdioOptions bdioOptions = detectConfigurationFactory.createBdioOptions();
CodeLocationNameGenerator codeLocationNameGenerator = detectConfigurationFactory.createCodeLocationOverride().map(CodeLocationNameGenerator::withOverride).orElse(CodeLocationNameGenerator.withPrefixSuffix(bdioOptions.getProjectCodeLocationPrefix().orElse(null), bdioOptions.getProjectCodeLocationSuffix().orElse(null)));
CodeLocationNameManager codeLocationNameManager = new CodeLocationNameManager(codeLocationNameGenerator);
AirGapInspectorPaths airGapInspectorPaths = new AirGapInspectorPaths(airGapPathFinder);
DetectExecutableRunner executableRunner = DetectExecutableRunner.newDebug(eventSystem);
DirectoryExecutableFinder directoryExecutableFinder = DirectoryExecutableFinder.forCurrentOperatingSystem(fileFinder);
SystemPathExecutableFinder systemExecutableFinder = new SystemPathExecutableFinder(directoryExecutableFinder);
DetectExecutableResolver detectExecutableResolver = new DetectExecutableResolver(directoryExecutableFinder, systemExecutableFinder, detectConfigurationFactory.createDetectExecutableOptions());
OperationSystem operationSystem = new OperationSystem(eventSingletons.getStatusEventPublisher());
OperationWrapper operationWrapper = new OperationWrapper();
return new UtilitySingletons(externalIdFactory, connectionDetails, artifactResolver, codeLocationNameManager, airGapInspectorPaths, executableRunner, detectExecutableResolver, operationSystem, operationWrapper, artifactoryZipInstaller);
}
Aggregations