Utility functions to process ClearingDecision.
More...
|
| __construct (ClearingDao $clearingDao, AgentLicenseEventProcessor $agentLicenseEventProcessor, ClearingEventProcessor $clearingEventProcessor, DbManager $dbManager) |
|
| hasUnhandledScannerDetectedLicenses (ItemTreeBounds $itemTreeBounds, $groupId, $additionalEventIds=array(), $licenseMap=null) |
|
| makeDecisionFromLastEvents (ItemTreeBounds $itemBounds, $userId, $groupId, $type, $global, $additionalEventIds=array()) |
| Create clearing decisions from clearing events. More...
|
|
| getCurrentClearings (ItemTreeBounds $itemTreeBounds, $groupId, $usageId=LicenseMap::TRIVIAL) |
| For a given item, get the clearing decisions. More...
|
|
Utility functions to process ClearingDecision.
Definition at line 24 of file ClearingDecisionProcessor.php.
◆ __construct()
◆ clearingDecisionIsDifferentFrom()
Fossology\Lib\BusinessRules\ClearingDecisionProcessor::clearingDecisionIsDifferentFrom |
( |
ClearingDecision |
$decision, |
|
|
|
$type, |
|
|
|
$scope, |
|
|
|
$clearingEventIds |
|
) |
| |
|
private |
Check if clearing decisions are different from clearing event ids.
- Parameters
-
ClearingDecision | $decision | Clearing decisions to check |
int | $type | Clearing decision type required |
int | $scope | Clearing decision scope required |
array | $clearingEventIds | Clearing events to compare with |
- Returns
- boolean True if they are same, false otherwise
Definition at line 124 of file ClearingDecisionProcessor.php.
◆ getCurrentClearings()
Fossology\Lib\BusinessRules\ClearingDecisionProcessor::getCurrentClearings |
( |
ItemTreeBounds |
$itemTreeBounds, |
|
|
|
$groupId, |
|
|
|
$usageId = LicenseMap::TRIVIAL |
|
) |
| |
For a given item, get the clearing decisions.
- Parameters
-
ItemTreeBounds | $itemTreeBounds | |
int | $groupId | |
int | $usageId | |
- Returns
- array Array of added and removed license findings
- Exceptions
-
Definition at line 200 of file ClearingDecisionProcessor.php.
◆ hasUnhandledScannerDetectedLicenses()
Fossology\Lib\BusinessRules\ClearingDecisionProcessor::hasUnhandledScannerDetectedLicenses |
( |
ItemTreeBounds |
$itemTreeBounds, |
|
|
|
$groupId, |
|
|
|
$additionalEventIds = array() , |
|
|
|
$licenseMap = null |
|
) |
| |
Check if the given upload tree bound have unhandled license detections
- Parameters
-
ItemTreeBounds | $itemTreeBounds | Upload tree bound to check |
int | $groupId | Current group id |
array | $additionalEventIds | Additional event ids to include, indexed by licenseId |
null | LicenseMap | $licenseMap | If given then license are considered as equal iff mapped to same |
- Returns
- bool True if unhandled licenses found, false otherwise.
Definition at line 70 of file ClearingDecisionProcessor.php.
◆ insertClearingEventsForAgentFindings()
Fossology\Lib\BusinessRules\ClearingDecisionProcessor::insertClearingEventsForAgentFindings |
( |
ItemTreeBounds |
$itemBounds, |
|
|
|
$userId, |
|
|
|
$groupId, |
|
|
|
$remove = false , |
|
|
|
$type = ClearingEventTypes::AGENT , |
|
|
|
$removedIds = array() |
|
) |
| |
|
private |
Insert clearing events in DB for agent findings.
- Parameters
-
ItemTreeBounds | $itemBounds | Upload tree bound of the item |
int | $userId | Current user id |
int | $groupId | Current group id |
boolean | $remove | Is the license finding removed? |
int | $type | Finding type |
array | $removedIds | Licenses to be skipped |
- Returns
- number[]
Definition at line 103 of file ClearingDecisionProcessor.php.
◆ makeDecisionFromLastEvents()
Fossology\Lib\BusinessRules\ClearingDecisionProcessor::makeDecisionFromLastEvents |
( |
ItemTreeBounds |
$itemBounds, |
|
|
|
$userId, |
|
|
|
$groupId, |
|
|
|
$type, |
|
|
|
$global, |
|
|
|
$additionalEventIds = array() |
|
) |
| |
Create clearing decisions from clearing events.
- Parameters
-
ItemTreeBounds | $itemBounds | |
int | $userId | |
int | $groupId | |
int | $type | |
boolean | $global | |
| array | Additional event ids to include, indexed by licenseId |
Definition at line 148 of file ClearingDecisionProcessor.php.
◆ $agentLicenseEventProcessor
◆ $clearingDao
ClearingDao Fossology\Lib\BusinessRules\ClearingDecisionProcessor::$clearingDao |
|
private |
◆ $clearingEventProcessor
◆ $dbManager
DbManager Fossology\Lib\BusinessRules\ClearingDecisionProcessor::$dbManager |
|
private |
◆ NO_LICENSE_KNOWN_DECISION_TYPE
integer Fossology\Lib\BusinessRules\ClearingDecisionProcessor::NO_LICENSE_KNOWN_DECISION_TYPE = 2 |
The documentation for this class was generated from the following file: