FOSSology  4.4.0
Open Source License Compliance by Open Source Software
DecisionExporter Class Reference

Generates Decision Exporter JSON. More...

Inheritance diagram for DecisionExporter:
Inheritance graph
Collaboration diagram for DecisionExporter:
Collaboration graph

Public Member Functions

 processUploadId ($uploadId)
 Given an upload ID, process the items in it. 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...
 

Private Member Functions

 writeReport ($contents, $uploadId)
 Writes the data to a json file. More...
 
 insertPfileData ($uploadId, $pfileData, $tableName)
 Create database table. More...
 
 createPfileTable ($uploadId, $tableName)
 Create database table. More...
 
 dropPfileTable ($uploadId, $tableName)
 Create database table. More...
 
 updateReportTable ($uploadId, $jobId, $filename)
 Update database with generated report path. More...
 

Private Attributes

 $uploadDao
 
 $allDecisionsDao
 
 $clearingDao
 

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...
 
- Protected Attributes inherited from Fossology\Lib\Agent\Agent
 $userId
 
 $groupId
 
 $jobId
 
 $agentSpecifOptions = ""
 
 $agentSpecifLongOptions = array()
 
 $args = array()
 
 $dbManager
 
 $agentDao
 
 $container
 
 $schedulerMode
 

Detailed Description

Generates Decision Exporter JSON.

Definition at line 22 of file decisionexporter.php.

Member Function Documentation

◆ createPfileTable()

DecisionExporter::createPfileTable (   $uploadId,
  $tableName 
)
private

Create database table.

Parameters
int$uploadId

Definition at line 177 of file decisionexporter.php.

◆ dropPfileTable()

DecisionExporter::dropPfileTable (   $uploadId,
  $tableName 
)
private

Create database table.

Parameters
int$uploadId

Definition at line 187 of file decisionexporter.php.

◆ insertPfileData()

DecisionExporter::insertPfileData (   $uploadId,
  $pfileData,
  $tableName 
)
private

Create database table.

Parameters
int$uploadId
array$pfileData

Definition at line 165 of file decisionexporter.php.

◆ processUploadId()

DecisionExporter::processUploadId (   $uploadId)

Given an upload ID, process the items in it.

This function is implemented by agent and should call heartbeat() at regular intervals.

Parameters
int$uploadIdUpload to be processed by the agent.
Returns
bool Process status
See also
Fossology::Lib::Agent::Agent::processUploadId()

Reimplemented from Fossology\Lib\Agent\Agent.

Definition at line 54 of file decisionexporter.php.

◆ updateReportTable()

DecisionExporter::updateReportTable (   $uploadId,
  $jobId,
  $filename 
)
private

Update database with generated report path.

Parameters
int$uploadId
int$jobId
string$filename

Definition at line 199 of file decisionexporter.php.

◆ writeReport()

DecisionExporter::writeReport (   $contents,
  $uploadId 
)
private

Writes the data to a json file.

The file name is of format FOSSology_Decisions_<packageName>_<d_m_Y_H_i_s>.json.

Parameters
array$contents
int$uploadId

Definition at line 141 of file decisionexporter.php.

Member Data Documentation

◆ $allDecisionsDao

AllDecisionsDao DecisionExporter::$allDecisionsDao
private

AllDecisionsDao object

Definition at line 32 of file decisionexporter.php.

◆ $clearingDao

ClearingDao DecisionExporter::$clearingDao
private

ClearingDao object

Definition at line 38 of file decisionexporter.php.


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