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

Public Member Functions

 __construct ()
 
 processUploadId ($uploadId)
 Run reso 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...
 

Public Attributes

const REUSE_FILE_SUFFIX = ".license"
 

Protected Member Functions

 findReSoUploadFiles ($uploadId)
 Find all files with specific suffix. More...
 
 associateBaseFile ($reSoUploadFiles, $uploadTreeTableName)
 Find and associate base file to files containting license info. More...
 
 findAssociatedFile ($row, $uploadTreeTableName)
 Find associated base file. More...
 
 copyOjoFindings ($linkedFiles, $uploadId)
 Copy license from licene holder to base file. More...
 
 copyCopyrightFindings ($linkedFiles, $uploadId)
 Copy copyright from .license file to base file. 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
 

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 25 of file ResoAgent.php.

Constructor & Destructor Documentation

◆ __construct()

Fossology\Reso\ResoAgent::__construct ( )

ResoAgent constructor.

Exceptions

Definition at line 48 of file ResoAgent.php.

Member Function Documentation

◆ associateBaseFile()

Fossology\Reso\ResoAgent::associateBaseFile (   $reSoUploadFiles,
  $uploadTreeTableName 
)
protected

Find and associate base file to files containting license info.

Parameters
array[]$reSoUploadFileslist of uploadtree objects to process
string$uploadTreeTableName- uploadtree table for upload
Returns
array[][] multi-dimensional array with license holding files with associated base files

Definition at line 102 of file ResoAgent.php.

◆ copyCopyrightFindings()

Fossology\Reso\ResoAgent::copyCopyrightFindings (   $linkedFiles,
  $uploadId 
)
protected

Copy copyright from .license file to base file.

Parameters
array[][]$linkedFiles- multi-dimensional array with copyright holding files with associated base files
int$uploadId
Returns
true on success, Error on failure

Definition at line 182 of file ResoAgent.php.

◆ copyOjoFindings()

Fossology\Reso\ResoAgent::copyOjoFindings (   $linkedFiles,
  $uploadId 
)
protected

Copy license from licene holder to base file.

Parameters
array[][]$linkedFiles- multi-dimensional array with license holding files with associated base files
int$uploadId
Returns
true on success, Error on failure

Definition at line 141 of file ResoAgent.php.

◆ findAssociatedFile()

Fossology\Reso\ResoAgent::findAssociatedFile (   $row,
  $uploadTreeTableName 
)
protected

Find associated base file.

Parameters
array[]$row- uploadtree entry to process
string$uploadTreeTableName- uploadtree table for upload
Returns
array[] uploadtree entry containing base file for input param

Definition at line 121 of file ResoAgent.php.

◆ findReSoUploadFiles()

Fossology\Reso\ResoAgent::findReSoUploadFiles (   $uploadId)
protected

Find all files with specific suffix.

Parameters
int$uploadId
Returns
array[] Array of uploadtree objects

Definition at line 82 of file ResoAgent.php.

◆ processUploadId()

Fossology\Reso\ResoAgent::processUploadId (   $uploadId)

Run reso for a package.

Parameters
int$uploadId
Returns
bool
Exceptions

Reimplemented from Fossology\Lib\Agent\Agent.

Definition at line 62 of file ResoAgent.php.

Member Data Documentation

◆ $agentDao

AgentDao Fossology\Reso\ResoAgent::$agentDao
protected

AgentDao object

Definition at line 42 of file ResoAgent.php.

◆ $uploadDao

UploadDao Fossology\Reso\ResoAgent::$uploadDao
private

UploadDao object

Definition at line 36 of file ResoAgent.php.


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