Open Journal Systems  3.3.0
Deposit Class Reference
Inheritance diagram for Deposit:
DataObject

Public Member Functions

 __construct ($uuid)
 
 getComplete ()
 
 getDateCreated ()
 
 getDateModified ()
 
 getDepositObjects ()
 
 getExportDepositError ()
 
 getJournalId ()
 
 getLastStatusDate ()
 
 getLocalStatus ()
 
 getLockssAgreementStatus ()
 
 getLockssReceivedStatus ()
 
 getLockssStatus ()
 
 getLockssSyncingStatus ()
 
 getNewStatus ()
 
 getObjectId ()
 
 getObjectType ()
 
 getPackagedStatus ()
 
 getPackagingFailedStatus ()
 
 getProcessingStatus ()
 
 getReceivedStatus ()
 
 getSentStatus ()
 
 getStatus ()
 
 getTransferredStatus ()
 
 getUUID ()
 
 getValidatedStatus ()
 
 setDateCreated ($dateCreated)
 
 setDateModified ($dateModified)
 
 setExportDepositError ($exportDepositError)
 
 setJournalId ($journalId)
 
 setLastStatusDate ($dateLastStatus)
 
 setLockssAgreementStatus ($status=true)
 
 setLockssReceivedStatus ($status=true)
 
 setLockssSyncingStatus ($status=true)
 
 setNewStatus ()
 
 setPackagedStatus ($status=true)
 
 setPackagingFailedStatus ($status=true)
 
 setReceivedStatus ($status=true)
 
 setSentStatus ($status=true)
 
 setStatus ($status)
 
 setTransferredStatus ($status=true)
 
 setUUID ($uuid)
 
 setValidatedStatus ($status=true)
 
- Public Member Functions inherited from DataObject
 __construct ()
 
 addSupportedMetadataAdapter ($metadataAdapter)
 
 extractMetadata ($metadataSchema)
 
 getAdditionalMetadataFieldNames ()
 
getAllData ()
 
 getDAO ()
 
getData ($key, $locale=null)
 
 getHasLoadableAdapters ()
 
 getId ()
 
 getLocaleMetadataFieldNames ()
 
 getLocalizedData ($key, $preferredLocale=null)
 
 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)
 
 unsetData ($key, $locale=null)
 
 upcastTo ($targetObject)
 

Protected Member Functions

 _getStatusField ($field)
 
 _setStatusField ($value, $field)
 

Additional Inherited Members

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

Detailed Description

Container for deposit objects that are submitted to a PLN.

Definition at line 14 of file Deposit.inc.php.

Constructor & Destructor Documentation

◆ __construct()

Deposit::__construct (   $uuid)

Constructor

Parameters
$uuidstring|null
Returns
Deposit

Definition at line 21 of file Deposit.inc.php.

References setUUID().

Member Function Documentation

◆ _getStatusField()

Deposit::_getStatusField (   $field)
protected

Get a status from the bit field.

Parameters
$fieldint one of the PLN_PLUGIN_DEPOSIT_STATUS_* constants.
Returns
int

Definition at line 191 of file Deposit.inc.php.

References getStatus().

Referenced by getLockssAgreementStatus(), getLockssReceivedStatus(), getLockssSyncingStatus(), getPackagedStatus(), getPackagingFailedStatus(), getReceivedStatus(), getSentStatus(), getTransferredStatus(), and getValidatedStatus().

◆ _setStatusField()

Deposit::_setStatusField (   $value,
  $field 
)
protected

Set a status value.

Parameters
boolean$value
int$fieldone of the PLN_PLUGIN_DEPOSIT_STATUS_* constants.

Definition at line 200 of file Deposit.inc.php.

References getStatus(), and setStatus().

Referenced by setLockssAgreementStatus(), setLockssReceivedStatus(), setLockssSyncingStatus(), setPackagedStatus(), setPackagingFailedStatus(), setReceivedStatus(), setSentStatus(), setTransferredStatus(), and setValidatedStatus().

◆ getComplete()

Deposit::getComplete ( )

Return a string representation of wether or not the deposit processing is complete ie. LOCKSS has acheived agreement.

Returns
string

Definition at line 167 of file Deposit.inc.php.

References getLockssAgreementStatus().

◆ getDateCreated()

Deposit::getDateCreated ( )

Get the date of deposit creation

Returns
DateTime

Definition at line 372 of file Deposit.inc.php.

References DataObject\getData().

◆ getDateModified()

Deposit::getDateModified ( )

