| 
 | Smack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jivesoftware.smackx.bookmark.BookmarkManager
public class BookmarkManager
Provides methods to manage bookmarks in accordance with JEP-0048. Methods for managing URLs and Conferences are provided.
It should be noted that some extensions have been made to the JEP. There is an attribute on URLs that marks a url as a news feed and also a sub-element can be added to either a URL or conference indicated that it is shared amongst all users on a server.
| Method Summary | |
|---|---|
|  void | addBookmarkedConference(String name,
                        String jid,
                        boolean isAutoJoin,
                        String nickname,
                        String password)Adds or updates a conference in the bookmarks. | 
|  void | addBookmarkedURL(String URL,
                 String name,
                 boolean isRSS)Adds a new url or updates an already existing url in the bookmarks. | 
|  Collection<BookmarkedConference> | getBookmarkedConferences()Returns all currently bookmarked conferences. | 
|  Collection<BookmarkedURL> | getBookmarkedURLs()Returns an unmodifiable collection of all bookmarked urls. | 
| static BookmarkManager | getBookmarkManager(Connection connection)Returns the BookmarkManager for a connection, if it doesn't exist it is created. | 
|  void | removeBookmarkedConference(String jid)Removes a conference from the bookmarks. | 
|  void | removeBookmarkedURL(String bookmarkURL)Removes a url from the bookmarks. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public static BookmarkManager getBookmarkManager(Connection connection)
                                          throws XMPPException
connection - the connection for which the manager is desired.
XMPPException - Thrown if the connection is null or has not yet been authenticated.
public Collection<BookmarkedConference> getBookmarkedConferences()
                                                          throws XMPPException
XMPPException - thrown when there was an error retrieving the current bookmarks from
 the server.BookmarkedConference
public void addBookmarkedConference(String name,
                                    String jid,
                                    boolean isAutoJoin,
                                    String nickname,
                                    String password)
                             throws XMPPException
name - the name of the conferencejid - the jid of the conferenceisAutoJoin - whether or not to join this conference automatically on loginnickname - the nickname to use for the user when joining the conferencepassword - the password to use for the user when joining the conference
XMPPException - thrown when there is an issue retrieving the current bookmarks from
 the server.
public void removeBookmarkedConference(String jid)
                                throws XMPPException
jid - the jid of the conference to be removed.
XMPPException - thrown when there is a problem with the connection attempting to
 retrieve the bookmarks or persist the bookmarks.
IllegalArgumentException - thrown when the conference being removed is a shared
 conference
public Collection<BookmarkedURL> getBookmarkedURLs()
                                            throws XMPPException
XMPPException - thrown when there is a problem retriving bookmarks from the server.
public void addBookmarkedURL(String URL,
                             String name,
                             boolean isRSS)
                      throws XMPPException
URL - the url of the bookmarkname - the name of the bookmarkisRSS - whether or not the url is an rss feed
XMPPException - thrown when there is an error retriving or saving bookmarks from or to
 the server
public void removeBookmarkedURL(String bookmarkURL)
                         throws XMPPException
bookmarkURL - the url of the bookmark to remove
XMPPException - thrown if there is an error retriving or saving bookmarks from or to
 the server.| 
 | Smack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||