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

Compare License Browser, list license histogram. More...

Inheritance diagram for ui_nomos_diff:
Inheritance graph
Collaboration diagram for ui_nomos_diff:
Collaboration graph

Public Member Functions

 Install ()
 Create and configure database tables. More...
 
 RegisterMenus ()
 Customize submenus. More...
 
 Initialize ()
 This is called before the plugin is used. More...
 
 GetTreeInfo ($Uploadtree_pk)
 get an array with uploadtree record and agent_pk More...
 
 UploadHist ($Uploadtree_pk, $TreeInfo)
 get history info for the directory BY LICENSE. More...
 
 ChildElt ($Child, $agent_pk, $OtherChild)
 get the entire <td> ... </td> for $Child file listing table More...
 
 ItemComparisonRows ($Master, $agent_pk1, $agent_pk2)
 get a string with the html table rows comparing the two file lists. More...
 
 AddLicStr ($TreeInfo, &$Children)
 Add license array to Children array. More...
 
 filter_samehash (&$Master)
 removes identical files More...
 
 filter_samelic (&$Master)
 removes files that have the same name and license list.
 
 filter_samelicfuzzy (&$Master)
 removes files that have the same fuzzyname, and same license list.
 
 filter_nolics (&$Master)
 removes pairs of "No_license_found" More...
 
 FilterChildren ($filter, &$Master)
 filter children through same license, same hash, no license, same fuzzy license More...
 
 HTMLout ($Master, $uploadtree_pk1, $uploadtree_pk2, $in_uploadtree_pk1, $in_uploadtree_pk2, $filter, $TreeInfo1, $TreeInfo2)
 HTML output, returns HTML as string.
 
 Output ()
 generate output information More...
 
- Public Member Functions inherited from FO_Plugin
 Remove ()
 This function (when defined) is only called once, when the plugin is removed. It should uninstall and remove all items that are only used by this plugin. There should be no residues – if the plugin is ever installed again, it should act like a clean install. Thus, any DB, files, or state variables specific to this plugin must be removed. This function must always succeed.
 
 __construct ()
 base constructor. Most plugins will just use this More...
 
 PostInitialize ()
 This function is called before the plugin is used and after all plugins have been initialized. If there is any initialization step that is dependent on other plugins, put it here. More...
 
 Destroy ()
 This is a destructor called after the plugin is no longer needed. It should assume that PostInitialize() was already run one time (this session) and succeeded. This function must always succeed.
 
 OutputOpen ()
 This function is called when user output is requested. This function is responsible for assigning headers.
 
 OutputUnSet ()
 Similar to OutputClose, this ends the output type for this object. However, this does NOT change any global settings. This is called when this object is a dependency for another object.
 
 getResponse ()
 
 getTemplateName ()
 
 renderString ($templateName, $vars=null)
 
 renderScripts ($scripts)
 Render JavaScript in the template's footer. More...
 
 getRequest ()
 
 execute ()
 
 preInstall ()
 
 postInstall ()
 
 unInstall ()
 
 getName ()
 
 __toString ()
 

Public Attributes

 $Name = "nomosdiff"
 
 $Title = TITLE_UI_NOMOS_DIFF
 
 $Version = "1.0"
 
 $Dependency
 
 $DBaccess = PLUGIN_DB_READ
 
 $LoginFlag = 0
 
 $ColumnSeparatorStyleL = "style='border:solid 0 #006600; border-left-width:2px;padding-left:1em'"
 
- Public Attributes inherited from FO_Plugin
 $State = PLUGIN_STATE_INVALID
 
 $Name = ""
 
 $Version = "1.0"
 
 $Title = ""
 
 $DBaccess = PLUGIN_DB_NONE
 
 $LoginFlag = 0
 
 $NoMenu = 0
 
 $NoHeader = 0
 
 $PluginLevel = 10
 
 $Dependency = array()
 
 $InitOrder = 0
 
 $MenuList = NULL
 
 $MenuOrder = 0
 
 $MenuTarget = NULL
 
 $OutputType = "HTML"
 
 $OutputToStdout = 0
 

Additional Inherited Members

- Protected Member Functions inherited from FO_Plugin
 render ($templateName, $vars=null)
 
- Protected Attributes inherited from FO_Plugin
 $microMenu
 
 $renderer
 
 $vars = array()
 

Detailed Description

Compare License Browser, list license histogram.

Definition at line 20 of file nomos-diff.php.

Member Function Documentation

◆ AddLicStr()

ui_nomos_diff::AddLicStr (   $TreeInfo,
$Children 
)

Add license array to Children array.

do not get duplicated licenses

Definition at line 327 of file nomos-diff.php.

◆ ChildElt()

