FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\SoftwareHeritage\softwareHeritageAgent Class Reference
Inheritance diagram for Fossology\SoftwareHeritage\softwareHeritageAgent:
Inheritance graph
Collaboration diagram for Fossology\SoftwareHeritage\softwareHeritageAgent:
Collaboration graph

Public Member Functions

 __construct ()
 
 processUploadId ($uploadId)
 Run software heritage for a package. More...
 
 processEachPfileForSWH ($pfileDetail, $agentId, $maxTime)
 process each pfile for software heritage and wait till the reset time More...
 
- Public Member Functions inherited from Fossology\Lib\Agent\Agent
 __construct ($agentName, $version, $revision)
 
 scheduler_connect ()
 Connect with scheduler and initialize options. More...
 
 heartbeat ($newProcessed)
 Send hear beat to the scheduler. More...
 
 bail ($exitvalue)
 Bail the agent, print the stack and disconnect from scheduler. More...
 
 scheduler_disconnect ($exitvalue)
 Closes connection from scheduler. More...
 
 scheduler_greet ()
 Greet the scheduler at the beginning of connection. More...
 
 initArsTable ()
 Initialize ARS table.
 
 run_scheduler_event_loop ()
 Runs a loop to read commands from scheduler and process them. More...
 

Protected Member Functions

 getSoftwareHeritageLicense ($sha256)
 Get the license details from software heritage. More...
 
 insertSoftwareHeritageRecord ($pfileId, $licenses, $agentId, $status)
 Insert the License Details in softwareHeritage table. More...
 

Protected Attributes

 $agentDao
 
- Protected Attributes inherited from Fossology\Lib\Agent\Agent
 $userId
 
 $groupId
 
 $jobId
 
 $agentSpecifOptions = ""
 
 $agentSpecifLongOptions = array()
 
 $args = array()
 
 $dbManager
 
 $agentDao
 
 $container
 
 $schedulerMode
 

Private Attributes

 $uploadDao
 
 $licenseDao
 
 $configuration
 
 $dbManeger
 
 $softwareHeritageDao
 

Additional Inherited Members

- Static Public Member Functions inherited from Fossology\Lib\Agent\Agent
static heartbeat_handler ($signo)
 Function to handle hear beats from the agent and send them to the scheduler from STDOUT. More...
 

Detailed Description

Definition at line 31 of file softwareHeritageAgent.php.

Constructor & Destructor Documentation

◆ __construct()

Fossology\SoftwareHeritage\softwareHeritageAgent::__construct ( )

softwareHeritageAgent constructor.

Exceptions

Definition at line 71 of file softwareHeritageAgent.php.

Member Function Documentation

◆ getSoftwareHeritageLicense()

Fossology\SoftwareHeritage\softwareHeritageAgent::getSoftwareHeritageLicense (   $sha256)
protected

Get the license details from software heritage.

Parameters
String$sha256
Returns
array

Definition at line 174 of file softwareHeritageAgent.php.

◆ insertSoftwareHeritageRecord()

Fossology\SoftwareHeritage\softwareHeritageAgent::insertSoftwareHeritageRecord (   $pfileId,
  $licenses,
  $agentId,
  $status 
)
protected

Insert the License Details in softwareHeritage table.

Parameters
int$pfileId
array$licenses
int$agentId
Returns
boolean True if finished

Definition at line 216 of file softwareHeritageAgent.php.

◆ processEachPfileForSWH()

Fossology\SoftwareHeritage\softwareHeritageAgent::processEachPfileForSWH (   $pfileDetail,
  $agentId,
  $maxTime 
)

process each pfile for software heritage and wait till the reset time

Parameters
int$pfileDetail
int$maxTime
Returns
bool

Definition at line 148 of file softwareHeritageAgent.php.

◆ processUploadId()

Fossology\SoftwareHeritage\softwareHeritageAgent::processUploadId (   $uploadId)

Run software heritage for a package.

Parameters
int$uploadId
Returns
bool
Exceptions

Reimplemented from Fossology\Lib\Agent\Agent.

Definition at line 124 of file softwareHeritageAgent.php.

Member Data Documentation

◆ $agentDao

AgentDao Fossology\SoftwareHeritage\softwareHeritageAgent::$agentDao
protected

AgentDao object

Definition at line 59 of file softwareHeritageAgent.php.

◆ $configuration

array Fossology\SoftwareHeritage\softwareHeritageAgent::$configuration
private

configuraiton for software heritage api

Definition at line 47 of file softwareHeritageAgent.php.

◆ $dbManeger

DbManager Fossology\SoftwareHeritage\softwareHeritageAgent::$dbManeger
private

DbManeger object

Definition at line 53 of file softwareHeritageAgent.php.

◆ $licenseDao

LicenseDao Fossology\SoftwareHeritage\softwareHeritageAgent::$licenseDao
private

LicenseDao object

Definition at line 41 of file softwareHeritageAgent.php.

◆ $uploadDao

UploadDao Fossology\SoftwareHeritage\softwareHeritageAgent::$uploadDao
private

UploadDao object

Definition at line 36 of file softwareHeritageAgent.php.


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