FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\Lib\Dao\AgentDao Class Reference
Collaboration diagram for Fossology\Lib\Dao\AgentDao:
Collaboration graph

Public Member Functions

 __construct (DbManager $dbManager, Logger $logger)
 
 arsTableExists ($agentName)
 
 createArsTable ($agentName)
 
 writeArsRecord ($agentName, $agentId, $uploadId, $arsId=0, $success=false, $status="")
 
 getCurrentAgentId ($agentName, $agentDesc="", $agentRev="")
 
 agentARSList ($tableName, $uploadId, $limit=1, $agentId=0, $agentSuccess=true)
 The purpose of this function is to return an array of _ars records for an agent so that the latest agent_pk(s) can be determined. This is for _ars tables only, for example, nomos_ars and bucket_ars. The _ars tables have a standard format but the specific agent ars table may have additional fields. More...
 
 getRunningAgentIds ($uploadId, $agentName)
 Returns the list of running or failed agent_pk s. Before latest successful run. More...
 
 getLatestAgentResultForUpload ($uploadId, $agentNames)
 
 getCurrentAgentRef ($agentName)
 
 getSuccessfulAgentRuns ($agentName, $uploadId)
 
 getSuccessfulAgentEntries ($scannerName, $uploadId)
 
 renewCurrentAgent ($agentName)
 
 getAgentName ($agentId)
 
 getAgentRev ($agentId)
 

Public Attributes

const ARS_TABLE_SUFFIX = "_ars"
 

Private Member Functions

 createAgentRef ($row)
 
 getArsTableName ($agentName)
 

Private Attributes

 $dbManager
 

Detailed Description

Definition at line 20 of file AgentDao.php.

Constructor & Destructor Documentation

◆ __construct()

Fossology\Lib\Dao\AgentDao::__construct ( DbManager  $dbManager,
Logger  $logger 
)
Parameters
DbManager$dbManager
Logger$logger

Definition at line 31 of file AgentDao.php.

Member Function Documentation

◆ agentARSList()

Fossology\Lib\Dao\AgentDao::agentARSList (   $tableName,
  $uploadId,
  $limit = 1,
  $agentId = 0,
  $agentSuccess = true 
)

The purpose of this function is to return an array of _ars records for an agent so that the latest agent_pk(s) can be determined. This is for _ars tables only, for example, nomos_ars and bucket_ars. The _ars tables have a standard format but the specific agent ars table may have additional fields.

Parameters
string$tableName- name of the ars table (e.g. nomos_ars)
int$uploadId
int$limit- limit number of rows returned. 0=No limit, default=1
int$agentId- ARS table agent_fk, optional
Returns
mixed assoc array of _ars records. or FALSE on error, or no rows

Definition at line 124 of file AgentDao.php.

◆ createAgentRef()

Fossology\Lib\Dao\AgentDao::createAgentRef (   $row)
private
Parameters
string[]$row
Returns
AgentRef

Definition at line 244 of file AgentDao.php.

◆ getAgentName()

Fossology\Lib\Dao\AgentDao::getAgentName (   $agentId)
Parameters
int$agentId
Returns
string

Definition at line 279 of file AgentDao.php.

◆ getAgentRev()

Fossology\Lib\Dao\AgentDao::getAgentRev (   $agentId)
Parameters
int$agentId
Returns
string

Definition at line 289 of file AgentDao.php.

◆ getArsTableName()

Fossology\Lib\Dao\AgentDao::getArsTableName (   $agentName)
private
Parameters
$agentName
Returns
string

Definition at line 253 of file AgentDao.php.

◆ getCurrentAgentRef()

Fossology\Lib\Dao\AgentDao::getCurrentAgentRef (   $agentName)
Parameters
string$agentName
Returns
AgentRef

Definition at line 193 of file AgentDao.php.

◆ getRunningAgentIds()

Fossology\Lib\Dao\AgentDao::getRunningAgentIds (   $uploadId,
  $agentName 
)

Returns the list of running or failed agent_pk s. Before latest successful run.

Parameters
int$uploadId
$agentName
Returns
int[] - list of running agent pks

Definition at line 164 of file AgentDao.php.

◆ getSuccessfulAgentEntries()

Fossology\Lib\Dao\AgentDao::getSuccessfulAgentEntries (   $scannerName,
  $uploadId 
)
Parameters
string$scannerName
int$uploadId
Returns
array[] with keys agent_id,agent_rev,agent_name

Definition at line 226 of file AgentDao.php.

◆ getSuccessfulAgentRuns()

Fossology\Lib\Dao\AgentDao::getSuccessfulAgentRuns (   $agentName,
  $uploadId 
)
Parameters
string$agentName
int$uploadId
Returns
AgentRef[]

Definition at line 205 of file AgentDao.php.

◆ renewCurrentAgent()

Fossology\Lib\Dao\AgentDao::renewCurrentAgent (   $agentName)
Parameters
string$agentName
Returns
bool

Definition at line 262 of file AgentDao.php.


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