nsIBookmarkTransactionService is a service designed to handle nsITransactions that correspond to changes in bookmarks. It is here as a service so that we can keep the transactions around without holding onto the whole global js scope+window.
[scriptable, uuid(f6305e79-1760-4991-ab4d-a42db60f0e67)]
Constants
Constants corresponding to the 3 different types of transactions possible Note that moving bookmarks is a combination of REMOVE+INSERT
Attributes
A reference to the transaction manager for bookmarks
Methods
Performs a new transaction according to the specified parameters
@param aType the type of transaction being performed. Must be one
of the three constants defined below
@param aAction the action to be performed. Expected values are:
import, insert, move, and remove (see bookmarks.js)
@param aItem the rdf node the transaction is being performed on
@param aIndex the index of the item in its RDF Container
@param aParent the rdf-parent of aItem, that is, the folder it
should be inserted into.
@param aRemovedProps properties removed from the item in question
void
createAndCommitTxn(in unsigned long aType, in AString aAction, in nsIRDFNode aItem, in long aIndex, in nsIRDFResource aParent, in unsigned long aPropCount, [array, size_is(aPropCount)] in nsIRDFLiteral aRemovedProps)
Ends the batch transaction in process, subject to the note above about multiple, successive calls of startBatch(). See also nsITransactionManager::endBatch
Signals the transaction manager that a series of transactions are going to
be performed, but that, for the purposes of undo and redo, they should all
be regarded as a single transaction. That is, a single undo() call will
undo all of the transactions created and committed between startBatch() and
endBatch(). See also nsITransactionManager::beginBatch
@note if startBatch() is called multiple times. The batch will not end
endBatch() has been called the same number of times.