ui_nomos_diff::ChildElt (   $Child,
  $agent_pk,
  $OtherChild 
)

get the entire <td> ... </td> for $Child file listing table

License differences are highlighted.

Returns
string The entire <td> ... </td>

Definition at line 234 of file nomos-diff.php.

◆ filter_nolics()

ui_nomos_diff::filter_nolics ( $Master)

removes pairs of "No_license_found"

Or pairs that only have one file and "No_license_found"

Uses fuzzyname.

Definition at line 418 of file nomos-diff.php.

◆ filter_samehash()

ui_nomos_diff::filter_samehash ( $Master)

removes identical files

If a child pair are identical remove the master record

Definition at line 347 of file nomos-diff.php.

◆ FilterChildren()

ui_nomos_diff::FilterChildren (   $filter,
$Master 
)

filter children through same license, same hash, no license, same fuzzy license

Parameters
$filternone, samelic, samehash An empty or unknown filter is the same as "none"

Definition at line 455 of file nomos-diff.php.

◆ GetTreeInfo()

ui_nomos_diff::GetTreeInfo (   $Uploadtree_pk)

get an array with uploadtree record and agent_pk

Parameters
integer$Uploadtree_pkUpload tree id to be retrieved
Returns
array Array with uploadtree record and agent_pk

Definition at line 134 of file nomos-diff.php.

◆ Initialize()

ui_nomos_diff::Initialize ( )

This is called before the plugin is used.

It should assume that Install() was already run one time (possibly years ago and not during this object's creation).

Returns
true on success, false on failure. A failed initialize is not used by the system.
Note
This function must NOT assume that other plugins are installed.
See also
FO_Plugin::Initialize()

Reimplemented from FO_Plugin.

Definition at line 111 of file nomos-diff.php.

◆ Install()

ui_nomos_diff::Install ( )

Create and configure database tables.

See also
FO_Plugin::Install()

Reimplemented from FO_Plugin.

Definition at line 73 of file nomos-diff.php.

◆ ItemComparisonRows()

ui_nomos_diff::ItemComparisonRows (   $Master,
  $agent_pk1,
  $agent_pk2 
)

get a string with the html table rows comparing the two file lists.

Each row contains 5 table fields. The third field is just for a column separator. If files match their fuzzyname then put on the same row. Highlight license differences. Unmatched fuzzynames go on a row of their own.

Definition at line 289 of file nomos-diff.php.

◆ Output()

ui_nomos_diff::Output ( )

generate output information

  • filter: optional filter to apply
  • item1: uploadtree_pk of the column 1 tree
  • item2: uploadtree_pk of the column 2 tree
  • freeze: column number (1 or 2) to freeze

Reimplemented from FO_Plugin.

Definition at line 648 of file nomos-diff.php.

◆ RegisterMenus()

ui_nomos_diff::RegisterMenus ( )

Customize submenus.

See also
FO_Plugin::RegisterMenus()

Reimplemented from FO_Plugin.

Definition at line 89 of file nomos-diff.php.

◆ UploadHist()

ui_nomos_diff::UploadHist (   $Uploadtree_pk,
  $TreeInfo 
)

get history info for the directory BY LICENSE.

Parameters
$Uploadtree_pkUploadtree_pk
$TreeInfoTree info generated by GetTreeInfo()
Returns
string A string with the histogram for the directory BY LICENSE.

Definition at line 152 of file nomos-diff.php.

Member Data Documentation

◆ $ColumnSeparatorStyleL

string ui_nomos_diff::$ColumnSeparatorStyleL = "style='border:solid 0 #006600; border-left-width:2px;padding-left:1em'"

CSS style for columns

Definition at line 67 of file nomos-diff.php.

◆ $DBaccess

string ui_nomos_diff::$DBaccess = PLUGIN_DB_READ

DB access required

Definition at line 55 of file nomos-diff.php.

◆ $Dependency

array ui_nomos_diff::$Dependency
Initial value:
= array(
"browse",
"view"
)

Plugin dependencies

Definition at line 46 of file nomos-diff.php.

◆ $LoginFlag

integer ui_nomos_diff::$LoginFlag = 0

User need not to be logged-in

Definition at line 61 of file nomos-diff.php.

◆ $Name

string ui_nomos_diff::$Name = "nomosdiff"

Name of the UI mod

Definition at line 27 of file nomos-diff.php.

◆ $Title

string ui_nomos_diff::$Title = TITLE_UI_NOMOS_DIFF

HTML title

Definition at line 33 of file nomos-diff.php.

◆ $Version

string ui_nomos_diff::$Version = "1.0"

Version of the plugin

Definition at line 39 of file nomos-diff.php.


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