Get the modification date of the deposit

Returns
DateTime

Definition at line 388 of file Deposit.inc.php.

References DataObject\getData().

◆ getDepositObjects()

Deposit::getDepositObjects ( )

Get all deposit objects of this deposit.

Returns
array of DepositObject

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

References DAORegistry\getDAO(), DataObject\getId(), and getJournalId().

Referenced by getObjectId(), and getObjectType().

◆ getExportDepositError()

Deposit::getExportDepositError ( )

Get the export deposit error message.

Returns
string|null

Definition at line 412 of file Deposit.inc.php.

References DataObject\getData().

◆ getJournalId()

Deposit::getJournalId ( )

Get journal id

Returns
int

Definition at line 77 of file Deposit.inc.php.

References DataObject\getData().

Referenced by getDepositObjects().

◆ getLastStatusDate()

Deposit::getLastStatusDate ( )

Get the date of the last status change

Returns
DateTime

Definition at line 356 of file Deposit.inc.php.

References DataObject\getData().

◆ getLocalStatus()

Deposit::getLocalStatus ( )

Return a string representation of the local status.

Returns
string

Definition at line 111 of file Deposit.inc.php.

References getNewStatus(), getPackagedStatus(), getPackagingFailedStatus(), and getTransferredStatus().

◆ getLockssAgreementStatus()

Deposit::getLockssAgreementStatus ( )

Get whether there's been an update to a deposit

Returns
int

Definition at line 340 of file Deposit.inc.php.

References _getStatusField().

Referenced by getComplete(), and getLockssStatus().

◆ getLockssReceivedStatus()

Deposit::getLockssReceivedStatus ( )

Get whether there's been an error from the staging server

Returns
int

Definition at line 308 of file Deposit.inc.php.

References _getStatusField().

Referenced by getLockssStatus().

◆ getLockssStatus()

Deposit::getLockssStatus ( )

Return a string representation of the LOCKSS status.

Returns
string

Definition at line 148 of file Deposit.inc.php.

References getLockssAgreementStatus(), getLockssReceivedStatus(), and getLockssSyncingStatus().

◆ getLockssSyncingStatus()

Deposit::getLockssSyncingStatus ( )

Get whether there's been a local error in the deposit process

Returns
int

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

References _getStatusField().

Referenced by getLockssStatus().

◆ getNewStatus()

Deposit::getNewStatus ( )

Get new (blank) deposit status

Returns
int

Definition at line 175 of file Deposit.inc.php.

References getStatus().

Referenced by getLocalStatus().

◆ getObjectId()

Deposit::getObjectId ( )

Get the id of deposit objects in this deposit.

Returns
int

Definition at line 42 of file Deposit.inc.php.

References getDepositObjects().

◆ getObjectType()

Deposit::getObjectType ( )

Get the type of deposit objects in this deposit.

Returns
string One of PLN_PLUGIN_DEPOSIT_SUPPORTED_OBJECTS

Definition at line 32 of file Deposit.inc.php.

References getDepositObjects().

◆ getPackagedStatus()

Deposit::getPackagedStatus ( )

Get whether the deposit has been packaged for the PLN

Returns
int

Definition at line 212 of file Deposit.inc.php.

References _getStatusField().

Referenced by getLocalStatus().

◆ getPackagingFailedStatus()

Deposit::getPackagingFailedStatus ( )

Get whether the PLN has been notified of the available deposit

Returns
int

Definition at line 244 of file Deposit.inc.php.

References _getStatusField().

Referenced by getLocalStatus().

◆ getProcessingStatus()

Deposit::getProcessingStatus ( )

Return a string representation of the processing status.

Returns
string

Definition at line 131 of file Deposit.inc.php.

References getReceivedStatus(), getSentStatus(), and getValidatedStatus().

◆ getReceivedStatus()

Deposit::getReceivedStatus ( )

Get whether the PLN has retrieved the deposit from the journal

Returns
int

Definition at line 260 of file Deposit.inc.php.

References _getStatusField().

Referenced by getProcessingStatus().

◆ getSentStatus()

Deposit::getSentStatus ( )

Get whether the deposit has been synced across its nodes

Returns
int

Definition at line 292 of file Deposit.inc.php.

References _getStatusField().

Referenced by getProcessingStatus().

◆ getStatus()

Deposit::getStatus ( )

Get deposit status - this is the raw bit field, the other status functions are more immediately useful.

Returns
int

Definition at line 94 of file Deposit.inc.php.

References DataObject\getData().

