Package com.lpvs.service.scan.scanner
Class LPVSScanossDetectService
java.lang.Object
com.lpvs.service.scan.scanner.LPVSScanossDetectService
- All Implemented Interfaces:
LPVSScanService
Service class responsible for interacting with the Scanoss scanner to scan licenses in files.
It handles the initiation of the scan, processing scan results, and checking for license conflicts.
-
Constructor Summary
ConstructorsConstructorDescriptionLPVSScanossDetectService
(Boolean debug, LPVSLicenseService licenseService, LPVSLicenseRepository lpvsLicenseRepository) Constructor for LPVSScanossDetectService. -
Method Summary
-
Constructor Details
-
LPVSScanossDetectService
@Autowired public LPVSScanossDetectService(@Value("${debug:false}") Boolean debug, LPVSLicenseService licenseService, LPVSLicenseRepository lpvsLicenseRepository) Constructor for LPVSScanossDetectService.- Parameters:
debug
- Flag indicating whether the application is in debug mode.licenseService
- The LPVSLicenseService for license-related operations.lpvsLicenseRepository
- The repository for LPVSLicense entities.
-
-
Method Details
-
runScan
Initiates the Scanoss scan for the specified LPVSQueue and file path.- Specified by:
runScan
in interfaceLPVSScanService
- Parameters:
webhookConfig
- The LPVSQueue representing the GitHub webhook configuration.path
- The file path to be scanned.- Throws:
Exception
- If an error occurs during the scanning process.
-
checkLicenses
Checks the licenses detected by Scanoss and returns a list of LPVSFile entities.- Specified by:
checkLicenses
in interfaceLPVSScanService
- Parameters:
webhookConfig
- The LPVSQueue representing the GitHub webhook configuration.- Returns:
- A list of LPVSFile entities representing detected files and their licenses.
-