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

Public Member Functions

 Install ()
 Create and configure database tables.
 
 RegisterMenus ()
 Customize submenus.
 
 Initialize ()
 This is called before the plugin is used. More...
 
 Create_file_picker ()
 Create file_picker table.
 
 HTMLFileList ($File1uploadtree_pk, $Children, $FolderContents)
 Given an $File1uploadtree_pk, $Children are non artifact children of $File1uploadtree_pk. More...
 
 HTMLPath ($File1uploadtree_pk, $FolderList, $DirectoryList)
 
 HistoryPick ($uploadtree_pk, &$rtncount)
 pick history More...
 
 SuggestionsPick ($FileName, $uploadtree_pk, &$rtncount)
 Search the whole repository for containers with names similar to $FileName (based on the beggining text of $FileName) More...
 
 BrowsePick ($uploadtree_pk, $inBrowseuploadtree_pk, $infolder_pk, $PathArray)
 file browser More...
 
 GetFolderContents ($folder_pk)
 
 HTMLout ($RtnMod, $uploadtree_pk, $Browseuploadtree_pk, $folder_pk, $PathArray)
 the html format out info More...
 
 Output ()
 The Picker page. More...
 
- 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 ()
 

Public Attributes

 $HighlightColor = '#4bfe78'
 
- 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

 ApplicationPick ($SLName, $SelectedVal, $label)
 Generate html to pick the application that will be called after the items are identified. More...
 
- Protected Member Functions inherited from FO_Plugin
 render ($templateName, $vars=null)
 

Private Member Functions

 Uploadtree2PathStr ($PathArray)
 Get string representation of uploadtree path. Use Dir2Path to get $PathArray. More...
 

Private Attributes

 $uploadDao
 

Additional Inherited Members

- Protected Attributes inherited from FO_Plugin
 $microMenu
 
 $renderer
 
 $vars = array()
 

Detailed Description

Member Function Documentation

ui_picker::ApplicationPick (   $SLName,
  $SelectedVal,
  $label 
)
protected

Generate html to pick the application that will be called after the items are identified.

Select list element ID is "apick"

Parameters
$SLName- select list name
$SelectedVal- selected value
$label- label of select list
Returns
string containing html to pick the application that will be called after the items are identified
Examples:
/home/travis/build/GMishx/fossology/src/www/ui/ui-picker.php.

Definition at line 739 of file ui-picker.php.

ui_picker::BrowsePick (   $uploadtree_pk,
  $inBrowseuploadtree_pk,
  $infolder_pk,
  $PathArray 
)

file browser

Returns
the HTML for the File browser.
Examples:
/home/travis/build/GMishx/fossology/src/www/ui/ui-picker.php.

Definition at line 432 of file ui-picker.php.

ui_picker::HistoryPick (   $uploadtree_pk,
$rtncount 
)

pick history

Parameters
$uploadtree_pk- for File 1 (aka item1)

return html for the history pick, may be empty array if no history.

Examples:
/home/travis/build/GMishx/fossology/src/www/ui/ui-picker.php.

Definition at line 327 of file ui-picker.php.

ui_picker::HTMLFileList (   $File1uploadtree_pk,
  $Children,
  $FolderContents 
)

Given an $File1uploadtree_pk, $Children are non artifact children of $File1uploadtree_pk.

Returns
a string with the html table, file listing (the browse tree), for these children.
Examples:
/home/travis/build/GMishx/fossology/src/www/ui/ui-picker.php.

Definition at line 157 of file ui-picker.php.

ui_picker::HTMLout (   $RtnMod,
  $uploadtree_pk,
  $Browseuploadtree_pk,
  $folder_pk,
  $PathArray 
)

the html format out info

Parameters
$RtnMod- module to run after a file is picked
$uploadtree_pk- of file1
$Browseuploadtree_pk- uploadtree_pk selected in file browser (may be empty)
$folder_pk- folder_pk selected in file browser (may be empty)
$PathArray- path to uploadtree_pk (array of uploadtree recs)

Script to run when item2 is selected Compare app is id=apick arg: "rtnmod" is the compare app arg: "item" is uploadtree_pk arg: "item2" is val

Suggestions. Suggestions are restricted to the same file type (rpm, bz2, etc) to keep the user from being overwhelmed with choices. So if they want to compare a .bz2 with a .gz, they will have to use the Browse Window.

Examples:
/home/travis/build/GMishx/fossology/src/www/ui/ui-picker.php.

Definition at line 562 of file ui-picker.php.

ui_picker::Initialize ( )

This is called before the plugin is used.

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.
Examples:
/home/travis/build/GMishx/fossology/src/www/ui/ui-picker.php.

Definition at line 101 of file ui-picker.php.

ui_picker::Output ( )

The Picker page.

create table if it doesn't exist (not assuming Install() was run. eg. source update

After picking an item2, this logic will record the pick in the picker history, and then redirect both item1 and item2 to the comparison app.

Examples:
/home/travis/build/GMishx/fossology/src/www/ui/ui-picker.php.

Definition at line 635 of file ui-picker.php.

ui_picker::SuggestionsPick (   $FileName,
  $uploadtree_pk,
$rtncount 
)

Search the whole repository for containers with names similar to $FileName (based on the beggining text of $FileName)

Parameters
$uploadtree_pk- the pk of $FileName.
Returns
html (select list) for picking suggestions.
Examples:
/home/travis/build/GMishx/fossology/src/www/ui/ui-picker.php.

Definition at line 380 of file ui-picker.php.

ui_picker::Uploadtree2PathStr (   $PathArray)
private

Get string representation of uploadtree path. Use Dir2Path to get $PathArray.

Parameters
$PathArryan array containing the path
Returns
string representation of uploadtree path
Examples:
/home/travis/build/GMishx/fossology/src/www/ui/ui-picker.php.

Definition at line 715 of file ui-picker.php.


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