nsIMicrosummaryService
| IID: | D58143A2-74FA-4B13-94ED-113AF8936D80 |
| Inherits From: | nsISupports |
This interface is implemented by the following components:
Methods
void addGenerator ( nsIURI generatorURI )
nsIMicrosummary createMicrosummary ( nsIURI pageURI , nsIURI generatorURI )
nsISimpleEnumerator getBookmarks ( )
nsIMicrosummaryGenerator getGenerator ( nsIURI generatorURI )
nsIMicrosummarySet getMicrosummaries ( nsIURI pageURI , PRInt64 bookmarkID )
nsIMicrosummary getMicrosummary ( PRInt64 bookmarkID )
PRBool hasMicrosummary ( PRInt64 bookmarkID )
nsIMicrosummaryGenerator installGenerator ( nsIDOMDocument xmlDefinition )
PRBool isMicrosummary ( PRInt64 bookmarkID , nsIMicrosummary microsummary )
nsIMicrosummary refreshMicrosummary ( PRInt64 bookmarkID )
void removeMicrosummary ( PRInt64 bookmarkID )
void setMicrosummary ( PRInt64 bookmarkID , nsIMicrosummary microsummary )
void addGenerator ( nsIURI generatorURI )
Install the microsummary generator from the resource at the supplied URI. Callable by content via the addMicrosummaryGenerator() sidebar method.
- Arguments:
- generatorURI: the URI of the resource providing the generator
nsIMicrosummary createMicrosummary ( nsIURI pageURI , nsIURI generatorURI )
Create a microsummary for a given page URI and generator URI.
- Arguments:
- pageURI: the URI of the page to be summarized
- generatorURI: the URI of the microsummary generator
nsISimpleEnumerator getBookmarks ( )
Get the set of bookmarks with microsummaries.
In the old RDF-based bookmarks datastore, bookmark IDs are nsIRDFResource objects. In the new Places-based datastore, they are nsIURI objects.
nsIMicrosummaryGenerator getGenerator ( nsIURI generatorURI )
Return a microsummary generator for the given URI.
- Arguments:
- generatorURI: the URI of the generator
nsIMicrosummarySet getMicrosummaries ( nsIURI pageURI , PRInt64 bookmarkID )
Get the set of microsummaries available for a given page. The set might change after this method returns, since this method will trigger an asynchronous load of the page in question (if it isn't already loaded) to see if it references any page-specific microsummaries.
If the caller passes a bookmark ID, and one of the microsummaries is the current one for the bookmark, this method will retrieve content from the datastore for that microsummary, which is useful when callers want to display a list of microsummaries for a page that isn't loaded, and they want to display the actual content of the selected microsummary immediately (rather than after the content is asynchronously loaded).
- Arguments:
- pageURI: the URI of the page for which to retrieve available microsummaries
- bookmarkID: (optional) the ID of the bookmark for which this method is being called
nsIMicrosummary getMicrosummary ( PRInt64 bookmarkID )
Get the current microsummary for the given bookmark.
- Arguments:
- bookmarkID: the bookmark for which to get the current microsummary
PRBool hasMicrosummary ( PRInt64 bookmarkID )
Whether or not the given bookmark has a current microsummary.
- Arguments:
- bookmarkID: the bookmark for which to set the current microsummary
nsIMicrosummaryGenerator installGenerator ( nsIDOMDocument xmlDefinition )
Install the microsummary generator in the given XML definition.
- Arguments:
- xmlDefinition: an nsIDOMDocument XML document defining the generator
PRBool isMicrosummary ( PRInt64 bookmarkID , nsIMicrosummary microsummary )
Whether or not the given microsummary is the current microsummary for the given bookmark.
- Arguments:
- bookmarkID: the bookmark to check
- microsummary: the microsummary to check
nsIMicrosummary refreshMicrosummary ( PRInt64 bookmarkID )
Refresh a microsummary, updating its value in the datastore and UI. If this method can refresh the microsummary instantly, it will. Otherwise, it'll asynchronously download the necessary information (the generator and/or page) before refreshing the microsummary.
Callers should check the "content" property of the returned microsummary object to distinguish between sync and async refreshes. If its value is "null", then it's an async refresh, and the caller should register itself as an nsIMicrosummaryObserver via nsIMicrosummary.addObserver() to find out when the refresh completes.
- Arguments:
- bookmarkID: the bookmark whose microsummary is being refreshed
void removeMicrosummary ( PRInt64 bookmarkID )
Remove the current microsummary for the given bookmark.
- Arguments:
- bookmarkID: the bookmark for which to remove the current microsummary
void setMicrosummary ( PRInt64 bookmarkID , nsIMicrosummary microsummary )
Set the current microsummary for the given bookmark.
- Arguments:
- bookmarkID: the bookmark for which to set the current microsummary
- microsummary: the microsummary to set as the current one
Reference documentation is generated from Mozilla's source.
