Open Journal Systems
3.3.0
|
Public Member Functions | |
assignRevisionToReviewRound ($fileId, $revision, $reviewRound) | |
baseQueryForFileSelection () | |
changePubId ($pubObjectId, $pubIdType, $pubId) | |
copyFile ($context, $submissionFile, $fileStage) | |
deleteAllPubIds ($contextId, $pubIdType) | |
deleteAllRevisionsByAssocId ($assocType, $assocId, $fileStage=null) | |
deleteAllRevisionsById ($fileId, $fileStage=null, $submissionId=null) | |
deleteAllRevisionsByReviewRound ($reviewRoundId) | |
deleteAllRevisionsBySubmissionId ($submissionId, $fileStage=null) | |
deleteLatestRevisionById ($fileId, $fileStage=null, $submissionId=null) | |
deletePubId ($pubObjectId, $pubIdType) | |
deleteReviewRoundAssignment ($submissionId, $stageId, $fileId, $revision) | |
deleteRevision ($submissionFile) | |
deleteRevisionById ($fileId, $revision, $fileStage=null, $submissionId=null) | |
fromRow ($row, $fileImplementation=null) | |
getAllFileStages () | |
getAllRevisions ($fileId, $fileStage=null, $submissionId=null, $rangeInfo=null) | |
getAllRevisionsByAssocId ($assocType, $assocId, $fileStage=null, $rangeInfo=null) | |
getByBestId ($fileId, $submissionId) | |
getByPubId ($pubIdType, $pubId, $submissionId=null, $contextId=null) | |
getBySubmissionId ($submissionId, $rangeInfo=null) | |
getDelegateClassNames () | |
getFileIdsBySetting ($settingName, $settingValue, $submissionId=null, $contextId=null) | |
getGenreCategoryMapping () | |
getLatestRevision ($fileId, $fileStage=null, $submissionId=null) | |
getLatestRevisionNumber ($fileId) | |
getLatestRevisions ($submissionId, $fileStage=null, $rangeInfo=null) | |
getLatestRevisionsByAssocId ($assocType, $assocId, $submissionId=null, $fileStage=null, $rangeInfo=null) | |
getLatestRevisionsByReviewRound ($reviewRound, $fileStage=null) | |
getRevision ($fileId, $revision, $fileStage=null, $submissionId=null) | |
getRevisionsByReviewRound ($reviewRound, $fileStage=null, $uploaderUserId=null) | |
getWorkflowStageId ($submissionFile) | |
insertObject ($submissionFile, $sourceFile, $isUpload=false) | |
newDataObjectByGenreId ($genreId) | |
pubIdExists ($pubIdType, $pubId, $excludePubObjectId, $contextId) | |
setAsLatestRevision ($revisedFileId, $newFileId, $submissionId, $fileStage) | |
transferOwnership ($oldUserId, $newUserId) | |
updateObject ($updatedFile, $previousFileId=null, $previousRevision=null) | |
Public Member Functions inherited from DAO | |
__construct ($dataSource=null, $callHooks=true) | |
concat () | |
convertFromDB ($value, $type) | |
convertToDB ($value, &$type) | |
dateFromDB ($d) | |
datetimeFromDB ($dt) | |
datetimeToDB ($dt) | |
dateToDB ($d) | |
flushCache () | |
formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true) | |
getAdditionalFieldNames () | |
getAffectedRows () | |
getDataObjectSettings ($tableName, $idFieldName, $idFieldValue, $dataObject) | |
getDataSource () | |
getDirectionMapping ($direction) | |
getDriver () | |
getLocaleFieldNames () | |
getType ($value) | |
handleError ($dataSource, $sql) | |
nullOrInt ($value) | |
replace ($table, $arrFields, $keyCols) | |
& | retrieve ($sql, $params=false, $callHooks=true) |
& | retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true) |
& | retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true) |
& | retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true) |
setCacheDir () | |
setDataSource ($dataSource) | |
update ($sql, $params=false, $callHooks=true, $dieOnError=true) | |
updateDataObjectSettings ($tableName, $dataObject, $idArray) | |
Data Fields | |
$_delegates = array() | |
Data Fields inherited from DAO | |
$_dataSource | |
Additional Inherited Members | |
Static Public Member Functions inherited from DAO | |
static | getDataChangedEvent ($elementId=null, $parentElementId=null, $content='') |
Protected Member Functions inherited from DAO | |
_getInsertId ($table='', $id='') | |
Abstract base class for retrieving and modifying SubmissionFile objects and their decendents (e.g. SubmissionFile, SubmissionArtworkFile).
This class provides access to all SubmissionFile implementations. It instantiates and uses delegates internally to provide the right database access behaviour depending on the type of the accessed file.
The state classes are named after the data object plus the "DAODelegate" extension, e.g. SubmissionArtworkFileDAODelegate. An internal factory method will provide the correct implementation to the DAO.
This design allows clients to access all types of files without having to know about the specific file implementation unless the client really wishes to access file implementation specific data. This also enables us to let delegates inherit from each others to avoid code duplication between DAO implementations.
Definition at line 38 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::assignRevisionToReviewRound | ( | $fileId, | |
$revision, | |||
$reviewRound | |||
) |
Assign file to a review round.
$fileId | int The file to be assigned. |
$revision | int The revision of the file to be assigned. |
$reviewRound | ReviewRound |
Definition at line 455 of file SubmissionFileDAO.inc.php.
References deleteReviewRoundAssignment(), fatalError(), and DAO\update().
SubmissionFileDAO::baseQueryForFileSelection | ( | ) |
Return the basic join over all file class tables.
Definition at line 648 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::changePubId | ( | $pubObjectId, | |
$pubIdType, | |||
$pubId | |||
) |
Change the public ID of a submission.
$pubObjectId | int ID of the pub object |
$pubIdType | string One of the NLM pub-id-type values or 'other::something' if not part of the official NLM list (see http://dtd.nlm.nih.gov/publishing/tag-library/n-4zh0.html). |
$pubId | string |
Reimplemented from PKPPubIdPluginDAO.
Definition at line 728 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::copyFile | ( | $context, | |
$submissionFile, | |||
$fileStage | |||
) |
Make a copy of the file to the specified file stage
$context | Context |
$submissionFile | SubmissionFile |
$fileStage | int SUBMISSION_FILE_... |
Definition at line 1112 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::deleteAllPubIds | ( | $contextId, | |
$pubIdType | |||
) |
Delete the public IDs of all submissions in this context.
$contextId | int |
$pubIdType | string One of the NLM pub-id-type values or 'other::something' if not part of the official NLM list (see http://dtd.nlm.nih.gov/publishing/tag-library/n-4zh0.html). |
Reimplemented from PKPPubIdPluginDAO.
Definition at line 744 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::deleteAllRevisionsByAssocId | ( | $assocType, | |
$assocId, | |||
$fileStage = null |
|||
) |
Retrieve all files associated to a certain object.
$assocType | int ASSOC_TYPE_... |
$assocId | int ID corresponding to specified assocType. |
$fileStage | int (optional) further restricts the selection to a given file stage. |
Definition at line 545 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::deleteAllRevisionsById | ( | $fileId, | |
$fileStage = null , |
|||
$submissionId = null |
|||
) |
Delete all revisions of a file, optionally restricted to a given file stage.
$fileId | int File ID. |
$fileStage | int (optional) further restricts the selection to a given file stage. |
$submissionId | int (optional) for validation purposes only |
Definition at line 521 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::deleteAllRevisionsByReviewRound | ( | $reviewRoundId | ) |
Remove all file assignements for the given review round.
$reviewRoundId | int The review round ID. |
Definition at line 553 of file SubmissionFileDAO.inc.php.
References DAO\update().
SubmissionFileDAO::deleteAllRevisionsBySubmissionId | ( | $submissionId, | |
$fileStage = null |
|||
) |
Delete all revisions of all files of a submission, optionally restricted to a given file stage.
$submissionId | int Submission ID. |
$fileStage | int (optional) further restricts the selection to a given file stage. |
Definition at line 533 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::deleteLatestRevisionById | ( | $fileId, | |
$fileStage = null , |
|||
$submissionId = null |
|||
) |
Delete the latest revision of a submission file by id.
$fileId | int File ID. |
$fileStage | int (optional) further restricts the selection to a given file stage. |
$submissionId | int (optional) for validation purposes only |
Definition at line 507 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::deletePubId | ( | $pubObjectId, | |
$pubIdType | |||
) |
Delete the public ID of a submission.
$pubObjectId | int ID of the pub object |
$pubIdType | string One of the NLM pub-id-type values or 'other::something' if not part of the official NLM list (see http://dtd.nlm.nih.gov/publishing/tag-library/n-4zh0.html). |
Reimplemented from PKPPubIdPluginDAO.
Definition at line 736 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::deleteReviewRoundAssignment | ( | $submissionId, | |
$stageId, | |||
$fileId, | |||
$revision | |||
) |
Remove a specific file assignment from a review round.
$submissionId | int The submission id of the file |
$stageId | int The review round type. |
$fileId | int The file id. |
$revision | int The file revision. |
Definition at line 565 of file SubmissionFileDAO.inc.php.
References DAO\update().
Referenced by assignRevisionToReviewRound().
SubmissionFileDAO::deleteRevision | ( | $submissionFile | ) |
Delete a specific revision of a submission file.
$submissionFile | SubmissionFile |
Definition at line 480 of file SubmissionFileDAO.inc.php.
References deleteRevisionById().
SubmissionFileDAO::deleteRevisionById | ( | $fileId, | |
$revision, | |||
$fileStage = null , |
|||
$submissionId = null |
|||
) |
Delete a specific revision of a submission file by id.
$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 |
Definition at line 494 of file SubmissionFileDAO.inc.php.
Referenced by deleteRevision().
SubmissionFileDAO::fromRow | ( | $row, | |
$fileImplementation = null |
|||
) |
Internal function to return a SubmissionFile object from a row.
$row | array |
$fileImplementation | string |
Definition at line 675 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::getAllFileStages | ( | ) |
SubmissionFileDAO::getAllRevisions | ( | $fileId, | |
$fileStage = null , |
|||
$submissionId = null , |
|||
$rangeInfo = null |
|||
) |
Retrieve all revisions of a submission file.
$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) |
Definition at line 196 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::getAllRevisionsByAssocId | ( | $assocType, | |
$assocId, | |||
$fileStage = null , |
|||
$rangeInfo = null |
|||
) |
Retrieve all files associated to a certain object.
$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) |
Definition at line 236 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::getByBestId | ( | $fileId, | |
$submissionId | |||
) |
Retrieve file by public ID or, failing that, internal file ID and revision; public ID takes precedence.
$fileId | string Either public ID or fileId-revision |
$submissionId | int |
Definition at line 144 of file SubmissionFileDAO.inc.php.
References getByPubId(), and getRevision().
SubmissionFileDAO::getByPubId | ( | $pubIdType, | |
$pubId, | |||
$submissionId = null , |
|||
$contextId = null |
|||
) |
Retrieve file by public file ID
$pubIdType | string One of the NLM pub-id-type values or 'other::something' if not part of the official NLM list (see http://dtd.nlm.nih.gov/publishing/tag-library/n-4zh0.html). |
$pubId | string |
$submissionId | int optional |
$contextId | int optional |
Definition at line 124 of file SubmissionFileDAO.inc.php.
References getFileIdsBySetting(), and getLatestRevision().
Referenced by getByBestId().
SubmissionFileDAO::getBySubmissionId | ( | $submissionId, | |
$rangeInfo = null |
|||
) |
Retrieve all submission files & revisions for a submission.
$submissionId | int Submission ID. |
$rangeInfo | DBResultRange (optional) |
Definition at line 207 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::getDelegateClassNames | ( | ) |
Return the available delegates mapped by lower case class names.
Definition at line 622 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::getFileIdsBySetting | ( | $settingName, | |
$settingValue, | |||
$submissionId = null , |
|||
$contextId = null |
|||
) |
Find file IDs by querying file settings.
$settingName | string |
$settingValue | mixed |
$submissionId | int optional |
$contextId | int optional |
Definition at line 75 of file SubmissionFileDAO.inc.php.
References DAO\retrieve().
Referenced by getByPubId().
SubmissionFileDAO::getGenreCategoryMapping | ( | ) |
Return the mapping of genre categories to the lower case class name of file implementation.
Definition at line 636 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::getLatestRevision | ( | $fileId, | |
$fileStage = null , |
|||
$submissionId = null |
|||
) |
Retrieve the latest revision of a file.
$fileId | int File ID. |
$fileStage | int (optional) further restricts the selection to a given file stage. |
$submissionId | int (optional) for validation purposes only |
Definition at line 166 of file SubmissionFileDAO.inc.php.
Referenced by getByPubId(), and setAsLatestRevision().
SubmissionFileDAO::getLatestRevisionNumber | ( | $fileId | ) |
Retrieve the current revision number for a file.
$fileId | int File ID. |
Definition at line 277 of file SubmissionFileDAO.inc.php.
References DAO\retrieve().
SubmissionFileDAO::getLatestRevisions | ( | $submissionId, | |
$fileStage = null , |
|||
$rangeInfo = null |
|||
) |
Retrieve a list of current revisions.
$submissionId | int Submission ID. |
$fileStage | int (optional) further restricts the selection to a given file stage. |
$rangeInfo | DBResultRange (optional) |
Definition at line 181 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::getLatestRevisionsByAssocId | ( | $assocType, | |
$assocId, | |||
$submissionId = null , |
|||
$fileStage = null , |
|||
$rangeInfo = null |
|||
) |
Retrieve the latest revision of all files associated to a certain object.
$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) |
Definition at line 222 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::getLatestRevisionsByReviewRound | ( | $reviewRound, | |
$fileStage = null |
|||
) |
Get the latest revisions of all files that are in the specified review round.
$reviewRound | ReviewRound |
$fileStage | int SUBMISSION_FILE_... (Optional) |
Definition at line 264 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::getRevision | ( | $fileId, | |
$revision, | |||
$fileStage = null , |
|||
$submissionId = null |
|||
) |
Retrieve a specific revision of a file.
$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 |
Definition at line 61 of file SubmissionFileDAO.inc.php.
Referenced by getByBestId(), and updateObject().
SubmissionFileDAO::getRevisionsByReviewRound | ( | $reviewRound, | |
$fileStage = null , |
|||
$uploaderUserId = null |
|||
) |
Get all file revisions assigned to the given review round.
$reviewRound | ReviewRound |
$fileStage | int SUBMISSION_FILE_... |
$uploaderUserId | int Uploader's user ID |
Definition at line 248 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::getWorkflowStageId | ( | $submissionFile | ) |
Get the workflow stage id associated with a submission file
Maps a file stage to a workflow stage. When a file is associated with a review round or query, it will get the stage id from the round or query.
$submissionFile | SubmissionFile |
Definition at line 759 of file SubmissionFileDAO.inc.php.
References DAORegistry\getDAO().
SubmissionFileDAO::insertObject | ( | $submissionFile, | |
$sourceFile, | |||
$isUpload = false |
|||
) |
Insert a new 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. |
Definition at line 305 of file SubmissionFileDAO.inc.php.
References strtolower_codesafe().
SubmissionFileDAO::newDataObjectByGenreId | ( | $genreId | ) |
Construct a new data object corresponding to this DAO.
$genreId | integer The genre is required to identify the right file implementation. |
Definition at line 599 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::pubIdExists | ( | $pubIdType, | |
$pubId, | |||
$excludePubObjectId, | |||
$contextId | |||
) |
Checks if public identifier exists (other than for the specified submission ID, which is treated as an exception).
$pubIdType | string One of the NLM pub-id-type values or 'other::something' if not part of the official NLM list (see http://dtd.nlm.nih.gov/publishing/tag-library/n-4zh0.html). |
$pubId | string |
$excludePubObjectId | int ID of the pub object to be excluded from the search. |
$contextId | int |
Reimplemented from PKPPubIdPluginDAO.
Definition at line 720 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::setAsLatestRevision | ( | $revisedFileId, | |
$newFileId, | |||
$submissionId, | |||
$fileStage | |||
) |
Set the latest revision of a file as the latest revision of another file.
$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. |
Definition at line 420 of file SubmissionFileDAO.inc.php.
References getLatestRevision(), and updateObject().
SubmissionFileDAO::transferOwnership | ( | $oldUserId, | |
$newUserId | |||
) |
Transfer the ownership of the submission files of one user to another.
$oldUserId | int User ID of old user (to be deleted) |
$newUserId | int User ID of new user (to receive assets belonging to old user) |
Definition at line 584 of file SubmissionFileDAO.inc.php.
SubmissionFileDAO::updateObject | ( | $updatedFile, | |
$previousFileId = null , |
|||
$previousRevision = null |
|||
) |
Update an existing submission file.
NB: We implement a delete + insert strategy to deal with various casting problems (e.g. file implementation/genre may change, file path may change, etc.).
$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. |
Definition at line 344 of file SubmissionFileDAO.inc.php.
References getRevision(), and strtolower_codesafe().
Referenced by setAsLatestRevision().
array SubmissionFileDAO::$_delegates = array() |
a private list of delegates that provide operations for different SubmissionFile implementations.
Definition at line 46 of file SubmissionFileDAO.inc.php.