Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
SubmissionFile Class Reference
Inheritance diagram for SubmissionFile:
PKPFile DataObject MonographFile ArtworkFile

Public Member Functions

 _fileStageToPath ($fileStage)
 
 _generateFileName ()
 
 copyEditableMetadataFrom ($submissionFile)
 
 getAssocId ()
 
 getAssocType ()
 
 getClientFileName ()
 
 getDateModified ()
 
 getDirectSalesPrice ()
 
 getDocumentType ()
 
 getExtension ()
 
 getFileId ()
 
 getFileIdAndRevision ()
 
 getFileLabel ($locale=null)
 
 getFilePath ()
 
 getFileStage ()
 
 getGenreId ()
 
 getLocalizedName ()
 
 getName ($locale)
 
 getRevision ()
 
 getRound ()
 
 getSalesType ()
 
 getServerFileName ()
 
 getSourceFileId ()
 
 getSourceRevision ()
 
 getSubmissionId ()
 
 getType ()
 
 getUploaderUserId ()
 
 getUserGroupId ()
 
 getViewable ()
 
 getViews ()
 
 isInlineable ()
 
 setAssocId ($assocId)
 
 setAssocType ($assocType)
 
 setDateModified ($dateModified)
 
 setDirectSalesPrice ($directSalesPrice)
 
 setFileId ($fileId)
 
 setFileStage ($fileStage)
 
 setGenreId ($genreId)
 
 setName ($name, $locale)
 
 setRevision ($revision)
 
 setRound ($round)
 
 setSalesType ($salesType)
 
 setServerFileName ($fileName)
 
 setSourceFileId ($sourceFileId)
 
 setSourceRevision ($sourceRevision)
 
 setSubmissionId ($submissionId)
 
 setType ($type)
 
 setUploaderUserId ($uploaderUserId)
 
 setUserGroupId ($userGroupId)
 
 setViewable ($viewable)
 
 SubmissionFile ()
 
- Public Member Functions inherited from PKPFile
 getDateUploaded ()
 
 getFileId ()
 
 getFilePath ()
 
 getFileSize ()
 
 getFileType ()
 
 getNiceFileSize ()
 
 getOriginalFileName ()
 
 getServerFileName ()
 
 PKPFile ()
 
 setDateUploaded ($dateUploaded)
 
 setFileId ($fileId)
 
 setFileSize ($fileSize)
 
 setFileType ($fileType)
 
 setOriginalFileName ($originalFileName)
 
 setServerFileName ($fileName)
 
- Public Member Functions inherited from DataObject
 addSupportedMetadataAdapter ($metadataAdapter)
 
 DataObject ()
 
 extractMetadata ($metadataSchema)
 
 getAdditionalMetadataFieldNames ()
 
getAllData ()
 
getData ($key, $locale=null)
 
 getHasLoadableAdapters ()
 
 getId ()
 
 getLocaleMetadataFieldNames ()
 
getLocalizedData ($key)
 
 getMetadataFieldNames ($translated=true)
 
 getSetMetadataFieldNames ($translated=true)
 
 getSupportedExtractionAdapters ()
 
 getSupportedInjectionAdapters ()
 
 getSupportedMetadataSchemas ()
 
 hasData ($key, $locale=null)
 
 injectMetadata ($metadataDescription)
 
 removeSupportedMetadataAdapter ($metadataSchemaName)
 
 setAllData (&$data)
 
 setData ($key, $value, $locale=null)
 
 setHasLoadableAdapters ($hasLoadableAdapters)
 
 setId ($id)
 
 upcastTo ($targetObject)
 

Additional Inherited Members

- Public Attributes inherited from DataObject
 $_data = array()
 
 $_extractionAdaptersLoaded = false
 
 $_hasLoadableAdapters = false
 
 $_injectionAdaptersLoaded = false
 
 $_metadataExtractionAdapters = array()
 
 $_metadataInjectionAdapters = array()
 

Detailed Description

Submission file class.

Definition at line 36 of file SubmissionFile.inc.php.

Member Function Documentation

SubmissionFile::_fileStageToPath (   $fileStage)

Return path associated with a file stage code.

Parameters
$fileStagestring
Returns
string

Definition at line 524 of file SubmissionFile.inc.php.

Referenced by getFilePath().

SubmissionFile::_generateFileName ( )

Generate the unique filename for this submission file.

Returns
string

Definition at line 503 of file SubmissionFile.inc.php.

References PKPFile\getDateUploaded(), getExtension(), getFileId(), getFileStage(), getGenreId(), getRevision(), and getSubmissionId().

Referenced by getServerFileName().

SubmissionFile::copyEditableMetadataFrom (   $submissionFile)

Copy the user-facing (editable) metadata from another submission file.

Parameters
$submissionFileSubmissionFile

Definition at line 437 of file SubmissionFile.inc.php.

References setName().

SubmissionFile::getAssocId ( )

Get associated ID of file. (Used, e.g., for email log attachments.)

Returns
int