Referenced by _getStatusField(), _setStatusField(), and getNewStatus().

◆ getTransferredStatus()

Deposit::getTransferredStatus ( )

Get whether the PLN has been notified of the available deposit

Returns
int

Definition at line 228 of file Deposit.inc.php.

References _getStatusField().

Referenced by getLocalStatus().

◆ getUUID()

Deposit::getUUID ( )

Get deposit uuid

Returns
string

Definition at line 61 of file Deposit.inc.php.

References DataObject\getData().

◆ getValidatedStatus()

Deposit::getValidatedStatus ( )

Get whether the PLN is syncing the deposit across its nodes

Returns
int

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

References _getStatusField().

Referenced by getProcessingStatus().

◆ setDateCreated()

Deposit::setDateCreated (   $dateCreated)

Set the date of deposit creation

Parameters
$dateCreatedboolean

Definition at line 380 of file Deposit.inc.php.

References DataObject\setData().

◆ setDateModified()

Deposit::setDateModified (   $dateModified)

Set the modification date of the deposit

Parameters
$dateModifiedboolean

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

References DataObject\setData().

◆ setExportDepositError()

Deposit::setExportDepositError (   $exportDepositError)

Set the export deposit error message.

Parameters
$exportDepositErrorstring

Definition at line 404 of file Deposit.inc.php.

References DataObject\setData().

◆ setJournalId()

Deposit::setJournalId (   $journalId)

Set journal id

Parameters
$journalIdint

Definition at line 85 of file Deposit.inc.php.

References DataObject\setData().

◆ setLastStatusDate()

Deposit::setLastStatusDate (   $dateLastStatus)

Set set the date of the last status change

Parameters
$dateLastStatusDateTime

Definition at line 364 of file Deposit.inc.php.

References DataObject\setData().

◆ setLockssAgreementStatus()

Deposit::setLockssAgreementStatus (   $status = true)

Set whether there's been an update to a deposit

Parameters
$statusboolean

Definition at line 348 of file Deposit.inc.php.

References _setStatusField().

◆ setLockssReceivedStatus()

Deposit::setLockssReceivedStatus (   $status = true)

Set whether there's been an error from the staging server

Parameters
$statusboolean

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

References _setStatusField().

◆ setLockssSyncingStatus()

Deposit::setLockssSyncingStatus (   $status = true)

Set whether there's been a local error in the deposit process

Parameters
$statusboolean

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

References _setStatusField().

◆ setNewStatus()

Deposit::setNewStatus ( )

Set new (blank) deposit status

Definition at line 182 of file Deposit.inc.php.

References setStatus().

◆ setPackagedStatus()

Deposit::setPackagedStatus (   $status = true)

Set whether the deposit has been packaged for the PLN

Parameters
$statusboolean

Definition at line 220 of file Deposit.inc.php.

References _setStatusField().

◆ setPackagingFailedStatus()

Deposit::setPackagingFailedStatus (   $status = true)

Set whether the PLN has been notified of the available deposit

Parameters
$statusboolean

Definition at line 252 of file Deposit.inc.php.

References _setStatusField().

◆ setReceivedStatus()

Deposit::setReceivedStatus (   $status = true)

Set whether the PLN has retrieved the deposit from the journal

Parameters
$statusboolean

Definition at line 268 of file Deposit.inc.php.

References _setStatusField().

◆ setSentStatus()

Deposit::setSentStatus (   $status = true)

Set whether the deposit has been synced across its nodes

Parameters
$statusboolean

Definition at line 300 of file Deposit.inc.php.

References _setStatusField().

◆ setStatus()

Deposit::setStatus (   $status)

Set deposit status - this is the raw bit field, the other status functions are more immediately useful.

Parameters
$statusint

Definition at line 103 of file Deposit.inc.php.

References DataObject\setData().

Referenced by _setStatusField(), and setNewStatus().

◆ setTransferredStatus()

Deposit::setTransferredStatus (   $status = true)

Set whether the PLN has been notified of the available deposit

Parameters
$statusboolean

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

References _setStatusField().

◆ setUUID()

Deposit::setUUID (   $uuid)

Set deposit uuid

Parameters
$uuidstring

Definition at line 69 of file Deposit.inc.php.

References DataObject\setData().

Referenced by __construct().

◆ setValidatedStatus()

Deposit::setValidatedStatus (   $status = true)

Set whether the PLN is syncing the deposit across its nodes

Parameters
$statusboolean

Definition at line 284 of file Deposit.inc.php.

References _setStatusField().


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