FOSSology  4.4.0
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)
 
 isDecisionCheck ($uploadTreeId, $groupId, $decisionType)
 
 getBulkHistory (ItemTreeBounds $itemTreeBound, $groupId, $onlyTried=true)
 
 getBulkMatches ($bulkId, $groupId)
 
 getClearedLicenseIdAndMultiplicities (ItemTreeBounds $itemTreeBounds, $groupId)
 
 getDecisionType ($decisionType)
 
 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)
 
 getCandidateLicenseCountForCurrentDecisions ($uploadTreeId, $uploadId=0)
 
 marklocalDecisionsAsGlobal ($uploadId)
 

Protected Member Functions

 buildClearingEvent ($eventId, $userId, $groupId, $licenseRef, $licenseIsRemoved, $type, $reportInfo, $comment, $acknowledgement)
 

Private Member Functions

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

Private Attributes

 $dbManager
 
 $logger
 
 $uploadDao
 
 $copyrightDao
 
 $licenseRefCache
 

Detailed Description

Definition at line 26 of file ClearingDao.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 43 of file ClearingDao.php.

Member Function Documentation

◆ buildClearingEvent()

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

Definition at line 581 of file ClearingDao.php.

◆ createDecisionFromEvents()

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 341 of file ClearingDao.php.

◆ deleteDecisionTypeFromDirectory()

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

Definition at line 807 of file ClearingDao.php.

◆ getBulkHistory()

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 651 of file ClearingDao.php.

◆ getCandidateLicenseCountForCurrentDecisions()

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

Definition at line 986 of file ClearingDao.php.

◆ getClearedLicenseIdAndMultiplicities()

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

Definition at line 739 of file ClearingDao.php.

◆ getClearedLicenses()

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

Definition at line 115 of file ClearingDao.php.

◆ getDecisionsFromCte()

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 211 of file ClearingDao.php.

◆ getDecisionType()

Fossology\Lib\Dao\ClearingDao::getDecisionType (   $decisionType)
Parameters
int$decisionType
Returns
int actual DecisionTypes

Definition at line 778 of file ClearingDao.php.

◆ getEventIdsOfJob()

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

Definition at line 546 of file ClearingDao.php.

◆ getFileClearings()

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

Definition at line 159 of file ClearingDao.php.

◆ getFileClearingsFolder()

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 183 of file ClearingDao.php.

◆ getFilesForDecisionTypeFolderLevel()

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

Definition at line 930 of file ClearingDao.php.

◆ getMainLicenseIds()

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

Definition at line 887 of file ClearingDao.php.

◆ getPreviousBulkIds()

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

Definition at line 960 of file ClearingDao.php.

◆ getRelevantClearingDecision()

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

Definition at line 314 of file ClearingDao.php.

◆ getRelevantClearingEvents()

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

Definition at line 404 of file ClearingDao.php.

◆ insertClearingEvent()

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 511 of file ClearingDao.php.

◆ isDecisionCheck()

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

Definition at line 620 of file ClearingDao.php.

◆ makeMainLicense()

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

Definition at line 906 of file ClearingDao.php.

◆ markDecisionAsWip()

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

Definition at line 603 of file ClearingDao.php.

◆ markDirectoryAsDecisionType()

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

Definition at line 795 of file ClearingDao.php.

◆ marklocalDecisionsAsGlobal()

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

Definition at line 1019 of file ClearingDao.php.

◆ removeMainLicense()

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

Definition at line 917 of file ClearingDao.php.

◆ removeWipClearingDecision()

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

Definition at line 327 of file ClearingDao.php.

◆ updateClearingEvent()

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 451 of file ClearingDao.php.


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