Linux Mac OSX Windows

Implemented by

 nsIPlacesTransactionService is a service designed to handle
 nsITransactions that correspond to changes in Places. It is here as a
 service so that we can keep the transactions around without holding onto
 the global scope of a js window.
[scriptable, uuid(7179d28c-bc41-4110-8225-b3ba7e1cb293)]
interface nsIPlacesTransactionsService : nsITransactionManager

Methods

 Transaction for performing several Places Transactions in a single batch. 
 
 @param aName
        title of the aggregate transactions
 @param aTransactions
        an array of transactions to perform
 @returns nsITransaction object
nsITransaction aggregateTransactions(in AString aName, in nsIVariant aTransactions)
 Transaction for creating a new folder item.

 @param aName
        the name of the new folder
 @param aContainer
        the identifier of the folder in which the new folder should be
        added.
 @param [optional] aIndex
        the index of the item in aContainer, pass -1 or nothing to create
        the item at the end of aContainer.
 @param [optional] aAnnotations
        the annotations to set for the new folder.
 @param [optional] aChildItemsTransactions
        array of transactions for items to be created under the new folder.
 @returns nsITransaction object
nsITransaction createFolder(in AString aName, in long long aContainer, [optional] in long long aIndex, [optional] in nsIVariant aAnnotations, [optional] in nsIVariant aChildItemsTransactions)
 Transaction for creating a new bookmark item

 @param aURI
        the uri of the new bookmark (nsIURI)
 @param aContainer
        the identifier of the folder in which the bookmark should be added.
 @param [optional] aIndex
        the index of the item in aContainer, pass -1 or nothing to create
        the item at the end of aContainer.
 @param [optional] aTitle
        the title of the new bookmark.
 @param [optional] aKeyword
        the keyword of the new bookmark.
 @param [optional] aAnnotations
        the annotations to set for the new bookmark.
 @param [optional] aChildTransactions
        child transactions to commit after creating the bookmark. Prefer
        using any of the arguments above if possible. In general, a child
        transations should be used only if the change it does has to be
        reverted manually when removing the bookmark item.
        a child transaction must support setting its bookmark-item
        identifier via an "id" js setter.
 @returns nsITransaction object
nsITransaction createItem(in nsIURI aURI, in long long aContainer, [optional] in long long aIndex, [optional] in AString aTitle, [optional] in AString aKeyword, [optional] in nsIVariant aAnnotations, [optional] in nsIVariant aChildTransactions)
 Transaction for creating a new live-bookmark item.

 @see nsILivemarksService::createLivemark for documentation regarding the
 first three arguments.

 @param aContainer
        the identifier of the folder in which the live-bookmark should be
        added.
 @param [optional]  aIndex
        the index of the item in aContainer, pass -1 or nothing to create
        the item at the end of aContainer.
 @param [optional] aAnnotations
        the annotations to set for the new live-bookmark.
 @returns nsITransaction object
nsITransaction createLivemark(in nsIURI aFeedURI, in nsIURI aSiteURI, in AString aName, in long long aContainer, [optional] in long long aIndex, [optional] in nsIVariant aAnnotations)
 Transaction for creating a new separator item

 @param aContainer
        the identifier of the folder in which the separator should be
        added.
 @param [optional] aIndex
        the index of the item in aContainer, pass -1 or nothing to create
        the separator at the end of aContainer.
 @returns nsITransaction object
nsITransaction createSeparator(in long long aContainer, [optional] in long long aIndex)
 Transaction for editing a bookmark's keyword.

 @param id
        id of the bookmark to edit
 @param newKeyword
        new keyword for the bookmark
 @returns nsITransaction object
nsITransaction editBookmarkKeyword(in long long aItemId, in AString aNewKeyword)
 Transaction for editing a bookmark's microsummary.

 @param aItemId
        id of the bookmark to edit
 @param aNewMicrosummary
        new microsummary for the bookmark
 @returns nsITransaction object
