Class adobeDPS-Transaction
- Extends:
- adobeDPS-Transaction -> adobeDPS-Class
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)
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)
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)
id
: String
The Unique id of this Transaction. Will be set when the Transaction is registered with the
TransactionManager.
state
: adobeDPS-TransactionState
The state of this Transaction.
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
error
: adobeDPS-TransactionError
The TransactionError associated with this transaction, assuming an error has occurred.
isCancelable
: Boolean
Whether this Transaction can be canceled.
- Default Value:
- false
isPausable
: Boolean
Whether this Transaction can be paused.
- Default Value:
- false
isDeterminate
: Boolean
Whether this Transaction is determinate (has progress). If true, you can expect to
receive progressSignals from this transaction.
- Default Value:
- false
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
Method Details
Whether this transaction is of type FolioStateChangingTransaction
- Returns:
- adobeDPS-Transaction true or false
Start this transaction.
- Throws:
- Error If the transaction wasn't properly initialized
- Returns:
- adobeDPS-Transaction The started transaction
Pauses a transaction.
isPausable must be true.
- Throws:
-
Error If
isPausableis false or ifisPausableis true and this function is not overridden - Returns:
- adobeDPS-Transaction The paused transaction
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
Cancels a transaction. The transaction must be ongoing and
isCancelable must be true.
- Throws:
-
Error If
isCancelableis false or ifisCancelableis true and this function is not overridden - Returns:
- adobeDPS-Transaction The canceled transaction
©2012-2013 Adobe Systems, inc
Documentation generated by JsDoc Toolkit 2.4.0 on Fri Feb 01 2013 13:18:40 GMT-0800 (PST)
Documentation generated by JsDoc Toolkit 2.4.0 on Fri Feb 01 2013 13:18:40 GMT-0800 (PST)