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

Generates unified report. More...

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

 documentSettingsAndStyles (PhpWord &$phpWord, $timestamp, $userName)
 Setting default heading styles and paragraph styles. More...
 
 globalLicenseTable (Section $section, $mainLicenses, $titleSubHeading, $heading)
 Generate global license table. More...
 
 bulkLicenseTable (Section $section, $title, $licenses, $titleSubHeading)
 This function lists out the bulk licenses, comments of identified licenses. More...
 
 licensesTable (Section $section, $title, $licenses, $riskarray, $titleSubHeading)
 This function lists out the red, white & yellow licenses. More...
 
 getRowsAndColumnsForCEI (Section $section, $title, $statementsCEI, $titleSubHeading, $text="")
 Copyright or ecc table. More...
 
 getRowsAndColumnsForIrre (Section $section, $title, $licensesIrre, $titleSubHeading)
 Irrelevant files in report. More...
 
 licenseHistogram (Section $section, $dataHistogram, $titleSubHeading, $heading)
 License histogram into report. More...
 
 writeReport ($contents, $uploadId, $groupId, $userId)
 Writes the report to a file. More...
 
 updateReportTable ($uploadId, $jobId, $filename)
 Update database with generated report path. More...
 

Private Attributes

 $licenseClearedGetter
 
 $licenseMainGetter
 
 $cpClearedGetter
 
 $ipraClearedGetter
 
 $eccClearedGetter
 
 $licenseIrrelevantGetter
 
 $licenseDNUGetter
 
 $licenseNonFunctionalGetter
 
 $bulkMatchesGetter
 
 $licenseIrrelevantCommentGetter
 
 $obligationsGetter
 
 $otherGetter
 
 $uploadDao
 
 $userDao
 
 $rowHeight = 500
 
 $tablestyle
 
 $subHeadingStyle
 
 $licenseColumn
 
 $licenseTextColumn
 
 $filePathColumn
 
 $groupBy
 

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 unified report.

Definition at line 116 of file unifiedreport.php.

Member Function Documentation

◆ bulkLicenseTable()

UnifiedReport::bulkLicenseTable ( Section  $section,
  $title,
  $licenses,
  $titleSubHeading 
)
private

This function lists out the bulk licenses, comments of identified licenses.

Parameters
Section$section
string$title
array$licenses
array$titleSubHeading

Definition at line 470 of file unifiedreport.php.

◆ documentSettingsAndStyles()

UnifiedReport::documentSettingsAndStyles ( PhpWord &  $phpWord,
  $timestamp,
  $userName 
)
private

Setting default heading styles and paragraph styles.

Parameters
[in,out]PhpWord&$phpWordPhpWord object
int$timestampReport gen timestamp
string$userNameUser generating the report

Definition at line 356 of file unifiedreport.php.

◆ getRowsAndColumnsForCEI()

UnifiedReport::getRowsAndColumnsForCEI ( Section  $section,
  $title,
  $statementsCEI,
  $titleSubHeading,
  $text = "" 
)
private

Copyright or ecc table.

Parameters
Section$section
string$title
array$statementsCEI
array$titleSubHeading
string$text

Definition at line 565 of file unifiedreport.php.

◆ getRowsAndColumnsForIrre()

UnifiedReport::getRowsAndColumnsForIrre ( Section  $section,
  $title,
  $licensesIrre,
  $titleSubHeading 
)
private

Irrelevant files in report.

Parameters
Section$section
string$title
array$licensesIrre
array$titleSubHeading

Definition at line 612 of file unifiedreport.php.

◆ globalLicenseTable()

UnifiedReport::globalLicenseTable ( Section  $section,
  $mainLicenses,
  $titleSubHeading,
  $heading 
)
private

Generate global license table.

Parameters
Section$section
array$mainLicenses
array$titleSubHeading
$heading

Definition at line 416 of file unifiedreport.php.

◆ licenseHistogram()

UnifiedReport::licenseHistogram ( Section  $section,
  $dataHistogram,
  $titleSubHeading,
  $heading 
)
private

License histogram into report.

Parameters
Section$section
array$dataHistogram
array$titleSubHeading
$heading

Definition at line 650 of file unifiedreport.php.

◆ licensesTable()

UnifiedReport::licensesTable ( Section  $section,
  $title,
  $licenses,
  $riskarray,
  $titleSubHeading 
)
private

This function lists out the red, white & yellow licenses.

Parameters
Section$section
string$title
array$licenses
array$riskarray
array$titleSubHeading

Definition at line 514 of file unifiedreport.php.

◆ processUploadId()

UnifiedReport::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 268 of file unifiedreport.php.

◆ updateReportTable()

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

Update database with generated report path.

