FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
Fossology\Lib\Dao\ClearingDao Class Reference
Collaboration diagram for Fossology\Lib\Dao\ClearingDao:
Collaboration graph

Public Member Functions

 __construct (DbManager $dbManager, UploadDao $uploadDao)
 
 getClearedLicenses (ItemTreeBounds $itemTreeBounds, $groupId)
 
 getFileClearings (ItemTreeBounds $itemTreeBounds, $groupId, $onlyCurrent=true, $forClearingHistory=false)
 
 getFileClearingsFolder (ItemTreeBounds $itemTreeBounds, $groupId, $includeSubFolders=true, $onlyCurrent=true)
 
 getRelevantClearingDecision (ItemTreeBounds $itemTreeBounds, $groupId)
 
 removeWipClearingDecision ($uploadTreeId, $groupId)
 
 createDecisionFromEvents ($uploadTreeId, $userId, $groupId, $decType, $scope, $eventIds)
 
 getRelevantClearingEvents ($itemTreeBounds, $groupId, $includeSubFolders=true)
 
 updateClearingEvent ($uploadTreeId, $userId, $groupId, $licenseId, $what, $changeTo)
 
 copyEventIdTo ($eventId, $itemId, $userId, $groupId)
 
 insertClearingEvent ($uploadTreeId, $userId, $groupId, $licenseId, $isRemoved, $type=ClearingEventTypes::USER, $reportInfo= '', $comment= '', $acknowledgement= '', $jobId=0)
 
 getEventIdsOfJob ($jobId)
 
 markDecisionAsWip ($uploadTreeId, $userId, $groupId)
 
 isDecisionWip ($uploadTreeId, $groupId)
 
 isDecisionTBD ($uploadTreeId, $groupId)
 
 isDecisionDNU ($uploadTreeId, $groupId)
 
 getBulkHistory (ItemTreeBounds $itemTreeBound, $groupId, $onlyTried=true)
 
 getBulkMatches ($bulkId, $groupId)
 
 getClearedLicenseIdAndMultiplicities (ItemTreeBounds $itemTreeBounds, $groupId)
 
 markDirectoryAsDecisionType (ItemTreeBounds $itemTreeBounds, $groupId, $userId, $decisionMark)
 
 deleteDecisionTypeFromDirectory (ItemTreeBounds $itemTreeBounds, $groupId, $userId, $decisionMark)
 
 getMainLicenseIds ($uploadId, $groupId)
 
 makeMainLicense ($uploadId, $groupId, $licenseId)
 
 removeMainLicense ($uploadId, $groupId, $licenseId)
 
 getFilesForDecisionTypeFolderLevel (ItemTreeBounds $itemTreeBounds, $groupId, $onlyCurrent=true, $decisionMark="")
 
 getPreviousBulkIds ($uploadId, $groupId, $userId, $onlyCount=0)
 
 getClearingDecisionsCount ($uploadId, $groupId)
 
 getTotalDecisionCount ($uploadId, $groupId)
 
 getCandidateLicenseCountForCurrentDecisions ($uploadTreeId, $uploadId=0)
 
 marklocalDecisionsAsGlobal ($uploadId)
 

Protected Member Functions

 buildClearingEvent ($eventId, $userId, $groupId, $licenseRef, $licenseIsRemoved, $type, $reportInfo, $comment, $acknowledgement)
 
 markDirectoryAsDecisionTypeIfScannerDetected (ItemTreeBounds $itemTreeBounds, $groupId, $userId, $removeDecision=false, $decisionMark=DecisionTypes::IRRELEVANT)
 
 markDirectoryAsDecisionTypeIfUserEdited (ItemTreeBounds $itemTreeBounds, $groupId, $userId, $removeDecision=false, $decisionMark=DecisionTypes::IRRELEVANT)
 

Private Member Functions

 getRelevantDecisionsCte (ItemTreeBounds $itemTreeBounds, $groupId, $onlyCurrent, &$statementName, &$params, $condition="")
 
 getDecisionsFromCte ($decisionsCte, $statementName, $params, $forClearingHistory=false)
 

