FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
UIExportList Class Reference
Inheritance diagram for UIExportList:
Inheritance graph
Collaboration diagram for UIExportList:
Collaboration graph

Public Member Functions

 setDelimiter ($delimiter=',')
 
 setEnclosure ($enclosure='"')
 
 RegisterMenus ()
 Customize submenus.
 
 getAgentPksFromRequest ($upload_pk)
 
 getTemplateName ()
 
 Output ()
 This function returns the scheduler status.
 
 getCopyrights ($uploadId, $uploadtree_pk, $uploadTreeTableName, $NomostListNum, $exclude, $copyrightType="all")
 
- Public Member Functions inherited from FO_Plugin
 Install ()
 This function (when defined) is only called when the plugin is first installed. It should make sure all requirements are available and create anything it needs to run. It returns 0 on success, non-zero on failure. A failed install is not inserted in the system. More...
 
 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...
 
 Initialize ()
 dummy stub till all references are removed.
 
 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...
 
 RegisterMenus ()
 While menus can be added to any time at or after the PostInitialize phase, this is the standard location for registering this item with menus. 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 ()
 
 Output ()
 This function is called when user output is requested. This function is responsible for content. (OutputOpen and Output are separated so one plugin can call another plugin's Output.)
 
 getTemplateName ()
 
 renderString ($templateName, $vars=null)
 
 renderScripts ($scripts)
 Render JavaScript in the template's footer. More...
 
 getRequest ()
 
 execute ()
 
 preInstall ()
 
 postInstall ()
 
 unInstall ()
 
 getName ()
 
 __toString ()
 

Protected Attributes

 $delimiter = ','
 
 $enclosure = '"'
 
- Protected Attributes inherited from FO_Plugin
 $microMenu
 
 $renderer
 
 $vars = array()
 

Private Member Functions

 updateCopyrightList (&$list, $newCopyrights, $NomostListNum, $uploadTreeTableName, $key)
 
 removeCopyrightWithLicense (&$lines, $itemTreeBounds, $agentList, $exclude)
 
 consolidateConclusions ($conclusions)
 
 removeIfKeyExists (&$lines, $key)
 
 printLines ($lines, $copyright=false)
 
 printCSV ($lines, $uploadtreeTablename, $copyright=false)
 
 reduceCopyrightLines ($lines)
 

Private Attributes

 $uploadDao
 
 $licenseDao
 
 $clearingDao
 
 $copyrightDao
 
 $clearingFilter
 
 $treeDao
 

Additional Inherited Members

- 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
 
- Protected Member Functions inherited from FO_Plugin
 render ($templateName, $vars=null)
 

Detailed Description

Print the founded and concluded license or copyrights as a list or CSV.

Definition at line 42 of file ui-export-list.php.

Member Function Documentation

UIExportList::consolidateConclusions (   $conclusions)
private

Reduce the 2D list of conclusions on a file to a linear array

Parameters
array$conclusions2D array of conclusions
Returns
array List of unique conclusions on the file

Definition at line 470 of file ui-export-list.php.

UIExportList::getAgentPksFromRequest (   $upload_pk)

Get the agent IDs for requested agents.

Parameters
integer$upload_pkCurrent upload id
Returns
array Array with agent name as key and agent id if found or false as value.

Definition at line 149 of file ui-export-list.php.

UIExportList::getCopyrights (   $uploadId,
  $uploadtree_pk,
  $uploadTreeTableName,
  $NomostListNum,
  $exclude,
  $copyrightType = "all" 
)

Get the list of copyrights

Parameters
integer$uploadIdUpload ID
integer$uploadtree_pkItem ID
integer$uploadTreeTableNameUpload tree table name
integer$NomostListNumLimit of lines to print
integer$excludeFiles to be excluded
string$copyrightTypeWhich copyrights to print ("all" to print everything, "nolic" to print only files with no scanner findings and no license as conclusion)
Returns
array List of copyrights with filePath and content

Definition at line 354 of file ui-export-list.php.

UIExportList::getTemplateName ( )

See also
FO_Plugin::getTemplateName()

Definition at line 231 of file ui-export-list.php.

UIExportList::printCSV (   $lines,
  $uploadtreeTablename,
  $copyright = false 
)
private

Print the lines as CSV

Parameters
array$linesLines to be printed
string$uploadtreeTablenameUpload tree table name
boolean$copyrightResults are copyright?
Returns
Response CSV file as a response

Definition at line 532 of file ui-export-list.php.

UIExportList::printLines (   $lines,
  $copyright = false 
)
private

Print the lines for browser

Parameters
array$linesLines to be printed
boolean$copyrightResults are copyright?
Returns
string

Definition at line 503 of file ui-export-list.php.

UIExportList::reduceCopyrightLines (   $lines)
private

Reduce multidimentional copyright list to simple 2D array

Parameters
array$linesCopyright list
Returns
array Simple 2D array

Definition at line 590 of file ui-export-list.php.

UIExportList::removeCopyrightWithLicense ( $lines,
  $itemTreeBounds,
  $agentList,
  $exclude 
)
private

Remove all files which either have license findings and not remove, or have at least one license as conclusion

Parameters
array[in,out]$lines Lines to be filtered
ItemTreeBounds$itemTreeBoundsItem bounds
array$agentListList of agent IDs
string$excludeFiles to be excluded

Definition at line 435 of file ui-export-list.php.

UIExportList::removeIfKeyExists ( $lines,
  $key 
)
private

Remove key from a list if it exists

Note
Uses strpos to find the key
Parameters
array[in,out]$lines Array
string$keyKey to be removed

Definition at line 487 of file ui-export-list.php.

UIExportList::setDelimiter (   $delimiter = ',')

Set the delimiter for CSV

Parameters
string$delimiterThe delimiter to be used (max len 1)

Definition at line 97 of file ui-export-list.php.

UIExportList::setEnclosure (   $enclosure = '"')

Set the enclosure for CSV

Parameters
string$enclosureThe enclosure to be used (max len 1)

Definition at line 106 of file ui-export-list.php.

UIExportList::updateCopyrightList ( $list,
  $newCopyrights,
  $NomostListNum,
  $uploadTreeTableName,
  $key 
)
private

Update the list of copyrights with new list

Parameters
array[in,out]$list List of copyrights
array$newCopyrightsList of copyrights to be included
integer$NomostListNumLimit of copyrights
string$uploadTreeTableNameUpload tree table name
string$keyKey of the array holding copyright

Definition at line 409 of file ui-export-list.php.

Member Data Documentation

ClearingDao UIExportList::$clearingDao
private

Clearing Dao object

Definition at line 54 of file ui-export-list.php.

ClearingDecisionFilte UIExportList::$clearingFilter
private

Clearing filer

Definition at line 62 of file ui-export-list.php.

CopyrightDao UIExportList::$copyrightDao
private

CopyrightDao object

Definition at line 58 of file ui-export-list.php.

string UIExportList::$delimiter = ','
protected

Delimiter for CSV

Definition at line 70 of file ui-export-list.php.

string UIExportList::$enclosure = '"'
protected

Enclosure for strings in CSV

Definition at line 74 of file ui-export-list.php.

LicenseDao UIExportList::$licenseDao
private

License Dao object

Definition at line 50 of file ui-export-list.php.

TreeDao UIExportList::$treeDao
private

TreeDao to get file path

Definition at line 66 of file ui-export-list.php.

UploadDao UIExportList::$uploadDao
private

Upload Dao object

Definition at line 46 of file ui-export-list.php.


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