A controller that handles basic server-side operations of the file upload wizard. More...
Public Member Functions | |
| & | _checkForRevision (&$uploadedFile, &$monographFiles) |
| & | _getMetadataForm (&$request) |
| & | _getUploadedFileInfo (&$uploadedFile) |
| _onlyNumbersDiffer ($a, $b) | |
| confirmRevision ($args, &$request) | |
| displayFileUploadForm ($args, &$request) | |
| editMetadata ($args, &$request) | |
| FileUploadWizardHandler () | |
| finishFileSubmission ($args, &$request) | |
| getAssocId () | |
| getAssocType () | |
| getFileStage () | |
| & | getReviewRound () |
| getRevisedFileId () | |
| getRevisionOnly () | |
| getUploaderRoles () | |
| initialize (&$request, $args) | |
| saveMetadata ($args, &$request) | |
| startWizard ($args, &$request) | |
| uploadFile ($args, &$request, $fileModifyCallback=null) | |
A controller that handles basic server-side operations of the file upload wizard.
Definition at line 30 of file FileUploadWizardHandler.inc.php.
| & FileUploadWizardHandler._checkForRevision | ( | &$ | uploadedFile, | |
| &$ | monographFiles | |||
| ) |
Check if the uploaded file has a similar name to an existing file which would then be a candidate for a revised file.
| $uploadedFile | MonographFile | |
| $monographFiles | array a list of monograph files to check the uploaded file against. |
Definition at line 467 of file FileUploadWizardHandler.inc.php.
References _onlyNumbersDiffer().
Referenced by uploadFile().
| & FileUploadWizardHandler._getMetadataForm | ( | &$ | request | ) |
Retrieve the requested meta-data form.
| $request | Request |
Definition at line 439 of file FileUploadWizardHandler.inc.php.
References FileManagementHandler.getMonograph(), getReviewRound(), and FileManagementHandler.getStageId().
Referenced by editMetadata(), and saveMetadata().
| & FileUploadWizardHandler._getUploadedFileInfo | ( | &$ | uploadedFile | ) |
Create an array that describes an uploaded file which can be used in a JSON response.
| MonographFile | $uploadedFile |
Definition at line 546 of file FileUploadWizardHandler.inc.php.
Referenced by confirmRevision(), and uploadFile().
| FileUploadWizardHandler._onlyNumbersDiffer | ( | $ | a, | |
| $ | b | |||
| ) |
Helper function: check if the only difference between $a and $b is numeric. Used to exclude well-named but nearly identical file names from the revision detection pile (e.g. "Chapter 1" and "Chapter 2")
| $a | string | |
| $b | string |
Definition at line 521 of file FileUploadWizardHandler.inc.php.
Referenced by _checkForRevision().
| FileUploadWizardHandler.confirmRevision | ( | $ | args, | |
| &$ | request | |||
| ) |
Confirm that the uploaded file is a revision of an earlier uploaded file.
| $args | array | |
| $request | Request |
Definition at line 352 of file FileUploadWizardHandler.inc.php.
References _getUploadedFileInfo(), getFileStage(), FileManagementHandler.getMonograph(), getReviewRound(), and FileManagementHandler.getStageId().
| FileUploadWizardHandler.displayFileUploadForm | ( | $ | args, | |
| &$ | request | |||
| ) |
Render the file upload form in its initial state.
| $args | array | |
| $request | Request |
Definition at line 270 of file FileUploadWizardHandler.inc.php.
References getAssocId(), getAssocType(), getFileStage(), FileManagementHandler.getMonograph(), getReviewRound(), getRevisedFileId(), getRevisionOnly(), FileManagementHandler.getStageId(), and getUploaderRoles().
| FileUploadWizardHandler.editMetadata | ( | $ | args, | |
| &$ | request | |||
| ) |
Edit the metadata of the latest revision of the requested submission file.
| $args | array | |
| $request | Request |
Definition at line 384 of file FileUploadWizardHandler.inc.php.
References _getMetadataForm().
| FileUploadWizardHandler.FileUploadWizardHandler | ( | ) |
Constructor
Definition at line 56 of file FileUploadWizardHandler.inc.php.
| FileUploadWizardHandler.finishFileSubmission | ( | $ | args, | |
| &$ | request | |||
| ) |
Display the final tab of the modal
| $args | array | |
| $request | Request |
Definition at line 417 of file FileUploadWizardHandler.inc.php.
References FileManagementHandler.getMonograph().
| FileUploadWizardHandler.getAssocId | ( | ) |
Get the assoc id (if any)
Definition at line 218 of file FileUploadWizardHandler.inc.php.
Referenced by displayFileUploadForm(), startWizard(), and uploadFile().
| FileUploadWizardHandler.getAssocType | ( | ) |
Get the assoc type (if any)
Definition at line 210 of file FileUploadWizardHandler.inc.php.
Referenced by displayFileUploadForm(), startWizard(), and uploadFile().
| FileUploadWizardHandler.getFileStage | ( | ) |
Get the workflow stage file storage that we upload files to. One of the MONOGRAPH_FILE_* constants.
Definition at line 170 of file FileUploadWizardHandler.inc.php.
Referenced by confirmRevision(), displayFileUploadForm(), startWizard(), and uploadFile().
| & FileUploadWizardHandler.getReviewRound | ( | ) |
Get review round object.
Definition at line 194 of file FileUploadWizardHandler.inc.php.
Referenced by _getMetadataForm(), confirmRevision(), displayFileUploadForm(), initialize(), startWizard(), and uploadFile().
| FileUploadWizardHandler.getRevisedFileId | ( | ) |
Get the id of the file to be revised (if any).
Definition at line 202 of file FileUploadWizardHandler.inc.php.
Referenced by displayFileUploadForm(), and startWizard().
| FileUploadWizardHandler.getRevisionOnly | ( | ) |
Does this uploader only allow revisions and no new files?
Definition at line 186 of file FileUploadWizardHandler.inc.php.
Referenced by displayFileUploadForm(), initialize(), startWizard(), and uploadFile().
| FileUploadWizardHandler.getUploaderRoles | ( | ) |
Get the uploader roles.
Definition at line 178 of file FileUploadWizardHandler.inc.php.
Referenced by displayFileUploadForm(), and startWizard().
| FileUploadWizardHandler.initialize | ( | &$ | request, | |
| $ | args | |||
| ) |
Reimplemented from FileManagementHandler.
Definition at line 76 of file FileUploadWizardHandler.inc.php.
References getReviewRound(), and getRevisionOnly().
| FileUploadWizardHandler.saveMetadata | ( | $ | args, | |
| &$ | request | |||
| ) |
Save the metadata of the latest revision of the requested submission file
| $args | array | |
| $request | Request |
Definition at line 398 of file FileUploadWizardHandler.inc.php.
References _getMetadataForm().
| FileUploadWizardHandler.startWizard | ( | $ | args, | |
| &$ | request | |||
| ) |
Displays the file upload wizard.
| $args | array | |
| $request | Request |
Definition at line 231 of file FileUploadWizardHandler.inc.php.
References getAssocId(), getAssocType(), getFileStage(), FileManagementHandler.getMonograph(), getReviewRound(), getRevisedFileId(), getRevisionOnly(), FileManagementHandler.getStageId(), and getUploaderRoles().
| FileUploadWizardHandler.uploadFile | ( | $ | args, | |
| &$ | request, | |||
| $ | fileModifyCallback = null | |||
| ) |
Upload a file and render the modified upload wizard.
| $args | array | |
| $request | Request |
Definition at line 292 of file FileUploadWizardHandler.inc.php.
References _checkForRevision(), _getUploadedFileInfo(), getAssocId(), getAssocType(), getFileStage(), FileManagementHandler.getMonograph(), getReviewRound(), getRevisionOnly(), and FileManagementHandler.getStageId().
1.7.1