Private Attributes

 $dbManager
 
 $logger
 
 $uploadDao
 
 $licenseRefCache
 

Detailed Description

Definition at line 37 of file ClearingDao.php.

Constructor & Destructor Documentation

Fossology\Lib\Dao\ClearingDao::__construct ( DbManager  $dbManager,
UploadDao  $uploadDao 
)
Parameters
DbManager$dbManager
UploadDao$uploadDao

Definition at line 52 of file ClearingDao.php.

Member Function Documentation

Fossology\Lib\Dao\ClearingDao::buildClearingEvent (   $eventId,
  $userId,
  $groupId,
  $licenseRef,
  $licenseIsRemoved,
  $type,
  $reportInfo,
  $comment,
  $acknowledgement 
)
protected
Parameters
int$eventId
int$userId
int$groupId
int$licenseRef
$licenseIsRemoved
$type
$reportInfo
string$comment
Returns
ClearingEvent

Definition at line 556 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::createDecisionFromEvents (   $uploadTreeId,
  $userId,
  $groupId,
  $decType,
  $scope,
  $eventIds 
)
Parameters
int$uploadTreeId
int$userId
int$groupId
int$decType
int$scope

Definition at line 334 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::deleteDecisionTypeFromDirectory ( ItemTreeBounds  $itemTreeBounds,
  $groupId,
  $userId,
  $decisionMark 
)
Parameters
ItemTreeBounds$itemTreeBounds
int$groupId
int$userId

Definition at line 773 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::getBulkHistory ( ItemTreeBounds  $itemTreeBound,
  $groupId,
  $onlyTried = true 
)
Parameters
ItemTreeBounds$itemTreeBound
int$groupId
boolean$onlyTried
Returns
array[] where array has keys ("bulkId","id","text","matched","tried","removedLicenses","addedLicenses")

Definition at line 631 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::getCandidateLicenseCountForCurrentDecisions (   $uploadTreeId,
  $uploadId = 0 
)
Parameters
uploadTreeId
Returns
count

Definition at line 1034 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::getClearedLicenseIdAndMultiplicities ( ItemTreeBounds  $itemTreeBounds,
  $groupId 
)
Parameters
ItemTreeBounds$itemTreeBounds
int$groupId
Returns
array mapping 'shortname'=>'count'

Definition at line 719 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::getClearedLicenses ( ItemTreeBounds  $itemTreeBounds,
  $groupId 
)
Parameters
ItemTreeBounds$itemTreeBounds
int$groupId
Returns
LicenseRef[]

Definition at line 113 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::getClearingDecisionsCount (   $uploadId,
  $groupId 
)

Get the count of items cleared for the given upload from clearing_decision table.

Parameters
integer$uploadIdUpload id
integer$groupIdGroup id for the decisions
Returns
integer Number of items cleared.

Definition at line 967 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::getDecisionsFromCte (   $decisionsCte,
  $statementName,
  $params,
  $forClearingHistory = false 
)
private
Parameters
string$decisionsCte
string$statementName
array$params
Returns
ClearingDecision[]

Add the last match

Definition at line 206 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::getEventIdsOfJob (   $jobId)
Parameters
int$jobId
Returns
int[][] eventIds indexed by itemId and licenseId

Definition at line 522 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::getFileClearings ( ItemTreeBounds  $itemTreeBounds,
  $groupId,
  $onlyCurrent = true,
  $forClearingHistory = false 
)
Parameters
ItemTreeBounds$itemTreeBounds
int$groupId
bool$onlyCurrent
Returns
ClearingDecision[]

Definition at line 154 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::getFileClearingsFolder ( ItemTreeBounds  $itemTreeBounds,
  $groupId,
  $includeSubFolders = true,
  $onlyCurrent = true 
)
Parameters
ItemTreeBounds$itemTreeBounds
int$groupId
bool$includeSubFolders
bool$onlyCurrent
Returns
ClearingDecision[]