nsITransaction editBookmarkMicrosummary(in long long aItemId, in nsIMicrosummary aNewMicrosummary)
 Transaction for editing the post data associated with a bookmark.

 @param aItemId
        id of the bookmark to edit
 @param aPostData
        post data
 @returns nsITransaction object
nsITransaction editBookmarkPostData(in long long aItemId, in AString aPostData)
 Transaction for editing a bookmark's uri.

 @param aBookmarkId
        id of the bookmark to edit
 @param aNewURI
        new uri for the bookmark
 @returns nsITransaction object
nsITransaction editBookmarkURI(in long long aBookmarkId, in nsIURI aNewURI)
 Transaction for editing an item's date added property.

 @param aItemId
        id of the item to edit
 @param aNewDateAdded
        new date added for the item 
 @returns nsITransaction object
nsITransaction editItemDateAdded(in long long aItemId, in PRTime aNewDateAdded)
 Transaction for editing a the description of a bookmark or a folder
 
 @param aItemId
        id of the item to edit
 @param aDescription
        new description
 @returns nsITransaction object
nsITransaction editItemDescription(in long long aItemId, in AString aDescription)
 Transaction for editing an item's last modified time.

 @param aItemId
        id of the item to edit
 @param aNewLastModified
        new last modified date for the item 
 @returns nsITransaction object
nsITransaction editItemLastModified(in long long aItemId, in PRTime aNewLastModified)
 Transaction for editting a bookmark's title.

 @param id
        id of the item to edit
 @param newTitle
        new title for the item to edit
 @returns nsITransaction object
nsITransaction editItemTitle(in long long id, in AString newTitle)
 Transaction for editting a live bookmark's feed URI.

 @param folderId
        id of the livemark
 @param uri
        new feed uri
 @returns nsITransaction object
nsITransaction editLivemarkFeedURI(in long long folderId, in nsIURI uri)
 Transaction for editing a live bookmark's site URI.

 @param aFolderId
        id of the livemark
 @param aURI
        new site uri
 @returns nsITransaction object
nsITransaction editLivemarkSiteURI(in long long aFolderId, in nsIURI aURI)
 Transaction for moving an Item.

 @param aItemId
        the id of the item to move
 @param aNewContainer
        id of the new container to move to
 @param aNewIndex
        index of the new position to move to
 @returns nsITransaction object
nsITransaction moveItem(in long long aItemId, in long long aNewContainer, in long long aNewIndex)
 Transaction for removing an Item

 @param aItemId
        id of the item to remove
 @returns nsITransaction object
nsITransaction removeItem(in long long aItemId)
 Transaction for setting/unsetting Load-in-sidebar annotation

 @param aBookmarkId
        id of the selected bookmark
 @param aLoadInSidebar
        boolean value
 @returns nsITransaction object
nsITransaction setLoadInSidebar(in long long aBookmarkId, in boolean aLoadInSidebar)
 Transaction for sorting a folder by name

 @param aFolderId
        id of the folder to sort
 @returns nsITransaction object
nsITransaction sortFolderByName(in long long aFolderId)
 Transaction for tagging a URL with the given set of tags. Current tags set
 for the URL persist. It's the caller's job to check whether or not aURI
 was already tagged by any of the tags in aTags, undoing this tags
 transaction removes them all from aURL!

 @param aURI
        the URL to tag.
 @param aTags
        Array of tags to set for the given URL.
nsITransaction tagURI(in nsIURI aURI, in nsIVariant aTags)
 Transaction for removing tags from a URL. It's the caller's job to check
 whether or not aURI isn't tagged by any of the tags in aTags, undoing this
 tags transaction adds them all to aURL!

 @param aURI
        the URL to un-tag.
 @param aTags
        Array of tags to unset. pass null to remove all tags from the given
        url.
nsITransaction untagURI(in nsIURI aURI, in nsIVariant aTags)