Handle events related to license findings.
More...
Handle events related to license findings.
Definition at line 26 of file AgentLicenseEventProcessor.php.
◆ __construct()
Fossology\Lib\BusinessRules\AgentLicenseEventProcessor::__construct |
( |
LicenseDao |
$licenseDao, |
|
|
AgentDao |
$agentDao |
|
) |
| |
◆ createAgentClearingEvent()
Fossology\Lib\BusinessRules\AgentLicenseEventProcessor::createAgentClearingEvent |
( |
|
$licenseProperty | ) |
|
|
private |
Create a new AgentClearingEvent.
- Parameters
-
array | $licenseProperty | License properties required for AgentClearingEvent in an associative array |
- Returns
- AgentClearingEvent
Definition at line 255 of file AgentLicenseEventProcessor.php.
◆ filterDetectedLicenses()
Fossology\Lib\BusinessRules\AgentLicenseEventProcessor::filterDetectedLicenses |
( |
|
$agentDetectedLicenses, |
|
|
|
$agentLatestMap |
|
) |
| |
|
protected |
(A->B->C->X, A->B) => C->A->X
- Parameters
-
mixed[][][] | $agentDetectedLicenses | |
array | $agentLatestMap | |
- Returns
- mixed[][]
Definition at line 186 of file AgentLicenseEventProcessor.php.
◆ filterLatestScannerDetectedMatches()
Fossology\Lib\BusinessRules\AgentLicenseEventProcessor::filterLatestScannerDetectedMatches |
( |
|
$agentDetectedLicenses, |
|
|
|
$uploadId |
|
) |
| |
|
protected |
(A->B->C->X) => C->A->X if B=latestScannerId(A)
- Parameters
-
array | $agentDetectedLicenses | Agent license match map |
int | $uploadId | Upload to be queried |
- Returns
- LicenseMatch[][][] map licenseId->agentName->licenseMatches
Definition at line 143 of file AgentLicenseEventProcessor.php.
◆ getLatestAgentIdPerAgent()
Fossology\Lib\BusinessRules\AgentLicenseEventProcessor::getLatestAgentIdPerAgent |
( |
|
$uploadId, |
|
|
|
$agentNames |
|
) |
| |
|
private |
Get map for agent name => agent id.
The function also updates the agent map cache.
- Parameters
-
int | $uploadId | Upload to query |
array | $agentNames | Agents required |
- Returns
- array Map of agent name => agent id
Definition at line 163 of file AgentLicenseEventProcessor.php.
◆ getLatestScannerDetectedMatches()
Fossology\Lib\BusinessRules\AgentLicenseEventProcessor::getLatestScannerDetectedMatches |
( |
ItemTreeBounds |
$itemTreeBounds | ) |
|
Get all license id matches by agent for a given upload tree item.
- Parameters
-
ItemTreeBounds | $itemTreeBounds | Upload tree bound |
- Returns
- LicenseMatch[][][] map licenseId->agentName->licenseMatches
Definition at line 115 of file AgentLicenseEventProcessor.php.
◆ getScannedLicenses()
Fossology\Lib\BusinessRules\AgentLicenseEventProcessor::getScannedLicenses |
( |
|
$details | ) |
|
Get scanned license as a map of license-id => license-ref.
- Parameters
-
- Returns
- LicenseRef[] indexed by license id
Definition at line 211 of file AgentLicenseEventProcessor.php.
◆ getScannerDetectedLicenseDetails()
Fossology\Lib\BusinessRules\AgentLicenseEventProcessor::getScannerDetectedLicenseDetails |
( |
ItemTreeBounds |
$itemTreeBounds, |
|
|
|
$usageId = LicenseMap::TRIVIAL |
|
) |
| |
|
protected |
Get licenses match from agents for given upload tree items.
- Parameters
-
ItemTreeBounds | $itemTreeBounds | Upload tree bounds to get results for |
int | $usageId | License usage |
- Returns
- array Associative array with
res => array(
<agent-name> => array(
agentRef => <agent-ref>,
matchId => <highlight-
match-
id>,
percentage => <
match-percentage>
)
)
)
Store the results of a regex match.
format
Definition at line 82 of file AgentLicenseEventProcessor.php.
◆ getScannerDetectedLicenses()
Fossology\Lib\BusinessRules\AgentLicenseEventProcessor::getScannerDetectedLicenses |
( |
ItemTreeBounds |
$itemTreeBounds, |
|
|
|
$usageId = LicenseMap::TRIVIAL |
|
) |
| |
Get licenses detected by agents for a given upload tree item.
- Parameters
-
ItemTreeBounds | $itemTreeBounds | Upload tree item bound |
int | $usageId | License usage |
- Returns
- LicenseRef[]
Definition at line 55 of file AgentLicenseEventProcessor.php.
◆ getScannerEvents()
Fossology\Lib\BusinessRules\AgentLicenseEventProcessor::getScannerEvents |
( |
ItemTreeBounds |
$itemTreeBounds, |
|
|
|
$usageId = LicenseMap::TRIVIAL |
|
) |
| |
Get all scanner events that occurred on a given upload tree bound.
- Parameters
-
ItemTreeBounds | $itemTreeBounds | Upload tree bound |
int | $usageId | License usage |
- Returns
- AgentClearingEvent[][] indexed by LicenseId
Definition at line 231 of file AgentLicenseEventProcessor.php.
◆ $agentDao
AgentDao Fossology\Lib\BusinessRules\AgentLicenseEventProcessor::$agentDao |
|
private |
◆ $latestAgentMapCache
array Fossology\Lib\BusinessRules\AgentLicenseEventProcessor::$latestAgentMapCache = array() |
|
private |
◆ $licenseDao
LicenseDao Fossology\Lib\BusinessRules\AgentLicenseEventProcessor::$licenseDao |
|
private |
The documentation for this class was generated from the following file: