프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_delegates | a private list of delegates that provide operations for different SubmissionFile implementations. |
메소드 | 설명 | |
---|---|---|
__construct ( ) | Constructor | |
assignRevisionToReviewRound ( $fileId, $revision, $reviewRound ) | Assign file to a review round. | |
baseQueryForFileSelection ( ) : string | Return the basic join over all file class tables. | |
changePubId ( $fileId, $pubIdType, $pubId ) | ||
deleteAllPubIds ( $contextId, $pubIdType ) | ||
deleteAllRevisionsByAssocId ( $assocType, $assocId, $fileStage = null ) : integer | Retrieve all files associated to a certain object. | |
deleteAllRevisionsById ( $fileId, $fileStage = null, $submissionId = null ) : integer | Delete all revisions of a file, optionally restricted to a given file stage. | |
deleteAllRevisionsByReviewRound ( $reviewRoundId ) | Remove all file assignements for the given review round. | |
deleteAllRevisionsBySubmissionId ( $submissionId, $fileStage = null ) : integer | Delete all revisions of all files of a submission, optionally restricted to a given file stage. | |
deleteLatestRevisionById ( $fileId, $fileStage = null, $submissionId = null ) : integer | Delete the latest revision of a submission file by id. | |
deletePubId ( $fileId, $pubIdType ) | ||
deleteReviewRoundAssignment ( $submissionId, $stageId, $fileId, $revision ) | Remove a specific file assignment from a review round. | |
deleteRevision ( $submissionFile ) : integer | Delete a specific revision of a submission file. | |
deleteRevisionById ( $fileId, $revision, $fileStage = null, $submissionId = null ) : integer | Delete a specific revision of a submission file by id. | |
fromRow ( $row, $fileImplementation ) : SubmissionFile | Internal function to return a SubmissionFile object from a row. | |
getAllFileStages ( ) : array | Return all file stages. | |
getAllRevisions ( $fileId, $fileStage = null, $submissionId = null, $rangeInfo = null ) : array | null | Retrieve all revisions of a submission file. | |
getAllRevisionsByAssocId ( $assocType, $assocId, $fileStage = null, $rangeInfo = null ) : array | null | Retrieve all files associated to a certain object. | |
getByBestId ( $fileId, $submissionId ) : SubmissionFile | null | Retrieve file by public ID or, failing that, internal file ID and revision; public ID takes precedence. | |
getByPubId ( $pubIdType, $pubId, $submissionId = null, $contextId = null ) : SubmissionFile | null | Retrieve file by public file ID | |
getBySubmissionId ( $submissionId, $rangeInfo = null ) : array | Retrieve all submission files & revisions for a submission. | |
getDelegateClassNames ( ) : array | Return the available delegates mapped by lower case class names. | |
getFileIdsBySetting ( $settingName, $settingValue, $submissionId = null, $contextId = null ) : array | Find file IDs by querying file settings. | |
getGenreCategoryMapping ( ) : array | Return the mapping of genre categories to the lower case class name of file implementation. | |
getLatestRevision ( $fileId, $fileStage = null, $submissionId = null ) : SubmissionFile | null | Retrieve the latest revision of a file. | |
getLatestRevisionNumber ( $fileId ) : integer | null | Retrieve the current revision number for a file. | |
getLatestRevisions ( $submissionId, $fileStage = null, $rangeInfo = null ) : array | null | Retrieve a list of current revisions. | |
getLatestRevisionsByAssocId ( $assocType, $assocId, $submissionId = null, $fileStage = null, $rangeInfo = null ) : array | null | Retrieve the latest revision of all files associated to a certain object. | |
getLatestRevisionsByReviewRound ( $reviewRound, $fileStage = null ) : array | Get the latest revisions of all files that are in the specified review round. | |
getRevision ( $fileId, $revision, $fileStage = null, $submissionId = null ) : SubmissionFile | null | Retrieve a specific revision of a file. | |
getRevisionsByReviewRound ( $reviewRound, $fileStage = null, $uploaderUserId = null, $uploaderUserGroupId = null ) : array | null | Get all file revisions assigned to the given review round. | |
insertObject ( $submissionFile, $sourceFile, $isUpload = false ) : SubmissionFile | Insert a new SubmissionFile. | |
newDataObjectByGenreId ( $genreId ) : SubmissionFile | Construct a new data object corresponding to this DAO. | |
pubIdExists ( $pubIdType, $pubId, $fileId, $contextId ) | ||
setAsLatestRevision ( $revisedFileId, $newFileId, $submissionId, $fileStage ) : SubmissionFile | Set the latest revision of a file as the latest revision of another file. | |
transferOwnership ( $oldUserId, $newUserId ) | Transfer the ownership of the submission files of one user to another. | |
updateObject ( $updatedFile, $previousFileId = null, $previousRevision = null ) : SubmissionFile | Update an existing submission file. |
메소드 | 설명 | |
---|---|---|
_buildFileSelectionFilter ( $submissionId, $fileStage, $fileId, $revision, $assocType, $assocId, $stageId, $uploaderUserId, $uploaderUserGroupId, $reviewRoundId ) : array | Build an SQL where clause to select submissions based on the given filter information. | |
_castToDatabase ( $submissionFile ) : SubmissionFile | Make sure that a file's implementation corresponds to the way it is saved in the database. | |
_castToGenre ( $submissionFile ) : SubmissionFile | Make sure that the genre of the file and its file implementation are compatible. | |
_checkAndReturnRevision ( $revisions ) : SubmissionFile | Check whether the given array contains exactly zero or one revisions and return it. | |
_deleteInternally ( $submissionId = null, $fileStage = null, $fileId = null, $revision = null, $assocType = null, $assocId = null, $stageId = null, $uploaderUserId = null, $uploaderUserGroupId = null, $latestOnly = false ) : boolean | integer | Private method to delete submission file revisions according to the given filters. | |
_getDaoDelegate ( $fileImplementation ) : SubmissionFileDAODelegate | Return the requested SubmissionFileDAODelegate. | |
_getDaoDelegateForGenreId ( $genreId ) : SubmissionFileDAODelegate | Instantiates an approprate SubmissionFileDAODelegate based on the given genre identifier. | |
_getDaoDelegateForObject ( $object ) : SubmissionFileDAODelegate | Instantiates an appropriate SubmissionFileDAODelegate based on the given SubmissionFile. | |
_getFileImplementationForGenreId ( $genreId ) : string | Map a genre to the corresponding file implementation. | |
_getInternally ( $submissionId = null, $fileStage = null, $fileId = null, $revision = null, $assocType = null, $assocId = null, $stageId = null, $uploaderUserId = null, $uploaderUserGroupId = null, $reviewRoundId = null, $latestOnly = false, $rangeInfo = null ) : array | Private method to retrieve submission file revisions according to the given filters. |
public assignRevisionToReviewRound ( $fileId, $revision, $reviewRound ) | ||
$fileId | int The file to be assigned. | |
$revision | int The revision of the file to be assigned. | |
$reviewRound | ReviewRound |
public baseQueryForFileSelection ( ) : string | ||
리턴 | string |
public deleteAllRevisionsByAssocId ( $assocType, $assocId, $fileStage = null ) : integer | ||
$assocType | int ASSOC_TYPE_... | |
$assocId | int ID corresponding to specified assocType. | |
$fileStage | int (optional) further restricts the selection to a given file stage. | |
리턴 | integer | the number of deleted file revisions. |
public deleteAllRevisionsById ( $fileId, $fileStage = null, $submissionId = null ) : integer | ||
$fileId | int File ID. | |
$fileStage | int (optional) further restricts the selection to a given file stage. | |
$submissionId | int (optional) for validation purposes only | |
리턴 | integer | the number of deleted file revisions |
public deleteAllRevisionsByReviewRound ( $reviewRoundId ) | ||
$reviewRoundId | int The review round ID. |
public deleteAllRevisionsBySubmissionId ( $submissionId, $fileStage = null ) : integer | ||
$submissionId | int Submission ID. | |
$fileStage | int (optional) further restricts the selection to a given file stage. | |
리턴 | integer | the number of deleted file revisions |
public deleteLatestRevisionById ( $fileId, $fileStage = null, $submissionId = null ) : integer | ||
$fileId | int File ID. | |
$fileStage | int (optional) further restricts the selection to a given file stage. | |
$submissionId | int (optional) for validation purposes only | |
리턴 | integer | the number of deleted file revisions |
public deleteReviewRoundAssignment ( $submissionId, $stageId, $fileId, $revision ) | ||
$submissionId | int The submission id of the file | |
$stageId | int The review round type. | |
$fileId | int The file id. | |
$revision | int The file revision. |
public deleteRevision ( $submissionFile ) : integer | ||
$submissionFile | SubmissionFile | |
리턴 | integer | the number of deleted file revisions |
public deleteRevisionById ( $fileId, $revision, $fileStage = null, $submissionId = null ) : integer | ||
$fileId | int File ID. | |
$revision | int File revision number. | |
$fileStage | int (optional) further restricts the selection to a given file stage. | |
$submissionId | int (optional) for validation purposes only | |
리턴 | integer | the number of deleted file revisions |
public fromRow ( $row, $fileImplementation ) : SubmissionFile | ||
$row | array | |
$fileImplementation | string | |
리턴 | SubmissionFile |
public getAllRevisions ( $fileId, $fileStage = null, $submissionId = null, $rangeInfo = null ) : array | null | ||
$fileId | int File ID. | |
$fileStage | int (optional) further restricts the selection to a given file stage. | |
$submissionId | int Optional submission ID for validation purposes only | |
$rangeInfo | DBResultRange (optional) | |
리턴 | array | null | a list of SubmissionFile instances |
public getAllRevisionsByAssocId ( $assocType, $assocId, $fileStage = null, $rangeInfo = null ) : array | null | ||
$assocType | int ASSOC_TYPE_... | |
$assocId | int ID corresponding to specified assocType. | |
$fileStage | int (optional) further restricts the selection to a given file stage. | |
$rangeInfo | DBResultRange (optional) | |
리턴 | array | null | a list of SubmissionFile instances |
public getByBestId ( $fileId, $submissionId ) : SubmissionFile | null | ||
$fileId | string Either public ID or fileId-revision | |
$submissionId | int | |
리턴 | SubmissionFile | null |
public getByPubId ( $pubIdType, $pubId, $submissionId = null, $contextId = null ) : SubmissionFile | null | ||
$pubIdType | string One of the NLM pub-id-type values or
'other::something' if not part of the official NLM list
(see |
|
$pubId | string | |
$submissionId | int optional | |
$contextId | int optional | |
리턴 | SubmissionFile | null |
public getBySubmissionId ( $submissionId, $rangeInfo = null ) : array | ||
$submissionId | int Submission ID. | |
$rangeInfo | DBResultRange (optional) | |
리턴 | array | a list of SubmissionFile instances |
public getDelegateClassNames ( ) : array | ||
리턴 | array | a list of fully qualified class names indexed by the lower case class name of the file implementation they serve. NB: Be careful to order class names such that they can be called in the given order to delete files without offending foreign key constraints, i.e. place the sub-classes before the super-classes. |
public getFileIdsBySetting ( $settingName, $settingValue, $submissionId = null, $contextId = null ) : array | ||
$settingName | string | |
$settingValue | mixed | |
$submissionId | int optional | |
$contextId | int optional | |
리턴 | array | The file IDs identified by setting. |
public getGenreCategoryMapping ( ) : array | ||
리턴 | array | a list of lower case class names of file implementations. |
public getLatestRevision ( $fileId, $fileStage = null, $submissionId = null ) : SubmissionFile | null | ||
$fileId | int File ID. | |
$fileStage | int (optional) further restricts the selection to a given file stage. | |
$submissionId | int (optional) for validation purposes only | |
리턴 | SubmissionFile | null |
public getLatestRevisionNumber ( $fileId ) : integer | null | ||
$fileId | int File ID. | |
리턴 | integer | null |
public getLatestRevisions ( $submissionId, $fileStage = null, $rangeInfo = null ) : array | null | ||
$submissionId | int Submission ID. | |
$fileStage | int (optional) further restricts the selection to a given file stage. | |
$rangeInfo | DBResultRange (optional) | |
리턴 | array | null | a list of SubmissionFile instances |
public getLatestRevisionsByAssocId ( $assocType, $assocId, $submissionId = null, $fileStage = null, $rangeInfo = null ) : array | null | ||
$assocType | int ASSOC_TYPE_... | |
$assocId | int ID corresponding to specified assocType. | |
$fileStage | int (optional) further restricts the selection to a given file stage. | |
$rangeInfo | DBResultRange (optional) | |
리턴 | array | null | a list of SubmissionFile instances |
public getLatestRevisionsByReviewRound ( $reviewRound, $fileStage = null ) : array | ||
$reviewRound | ReviewRound | |
$fileStage | int SUBMISSION_FILE_... (Optional) | |
리턴 | array | A list of SubmissionFiles. |
public getRevision ( $fileId, $revision, $fileStage = null, $submissionId = null ) : SubmissionFile | null | ||
$fileId | int File ID. | |
$revision | int File revision number. | |
$fileStage | int (optional) further restricts the selection to a given file stage. | |
$submissionId | int|null (optional) for validation purposes only | |
리턴 | SubmissionFile | null |
public getRevisionsByReviewRound ( $reviewRound, $fileStage = null, $uploaderUserId = null, $uploaderUserGroupId = null ) : array | null | ||
$reviewRound | ReviewRound | |
$fileStage | int SUBMISSION_FILE_... | |
$uploaderUserId | int Uploader's user ID | |
$uploaderUserGroupId | int Uploader's user group ID | |
리턴 | array | null | A list of SubmissionFiles. |
public insertObject ( $submissionFile, $sourceFile, $isUpload = false ) : SubmissionFile | ||
$submissionFile | SubmissionFile | |
$sourceFile | string The place where the physical file resides right now or the file name in the case of an upload. The file will be copied to its canonical target location. | |
$isUpload | boolean set to true if the file has just been uploaded. | |
리턴 | SubmissionFile |
public newDataObjectByGenreId ( $genreId ) : SubmissionFile | ||
$genreId | integer The genre is required to identify the right file implementation. | |
리턴 | SubmissionFile |
public setAsLatestRevision ( $revisedFileId, $newFileId, $submissionId, $fileStage ) : SubmissionFile | ||
$revisedFileId | integer the revised file | |
$newFileId | integer the file that will become the latest revision of the revised file. | |
$submissionId | integer the submission id the two files must belong to. | |
$fileStage | integer the file stage the two files must belong to. | |
리턴 | SubmissionFile | the new revision or null if something went wrong. |
public transferOwnership ( $oldUserId, $newUserId ) | ||
$oldUserId | int User ID of old user (to be deleted) | |
$newUserId | int User ID of new user (to receive assets belonging to old user) |
public updateObject ( $updatedFile, $previousFileId = null, $previousRevision = null ) : SubmissionFile | ||
$updatedFile | SubmissionFile | |
$previousFileId | integer The file id before the file was changed. Must only be given if the file id changed so that the previous file can be identified. | |
$previousRevision | integer The revision before the file was changed. Must only be given if the revision changed so that the previous file can be identified. | |
리턴 | SubmissionFile | The updated file. This file may be of a different file implementation than the file passed into the method if the genre of the file didn't fit its implementation. |