Definition at line 104 of file SubmissionFile.inc.php.

References DataObject\getData().

SubmissionFile::getAssocType ( )

Get type that is associated with this file.

Returns
int

Definition at line 381 of file SubmissionFile.inc.php.

References DataObject\getData().

SubmissionFile::getClientFileName ( )

Get the filename that should be sent to clients when downloading.

Returns
string

Definition at line 446 of file SubmissionFile.inc.php.

References DAORegistry\getDAO(), PKPFile\getDateUploaded(), getExtension(), getFileId(), getFileStage(), getGenreId(), getRevision(), and getSubmissionId().

SubmissionFile::getDateModified ( )

Get modified date of file.

Returns
date

Definition at line 298 of file SubmissionFile.inc.php.

References DataObject\getData().

SubmissionFile::getDirectSalesPrice ( )

Get price of submission file.

Returns
numeric

Definition at line 120 of file SubmissionFile.inc.php.

References DataObject\getData().

SubmissionFile::getDocumentType ( )

Get the file's document type (enumerated types)

Returns
string

Definition at line 188 of file SubmissionFile.inc.php.

References PKPFile\getFileType().

SubmissionFile::getExtension ( )

Get the file's extension.

Returns
string

Definition at line 178 of file SubmissionFile.inc.php.

Referenced by _generateFileName(), and getClientFileName().

SubmissionFile::getFileId ( )

Get ID of file.

Returns
int

Definition at line 52 of file SubmissionFile.inc.php.

References DataObject\getData().

Referenced by _generateFileName(), getClientFileName(), getFileIdAndRevision(), and getViews().

SubmissionFile::getFileIdAndRevision ( )

Get the combined key of the file consisting of the file id and the revision.

Returns
string

Definition at line 225 of file SubmissionFile.inc.php.

References getFileId(), and getRevision().

SubmissionFile::getFileLabel (   $locale = null)

Build a file name label.

Returns
string

Definition at line 414 of file SubmissionFile.inc.php.

References getLocalizedName(), getName(), PKPFile\getOriginalFileName(), and getRevision().

SubmissionFile::getFilePath ( )

Return a context-aware file path.

Definition at line 396 of file SubmissionFile.inc.php.

References _fileStageToPath(), getFileStage(), getServerFileName(), Application\getSubmissionDAO(), and getSubmissionId().

Referenced by ArtworkFile\setContactAuthor().

SubmissionFile::getFileStage ( )

Get file stage of the file.

Returns
int SUBMISSION_FILE_...

Definition at line 281 of file SubmissionFile.inc.php.

References DataObject\getData().

Referenced by _generateFileName(), getClientFileName(), getFilePath(), and getType().

SubmissionFile::getGenreId ( )

Get the genre id of this file (i.e. referring to Manuscript, Index, etc) Foreign key into genres table

Returns
int

Definition at line 208 of file SubmissionFile.inc.php.

References DataObject\getData().

Referenced by _generateFileName(), and getClientFileName().

SubmissionFile::getLocalizedName ( )

Get the localized name of the file

Returns
string

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

References DataObject\getLocalizedData().

Referenced by getFileLabel().

SubmissionFile::getName (   $locale)

Get the name of the file

Parameters
$localestring
Returns
string

Definition at line 162 of file SubmissionFile.inc.php.

References DataObject\getData().

Referenced by getFileLabel().

SubmissionFile::getRevision ( )

Get revision number.

Returns
int

Definition at line 216 of file SubmissionFile.inc.php.

References DataObject\getData().

Referenced by _generateFileName(), getClientFileName(), getFileIdAndRevision(), and getFileLabel().

SubmissionFile::getRound ( )

Get round.

Returns
int

Definition at line 316 of file SubmissionFile.inc.php.

References DataObject\getData().

SubmissionFile::getSalesType ( )

Get sales type of submission file.

Returns
string

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

References DataObject\getData().

SubmissionFile::getServerFileName ( )
See Also
PKPFile::getServerFileName() Generate the File name from identification data rather than retrieving it from the database.

Definition at line 473 of file SubmissionFile.inc.php.

References _generateFileName().

Referenced by getFilePath().

SubmissionFile::getSourceFileId ( )

Get source file ID of this file.

Returns
int

Definition at line 72 of file SubmissionFile.inc.php.

References DataObject\getData().

SubmissionFile::getSourceRevision ( )

Get source revision of this file.

Returns
int

Definition at line 88 of file SubmissionFile.inc.php.

References DataObject\getData().

SubmissionFile::getSubmissionId ( )

Get ID of submission.

Returns
int

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

References DataObject\getData().

Referenced by _generateFileName(), getClientFileName(), getFilePath(), and MonographFile\getMonographId().

SubmissionFile::getType ( )

Get type of the file.

Returns
int

Definition at line 263 of file SubmissionFile.inc.php.

References getFileStage(), and Config\getVar().

SubmissionFile::getUploaderUserId ( )

Get the uploader's user id.

Returns
integer

