FOSSology  3.2.0rc1
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)
 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)
 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
 
 $eccClearedGetter
 
 $licenseIrrelevantGetter
 
 $licenseDNUGetter
 
 $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 Member Functions inherited from Fossology\Lib\Agent\Agent
 processUploadId ($uploadId)
 Given an upload ID, process the items in it. 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 125 of file unifiedreport.php.

Member Function Documentation

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 447 of file unifiedreport.php.

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 335 of file unifiedreport.php.

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 540 of file unifiedreport.php.

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

Irrelevant files in report.

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

Definition at line 587 of file unifiedreport.php.

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

Generate global license table.

Parameters
Section$section
array$mainLicenses
array$titleSubHeading

Definition at line 394 of file unifiedreport.php.

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

License histogram into report.

Parameters
Section$section
array$dataHistogram
array$titleSubHeading

Definition at line 623 of file unifiedreport.php.

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 490 of file unifiedreport.php.

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.
See also
Fossology::Lib::Agent::Agent::processUploadId()

Definition at line 260 of file unifiedreport.php.

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

Update database with generated report path.

Parameters
int$uploadId
int$jobId
string$filename

Definition at line 839 of file unifiedreport.php.

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 655 of file unifiedreport.php.

Member Data Documentation

BulkMatchesGetter UnifiedReport::$bulkMatchesGetter
private

BulkMatchesGetter object

Definition at line 160 of file unifiedreport.php.

cpClearedGetter UnifiedReport::$cpClearedGetter
private

Copyright clearance object

Definition at line 140 of file unifiedreport.php.

eccClearedGetter UnifiedReport::$eccClearedGetter
private

ECC clearance object

Definition at line 145 of file unifiedreport.php.

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

File path column style attributes

Definition at line 227 of file unifiedreport.php.

string UnifiedReport::$groupBy
private
Todo:
Unused variable

Definition at line 234 of file unifiedreport.php.

LicenseClearedGetter UnifiedReport::$licenseClearedGetter
private

LicenseClearedGetter object

Definition at line 130 of file unifiedreport.php.

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

License column style attributes

Definition at line 212 of file unifiedreport.php.

LicenseDNUGetter UnifiedReport::$licenseDNUGetter
private

LicenseDNUGetter object

Definition at line 155 of file unifiedreport.php.

licenseIrrelevantCommentGetter UnifiedReport::$licenseIrrelevantCommentGetter
private

licenseIrrelevantCommentGetter object

Definition at line 165 of file unifiedreport.php.

LicenseIrrelevantGetter UnifiedReport::$licenseIrrelevantGetter
private

LicenseIrrelevantGetter object

Definition at line 150 of file unifiedreport.php.

LicenseMainGetter UnifiedReport::$licenseMainGetter
private

LicenseMainGetter object

Definition at line 135 of file unifiedreport.php.

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

License column text style attributes

Definition at line 219 of file unifiedreport.php.

obligationsGetter UnifiedReport::$obligationsGetter
private

obligationsGetter object

Definition at line 170 of file unifiedreport.php.

OtherGetter UnifiedReport::$otherGetter
private

otherGetter object

Definition at line 175 of file unifiedreport.php.

int UnifiedReport::$rowHeight = 500
private

Row height for table

Definition at line 190 of file unifiedreport.php.

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

Sub heading style attributes

Definition at line 204 of file unifiedreport.php.

array UnifiedReport::$tablestyle
private
Initial value:
= array("borderSize" => 2,
"name" => "Arial",
"borderColor" => "000000",
"cellSpacing" => 5
)

Table style attributes

Definition at line 195 of file unifiedreport.php.

UploadDao UnifiedReport::$uploadDao
private

UploadDao object

Definition at line 180 of file unifiedreport.php.

UserDao UnifiedReport::$userDao
private

UserDao object

Definition at line 185 of file unifiedreport.php.


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