Parameters
int$uploadId
int$jobId
string$filename

Definition at line 964 of file unifiedreport.php.

◆ writeReport()

UnifiedReport::writeReport (   $contents,
  $uploadId,
  $groupId,
  $userId 
)
private

Writes the report to a file.

The file name is of format <packageName>_clearing_report_<D_M_d_m_Y_h_i_s>.docx.

The docx format used is Word2007.

Parameters
array$contents
int$uploadId
int$groupId
int$userId

Definition at line 682 of file unifiedreport.php.

Member Data Documentation

◆ $bulkMatchesGetter

BulkMatchesGetter UnifiedReport::$bulkMatchesGetter
private

BulkMatchesGetter object

Definition at line 162 of file unifiedreport.php.

◆ $cpClearedGetter

XpClearedGetter UnifiedReport::$cpClearedGetter
private

Copyright clearance object

Definition at line 131 of file unifiedreport.php.

◆ $eccClearedGetter

XpClearedGetter UnifiedReport::$eccClearedGetter
private

ECC clearance object

Definition at line 142 of file unifiedreport.php.

◆ $filePathColumn

array UnifiedReport::$filePathColumn
private
Initial value:
= array("size" => "9",
"bold" => false
)

File path column style attributes

Definition at line 231 of file unifiedreport.php.

◆ $groupBy

string UnifiedReport::$groupBy
private
Todo:
Unused variable

Definition at line 238 of file unifiedreport.php.

◆ $ipraClearedGetter

XpClearedGetter UnifiedReport::$ipraClearedGetter
private

IP clearance object

Definition at line 137 of file unifiedreport.php.

◆ $licenseClearedGetter

LicenseClearedGetter UnifiedReport::$licenseClearedGetter
private

LicenseClearedGetter object

Definition at line 121 of file unifiedreport.php.

◆ $licenseColumn

array UnifiedReport::$licenseColumn
private
Initial value:
= array("size" => "9",
"bold" => true
)

License column style attributes

Definition at line 216 of file unifiedreport.php.

◆ $licenseDNUGetter

LicenseDNUGetter UnifiedReport::$licenseDNUGetter
private

LicenseDNUGetter object

Definition at line 152 of file unifiedreport.php.

◆ $licenseIrrelevantCommentGetter

LicenseIrrelevantGetter UnifiedReport::$licenseIrrelevantCommentGetter
private

licenseIrrelevantCommentGetter object

Definition at line 167 of file unifiedreport.php.

◆ $licenseIrrelevantGetter

LicenseIrrelevantGetter UnifiedReport::$licenseIrrelevantGetter
private

LicenseIrrelevantGetter object

Definition at line 147 of file unifiedreport.php.

◆ $licenseMainGetter

LicenseMainGetter UnifiedReport::$licenseMainGetter
private

LicenseMainGetter object

Definition at line 126 of file unifiedreport.php.

◆ $licenseNonFunctionalGetter

LicenseNonFunctionalGetter UnifiedReport::$licenseNonFunctionalGetter
private

LicenseNonFunctionalGetter object

Definition at line 157 of file unifiedreport.php.

◆ $licenseTextColumn

array UnifiedReport::$licenseTextColumn
private
Initial value:
= array("name" => "Courier New",
"size" => 9,
"bold" => false
)

License column text style attributes

Definition at line 223 of file unifiedreport.php.

◆ $obligationsGetter

ObligationsGetter UnifiedReport::$obligationsGetter
private

obligationsGetter object

Definition at line 172 of file unifiedreport.php.

◆ $otherGetter

OtherGetter UnifiedReport::$otherGetter
private

otherGetter object

Definition at line 177 of file unifiedreport.php.

◆ $rowHeight

int UnifiedReport::$rowHeight = 500
private

Row height for table

Definition at line 192 of file unifiedreport.php.

◆ $subHeadingStyle

array UnifiedReport::$subHeadingStyle
private
Initial value:
= array("size" => 9,
"align" => "center",
"bold" => true
)

Sub heading style attributes

Definition at line 208 of file unifiedreport.php.

◆ $tablestyle

array UnifiedReport::$tablestyle
private
Initial value:
= array("borderSize" => 2,
"name" => "Arial",
"borderColor" => "000000",
"cellSpacing" => 5,
"alignment" => JcTable::START,
"layout" => Table::LAYOUT_FIXED
)

Table style attributes

Definition at line 197 of file unifiedreport.php.

◆ $uploadDao

UploadDao UnifiedReport::$uploadDao
private

UploadDao object

Definition at line 182 of file unifiedreport.php.

◆ $userDao

UserDao UnifiedReport::$userDao
private

UserDao object

Definition at line 187 of file unifiedreport.php.


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