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

Public Member Functions

 __construct (DbManager $dbManager)
 
 getAgentFileLicenseMatches (ItemTreeBounds $itemTreeBounds, $usageId=LicenseMap::TRIVIAL)
 get all the licenses for a single file or uploadtree More...
 
 getBulkFileLicenseMatches (ItemTreeBounds $itemTreeBounds)
 get all the tried bulk recognitions for a single file or uploadtree (currently unused) More...
 
 getLicenseRefs ($search=null, $orderAscending=true)
 
 getConclusionLicenseRefs ($groupId, $search=null, $orderAscending=true, $exclude=array())
 
 getLicenseArray ($groupId=null)
 
 getLicenseIdPerPfileForAgentId (ItemTreeBounds $itemTreeBounds, $selectedAgentId, $includeSubfolders=true, $nameRange=array())
 
 getLicensesPerFileNameForAgentId (ItemTreeBounds $itemTreeBounds, $selectedAgentIds=null, $includeSubfolders=true, $excluding='', $ignore=false, &$clearingDecisionsForLicList=array())
 
 getLicenseHistogram (ItemTreeBounds $itemTreeBounds, $agentId=null)
 
 getLicenseShortnamesContained (ItemTreeBounds $itemTreeBounds, $latestSuccessfulAgentIds=null, $filterLicenses=array('VOID'))
 
 getLicenseById ($licenseId, $groupId=null)
 
 getLicenseByShortName ($licenseShortname, $groupId=null)
 
 insertBulkLicense ($userId, $groupId, $uploadTreeId, $licenseRemovals, $refText)
 
 isNewLicense ($newShortname, $groupId)
 
 insertLicense ($shortname, $refText, $spdxCompatible=false)
 
 insertUploadLicense ($newShortname, $refText, $groupId)
 
 getLicenseCount ()
 
 updateCandidate ($rf_pk, $shortname, $fullname, $rfText, $url, $rfNotes, $readyformerge, $riskLvl)
 
 getLicenseParentById ($licenseId, $groupId=null)
 
 getLicenseObligations ($licenseLists, $tableName='obligation_map')
 

Public Attributes

const NO_LICENSE_FOUND = 'No_license_found'
 

Private Member Functions

 updateStackState (&$pathStack, &$rgtStack, &$lastLft, $row)
 
 addToLicensesPerFileName (&$licensesPerFileName, $path, $row, $ignore, &$clearingDecisionsForLicList=array())
 
 getLicenseByCondition ($condition, $param, $groupId=null)
 

Private Attributes

 $dbManager
 
 $logger
 
 $candidatePrefix = '*'
 

Detailed Description

Definition at line 32 of file LicenseDao.php.

Member Function Documentation

Fossology\Lib\Dao\LicenseDao::getAgentFileLicenseMatches ( ItemTreeBounds  $itemTreeBounds,
  $usageId = LicenseMap::TRIVIAL 
)

get all the licenses for a single file or uploadtree

Parameters
ItemTreeBounds$itemTreeBounds
int
Returns
LicenseMatch[]

Definition at line 56 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::getBulkFileLicenseMatches ( ItemTreeBounds  $itemTreeBounds)

get all the tried bulk recognitions for a single file or uploadtree (currently unused)

Parameters
ItemTreeBounds$itemTreeBounds
Returns
LicenseMatch[]

Definition at line 105 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::getConclusionLicenseRefs (   $groupId,
  $search = null,
  $orderAscending = true,
  $exclude = array() 
)
Returns
LicenseRef[]

Definition at line 180 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::getLicenseArray (   $groupId = null)
Returns
array

Definition at line 218 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::getLicenseByCondition (   $condition,
  $param,
  $groupId = null 
)
private
Parameters
string$condition
array$param
$groupId
Returns
License|null

Definition at line 497 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::getLicenseById (   $licenseId,
  $groupId = null 
)
Parameters
string$licenseId
int | null$groupId
Returns
License|null

Definition at line 531 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::getLicenseByShortName (   $licenseShortname,
  $groupId = null 
)
Parameters
string$licenseShortname
int | null$groupId
Returns
License|null

Definition at line 541 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::getLicenseCount ( )
Parameters
array("Licenseby Nomos.")
Returns
int count of license_ref

Definition at line 620 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::getLicenseHistogram ( ItemTreeBounds  $itemTreeBounds,
  $agentId = null 
)
Parameters
ItemTreeBounds$itemTreeBounds
null|int|int[]$agentId
Returns
array

Definition at line 416 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::getLicenseIdPerPfileForAgentId ( ItemTreeBounds  $itemTreeBounds,
  $selectedAgentId,
  $includeSubfolders = true,
  $nameRange = array() 
)
Parameters
ItemTreeBounds$itemTreeBounds
int$selectedAgentId
array$mask
Returns
array

Definition at line 244 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::getLicenseObligations (   $licenseLists,
  $tableName = 'obligation_map' 
)
Parameters
array$licenseLists
Returns
array

Definition at line 655 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::getLicenseParentById (   $licenseId,
  $groupId = null 
)
Parameters
int$licenseId
int$groupId

Definition at line 645 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::getLicenseRefs (   $search = null,
  $orderAscending = true 
)
Returns
LicenseRef[]

Definition at line 148 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::getLicensesPerFileNameForAgentId ( ItemTreeBounds  $itemTreeBounds,
  $selectedAgentIds = null,
  $includeSubfolders = true,
  $excluding = '',
  $ignore = false,
$clearingDecisionsForLicList = array() 
)
Parameters
ItemTreeBounds$itemTreeBounds
Array(int)$selectedAgentIds
bool$includeSubFolders
String$excluding
bool$ignoreignore files without license
Returns
array

Definition at line 302 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::insertBulkLicense (   $userId,
  $groupId,
  $uploadTreeId,
  $licenseRemovals,
  $refText 
)
Parameters
int$userId
int$groupId
int$uploadTreeId
bool[]$licenseRemovals
string$refText
Returns
int lrp_pk on success or -1 on fail

Definition at line 554 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::insertLicense (   $shortname,
  $refText,
  $spdxCompatible = false 
)
Parameters
$shortname
$refText
bool$spdxCompatible
Returns
mixed

Definition at line 595 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::insertUploadLicense (   $newShortname,
  $refText,
  $groupId 
)
Parameters
string$newShortname
string$refText
Returns
int Id of license candidate

Definition at line 609 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::isNewLicense (   $newShortname,
  $groupId 
)
Parameters
string$newShortname
int$groupId
Returns
bool

Definition at line 581 of file LicenseDao.php.

Fossology\Lib\Dao\LicenseDao::updateCandidate (   $rf_pk,
  $shortname,
  $fullname,
  $rfText,
  $url,
  $rfNotes,
  $readyformerge,
  $riskLvl 
)
Parameters
int$rf_pk
string$shortname
string$fullname
string$rfText,$rfNotes
string$readyformerge
int$riskLvl

Definition at line 634 of file LicenseDao.php.


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