Definition at line 178 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::getFilesForDecisionTypeFolderLevel ( ItemTreeBounds  $itemTreeBounds,
  $groupId,
  $onlyCurrent = true,
  $decisionMark = "" 
)
Parameters
ItemTreeBounds$itemTreeBounds
int$groupId
bool$onlyCurrent
Returns
ClearingDecision[]

Definition at line 905 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::getMainLicenseIds (   $uploadId,
  $groupId 
)
Parameters
uploadId
int$groupId
Returns
array $ids

Definition at line 863 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::getPreviousBulkIds (   $uploadId,
  $groupId,
  $userId,
  $onlyCount = 0 
)
Parameters
int$uploadId
int$groupId
int$userId

Definition at line 938 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::getRelevantClearingDecision ( ItemTreeBounds  $itemTreeBounds,
  $groupId 
)
Parameters
ItemTreeBounds$itemTreeBounds
int$groupId
Returns
ClearingDecision|null

Definition at line 307 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::getRelevantClearingEvents (   $itemTreeBounds,
  $groupId,
  $includeSubFolders = true 
)
Parameters
ItemTreeBounds$itemTreeBounds
int$groupId
Returns
ClearingEvent[] sorted by ts_added

Definition at line 385 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::getTotalDecisionCount (   $uploadId,
  $groupId 
)

Get the count of items with either agent license finding or user license finding.

Parameters
integer$uploadIdUpload id
integer$groupIdGroup id
Returns
integer Number of items with license findings.

Definition at line 991 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::insertClearingEvent (   $uploadTreeId,
  $userId,
  $groupId,
  $licenseId,
  $isRemoved,
  $type = ClearingEventTypes::USER,
  $reportInfo = '',
  $comment = '',
  $acknowledgement = '',
  $jobId = 0 
)
Parameters
int$uploadTreeId
int$userId
int$groupId
int$licenseId
bool$isRemoved
int$typeClearingEventTypes
string$reportInfo
string$comment
int$jobId
Returns
int $clearing_event_pk

Definition at line 491 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::makeMainLicense (   $uploadId,
  $groupId,
  $licenseId 
)
Parameters
$uploadId
int$groupId
int$licenseId

Definition at line 882 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::markDecisionAsWip (   $uploadTreeId,
  $userId,
  $groupId 
)
Parameters
int$uploadTreeId
int$userId
int$groupId

Definition at line 578 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::markDirectoryAsDecisionType ( ItemTreeBounds  $itemTreeBounds,
  $groupId,
  $userId,
  $decisionMark 
)
Parameters
ItemTreeBounds$itemTreeBounds
int$groupId
int$userId

Definition at line 757 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::markDirectoryAsDecisionTypeIfScannerDetected ( ItemTreeBounds  $itemTreeBounds,
  $groupId,
  $userId,
  $removeDecision = false,
  $decisionMark = DecisionTypes::IRRELEVANT 
)
protected
Parameters
ItemTreeBounds$itemTreeBounds
int$groupId
int$userId

Definition at line 789 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::markDirectoryAsDecisionTypeIfUserEdited ( ItemTreeBounds  $itemTreeBounds,
  $groupId,
  $userId,
  $removeDecision = false,
  $decisionMark = DecisionTypes::IRRELEVANT 
)
protected
Parameters
ItemTreeBounds$itemTreeBounds
int$groupId
int$userId

Definition at line 830 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::marklocalDecisionsAsGlobal (   $uploadId)
Parameters
uploadId
Returns
count

Definition at line 1066 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::removeMainLicense (   $uploadId,
  $groupId,
  $licenseId 
)
Parameters
uploadId
int$groupId
int$licenseId

Definition at line 893 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::removeWipClearingDecision (   $uploadTreeId,
  $groupId 
)
Parameters
int$uploadTreeId
int$groupId

Definition at line 320 of file ClearingDao.php.

Fossology\Lib\Dao\ClearingDao::updateClearingEvent (   $uploadTreeId,
  $userId,
  $groupId,
  $licenseId,
  $what,
  $changeTo 
)
Parameters
int$uploadTreeId
int$userId
int$groupId
int$licenseId
string$what
string$changeTo

Definition at line 432 of file ClearingDao.php.


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