public final class BookmarkManager
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
void |
addBookmarkedConference(java.lang.String name,
org.jxmpp.jid.EntityBareJid jid,
boolean isAutoJoin,
org.jxmpp.jid.parts.Resourcepart nickname,
java.lang.String password)
Adds or updates a conference in the bookmarks.
|
void |
addBookmarkedURL(java.lang.String URL,
java.lang.String name,
boolean isRSS)
Adds a new url or updates an already existing url in the bookmarks.
|
java.util.List<BookmarkedConference> |
getBookmarkedConferences()
Returns all currently bookmarked conferences.
|
java.util.List<BookmarkedURL> |
getBookmarkedURLs()
Returns an unmodifiable collection of all bookmarked urls.
|
static BookmarkManager |
getBookmarkManager(org.jivesoftware.smack.XMPPConnection connection)
Returns the BookmarkManager for a connection, if it doesn't exist it is created.
|
boolean |
isSupported()
Check if the service supports bookmarks using private data.
|
void |
removeBookmarkedConference(org.jxmpp.jid.EntityBareJid jid)
Removes a conference from the bookmarks.
|
void |
removeBookmarkedURL(java.lang.String bookmarkURL)
Removes a url from the bookmarks.
|
public static BookmarkManager getBookmarkManager(org.jivesoftware.smack.XMPPConnection connection)
connection - the connection for which the manager is desired.java.lang.IllegalArgumentException - when the connection is null.public java.util.List<BookmarkedConference> getBookmarkedConferences() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
org.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionBookmarkedConferencepublic void addBookmarkedConference(java.lang.String name,
org.jxmpp.jid.EntityBareJid jid,
boolean isAutoJoin,
org.jxmpp.jid.parts.Resourcepart nickname,
java.lang.String password)
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException,
java.lang.InterruptedException
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 conferenceorg.jivesoftware.smack.XMPPException.XMPPErrorException - thrown when there is an issue retrieving the current bookmarks from
the server.org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the server.org.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void removeBookmarkedConference(org.jxmpp.jid.EntityBareJid jid)
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException,
java.lang.InterruptedException
jid - the jid of the conference to be removed.org.jivesoftware.smack.XMPPException.XMPPErrorException - thrown when there is a problem with the connection attempting to
retrieve the bookmarks or persist the bookmarks.org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the server.org.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionjava.lang.IllegalArgumentException - thrown when the conference being removed is a shared
conferencepublic java.util.List<BookmarkedURL> getBookmarkedURLs() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
org.jivesoftware.smack.XMPPException.XMPPErrorException - thrown when there is a problem retriving bookmarks from the server.org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the server.org.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void addBookmarkedURL(java.lang.String URL,
java.lang.String name,
boolean isRSS)
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException,
java.lang.InterruptedException
URL - the url of the bookmarkname - the name of the bookmarkisRSS - whether or not the url is an rss feedorg.jivesoftware.smack.XMPPException.XMPPErrorException - thrown when there is an error retriving or saving bookmarks from or to
the serverorg.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the server.org.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void removeBookmarkedURL(java.lang.String bookmarkURL)
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException,
java.lang.InterruptedException
bookmarkURL - the url of the bookmark to removeorg.jivesoftware.smack.XMPPException.XMPPErrorException - thrown if there is an error retriving or saving bookmarks from or to
the server.org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the server.org.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic boolean isSupported()
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.SmackException.NotConnectedException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionPrivateDataManager.isSupported()