FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\DecisionImporter\DecisionImporterAgent Class Reference

Import decisions generated by Decision Exporter from JSON files. More...

Inheritance diagram for Fossology\DecisionImporter\DecisionImporterAgent:
Inheritance graph
Collaboration diagram for Fossology\DecisionImporter\DecisionImporterAgent:
Collaboration graph

Public Member Functions

 __construct ()
 
 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...
 

Public Attributes

const REPORT_KEY = "report"
 Key used to pass report name.
 
const LONG_OPT_KEYS = ["userselect"]
 Other CLI args required by agents.
 

Static Public Attributes

static $UPDATE_COUNT = 1000
 

Private Member Functions

 processArgs ()
 

Private Attributes

 $report
 
 $setUserId
 
 $reportData
 
 $decisionImporterUtils
 
 $decisionImporterDataCreator
 

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

Import decisions generated by Decision Exporter from JSON files.

Definition at line 35 of file DecisionImporterAgent.php.

Constructor & Destructor Documentation

◆ __construct()

Fossology\DecisionImporter\DecisionImporterAgent::__construct ( )
Exceptions
Exception

Definition at line 79 of file DecisionImporterAgent.php.

Member Function Documentation

◆ processArgs()

Fossology\DecisionImporter\DecisionImporterAgent::processArgs ( )
private

Process args and extract additional values.

Definition at line 150 of file DecisionImporterAgent.php.

◆ processUploadId()

Fossology\DecisionImporter\DecisionImporterAgent::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
Exceptions
ExceptionThrows Exception if anything goes wrong.
See also
Fossology::Lib::Agent::Agent::processUploadId()

Reimplemented from Fossology\Lib\Agent\Agent.

Definition at line 106 of file DecisionImporterAgent.php.

Member Data Documentation

◆ $decisionImporterDataCreator

DecisionImporterDataCreator Fossology\DecisionImporter\DecisionImporterAgent::$decisionImporterDataCreator
private

Creator object

Definition at line 74 of file DecisionImporterAgent.php.

◆ $decisionImporterUtils

DecisionImporterIdFetcher Fossology\DecisionImporter\DecisionImporterAgent::$decisionImporterUtils
private

Fetcher object

Definition at line 68 of file DecisionImporterAgent.php.

◆ $report

string Fossology\DecisionImporter\DecisionImporterAgent::$report
private

Location of JSON report.

Definition at line 50 of file DecisionImporterAgent.php.

◆ $reportData

FoDecisionData Fossology\DecisionImporter\DecisionImporterAgent::$reportData
private

Object holding report data

Definition at line 62 of file DecisionImporterAgent.php.

◆ $setUserId

int Fossology\DecisionImporter\DecisionImporterAgent::$setUserId
private

User ID to use while creating decisions.

Definition at line 56 of file DecisionImporterAgent.php.

◆ $UPDATE_COUNT

int Fossology\DecisionImporter\DecisionImporterAgent::$UPDATE_COUNT = 1000
static

How many rows to update at once to DB

Definition at line 41 of file DecisionImporterAgent.php.


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