FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\DecisionImporter\DecisionImporterIdFetcher Class Reference
Collaboration diagram for Fossology\DecisionImporter\DecisionImporterIdFetcher:
Collaboration graph

Public Member Functions

 __construct (DbManager $dbManager, PfileDao $pfileDao, LicenseDao $licenseDao)
 
 setGroupId (int $groupId)
 
 setUserId (int $userId)
 
 setUploadId (int $uploadId)
 
 getOrCreateIds (FoDecisionData &$reportData, DecisionImporterAgent &$agentObj)
 

Private Member Functions

 updatePfileIds (array &$pfileList)
 
 updateUploadTreeIds (array &$uploadTreeList, array $pfileList, DecisionImporterAgent &$agentObj)
 
 updateClearingDecision (array &$clearingDecisionList, array $uploadTreeList, array $pfileList)
 
 updateCxList (array &$cxList, array $pfileList)
 
 updateDecisionList (array &$decisionList, array $pfileList)
 
 updateEventList (array &$eventList, array $uploadtreeList)
 
 updateLicenses (array &$licenseList)
 
 updateClearingEvent (array &$clearingEventList, array $uploadTreeList, array $licenseList)
 
 updateLicenseSetBulk (array &$licenseSetBulkList, array $licenseList)
 
 updateMainLicenseList (array &$mainLicenseList, array $licenseList)
 

Private Attributes

 $dbManager
 
 $pfileDao
 
 $licenseDao
 
 $groupId
 
 $userId
 
 $uploadId
 

Detailed Description

Take the report JSON and translate old IDs to IDs from current Database.

Definition at line 26 of file DecisionImporterIdFetcher.php.

Constructor & Destructor Documentation

◆ __construct()

Fossology\DecisionImporter\DecisionImporterIdFetcher::__construct ( DbManager  $dbManager,
PfileDao  $pfileDao,
LicenseDao  $licenseDao 
)
Parameters
DbManager$dbManager
PfileDao$pfileDao
LicenseDao$licenseDao

Definition at line 60 of file DecisionImporterIdFetcher.php.

Member Function Documentation

◆ getOrCreateIds()

Fossology\DecisionImporter\DecisionImporterIdFetcher::getOrCreateIds ( FoDecisionData $reportData,
DecisionImporterAgent $agentObj 
)

Update the IDs from report to IDs from DB.

Parameters
FoDecisionData$reportDataThe report data object.
DecisionImporterAgent$agentObjThe agent object to send heartbeat.

Definition at line 97 of file DecisionImporterIdFetcher.php.

◆ setGroupId()

Fossology\DecisionImporter\DecisionImporterIdFetcher::setGroupId ( int  $groupId)
Parameters
int$groupId

Definition at line 70 of file DecisionImporterIdFetcher.php.

◆ setUploadId()

Fossology\DecisionImporter\DecisionImporterIdFetcher::setUploadId ( int  $uploadId)
Parameters
int$uploadId

Definition at line 86 of file DecisionImporterIdFetcher.php.

◆ setUserId()

Fossology\DecisionImporter\DecisionImporterIdFetcher::setUserId ( int  $userId)
Parameters
int$userId

Definition at line 78 of file DecisionImporterIdFetcher.php.

◆ updateClearingDecision()

Fossology\DecisionImporter\DecisionImporterIdFetcher::updateClearingDecision ( array &  $clearingDecisionList,
array  $uploadTreeList,
array  $pfileList 
)
private

Update pfile id and utree id for clearing decisions.

Parameters
array$clearingDecisionList
array$uploadTreeList
array$pfileList

Definition at line 246 of file DecisionImporterIdFetcher.php.

◆ updateClearingEvent()

Fossology\DecisionImporter\DecisionImporterIdFetcher::updateClearingEvent ( array &  $clearingEventList,
array  $uploadTreeList,
array  $licenseList 
)
private

Update pfile id and license id for clearing events.

Parameters
array$clearingEventList
array$uploadTreeList
array$licenseList

Definition at line 337 of file DecisionImporterIdFetcher.php.

◆ updateCxList()

Fossology\DecisionImporter\DecisionImporterIdFetcher::updateCxList ( array &  $cxList,
array  $pfileList 
)
private

Update pfile id for copyright and sibling agents.

Parameters
array$cxList
array$pfileList

Definition at line 261 of file DecisionImporterIdFetcher.php.

◆ updateDecisionList()

Fossology\DecisionImporter\DecisionImporterIdFetcher::updateDecisionList ( array &  $decisionList,
array  $pfileList 
)
private

Update pfile id for decisions in copyright and sibling agents.

Parameters
array$decisionList
array$pfileList

Definition at line 274 of file DecisionImporterIdFetcher.php.

◆ updateEventList()

Fossology\DecisionImporter\DecisionImporterIdFetcher::updateEventList ( array &  $eventList,
array  $uploadtreeList 
)
private

Update utree id for events in copyright and sibling agents.

Parameters
array$eventList
array$uploadtreeList

Definition at line 287 of file DecisionImporterIdFetcher.php.

◆ updateLicenses()

Fossology\DecisionImporter\DecisionImporterIdFetcher::updateLicenses ( array &  $licenseList)
private

Update license id if shortname exists in DB otherwise create a new license.

Parameters
array$licenseList

Definition at line 304 of file DecisionImporterIdFetcher.php.

◆ updateLicenseSetBulk()

Fossology\DecisionImporter\DecisionImporterIdFetcher::updateLicenseSetBulk ( array &  $licenseSetBulkList,
array  $licenseList 
)
private

Update license ID in license set bulk

Parameters
array$licenseSetBulkList
array$licenseList

Definition at line 352 of file DecisionImporterIdFetcher.php.

◆ updateMainLicenseList()

Fossology\DecisionImporter\DecisionImporterIdFetcher::updateMainLicenseList ( array &  $mainLicenseList,
array  $licenseList 
)
private

Update license ID in main license list

Parameters
array$mainLicenseList
array$licenseList

Definition at line 367 of file DecisionImporterIdFetcher.php.

◆ updatePfileIds()

Fossology\DecisionImporter\DecisionImporterIdFetcher::updatePfileIds ( array &  $pfileList)
private

Update pfile id from database using pfile hash.

Parameters
array$pfileList

Definition at line 171 of file DecisionImporterIdFetcher.php.

◆ updateUploadTreeIds()

Fossology\DecisionImporter\DecisionImporterIdFetcher::updateUploadTreeIds ( array &  $uploadTreeList,
array  $pfileList,
DecisionImporterAgent $agentObj 
)
private

Update upload tree ids using pfile, lft and rgt

Parameters
array$uploadTreeList
array$pfileList
DecisionImporterAgent$agentObjAgent object to send heartbeats

Definition at line 190 of file DecisionImporterIdFetcher.php.

Member Data Documentation

◆ $groupId

int Fossology\DecisionImporter\DecisionImporterIdFetcher::$groupId
private

Current group id

Definition at line 41 of file DecisionImporterIdFetcher.php.

◆ $uploadId

int Fossology\DecisionImporter\DecisionImporterIdFetcher::$uploadId
private

Current upload's id

Definition at line 53 of file DecisionImporterIdFetcher.php.

◆ $userId

int Fossology\DecisionImporter\DecisionImporterIdFetcher::$userId
private

Current user id

Definition at line 47 of file DecisionImporterIdFetcher.php.


The documentation for this class was generated from the following file: