Package rocks.xmpp.extensions.bookmarks
Class BookmarkManager
- java.lang.Object
-
- rocks.xmpp.core.session.Manager
-
- rocks.xmpp.extensions.bookmarks.BookmarkManager
-
public final class BookmarkManager extends Manager
This manager facilitates the access to the private storage by providing convenient method for adding, retrieving or removing bookmarks.This class is thread-safe.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AsyncResult<Void>
addBookmark(AbstractBookmark bookmark)
Adds a bookmark.AsyncResult<List<ChatRoomBookmark>>
getChatRoomBookmarks()
Gets a sorted collection of chat room bookmarks.AsyncResult<List<WebPageBookmark>>
getWebPageBookmarks()
Gets a sorted collection of web page bookmarks.AsyncResult<Void>
removeChatRoomBookmark(Jid chatRoom)
Removes a chat room bookmark.AsyncResult<Void>
removeWebPageBookmark(URL webPage)
Removes a web page bookmark.-
Methods inherited from class rocks.xmpp.core.session.Manager
isEnabled, setEnabled
-
-
-
-
Method Detail
-
getChatRoomBookmarks
public final AsyncResult<List<ChatRoomBookmark>> getChatRoomBookmarks()
Gets a sorted collection of chat room bookmarks.- Returns:
- The async result with the chat room bookmarks.
-
getWebPageBookmarks
public final AsyncResult<List<WebPageBookmark>> getWebPageBookmarks()
Gets a sorted collection of web page bookmarks.- Returns:
- The async result with the web page bookmarks.
-
addBookmark
public final AsyncResult<Void> addBookmark(AbstractBookmark bookmark)
Adds a bookmark.- Parameters:
bookmark
- The bookmark.- Returns:
- The async result.
-
removeChatRoomBookmark
public final AsyncResult<Void> removeChatRoomBookmark(Jid chatRoom)
Removes a chat room bookmark.- Parameters:
chatRoom
- The chat room.- Returns:
- The async result.
-
removeWebPageBookmark
public final AsyncResult<Void> removeWebPageBookmark(URL webPage)
Removes a web page bookmark.- Parameters:
webPage
- The web page.- Returns:
- The async result.
-
-