![]() |
FOSSology
4.7.1
Open Source License Compliance by Open Source Software
|

Public Member Functions | |
| __construct (DbManager $dbManager, AgentDao $agentDao, CopyrightDao $copyrightDao, LicenseDao $licenseDao, UploadDao $uploadDao, ClearingDao $clearingDao) | |
| setUserId (int $userId) | |
| setGroupId (int $groupId) | |
| setUploadId (int $uploadId) | |
| createClearingDecisions (FoDecisionData &$reportData, DecisionImporterAgent &$agentObj) | |
| createReportData (FoDecisionData &$reportData) | |
| createCopyrightData (FoDecisionData &$reportData, DecisionImporterAgent &$agentObj, string $agentName, int $jobId) | |
| Create copyright and sibling agent's related data in DB. More... | |
| createMonkBulkData (FoDecisionData &$reportData, DecisionImporterAgent &$agentObj) | |
| Create monkbulk findings from the report. More... | |
| createMainLicenses (FoDecisionData &$reportData, int $uploadId, int $groupId) | |
Private Member Functions | |
| createCxJobs (string $agentName, int $currentJobId, int $agentId) | |
| getClearingEventForLrb (array $clearingEventList, int $oldLrbId) | |
| createMonkBulkJobs (int $bulkId) | |
Private Attributes | |
| $dbManager | |
| $agentDao | |
| $copyrightDao | |
| $licenseDao | |
| $uploadDao | |
| $clearingDao | |
| $userId | |
| $groupId | |
| $uploadId | |
This class contains all the helper functions to create data from JSON report in database.
Definition at line 31 of file DecisionImporterDataCreator.php.
| Fossology\DecisionImporter\DecisionImporterDataCreator::__construct | ( | DbManager | $dbManager, |
| AgentDao | $agentDao, | ||
| CopyrightDao | $copyrightDao, | ||
| LicenseDao | $licenseDao, | ||
| UploadDao | $uploadDao, | ||
| ClearingDao | $clearingDao | ||
| ) |
| DbManager | $dbManager | DbManager to use |
| AgentDao | $agentDao | AgentDao to use |
| CopyrightDao | $copyrightDao | CopyrightDao to use |
| LicenseDao | $licenseDao | LicenseDao to use |
| UploadDao | $uploadDao | UploadDao to use |
| ClearingDao | $clearingDao | ClearingDao to use |
Definition at line 95 of file DecisionImporterDataCreator.php.
| Fossology\DecisionImporter\DecisionImporterDataCreator::createClearingDecisions | ( | FoDecisionData & | $reportData, |
| DecisionImporterAgent & | $agentObj | ||
| ) |
It creates the clearing decisions and events from the report.
| FoDecisionData | $reportData | The FoDecisionData object that contains the data to be imported. |
| DecisionImporterAgent | $agentObj | Agent object to send heartbeats |
Definition at line 136 of file DecisionImporterDataCreator.php.
| Fossology\DecisionImporter\DecisionImporterDataCreator::createCopyrightData | ( | FoDecisionData & | $reportData, |
| DecisionImporterAgent & | $agentObj, | ||
| string | $agentName, | ||
| int | $jobId | ||
| ) |
Create copyright and sibling agent's related data in DB.
Take the report data and create an entry for the agent in job queue. It then imports the agent data from report. It then creates records for decisions and events.
| FoDecisionData | $reportData | The report data object. |
| DecisionImporterAgent | $agentObj | Agent object to send heartbeats |
| string | $agentName | The name of the agent. (can be "copyright", "ecc" or "ipra") |
| int | $jobId | Current job id |
Definition at line 282 of file DecisionImporterDataCreator.php.
|
private |
It creates a job for the agent or return if it already exists. Thn marks it as completed, and then writes the agent record to the database.
| string | $agentName | The name of the agent to create a job for. |
| int | $currentJobId | The job queue id of the current job. |
| int | $agentId | The latest agent ID of the agent you want to run. |
Definition at line 407 of file DecisionImporterDataCreator.php.
| Fossology\DecisionImporter\DecisionImporterDataCreator::createMainLicenses | ( | FoDecisionData & | $reportData, |
| int | $uploadId, | ||
| int | $groupId | ||
| ) |
Create main license entries for the upload
| FoDecisionData | $reportData | |
| int | $uploadId | |
| int | $groupId |
Definition at line 576 of file DecisionImporterDataCreator.php.
| Fossology\DecisionImporter\DecisionImporterDataCreator::createMonkBulkData | ( | FoDecisionData & | $reportData, |
| DecisionImporterAgent & | $agentObj | ||
| ) |
Create monkbulk findings from the report.
license_ref_bulk and license_set_bulk entries.clearing_event entries with job_fkhighlight_bulk entries. | FoDecisionData | $reportData | |
| DecisionImporterAgent | $agentObj |
Definition at line 436 of file DecisionImporterDataCreator.php.
|
private |
It creates a job and job queue for the monkbulk job agents. Then marks them as completed, and writes the agent ars records to the database.
| int | $bulkId | license_ref_bulk ID to create jobs for. |
Definition at line 543 of file DecisionImporterDataCreator.php.
| Fossology\DecisionImporter\DecisionImporterDataCreator::createReportData | ( | FoDecisionData & | $reportData | ) |
Insert report conf data from report into the database
| FoDecisionData | $reportData | The report data object. |
Definition at line 226 of file DecisionImporterDataCreator.php.
|
private |
From the clearing event list, get the old clearing event id for a given license_ref_bulk id
| array | $clearingEventList | |
| int | $oldLrbId |
Definition at line 527 of file DecisionImporterDataCreator.php.
| Fossology\DecisionImporter\DecisionImporterDataCreator::setGroupId | ( | int | $groupId | ) |
| int | $groupId |
Definition at line 117 of file DecisionImporterDataCreator.php.
| Fossology\DecisionImporter\DecisionImporterDataCreator::setUploadId | ( | int | $uploadId | ) |
| int | $uploadId |
Definition at line 125 of file DecisionImporterDataCreator.php.
| Fossology\DecisionImporter\DecisionImporterDataCreator::setUserId | ( | int | $userId | ) |
| int | $userId |
Definition at line 109 of file DecisionImporterDataCreator.php.
|
private |
AgentDao object
Definition at line 43 of file DecisionImporterDataCreator.php.
|
private |
ClearingDao object
Definition at line 67 of file DecisionImporterDataCreator.php.
|
private |
CopyrightDao object
Definition at line 49 of file DecisionImporterDataCreator.php.
|
private |
DbManager object
Definition at line 37 of file DecisionImporterDataCreator.php.
|
private |
Group ID to use while creating records.
Definition at line 79 of file DecisionImporterDataCreator.php.
|
private |
LicenseDao object
Definition at line 55 of file DecisionImporterDataCreator.php.
|
private |
UploadDao object
Definition at line 61 of file DecisionImporterDataCreator.php.
|
private |
Upload for which import is working.
Definition at line 85 of file DecisionImporterDataCreator.php.
|
private |
User ID to use while creating records.
Definition at line 73 of file DecisionImporterDataCreator.php.