Class Bookmarks

java.lang.Object
org.jivesoftware.smackx.bookmarks.Bookmarks
All Implemented Interfaces:
PrivateData

public class Bookmarks extends Object implements PrivateData
Bookmarks is used for storing and retrieving URLS and Conference rooms. Bookmark Storage (XEP-0048) defined a protocol for the storage of bookmarks to conference rooms and other entities in a Jabber user's account. See the following code sample for saving Bookmarks:
XMPPConnection con = new XMPPTCPConnection("jabber.org");
con.login("john", "doe");
Bookmarks bookmarks = new Bookmarks();
// Bookmark a URL
BookmarkedURL url = new BookmarkedURL();
url.setName("Google");
url.setURL("http://www.jivesoftware.com");
bookmarks.addURL(url);
// Bookmark a Conference room.
BookmarkedConference conference = new BookmarkedConference();
conference.setName("My Favorite Room");
conference.setAutoJoin("true");
conference.setJID("dev@conference.jivesoftware.com");
bookmarks.addConference(conference);
// Save Bookmarks using PrivateDataManager.
PrivateDataManager manager = new PrivateDataManager(con);
manager.setPrivateData(bookmarks);
LastActivity activity = LastActivity.getLastActivity(con, "xray@jabber.org");