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

Public Member Functions

 __construct (DbManager $dbManager, Logger $logger, UploadPermissionDao $uploadPermissionDao)
 
 getUploadEntry ($uploadTreeId, $uploadTreeTableName="uploadtree")
 
 getUploadtreeIdFromPfile ($uploadFk, $pfileFk)
 
 getUpload ($uploadId)
 
 getItemTreeBounds ($itemId, $uploadTreeTableName="uploadtree")
 
 getItemTreeBoundsFromUploadId ($uploadTreeId, $uploadId)
 
 getParentItemBounds ($uploadId, $uploadTreeTableName=null)
 
 countPlainFiles (ItemTreeBounds $itemTreeBounds)
 
 getStatus ($uploadId, $groupId)
 unused function
 
 getUploadtreeTableName ($uploadId)
 Get the uploadtree table name for this upload_pk If upload_pk does not exist, return "uploadtree". More...
 
 getNextItem ($uploadId, $itemId, $options=null)
 
 getPreviousItem ($uploadId, $itemId, $options=null)
 
 getItemByDirection ($uploadId, $itemId, $direction, $options)
 
 getUploadParent ($uploadId)
 
 getLeftAndRight ($uploadtreeID, $uploadTreeTableName="uploadtree")
 
 getContainingFileCount (ItemTreeBounds $itemTreeBounds, UploadTreeProxy $uploadTreeView)
 
 getContainedItems (ItemTreeBounds $itemTreeBounds, $addCondition="", $addParameters=array())
 
 addReusedUpload ($uploadId, $reusedUploadId, $groupId, $reusedGroupId, $reuseMode=0)
 
 getReusedUpload ($uploadId, $groupId)
 
 countNonArtifactDescendants (ItemTreeBounds $itemTreeBounds, $isFlat=true)
 
 isAccessible ($uploadId, $groupId)
 
 isEditable ($uploadId, $groupId)
 
 makeAccessibleToGroup ($uploadId, $groupId, $perm=null)
 
 makeAccessibleToAllGroupsOf ($uploadId, $userId, $perm=null)
 
 getUploadHashes ($uploadId)
 
 getFatItemArray ($itemId, $uploadId, $uploadtreeTablename)
 
 getFatItemId ($itemId, $uploadId, $uploadtreeTablename)
 
 getPFileDataPerFileName (ItemTreeBounds $itemTreeBounds)
 
 getPFilesDataPerHashAlgo (ItemTreeBounds $itemTreeBounds, $hashAlgo="sha1")
 
 getReportInfo ($uploadId)
 
 getUploadHashesFromPfileId ($pfilePk)
 Get Pfile hashes from the pfile id. More...
 
 insertReportConfReuse ($uploadId, $reusedUploadId)
 

Public Attributes

const REUSE_NONE = 0
 
const REUSE_ENHANCED = 2
 
const REUSE_MAIN = 4
 
const REUSE_CONF = 16
 
const DIR_FWD = 1
 
const DIR_BCK = -1
 
const NOT_FOUND = null
 

Protected Member Functions

 createItem ($uploadEntry, $uploadTreeTableName)
 
 createItemTreeBounds ($uploadEntryData, $uploadTreeTableName)
 

Private Member Functions

 handleUploadIdForTable ($uploadTreeTableName, $uploadId, &$parameters)
 
 updateStackState (&$pathStack, &$rgtStack, &$lastLft, $row)
 
 addToPFilePerFileName (&$pfilePerFileName, $pathStack, $row)
 

Private Attributes

 $dbManager
 
 $logger
 
 $permissionDao
 

Detailed Description

Definition at line 34 of file UploadDao.php.

Member Function Documentation

Fossology\Lib\Dao\UploadDao::addReusedUpload (   $uploadId,
  $reusedUploadId,
  $groupId,
  $reusedGroupId,
  $reuseMode = 0 
)
Parameters
int$uploadId
int$reusedUploadId
int$groupId
int$reusedGroupId
int$reuseMode

Definition at line 374 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::countNonArtifactDescendants ( ItemTreeBounds  $itemTreeBounds,
  $isFlat = true 
)
Parameters
ItemTreeBounds$itemTreeBounds
bool$isFlatplain files from sub*folders instead of folders
Returns
array

