Interface nsITransactionType

The nsITransaction interface.

This interface is implemented by an object that needs to execute some behavior that must be tracked by the transaction manager.

Hierarchy

Properties

isTransient: boolean

The transaction's transient state. This attribute is checked by the transaction manager after the transaction's Execute() method is called. If the transient state is false, a reference to the transaction is held by the transaction manager so that the transactions' undoTransaction() and redoTransaction() methods can be called. If the transient state is true, the transaction manager returns immediately after the transaction's doTransaction() method is called, no references to the transaction are maintained. Transient transactions cannot be undone or redone by the transaction manager.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Executes the transaction.

    Returns void

  • Returns EditTransactionBasePtr

  • Attempts to merge a transaction into "this" transaction. Both transactions must be in their undo state, doTransaction() methods already called. The transaction manager calls this method to coalesce a new transaction with the transaction on the top of the undo stack. This method returns a boolean value that indicates the merge result. A true value indicates that the transactions were merged successfully, a false value if the merge was not possible or failed. If true, the transaction manager will Release() the new transacton instead of pushing it on the undo stack.

    Parameters

    • aTransaction: nsITransaction

      the previously executed transaction to merge.

    Returns boolean

  • Executes the transaction again. Can only be called on a transaction that was previously undone.

    In most cases, the redoTransaction() method will actually call the doTransaction() method to execute the transaction again.

    Returns void

  • Restores the state to what it was before the transaction was executed.

    Returns void

Generated using TypeDoc