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

Readme_OSS agent generates list of licenses and copyrights found in an upload. More...

Inheritance diagram for ReadmeOssAgent:
Inheritance graph
Collaboration diagram for ReadmeOssAgent:
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...
 

Public Attributes

const UPLOAD_ADDS = "uploadsAdd"
 The HTTP GET parameter name.
 

Protected Attributes

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

Private Member Functions

 writeReport ($contents, $uploadId)
 Write data to text file. More...
 
 updateReportTable ($uploadId, $jobId, $filename)
 Update the report path. More...
 
 createReadMeOSSFormat ($addSeparator, $dataForReadME, $extract, $break)
 This function lists elements of array. More...
 
 generateReport ($contents, $packageName)
 Gather all the data. More...
 

Private Attributes

 $licenseClearedGetter
 
 $cpClearedGetter
 
 $licenseMainGetter
 
 $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

Readme_OSS agent generates list of licenses and copyrights found in an upload.

Definition at line 51 of file readmeoss.php.

Member Function Documentation

◆ createReadMeOSSFormat()

ReadmeOssAgent::createReadMeOSSFormat (   $addSeparator,
  $dataForReadME,
  $extract,
  $break 
)
private

This function lists elements of array.

Parameters
string$addSeparatorSeparator to be used
string$dataForReadMEArray of content
string$extractData to be extracted from $dataForReadME
string$breakLine break string
Returns
string Formated report

Definition at line 186 of file readmeoss.php.

◆ generateReport()

ReadmeOssAgent::generateReport (   $contents,
  $packageName 
)
private

Gather all the data.

Parameters
array$contentsArray of contents with licenseMain, licenses and licenseAcknowledgements keys.
string$packageNamePackage for which the report is generated
Returns
string ReadmeOSS report

Definition at line 208 of file readmeoss.php.

◆ processUploadId()

ReadmeOssAgent::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()
Todo:
Without wrapper

Reimplemented from Fossology\Lib\Agent\Agent.

Definition at line 98 of file readmeoss.php.

◆ updateReportTable()

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

Update the report path.

Parameters
int$uploadIdUpload ID
int$jobIdJob ID
string$filenamePath of the file

Definition at line 173 of file readmeoss.php.

◆ writeReport()

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

Write data to text file.

Parameters
array$contentsContents of the report
int$uploadIdID of the upload

Definition at line 143 of file readmeoss.php.

Member Data Documentation

◆ $additionalUploadIds

int ReadmeOssAgent::$additionalUploadIds = array()
protected

Additional Uploads to be included in report

Definition at line 78 of file readmeoss.php.

◆ $cpClearedGetter

XpClearedGetter ReadmeOssAgent::$cpClearedGetter
private

XpClearedGetter object

Definition at line 63 of file readmeoss.php.

◆ $licenseClearedGetter

LicenseClearedGetter ReadmeOssAgent::$licenseClearedGetter
private

LicenseClearedGetter object

Definition at line 58 of file readmeoss.php.

◆ $licenseMainGetter

LicenseMainGetter ReadmeOssAgent::$licenseMainGetter
private

LicenseMainGetter object

Definition at line 68 of file readmeoss.php.

◆ $uploadDao

UploadDao ReadmeOssAgent::$uploadDao
private

UploadDao object

Definition at line 73 of file readmeoss.php.


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