Definition at line 436 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::countPlainFiles ( ItemTreeBounds  $itemTreeBounds)
Parameters
ItemTreeBounds$itemTreeBounds
Returns
int

Definition at line 154 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::createItem (   $uploadEntry,
  $uploadTreeTableName 
)
protected
Parameters
array$uploadEntry
string$uploadTreeTableName
Returns
Item

Definition at line 402 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::createItemTreeBounds (   $uploadEntryData,
  $uploadTreeTableName 
)
protected
Parameters
array$uploadEntryData
string$uploadTreeTableName
Exceptions
Exception
Returns
ItemTreeBounds

Definition at line 423 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getFatItemArray (   $itemId,
  $uploadId,
  $uploadtreeTablename 
)
Parameters
int$itemId
string$uploadId
string$uploadtreeTablename
Returns
array

Definition at line 494 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getFatItemId (   $itemId,
  $uploadId,
  $uploadtreeTablename 
)
Parameters
int$itemId
string$uploadId
string$uploadtreeTablename
Returns
int

Definition at line 517 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getItemByDirection (   $uploadId,
  $itemId,
  $direction,
  $options 
)
Parameters
$uploadId
$itemId
$direction
Returns
Item|null

Definition at line 264 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getItemTreeBounds (   $itemId,
  $uploadTreeTableName = "uploadtree" 
)
Parameters
$itemId
$uploadTreeTableName
Returns
ItemTreeBounds

Definition at line 108 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getItemTreeBoundsFromUploadId (   $uploadTreeId,
  $uploadId 
)
Parameters
$uploadTreeId
$uploadId
Returns
ItemTreeBounds

Definition at line 119 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getNextItem (   $uploadId,
  $itemId,
  $options = null 
)
Parameters
int$uploadId
int$itemId
Returns
Item|null

Definition at line 238 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getParentItemBounds (   $uploadId,
  $uploadTreeTableName = null 
)
Parameters
int$uploadId
string|null
Exceptions
Exception
Returns
ItemTreeBounds

Definition at line 131 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getPFileDataPerFileName ( ItemTreeBounds  $itemTreeBounds)
Parameters
ItemTreeBounds$itemTreeBounds
Returns
array

Definition at line 527 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getPFilesDataPerHashAlgo ( ItemTreeBounds  $itemTreeBounds,
  $hashAlgo = "sha1" 
)
Parameters
ItemTreeBounds$itemTreeBounds
String$hashAlgo
Returns
array

Definition at line 606 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getPreviousItem (   $uploadId,
  $itemId,
  $options = null 
)
Parameters
$uploadId
$itemId
Returns
mixed

Definition at line 248 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getReusedUpload (   $uploadId,
  $groupId 
)
Parameters
int$uploadId
int$groupId
Returns
int

Definition at line 385 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getUpload (   $uploadId)
Parameters
int$uploadId
Returns
Upload|null

Definition at line 94 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getUploadEntry (   $uploadTreeId,
  $uploadTreeTableName = "uploadtree" 
)
Parameters
$uploadTreeId
string$uploadTreeTableName
Returns
array

Definition at line 62 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getUploadHashes (   $uploadId)
Parameters
int$uploadId
Returns
array with keys sha1, md5, sha256

Definition at line 481 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getUploadHashesFromPfileId (   $pfilePk)

Get Pfile hashes from the pfile id.

Parameters
$pfilePk
Returns
array

Definition at line 671 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getUploadParent (   $uploadId)
Parameters
$uploadId
Returns
int uploadtreeId of top item

Definition at line 300 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getUploadtreeIdFromPfile (   $uploadFk,
  $pfileFk 
)

Get the first entry for uploadtree_pk for a given pfile in a given upload.

Parameters
integer$uploadFkUpload id
integer$pfileFkPfile id
Returns
integer Uploadtree_pk

Definition at line 79 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::getUploadtreeTableName (   $uploadId)

Get the uploadtree table name for this upload_pk If upload_pk does not exist, return "uploadtree".

Parameters
$upload_pk
Returns
uploadtree table name

Definition at line 217 of file UploadDao.php.

Fossology\Lib\Dao\UploadDao::insertReportConfReuse (   $uploadId,
  $reusedUploadId 
)
Parameters
int$uploadId
int$reusedUploadId
Returns
bolean

Definition at line 685 of file UploadDao.php.


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