Open Journal Systems  3.3.0
PKPManageFileApiHandler Class Reference
Inheritance diagram for PKPManageFileApiHandler:
Handler PKPHandler ManageFileApiHandler

Public Member Functions

 __construct ()
 
 authorize ($request, &$args, $roleAssignments)
 
 deleteFile ($args, $request)
 
 detachEntities ($submissionFile, $submissionId, $stageId)
 
 editMetadata ($args, $request)
 
 editMetadataTab ($args, $request)
 
 getFileManager ($contextId, $submissionId)
 
 logDeletionEvent ($request, $submission, $submissionFile, $user)
 
 removeFileIndex ($submission, $submissionFile)
 
 saveMetadata ($args, $request)
 
- Public Member Functions inherited from PKPHandler
 addPolicy ($authorizationPolicy, $addToTop=false)
 
 addRoleAssignment ($roleIds, $operations)
 
 getApiToken ()
 
getAuthorizedContext ()
 
getAuthorizedContextObject ($assocType)
 
getDispatcher ()
 
 getFirstUserContext ($user, $contexts)
 
 getId ()
 
 getLastAuthorizationMessage ()
 
 getRoleAssignment ($roleId)
 
 getRoleAssignments ()
 
 getSiteRedirectContext ($request)
 
 getTargetContext ($request, &$contextsCount=null)
 
 index ($args, $request)
 
 initialize ($request)
 
 markRoleAssignmentsChecked ()
 
 requireSSL ()
 
 setApiToken ($apiToken)
 
 setDispatcher ($dispatcher)
 
 setEnforceRestrictedSite ($enforceRestrictedSite)
 
 setId ($id)
 
 setupTemplate ($request)
 
 validate ($requiredContexts=null, $request=null)
 

Protected Member Functions

 getUpdateNotifications ()
 

Additional Inherited Members

- Static Public Member Functions inherited from PKPHandler
static getPageParamName ($rangeName)
 
static getRangeInfo ($request, $rangeName, $contextData=null)
 
static hashPageContext ($request, $contextData=array())
 
- Data Fields inherited from PKPHandler
 $_authorizationDecisionManager
 
 $_checks = array()
 
 $_dispatcher
 
 $_enforceRestrictedSite = true
 
 $_id
 
 $_isBackendPage = false
 
 $_roleAssignments = array()
 
 $_roleAssignmentsChecked = false
 
- Protected Attributes inherited from PKPHandler
 $_apiToken = null
 

Detailed Description

Class defining an AJAX API for file manipulation.

Definition at line 20 of file PKPManageFileApiHandler.inc.php.

Constructor & Destructor Documentation

◆ __construct()

PKPManageFileApiHandler::__construct ( )

Constructor.

Reimplemented from PKPHandler.

Reimplemented in ManageFileApiHandler.

Definition at line 25 of file PKPManageFileApiHandler.inc.php.

References PKPHandler\addRoleAssignment(), and AppLocale\requireComponents().

Member Function Documentation

◆ authorize()

PKPManageFileApiHandler::authorize (   $request,
$args,
  $roleAssignments 
)

Authorize this request.

Routers will call this method automatically thereby enforcing authorization. This method will be called before the validate() method and before passing control on to the handler operation.

NB: This method will be called once for every request only.

Parameters
$requestRequest
$argsarray request arguments
$roleAssignmentsarray the operation role assignment, see getRoleAssignment() for more details.
Returns
boolean

Reimplemented from PKPHandler.

Definition at line 38 of file PKPManageFileApiHandler.inc.php.

References PKPHandler\addPolicy().

◆ deleteFile()

PKPManageFileApiHandler::deleteFile (   $args,
  $request 
)

◆ detachEntities()

PKPManageFileApiHandler::detachEntities (   $submissionFile,
  $submissionId,
  $stageId 
)

Detach any dependent entities to this file upload.

Parameters
$submissionFileSubmissionFile
$submissionIdinteger
$stageIdinteger

Reimplemented in ManageFileApiHandler.

Definition at line 276 of file PKPManageFileApiHandler.inc.php.

References DAORegistry\getDAO().

Referenced by deleteFile().

◆ editMetadata()

PKPManageFileApiHandler::editMetadata (   $args,
  $request 
)

Edit submission file metadata modal.

Parameters
$argsarray
$requestRequest
Returns
JSONMessage JSON object

Definition at line 136 of file PKPManageFileApiHandler.inc.php.

References editMetadataTab(), PKPHandler\getAuthorizedContextObject(), and PKPTemplateManager\getManager().

◆ editMetadataTab()

PKPManageFileApiHandler::editMetadataTab (   $args,
  $request 
)

Edit submission file metadata tab.

Parameters
$argsarray
$requestRequest
Returns
JSONMessage JSON object

Definition at line 154 of file PKPManageFileApiHandler.inc.php.

References PKPHandler\getAuthorizedContextObject().

Referenced by editMetadata().

◆ getFileManager()

PKPManageFileApiHandler::getFileManager (   $contextId,
  $submissionId 
)

Get the submission file manager.

Parameters
$contextIdint the context id.
$submissionIdint the submission id.
Returns
SubmissionFileManager

Definition at line 247 of file PKPManageFileApiHandler.inc.php.

Referenced by deleteFile().

◆ getUpdateNotifications()

PKPManageFileApiHandler::getUpdateNotifications ( )
protected

Get the list of notifications to be updated on metadata form submission.

Returns
array

Definition at line 266 of file PKPManageFileApiHandler.inc.php.

Referenced by saveMetadata().

◆ logDeletionEvent()

PKPManageFileApiHandler::logDeletionEvent (   $request,
  $submission,
  $submissionFile,
  $user 
)
abstract

Logs the deletion event using app-specific logging classes. Must be implemented by subclasses.

Parameters
$requestPKPRequest
$submissionSubmission
$submissionFileSubmissionFile
$userUser

Reimplemented in ManageFileApiHandler.

Referenced by deleteFile().

◆ removeFileIndex()

PKPManageFileApiHandler::removeFileIndex (   $submission,
  $submissionFile 
)
abstract

Remove the submission file index.

Parameters
$submissionSubmission
$submissionFileSubmissionFile

Reimplemented in ManageFileApiHandler.

Referenced by deleteFile().

◆ saveMetadata()

PKPManageFileApiHandler::saveMetadata (   $args,
  $request 
)

Save the metadata of the latest revision of the requested submission file.

Parameters
$argsarray
$requestRequest
Returns
JSONMessage JSON object

Definition at line 170 of file PKPManageFileApiHandler.inc.php.

References PKPHandler\getAuthorizedContextObject(), DAORegistry\getDAO(), DAO\getDataChangedEvent(), Application\getSubmissionSearchIndex(), getUpdateNotifications(), and SubmissionLog\logEvent().


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