Class adobeDPS-Transaction
- Extends:
- adobeDPS-Transaction -> adobeDPS-Class
- Platforms:
- iOS, Android, Windows
The base Transaction
Constructor
[inner]
Create a new Transaction
Fields
Field | Defined By | |
---|---|---|
Signal to indicate that the state of this transaction has changed.
|
Transaction
|
|
Signal to indicate that the transaction has completed.
|
Transaction
|
|
Signal to indicate transaction progress.
|
Transaction
|
|
id
: String
The Unique id of this Transaction.
|
Transaction
|
|
The state of this Transaction.
|
Transaction
|
|
progress
: Number
The progress of this Transaction.
|
Transaction
|
|
The TransactionError associated with this transaction, assuming an error has occurred.
|
Transaction
|
|
isCancelable
: Boolean = false
Whether this Transaction can be canceled.
|
Transaction
|
|
isPausable
: Boolean = false
Whether this Transaction can be paused.
|
Transaction
|
|
isDeterminate
: Boolean = false
Whether this Transaction is determinate (has progress).
|
Transaction
|
|
isFailureTerminal
: Boolean = false
Whether failure of the transaction is a terminal state.
|
Transaction
|
Methods
Method | Defined By | |
---|---|---|
Whether this transaction is of type FolioStateChangingTransaction
|
Transaction
|
|
start()
Start this transaction.
|
Transaction
|
|
pause()
Pauses a transaction.
|
Transaction
|
|
resume()
Resumes a paused transaction.
|
Transaction
|
|
cancel()
Cancels a transaction.
|
Transaction
|
|
toString()
Gets the string representation of this instance.
|
Class Detail
adobeDPS-Transaction()
[inner]
Create a new Transaction
- Throws:
- {Error} If the constructor was not called with new
Field Details
stateChangedSignal
: adobeDPS-Signal
Signal to indicate that the state of this transaction has changed.
Callback Signature: stateChangedHandler(adobeDPS-Transaction)
Callback Signature: stateChangedHandler(adobeDPS-Transaction)
- Platforms:
- iOS, Android, Windows
completedSignal
: adobeDPS-Signal
Signal to indicate that the transaction has completed. This could mean that it finished,
failed, or been canceled. You will need to check the state and the error field to check the results.
Callback Signature: transactionCompletedHandler(adobeDPS-Transaction)
Callback Signature: transactionCompletedHandler(adobeDPS-Transaction)
- Platforms:
- iOS, Android, Windows
progressSignal
: adobeDPS-Signal
Signal to indicate transaction progress. Will only be dispatched if
Callback Signature: progressHandler(adobeDPS-Transaction)
isDeterminate
is true.
Sends this.progress
to the handlers.
Callback Signature: progressHandler(adobeDPS-Transaction)
- Platforms:
- iOS, Android, Windows
id
: String
The Unique id of this Transaction. Will be set when the Transaction is registered with the
TransactionManager.
- Platforms:
- iOS, Android, Windows
state
: adobeDPS-TransactionState
The state of this Transaction.
- Platforms:
- iOS, Android, Windows
progress
: Number
The progress of this Transaction.
Represented as a 100-based percentage ( values between 0 and 100).
NOTE: Will remain 0 if
Represented as a 100-based percentage ( values between 0 and 100).
NOTE: Will remain 0 if
isDeterminate
is false
- Platforms:
- iOS, Android, Windows
error
: adobeDPS-TransactionError
The TransactionError associated with this transaction, assuming an error has occurred.
- Platforms:
- iOS, Android, Windows
isCancelable
: Boolean
Whether this Transaction can be canceled.
- Default Value:
- false
- Platforms:
- iOS, Android, Windows
isPausable
: Boolean
Whether this Transaction can be paused.
- Default Value:
- false
- Platforms:
- iOS, Android, Windows
isDeterminate
: Boolean
Whether this Transaction is determinate (has progress). If true, you can expect to
receive progressSignals from this transaction.
- Default Value:
- false
- Platforms:
- iOS, Android, Windows
isFailureTerminal
: Boolean
Whether failure of the transaction is a terminal state. When this is true, the
completedSignal will be dispatched when the state changes to FAILED. Otherwise,
FAILED should be treated like PAUSED and can be resumed.
- Default Value:
- false
- Platforms:
- iOS, Android, Windows
Method Details
Whether this transaction is of type FolioStateChangingTransaction
- Returns:
- adobeDPS-Transaction true or false
- Platforms:
- iOS, Android, Windows
Start this transaction.
- Throws:
- Error If the transaction wasn't properly initialized
- Returns:
- adobeDPS-Transaction The started transaction
- Platforms:
- iOS, Android, Windows
Pauses a transaction.
isPausable
must be true.
- Throws:
-
Error If
isPausable
is false or ifisPausable
is true and this function is not overridden - Returns:
- adobeDPS-Transaction The paused transaction
- Platforms:
- iOS, Android, Windows
Resumes a paused transaction.
state
must be adobeDPS-TransactionState#PAUSED.
- Throws:
- Error If the Transaction is not currently paused or if it is and this function is not overridden
- Returns:
- adobeDPS-Transaction The now-active transaction
- Platforms:
- iOS, Android, Windows
Cancels a transaction. The transaction must be ongoing and
isCancelable
must be true.
- Throws:
-
Error If
isCancelable
is false or ifisCancelable
is true and this function is not overridden - Returns:
- adobeDPS-Transaction The canceled transaction
- Platforms:
- iOS, Android, Windows
©2012-2013 Adobe Systems, inc
Documentation generated by JsDoc Toolkit 2.4.0 on Mon Aug 31 2015 09:23:40 GMT-0700 (PDT)
Documentation generated by JsDoc Toolkit 2.4.0 on Mon Aug 31 2015 09:23:40 GMT-0700 (PDT)