public class DefaultRosterStore extends Object implements RosterStore
| Modifier and Type | Method and Description |
|---|---|
boolean |
addEntry(org.xmpp.packet.Roster.Item item,
String version)
This method stores a new roster entry in this store or updates an
existing one.
|
List<org.xmpp.packet.Roster.Item> |
getEntries()
This method returns a collection of all roster items contained in this
store.
|
org.xmpp.packet.Roster.Item |
getEntry(String bareJid)
This method returns the roster item in this store for the given JID.
|
String |
getRosterVersion()
This method returns the version number as specified by the "ver"
attribute of the local store.
|
static DefaultRosterStore |
init(File baseDir)
Creates a new roster store on disk
|
static DefaultRosterStore |
open(File baseDir)
Opens a roster store
|
boolean |
removeEntry(String bareJid,
String version)
Removes an entry from the store
|
boolean |
resetEntries(Collection<org.xmpp.packet.Roster.Item> items,
String version)
This method updates the store so that it contains only the given entries.
|
public static DefaultRosterStore init(File baseDir)
baseDir - The directory to create the store in. The directory should be
emptyDefaultRosterStore instance if successful,
null else.public static DefaultRosterStore open(File baseDir)
baseDir - The directory containing the roster store.DefaultRosterStore instance if successful,
null else.public List<org.xmpp.packet.Roster.Item> getEntries()
RosterStoregetEntries in interface RosterStoreRosterEntrypublic org.xmpp.packet.Roster.Item getEntry(String bareJid)
RosterStoregetEntry in interface RosterStorebareJid - The bare JID of the RosterEntryRosterEntry which belongs to that userpublic String getRosterVersion()
RosterStoregetRosterVersion in interface RosterStorepublic boolean addEntry(org.xmpp.packet.Roster.Item item,
String version)
RosterStoreaddEntry in interface RosterStoreitem - the entry to storeversion - the new roster versionpublic boolean removeEntry(String bareJid, String version)
RosterStoreremoveEntry in interface RosterStorebareJid - The bare JID of the entry to be removedversion - the new roster versionpublic boolean resetEntries(Collection<org.xmpp.packet.Roster.Item> items, String version)
RosterStoreresetEntries in interface RosterStoreitems - the entries to storeversion - the new roster versionCopyright © 2014. All Rights Reserved.