Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct () | |
& | _checkForRevision (&$uploadedFile, &$submissionFiles) |
_getMetadataForm ($request) | |
_getUploadedFileInfo ($uploadedFile) | |
_onlyNumbersDiffer ($a, $b) | |
confirmRevision ($args, $request) | |
displayFileUploadForm ($args, $request) | |
editMetadata ($args, $request) | |
finishFileSubmission ($args, $request) | |
getAssocId () | |
getAssocType () | |
getFileStage () | |
getReviewRound () | |
getRevisedFileId () | |
getRevisionOnly () | |
getStageId () | |
getSubmission () | |
getUploaderRoles () | |
initialize ($request) | |
startWizard ($args, $request) | |
uploadFile ($args, $request) | |
![]() | |
addPolicy ($authorizationPolicy, $addToTop=false) | |
addRoleAssignment ($roleIds, $operations) | |
authorize ($request, &$args, $roleAssignments) | |
getApiToken () | |
& | getAuthorizedContext () |
& | getAuthorizedContextObject ($assocType) |
& | getDispatcher () |
getFirstUserContext ($user, $contexts) | |
getId () | |
getLastAuthorizationMessage () | |
getRoleAssignment ($roleId) | |
getRoleAssignments () | |
getSiteRedirectContext ($request) | |
getTargetContext ($request, &$contextsCount=null) | |
index ($args, $request) | |
markRoleAssignmentsChecked () | |
requireSSL () | |
setApiToken ($apiToken) | |
setDispatcher ($dispatcher) | |
setEnforceRestrictedSite ($enforceRestrictedSite) | |
setId ($id) | |
setupTemplate ($request) | |
validate ($requiredContexts=null, $request=null) | |
Data Fields | |
$_assocId | |
$_assocType | |
$_fileStage | |
$_reviewRound | |
$_revisedFileId | |
$_revisionOnly | |
$_uploaderRoles | |
![]() | |
$_authorizationDecisionManager | |
$_checks = array() | |
$_dispatcher | |
$_enforceRestrictedSite = true | |
$_id | |
$_isBackendPage = false | |
$_roleAssignments = array() | |
$_roleAssignmentsChecked = false | |
Protected Member Functions | |
_attachEntities ($submissionFile) | |
Additional Inherited Members | |
![]() | |
static | getPageParamName ($rangeName) |
static | getRangeInfo ($request, $rangeName, $contextData=null) |
static | hashPageContext ($request, $contextData=array()) |
![]() | |
$_apiToken = null | |
Definition at line 23 of file PKPFileUploadWizardHandler.inc.php.
PKPFileUploadWizardHandler::__construct | ( | ) |
Constructor
Reimplemented from PKPHandler.
Definition at line 70 of file PKPFileUploadWizardHandler.inc.php.
References PKPHandler\addRoleAssignment().
|
protected |
Attach any dependent entities to a new file upload.
$submissionFile | SubmissionFile |
Reimplemented in FileUploadWizardHandler.
Definition at line 313 of file PKPFileUploadWizardHandler.inc.php.
References PKPApplication\get(), DAORegistry\getDAO(), getReviewRound(), and getSubmission().
Referenced by confirmRevision(), and uploadFile().
& PKPFileUploadWizardHandler::_checkForRevision | ( | & | $uploadedFile, |
& | $submissionFiles | ||
) |
Check if the uploaded file has a similar name to an existing file which would then be a candidate for a revised file.
$uploadedFile | SubmissionFile |
$submissionFiles | array a list of submission files to check the uploaded file against. |
Definition at line 511 of file PKPFileUploadWizardHandler.inc.php.
References _onlyNumbersDiffer(), and Config\getVar().
Referenced by uploadFile().
PKPFileUploadWizardHandler::_getMetadataForm | ( | $request | ) |
Retrieve the requested meta-data form.
$request | Request |
Definition at line 497 of file PKPFileUploadWizardHandler.inc.php.
References PKPHandler\getAuthorizedContextObject(), getReviewRound(), and getStageId().
Referenced by editMetadata().
PKPFileUploadWizardHandler::_getUploadedFileInfo | ( | $uploadedFile | ) |
Create an array that describes an uploaded file which can be used in a JSON response.
SubmissionFile | $uploadedFile |
Definition at line 578 of file PKPFileUploadWizardHandler.inc.php.
Referenced by confirmRevision(), and uploadFile().
PKPFileUploadWizardHandler::_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 553 of file PKPFileUploadWizardHandler.inc.php.
Referenced by _checkForRevision().
PKPFileUploadWizardHandler::confirmRevision | ( | $args, | |
$request | |||
) |
Confirm that the uploaded file is a revision of an earlier uploaded file.
$args | array |
$request | Request |
Definition at line 425 of file PKPFileUploadWizardHandler.inc.php.
References _attachEntities(), _getUploadedFileInfo(), getReviewRound(), and getSubmission().
PKPFileUploadWizardHandler::displayFileUploadForm | ( | $args, | |
$request | |||
) |
Render the file upload form in its initial state.
$args | array |
$request | Request |
Definition at line 241 of file PKPFileUploadWizardHandler.inc.php.
References getSubmission().
PKPFileUploadWizardHandler::editMetadata | ( | $args, | |
$request | |||
) |
Edit the metadata of the latest revision of the requested submission file.
$args | array |
$request | Request |
Definition at line 460 of file PKPFileUploadWizardHandler.inc.php.
References _getMetadataForm().
PKPFileUploadWizardHandler::finishFileSubmission | ( | $args, | |
$request | |||
) |
Display the final tab of the modal
$args | array |
$request | Request |
Definition at line 472 of file PKPFileUploadWizardHandler.inc.php.
References PKPTemplateManager\getManager(), and getSubmission().
PKPFileUploadWizardHandler::getAssocId | ( | ) |
Get the assoc id (if any)
Definition at line 203 of file PKPFileUploadWizardHandler.inc.php.
References $_assocId.
PKPFileUploadWizardHandler::getAssocType | ( | ) |
Get the assoc type (if any)
Definition at line 195 of file PKPFileUploadWizardHandler.inc.php.
References $_assocType.
PKPFileUploadWizardHandler::getFileStage | ( | ) |
Get the workflow stage file storage that we upload files to. One of the SUBMISSION_FILE_* constants.
Definition at line 155 of file PKPFileUploadWizardHandler.inc.php.
References $_fileStage.
Referenced by startWizard().
PKPFileUploadWizardHandler::getReviewRound | ( | ) |
Get review round object.
Definition at line 179 of file PKPFileUploadWizardHandler.inc.php.
References PKPHandler\getAuthorizedContextObject().
Referenced by _attachEntities(), _getMetadataForm(), confirmRevision(), initialize(), startWizard(), and uploadFile().
PKPFileUploadWizardHandler::getRevisedFileId | ( | ) |
Get the id of the file to be revised (if any).
Definition at line 187 of file PKPFileUploadWizardHandler.inc.php.
References $_revisedFileId.
PKPFileUploadWizardHandler::getRevisionOnly | ( | ) |
Does this uploader only allow revisions and no new files?
Definition at line 171 of file PKPFileUploadWizardHandler.inc.php.
References $_revisionOnly.
Referenced by initialize().
PKPFileUploadWizardHandler::getStageId | ( | ) |
Get the authorized workflow stage.
Definition at line 145 of file PKPFileUploadWizardHandler.inc.php.
References PKPHandler\getAuthorizedContextObject().
Referenced by _getMetadataForm(), and startWizard().
PKPFileUploadWizardHandler::getSubmission | ( | ) |
The submission to which we upload files.
Definition at line 136 of file PKPFileUploadWizardHandler.inc.php.
References PKPHandler\getAuthorizedContextObject().
Referenced by _attachEntities(), confirmRevision(), displayFileUploadForm(), finishFileSubmission(), startWizard(), and uploadFile().
PKPFileUploadWizardHandler::getUploaderRoles | ( | ) |
Get the uploader roles.
Definition at line 163 of file PKPFileUploadWizardHandler.inc.php.
References $_uploaderRoles.
Referenced by startWizard().
PKPFileUploadWizardHandler::initialize | ( | $request | ) |
Subclasses can override this method to configure the handler.
NB: This method will be called after validation and authorization.
$request | PKPRequest |
Reimplemented from PKPHandler.
Definition at line 90 of file PKPFileUploadWizardHandler.inc.php.
References fatalError(), getReviewRound(), getRevisionOnly(), and AppLocale\requireComponents().
PKPFileUploadWizardHandler::startWizard | ( | $args, | |
$request | |||
) |
Displays the file upload wizard.
$args | array |
$request | Request |
Definition at line 216 of file PKPFileUploadWizardHandler.inc.php.
References getFileStage(), PKPHandler\getId(), PKPTemplateManager\getManager(), getReviewRound(), getStageId(), getSubmission(), and getUploaderRoles().
PKPFileUploadWizardHandler::uploadFile | ( | $args, | |
$request | |||
) |
Upload a file and render the modified upload wizard.
$args | array |
$request | Request |
Definition at line 262 of file PKPFileUploadWizardHandler.inc.php.
References _attachEntities(), _checkForRevision(), _getUploadedFileInfo(), getReviewRound(), and getSubmission().
integer PKPFileUploadWizardHandler::$_assocId |
Definition at line 64 of file PKPFileUploadWizardHandler.inc.php.
Referenced by getAssocId().
integer PKPFileUploadWizardHandler::$_assocType |
Definition at line 58 of file PKPFileUploadWizardHandler.inc.php.
Referenced by getAssocType().
integer PKPFileUploadWizardHandler::$_fileStage |
Definition at line 28 of file PKPFileUploadWizardHandler.inc.php.
Referenced by getFileStage().
int PKPFileUploadWizardHandler::$_reviewRound |
Definition at line 46 of file PKPFileUploadWizardHandler.inc.php.
integer PKPFileUploadWizardHandler::$_revisedFileId |
Definition at line 52 of file PKPFileUploadWizardHandler.inc.php.
Referenced by getRevisedFileId().
boolean PKPFileUploadWizardHandler::$_revisionOnly |
Definition at line 40 of file PKPFileUploadWizardHandler.inc.php.
Referenced by getRevisionOnly().
array PKPFileUploadWizardHandler::$_uploaderRoles |
Definition at line 34 of file PKPFileUploadWizardHandler.inc.php.
Referenced by getUploaderRoles().