FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\Lib\Dao\FolderDao Class Reference
Collaboration diagram for Fossology\Lib\Dao\FolderDao:
Collaboration graph

Public Member Functions

 __construct (DbManager $dbManager, UserDao $userDao, UploadDao $uploadDao)
 
 hasTopLevelFolder ()
 
 insertFolder ($folderName, $folderDescription, $parentFolderId=self::TOP_LEVEL)
 
 getFolderId ($folderName, $parentFolderId=self::TOP_LEVEL)
 
 insertFolderContents ($parentId, $foldercontentsMode, $childId)
 
 getRootFolder ($userId)
 
 getDefaultFolder ($userId)
 
 getFolderTreeCte ($parentId=null)
 
 getFolderStructure ($parentId=null)
 
 countFolderUploads ($parentId, $userGroupMap)
 
 getAllFolderIds ()
 
 getFolderChildUploads ($parentId, $trustGroupId)
 
 getFolderUploads ($parentId, $trustGroupId=null)
 
 createFolder ($folderName, $folderDescription, $parentId)
 
 ensureTopLevelFolder ()
 
 isWithoutReusableFolders ($folderStructure)
 
 getContent ($folderContentId)
 
 moveContent ($folderContentId, $newParentId)
 
 copyContent ($folderContentId, $newParentId)
 
 getRemovableContents ($folderId)
 
 isRemovableContent ($childId, $mode)
 
 removeContent ($folderContentId)
 
 removeContentById ($uploadpk, $folderId)
 
 getFolderChildFolders ($folderId)
 
 getFolder ($folderId)
 
 isFolderAccessible ($folderId, $userId=null)
 
 getFolderContentsId ($childId, $mode)
 
 getFolderParentId ($folderPk)
 

Public Attributes

const FOLDER_KEY = "folder"
 
const DEPTH_KEY = "depth"
 
const REUSE_KEY = 'reuse'
 
const TOP_LEVEL = 1
 
const MODE_FOLDER = 1
 
const MODE_UPLOAD = 2
 
const MODE_ITEM = 4
 

Protected Member Functions

 fixFolderSequence ()
 
 isInFolderTree ($parentId, $folderId)
 
 isContentMovable ($content, $newParentId)
 

Private Attributes

 $dbManager
 
 $userDao
 
 $uploadDao
 
 $logger
 

Detailed Description

Definition at line 17 of file FolderDao.php.

Member Function Documentation

◆ countFolderUploads()

Fossology\Lib\Dao\FolderDao::countFolderUploads (   $parentId,
  $userGroupMap 
)
Parameters
int$parentId
string[]$userGroupMapmap groupId=>groupName
Returns
array of array(group_id,count,group_name)

Definition at line 191 of file FolderDao.php.

◆ getDefaultFolder()

Fossology\Lib\Dao\FolderDao::getDefaultFolder (   $userId)
Parameters
int$userId
Returns
Folder|null

Definition at line 124 of file FolderDao.php.

◆ getFolder()

Fossology\Lib\Dao\FolderDao::getFolder (   $folderId)
Parameters
int$folderId
Returns
Folder|null

Definition at line 423 of file FolderDao.php.

◆ getFolderContentsId()

Fossology\Lib\Dao\FolderDao::getFolderContentsId (   $childId,
  $mode 
)

Get the folder contents id for a given child id

Parameters
integer$childIdId of the child
integer$modeMode of child
Returns
NULL|integer Folder content id if success, NULL otherwise

Definition at line 457 of file FolderDao.php.

◆ getFolderParentId()

Fossology\Lib\Dao\FolderDao::getFolderParentId (   $folderPk)

For a given folder id, get the parent folder id.

Parameters
integer$folderPkID of the folder
Returns
number Parent id if parent exists, null otherwise.

Definition at line 473 of file FolderDao.php.

◆ getFolderUploads()

Fossology\Lib\Dao\FolderDao::getFolderUploads (   $parentId,
  $trustGroupId = null 
)
Parameters
int$parentId
int$trustGroupId
Returns
UploadProgress[]

Definition at line 252 of file FolderDao.php.

◆ getRootFolder()

Fossology\Lib\Dao\FolderDao::getRootFolder (   $userId)
Parameters
int$userId
Returns
Folder|null

Definition at line 108 of file FolderDao.php.

◆ hasTopLevelFolder()

Fossology\Lib\Dao\FolderDao::hasTopLevelFolder ( )
Returns
boolean

Definition at line 48 of file FolderDao.php.

◆ isFolderAccessible()

Fossology\Lib\Dao\FolderDao::isFolderAccessible (   $folderId,
  $userId = null 
)
Parameters
int$folderId
int$userId
Returns
true|false

Definition at line 437 of file FolderDao.php.


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