FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\Spasht\SpashtAgent Class Reference

The Spasht agent. More...

Inheritance diagram for Fossology\Spasht\SpashtAgent:
Inheritance graph
Collaboration diagram for Fossology\Spasht\SpashtAgent:
Collaboration graph

Public Member Functions

 processUploadId ($uploadId)
 Run Spasht Agent for a package. 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

 searchUploadIdInSpasht ($uploadId)
 
 getInformation ($details, $pfileSha1AndpfileId)
 
 insertLicensesSpashtAgentRecord ($body, $agentId)
 Insert the License Details in Spasht Agent table. More...
 
 insertCopyrightSpashtAgentRecord ($body, $agentId)
 Insert the Copyright Details in Spasht Agent table. More...
 

Private Member Functions

 separateLicenses ($rawLicenses)
 

Private Attributes

 $uploadDao
 
 $spashtDao
 
 $licenseDao
 

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

The Spasht agent.

Definition at line 26 of file SpashtAgent.php.

Member Function Documentation

◆ getInformation()

Fossology\Spasht\SpashtAgent::getInformation (   $details,
  $pfileSha1AndpfileId 
)
protected

Search pfile for uploads into clearlydefined

Parameters
Coordinate$details
array$pfileSha1AndpfileIdAssociated pfile and sha1 array
Returns
array Array containing license, copyright and pfile info. String containing error message if and error occurred

Guzzle/http Guzzle Client that connect with ClearlyDefined API

Definition at line 118 of file SpashtAgent.php.

◆ insertCopyrightSpashtAgentRecord()

Fossology\Spasht\SpashtAgent::insertCopyrightSpashtAgentRecord (   $body,
  $agentId 
)
protected

Insert the Copyright Details in Spasht Agent table.

Parameters
$agentIdInteger
$licenseArray

Definition at line 270 of file SpashtAgent.php.

◆ insertLicensesSpashtAgentRecord()

Fossology\Spasht\SpashtAgent::insertLicensesSpashtAgentRecord (   $body,
  $agentId 
)
protected

Insert the License Details in Spasht Agent table.

Parameters
$body
$agentId

Definition at line 239 of file SpashtAgent.php.

◆ processUploadId()

Fossology\Spasht\SpashtAgent::processUploadId (   $uploadId)

Run Spasht Agent for a package.

Parameters
$uploadIdInteger
See also
Fossology::Lib::Agent::Agent::processUploadId()

Reimplemented from Fossology\Lib\Agent\Agent.

Definition at line 60 of file SpashtAgent.php.

◆ searchUploadIdInSpasht()

Fossology\Spasht\SpashtAgent::searchUploadIdInSpasht (   $uploadId)
protected

This function is responsible for available upload in the spasht db. If the upload is available then only the spasht agent will run.

Parameters
integer$uploadId
Returns
Coordinate|boolean

Definition at line 99 of file SpashtAgent.php.

◆ separateLicenses()

Fossology\Spasht\SpashtAgent::separateLicenses (   $rawLicenses)
private

Convert the license string into fossology format

Parameters
string$rawLicensesLicense name
Returns
string Fossology license shortname

Definition at line 202 of file SpashtAgent.php.

Member Data Documentation

◆ $licenseDao

LicenseDao Fossology\Spasht\SpashtAgent::$licenseDao
private

LicenseDao object

Definition at line 45 of file SpashtAgent.php.

◆ $spashtDao

SpashtDao Fossology\Spasht\SpashtAgent::$spashtDao
private

SpashtDao object

Definition at line 39 of file SpashtAgent.php.

◆ $uploadDao

UploadDao Fossology\Spasht\SpashtAgent::$uploadDao
private

UploadDao object

Definition at line 33 of file SpashtAgent.php.


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