FOSSology  4.7.1
Open Source License Compliance by Open Source Software
Fossology\Reuser\ReuseComparePlugin Class Reference

Compare files in the current upload against their counterparts from the reused upload source. Shows histogram, diff tree, and license comparison similar to the Enhanced Reuse view. More...

Inheritance diagram for Fossology\Reuser\ReuseComparePlugin:
Inheritance graph
Collaboration diagram for Fossology\Reuser\ReuseComparePlugin:
Collaboration graph

Public Member Functions

 preInstall ()
 
- Public Member Functions inherited from Fossology\Lib\Plugin\DefaultPlugin
 __construct ($name, $parameters=array())
 
 getName ()
 
 getVersion ()
 
 getTitle ()
 
 isRequiresLogin ()
 
 getDependency ()
 
 getPluginLevel ()
 
 getDBaccess ()
 
 getState ()
 
 getInitOrder ()
 
 getNoMenu ()
 
 getResponse ()
 
 getObject ($name)
 
 postInstall ()
 
 unInstall ()
 
 execute ()
 
 isLoggedIn ()
 
 __get ($name)
 
 __toString ()
 

Public Attributes

const NAME = "reusecompare"
 
- Public Attributes inherited from Fossology\Lib\Plugin\DefaultPlugin
const PERMISSION = "permission"
 
const REQUIRES_LOGIN = "requiresLogin"
 
const ENABLE_MENU = "ENABLE_MENU"
 
const LEVEL = "level"
 
const DEPENDENCIES = "dependencies"
 
const INIT_ORDER = "initOrder"
 
const MENU_LIST = "menuList"
 
const MENU_ORDER = "menuOrder"
 
const MENU_TARGET = "menuTarget"
 
const TITLE = "title"
 
 $fileLogger
 

Protected Member Functions

 handle (Request $request)
 
- Protected Member Functions inherited from Fossology\Lib\Plugin\DefaultPlugin
 RegisterMenus ()
 Customize submenus.
 
 render ($templateName, $vars=null, $headers=null)
 
 getDefaultHeaders ()
 
 getDefaultVars ()
 
 mergeWithDefault ($vars)
 
 flushContent ($content)
 

Private Member Functions

 buildDiffRow ($child1, $child2, $uploadId, $reuseUploadId, $tableName, $reuseTableName, $uri)
 
 batchGetLicensesForUpload ($uploadFk, $lft, $rgt, $tableName)
 
 getAllNonArtifactDescendants ($itemRow, $tableName)
 

Private Attributes

 $dbManager
 
 $uploadDao
 

Additional Inherited Members

- Protected Attributes inherited from Fossology\Lib\Plugin\DefaultPlugin
 $container
 
 $renderer
 
 $microMenu
 

Detailed Description

Compare files in the current upload against their counterparts from the reused upload source. Shows histogram, diff tree, and license comparison similar to the Enhanced Reuse view.

Definition at line 29 of file ReuseComparePlugin.php.

Member Function Documentation

◆ batchGetLicensesForUpload()

Fossology\Reuser\ReuseComparePlugin::batchGetLicensesForUpload (   $uploadFk,
  $lft,
  $rgt,
  $tableName 
)
private

Get licenses for all files within an upload tree boundary via subquery.

Definition at line 322 of file ReuseComparePlugin.php.

◆ buildDiffRow()

Fossology\Reuser\ReuseComparePlugin::buildDiffRow (   $child1,
  $child2,
  $uploadId,
  $reuseUploadId,
  $tableName,
  $reuseTableName,
  $uri 
)
private

Build a diff tree row for a matched/unmatched file pair.

Definition at line 273 of file ReuseComparePlugin.php.

◆ getAllNonArtifactDescendants()

Fossology\Reuser\ReuseComparePlugin::getAllNonArtifactDescendants (   $itemRow,
  $tableName 
)
private

Recursively get all non-artifact descendant files under an upload tree node using the lft/rgt nested-set range. Returns rows in the same format as GetNonArtifactChildren (uploadtree + pfile columns).

Parameters
array$itemRowRow from uploadtree table (must have lft, rgt, uploadtree_pk, upload_fk)
string$tableName
Returns
array

Definition at line 359 of file ReuseComparePlugin.php.

◆ handle()

Fossology\Reuser\ReuseComparePlugin::handle ( Request  $request)
protected
Parameters
Request$request
Returns
Response

Reimplemented from Fossology\Lib\Plugin\DefaultPlugin.

Definition at line 61 of file ReuseComparePlugin.php.


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