FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\Scancode\Ui\ScancodesAgentPlugin Class Reference
Inheritance diagram for Fossology\Scancode\Ui\ScancodesAgentPlugin:
Inheritance graph
Collaboration diagram for Fossology\Scancode\Ui\ScancodesAgentPlugin:
Collaboration graph

Public Member Functions

 renderContent (&$vars)
 Render HTML from template. More...
 
 renderFoot (&$vars)
 Render footer HTML. More...
 
 scheduleAgent ($jobId, $uploadId, &$errorMsg, $request)
 Schedule scancode agent. More...
 
 getScanCodeArgs ($flags, $unpackArgs)
 
 AgentHasResults ($uploadId=0)
 
 preInstall ()
 
 isScanCodeInstalled ()
 
- Public Member Functions inherited from Fossology\Lib\Plugin\AgentPlugin
 execute ()
 
 postInstall ()
 
 unInstall ()
 
 getName ()
 
 AgentAdd ($jobId, $uploadId, &$errorMsg, $dependencies=[], $arguments=null, $request=null, $unpackArgs=null)
 
 __toString ()
 

Public Attributes

const SCAN_FLAG = '-'
 
- Public Attributes inherited from Fossology\Lib\Plugin\AgentPlugin
const PRE_JOB_QUEUE = 'preJq'
 
 $AgentName
 
 $Name = "agent_abstract"
 
 $Dependency = array()
 
 $Title = 'how to show checkbox'
 
 $PluginLevel = 10
 
 $State = PLUGIN_STATE_READY
 
 $DBaccess = PLUGIN_DB_WRITE
 

Protected Member Functions

 isAgentIncluded ($dependencies, $agentName)
 
- Protected Member Functions inherited from Fossology\Lib\Plugin\AgentPlugin
 doAgentAdd ($jobId, $uploadId, &$errorMsg, $dependencies, $jqargs="", $jq_cmd_args=null, $request=null)
 
 implicitAgentAdd ($jobId, $uploadId, &$errorMsg, $dependency, $request)
 

Detailed Description

Definition at line 13 of file agent-scancode.php.

Member Function Documentation

◆ AgentHasResults()

Fossology\Scancode\Ui\ScancodesAgentPlugin::AgentHasResults (   $uploadId = 0)

Parameters
int$uploadId
Returns
int
  • 0 = no or this agent can be re run multiple times
  • 1 = yes, from latest agent version
  • 2 = yes, from older agent version
See also
Fossology::Lib::Plugin::AgentPlugin::AgentHasResults()

Reimplemented from Fossology\Lib\Plugin\AgentPlugin.

Definition at line 116 of file agent-scancode.php.

◆ getScanCodeArgs()

Fossology\Scancode\Ui\ScancodesAgentPlugin::getScanCodeArgs (   $flags,
  $unpackArgs 
)

Translate request flags to agent's args string

Parameters
string[]$flagsArray of flags
string$unpackArgsUnpack agent args
Returns
null|string NULL if no args created, string otherwise

Definition at line 83 of file agent-scancode.php.

◆ isAgentIncluded()

Fossology\Scancode\Ui\ScancodesAgentPlugin::isAgentIncluded (   $dependencies,
  $agentName 
)
protected

Check if agent already included in the dependency list

Parameters
mixed$dependenciesArray of job dependencies
string$agentNameName of the agent to be checked for
Returns
boolean true if agent already in dependency list else false

Definition at line 127 of file agent-scancode.php.

◆ isScanCodeInstalled()

Fossology\Scancode\Ui\ScancodesAgentPlugin::isScanCodeInstalled ( )

Is scancode-toolkit installed on the system?

Checks if scancode executable exists

Definition at line 154 of file agent-scancode.php.

◆ preInstall()

Fossology\Scancode\Ui\ScancodesAgentPlugin::preInstall ( )

See also
Fossology::Lib::Plugin::AgentPlugin::preInstall()

Reimplemented from Fossology\Lib\Plugin\AgentPlugin.

Definition at line 144 of file agent-scancode.php.

◆ renderContent()

Fossology\Scancode\Ui\ScancodesAgentPlugin::renderContent ( $vars)

Render HTML from template.

Parameters
array$varsVariables using in template
Returns
string HTML rendered from agent_decider.html.twig template

Definition at line 31 of file agent-scancode.php.

◆ renderFoot()

Fossology\Scancode\Ui\ScancodesAgentPlugin::renderFoot ( $vars)

Render footer HTML.

Parameters
array$varsVariables using in template
Returns
string Footer HTML

Definition at line 42 of file agent-scancode.php.

◆ scheduleAgent()

Fossology\Scancode\Ui\ScancodesAgentPlugin::scheduleAgent (   $jobId,
  $uploadId,
$errorMsg,
  $request 
)

Schedule scancode agent.

flags: l-> license, r-> copyright, e-> email, u->url

Parameters
int$jobIdschedule Job Id which has to add
int$uploadIdUploaded pfile Id
string$errorMsgError message which has to be displayed
Request$requestSession request in html
Returns
int $jobQueueId jq_pk of scheduled jobqueue or 0 if not scheduled

Definition at line 62 of file agent-scancode.php.


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