FOSSology
4.4.0
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 30 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 94 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 135 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 275 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 400 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 568 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_fk
highlight_bulk
entries. FoDecisionData | $reportData | |
DecisionImporterAgent | $agentObj |
Definition at line 429 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 536 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 225 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 520 of file DecisionImporterDataCreator.php.
Fossology\DecisionImporter\DecisionImporterDataCreator::setGroupId | ( | int | $groupId | ) |
int | $groupId |
Definition at line 116 of file DecisionImporterDataCreator.php.
Fossology\DecisionImporter\DecisionImporterDataCreator::setUploadId | ( | int | $uploadId | ) |
int | $uploadId |
Definition at line 124 of file DecisionImporterDataCreator.php.
Fossology\DecisionImporter\DecisionImporterDataCreator::setUserId | ( | int | $userId | ) |
int | $userId |
Definition at line 108 of file DecisionImporterDataCreator.php.
|
private |
AgentDao object
Definition at line 42 of file DecisionImporterDataCreator.php.
|
private |
ClearingDao object
Definition at line 66 of file DecisionImporterDataCreator.php.
|
private |
CopyrightDao object
Definition at line 48 of file DecisionImporterDataCreator.php.
|
private |
DbManager object
Definition at line 36 of file DecisionImporterDataCreator.php.
|
private |
Group ID to use while creating records.
Definition at line 78 of file DecisionImporterDataCreator.php.
|
private |
LicenseDao object
Definition at line 54 of file DecisionImporterDataCreator.php.
|
private |
UploadDao object
Definition at line 60 of file DecisionImporterDataCreator.php.
|
private |
Upload for which import is working.
Definition at line 84 of file DecisionImporterDataCreator.php.
|
private |
User ID to use while creating records.
Definition at line 72 of file DecisionImporterDataCreator.php.