Definition at line 357 of file SubmissionFile.inc.php.

References DataObject\getData().

SubmissionFile::getUserGroupId ( )

Get the uploader's user group id

Returns
int

Definition at line 373 of file SubmissionFile.inc.php.

References DataObject\getData().

SubmissionFile::getViewable ( )

Get viewable.

Returns
boolean

Definition at line 332 of file SubmissionFile.inc.php.

References DataObject\getData().

SubmissionFile::getViews ( )

Get submission file number of public downloads.

Returns
int

Definition at line 490 of file SubmissionFile.inc.php.

References getFileId().

SubmissionFile::isInlineable ( )

Check if the file may be displayed inline. FIXME: Move to DAO to remove coupling of the domain object to its DAO.

Returns
boolean

Definition at line 557 of file SubmissionFile.inc.php.

References DAORegistry\getDAO().

SubmissionFile::setAssocId (   $assocId)

Set associated ID of file. (Used, e.g., for email log attachments.)

Parameters
$assocIdint

Definition at line 112 of file SubmissionFile.inc.php.

References DataObject\setData().

SubmissionFile::setAssocType (   $assocType)

Set type that is associated with this file.

Parameters
$assocTypeint

Definition at line 389 of file SubmissionFile.inc.php.

References DataObject\setData().

SubmissionFile::setDateModified (   $dateModified)

Set modified date of file.

Parameters
$dateModifieddate

Definition at line 307 of file SubmissionFile.inc.php.

SubmissionFile::setDirectSalesPrice (   $directSalesPrice)

Set direct sales price.

Parameters
$directSalesPricenumeric

Definition at line 128 of file SubmissionFile.inc.php.

References DataObject\setData().

SubmissionFile::setFileId (   $fileId)

Set ID of file.

Parameters
$fileIdint

Definition at line 62 of file SubmissionFile.inc.php.

References DataObject\setData().

SubmissionFile::setFileStage (   $fileStage)

Set file stage of the file.

Parameters
$fileStageint SUBMISSION_FILE_...

Definition at line 289 of file SubmissionFile.inc.php.

References DataObject\setData().

Referenced by setType().

SubmissionFile::setGenreId (   $genreId)

Set the genre id of this file (i.e. referring to Manuscript, Index, etc) Foreign key into genres table

Parameters
$genreIdint

Definition at line 199 of file SubmissionFile.inc.php.

References DataObject\setData().

SubmissionFile::setName (   $name,
  $locale 
)

Set the name of the file

Parameters
$namestring
$localestring

Definition at line 153 of file SubmissionFile.inc.php.

References DataObject\setData().

Referenced by copyEditableMetadataFrom().

SubmissionFile::setRevision (   $revision)

Set revision number.

Parameters
$revisionint

Definition at line 239 of file SubmissionFile.inc.php.

References DataObject\setData().

SubmissionFile::setRound (   $round)

Set round.

Parameters
$roundint

Definition at line 324 of file SubmissionFile.inc.php.

SubmissionFile::setSalesType (   $salesType)

Set sales type.

Parameters
$salesTypestring

Definition at line 144 of file SubmissionFile.inc.php.

References DataObject\setData().

SubmissionFile::setServerFileName (   $fileName)
See Also
PKPFile::setFileName() Do not allow setting the File name of a Submission File directly because it is generated from identification data.

Definition at line 482 of file SubmissionFile.inc.php.

SubmissionFile::setSourceFileId (   $sourceFileId)

Set source file ID of this file.

Parameters
$sourceFileIdint

Definition at line 80 of file SubmissionFile.inc.php.

References DataObject\setData().

SubmissionFile::setSourceRevision (   $sourceRevision)

Set source revision of this file.

Parameters
$sourceRevisionint

Definition at line 96 of file SubmissionFile.inc.php.

References DataObject\setData().

SubmissionFile::setSubmissionId (   $submissionId)

Set ID of submission.

Parameters
$submissionIdint

Definition at line 255 of file SubmissionFile.inc.php.

References DataObject\setData().

Referenced by MonographFile\setMonographId().

SubmissionFile::setType (   $type)

Set type of the file.

Parameters
$typeint

Definition at line 272 of file SubmissionFile.inc.php.

References Config\getVar(), and setFileStage().

SubmissionFile::setUploaderUserId (   $uploaderUserId)

Set the uploader's user id.

Parameters
$uploaderUserIdinteger

Definition at line 349 of file SubmissionFile.inc.php.

References DataObject\setData().

SubmissionFile::setUserGroupId (   $userGroupId)

Set the uploader's user group id

Parameters
$userGroupIdint

Definition at line 365 of file SubmissionFile.inc.php.

References DataObject\setData().

SubmissionFile::setViewable (   $viewable)

Set viewable.

Parameters
$viewableboolean

Definition at line 341 of file SubmissionFile.inc.php.

SubmissionFile::SubmissionFile ( )

Constructor.

Definition at line 40 of file SubmissionFile.inc.php.


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