Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
FileApiHandler Class Reference
Inheritance diagram for FileApiHandler:
Handler PKPHandler

Public Member Functions

 _getAccessPolicy ($request, $args, $roleAssignments, $fileIdAndRevision=null)
 
 _getFileManager ($contextId, $submissionId)
 
 downloadAllFiles ($args, $request)
 
 downloadFile ($args, $request)
 
 downloadLibraryFile ($args, $request)
 
 enableLinkAction ($args, $request)
 
 FileApiHandler ()
 
 recordDownload ($args, $request)
 
 recordView ($submissionFile)
 
 viewFile ($args, $request)
 
- Public Member Functions inherited from Handler
 getSiteRedirectContext ($request)
 
 getTargetContext ($request, $bestGuess=true)
 
 getWorkingContexts ($request)
 
 Handler ()
 
- Public Member Functions inherited from PKPHandler
 addCheck (&$handlerValidator)
 
 addPolicy ($authorizationPolicy, $addToTop=false)
 
 addRoleAssignment ($roleIds, $operations)
 
 authorize ($request, &$args, $roleAssignments, $enforceRestrictedSite=true)
 
getAuthorizedContext ()
 
getAuthorizedContextObject ($assocType)
 
getDispatcher ()
 
 getFirstUserContext ($user, $contexts)
 
 getId ()
 
 getLastAuthorizationMessage ()
 
 getLoginExemptions ()
 
 getRoleAssignment ($roleId)
 
 getRoleAssignments ()
 
 getWorkingContexts ($request)
 
 index ($args, $request)
 
 initialize ($request, $args=null)
 
 PKPHandler ()
 
 setDispatcher ($dispatcher)
 
 setId ($id)
 
 setupTemplate ($request)
 
 validate ($requiredContexts=null, $request=null)
 

Additional Inherited Members

- Static Public Member Functions inherited from PKPHandler
static getPageParamName ($rangeName)
 
static getRangeInfo ($request, $rangeName, $contextData=null)
 
static hashPageContext ($request, $contextData=array())
 
- Public Attributes inherited from PKPHandler
 $_authorizationDecisionManager
 
 $_checks = array()
 
 $_dispatcher
 
 $_id
 
 $_roleAssignments = array()
 

Detailed Description

Class defining an AJAX API for supplying file information.

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

Member Function Documentation

FileApiHandler::_getAccessPolicy (   $request,
  $args,
  $roleAssignments,
  $fileIdAndRevision = null 
)

return the application specific file access policy.

Parameters
$requestPKPRequest
$args
$roleAssignmentsarray
$fileIdAndRevisionarray optional
Returns
SubmissionAccessPolicy

Definition at line 236 of file FileApiHandler.inc.php.

FileApiHandler::_getFileManager (   $contextId,
  $submissionId 
)

return the application specific file manager.

Parameters
$contextIdint the context for this manager.
$submissionIdint the submission id.
Returns
SubmissionFileManager

Definition at line 224 of file FileApiHandler.inc.php.

Referenced by downloadAllFiles(), downloadFile(), and viewFile().

FileApiHandler::downloadAllFiles (   $args,
  $request 
)

Download all passed files.

Parameters
$argsarray
$requestRequest

Definition at line 151 of file FileApiHandler.inc.php.

References _getFileManager(), and PKPHandler\getAuthorizedContextObject().

FileApiHandler::downloadFile (   $args,
  $request 
)

Download a file.

Parameters
$argsarray
$requestRequest

Definition at line 84 of file FileApiHandler.inc.php.

References _getFileManager(), and PKPHandler\getAuthorizedContextObject().

FileApiHandler::downloadLibraryFile (   $args,
  $request 
)

Download a library file.

Parameters
$argsarray
$requestRequest

Definition at line 97 of file FileApiHandler.inc.php.

References DAORegistry\getDAO().

FileApiHandler::enableLinkAction (   $args,
  $request 
)

Returns a data changd event to re-enable the link action. Refactored out of recordDownload since library files do not have downloads recorded and are in a different context.

Parameters
$argsaray
$requestRequest
Returns
string

Definition at line 214 of file FileApiHandler.inc.php.

References DAO\getDataChangedEvent().

Referenced by recordDownload().

FileApiHandler::FileApiHandler ( )

Constructor.

Definition at line 30 of file FileApiHandler.inc.php.

References PKPHandler\addRoleAssignment().

FileApiHandler::recordDownload (   $args,
  $request 
)

Record file download and return js event to update grid rows.

Parameters
$argsarray
$requestRequest
Returns
string

Definition at line 189 of file FileApiHandler.inc.php.

References enableLinkAction(), PKPHandler\getAuthorizedContextObject(), and recordView().

FileApiHandler::recordView (   $submissionFile)

record a file view. Must be overridden in subclases.

Parameters
$submissionFileSubmissionFile the file to record.

Definition at line 43 of file FileApiHandler.inc.php.

Referenced by recordDownload().

FileApiHandler::viewFile (   $args,
  $request 
)

View a file.

Parameters
$argsarray
$requestRequest

Definition at line 138 of file FileApiHandler.inc.php.

References _getFileManager(), and PKPHandler\getAuthorizedContextObject().


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