XEP-0048: Bookmarks allows you to store bookmarks for multi-user chat rooms and web pages by using the server-side XML storage.
The BookmarkManager
facilitates the access to the private storage by providing convenient method for adding,
retrieving or removing bookmarks.
BookmarkManager bookmarkManager = xmppClient.getManager(BookmarkManager.class);
bookmarkManager.addBookmark(new ChatRoomBookmark("chatroom", Jid.of("chat@conference.domain")));
bookmarkManager.addBookmark(new WebPageBookmark("chatroom", new URL("http://www.xmpp.org")));
Collection<ChatRoomBookmark> chatRoomBookmarks = bookmarkManager.getChatRoomBookmarks().getResult();
Collection<WebPageBookmark> webPageBookmarks = bookmarkManager.getWebPageBookmarks().getResult();
bookmarkManager.removeChatRoomBookmark(Jid.of("chat@conference.domain"));
bookmarkManager.removeWebPageBookmark(url);