FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\Lib\Report\ReportUtils Class Reference
Collaboration diagram for Fossology\Lib\Report\ReportUtils:
Collaboration graph

Public Member Functions

 addClearingStatus (&$filesWithLicenses, ItemTreeBounds $itemTreeBounds, $groupId)
 Add clearing status to the files. More...
 
 addScannerResults (&$filesWithLicenses, ItemTreeBounds $itemTreeBounds, $groupId, &$licensesInDocument)
 Attach finding agents to the files and return names of scanners. More...
 
 getFilesWithLicensesFromClearings (ItemTreeBounds $itemTreeBounds, $groupId, $agentObj, &$licensesInDocument)
 Given an ItemTreeBounds, get the files with clearings. More...
 
 updateOrInsertReportgenEntry ($upload_fk, $job_fk, $filepath)
 

Protected Attributes

 $agentNames = AgentRef::AGENT_LIST
 
 $container
 
 $dbManager
 

Private Attributes

 $licenseMap
 
 $uploadDao
 
 $licenseDao
 
 $clearingDao
 

Detailed Description

Definition at line 29 of file ReportUtils.php.

Member Function Documentation

◆ addClearingStatus()

Fossology\Lib\Report\ReportUtils::addClearingStatus ( $filesWithLicenses,
ItemTreeBounds  $itemTreeBounds,
  $groupId 
)

Add clearing status to the files.

Parameters
FileNode[]&$filesWithLicenses
ItemTreeBounds$itemTreeBounds
int$groupId

Definition at line 79 of file ReportUtils.php.

◆ addScannerResults()

Fossology\Lib\Report\ReportUtils::addScannerResults ( $filesWithLicenses,
ItemTreeBounds  $itemTreeBounds,
  $groupId,
$licensesInDocument 
)

Attach finding agents to the files and return names of scanners.

Parameters
FileNode[]&$filesWithLicenses
ItemTreeBounds$itemTreeBounds
int$groupId
SpdxLicenseInfo[]&$licensesInDocument
Returns
array Name(s) of scanners used

Definition at line 109 of file ReportUtils.php.

◆ getFilesWithLicensesFromClearings()

Fossology\Lib\Report\ReportUtils::getFilesWithLicensesFromClearings ( ItemTreeBounds  $itemTreeBounds,
  $groupId,
  $agentObj,
$licensesInDocument 
)

Given an ItemTreeBounds, get the files with clearings.

Parameters
ItemTreeBounds$itemTreeBounds
int$groupId
Agent$agentObj
SpdxLicenseInfo[]&$licensesInDocument
Returns
FileNode[] Mapping item->FileNode

Definition at line 212 of file ReportUtils.php.

◆ updateOrInsertReportgenEntry()

Fossology\Lib\Report\ReportUtils::updateOrInsertReportgenEntry (   $upload_fk,
  $job_fk,
  $filepath 
)

Update or insert an entry in the reportgen table.

This function checks if an entry with the specified upload_fk and filepath exists in the reportgen table. If it exists, it updates the job_fk for that row. If it does not exist, a new row is inserted with the provided values.

Parameters
int$upload_fkForeign key for the upload.
int$job_fkID of the job to be updated or inserted.
string$filepathFilepath associated with the entry.

Definition at line 302 of file ReportUtils.php.

Member Data Documentation

◆ $agentNames

array Fossology\Lib\Report\ReportUtils::$agentNames = AgentRef::AGENT_LIST
protected

Agent names mapping

Definition at line 34 of file ReportUtils.php.

◆ $clearingDao

ClearingDao Fossology\Lib\Report\ReportUtils::$clearingDao
private

ClearingDao object

Definition at line 59 of file ReportUtils.php.

◆ $container

ContainerBuilder Fossology\Lib\Report\ReportUtils::$container
protected

Symfony DI container

Definition at line 38 of file ReportUtils.php.

◆ $dbManager

DbManager Fossology\Lib\Report\ReportUtils::$dbManager
protected

DbManager object

Definition at line 46 of file ReportUtils.php.

◆ $licenseDao

LicenseDao Fossology\Lib\Report\ReportUtils::$licenseDao
private

LicenseDao object

Definition at line 54 of file ReportUtils.php.

◆ $licenseMap

LicenseMap Fossology\Lib\Report\ReportUtils::$licenseMap
private

LicenseMap object

Definition at line 42 of file ReportUtils.php.

◆ $uploadDao

UploadDao Fossology\Lib\Report\ReportUtils::$uploadDao
private

UploadDao object

Definition at line 50 of file ReportUtils.php.


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