public interface RosterStore
Modifier and Type | Method and Description |
---|---|
boolean |
addEntry(RosterPacket.Item item,
java.lang.String version)
This method stores a new roster entry in this store or updates an existing one.
|
java.util.List<RosterPacket.Item> |
getEntries()
This method returns a list of all roster items contained in this store.
|
RosterPacket.Item |
getEntry(Jid bareJid)
This method returns the roster item in this store for the given JID.
|
java.lang.String |
getRosterVersion()
This method returns the version number as specified by the "ver" attribute
of the local store.
|
boolean |
removeEntry(Jid bareJid,
java.lang.String version)
Removes an entry from the store.
|
boolean |
resetEntries(java.util.Collection<RosterPacket.Item> items,
java.lang.String version)
This method updates the store so that it contains only the given entries.
|
void |
resetStore()
Reset the store by removing all entries and setting the version to the empty String.
|
java.util.List<RosterPacket.Item> getEntries()
null
is returned.RosterEntry
or null
.RosterPacket.Item getEntry(Jid bareJid)
bareJid
- The bare JID of the RosterEntryRosterEntry
which belongs to that userjava.lang.String getRosterVersion()
boolean addEntry(RosterPacket.Item item, java.lang.String version)
item
- the entry to storeversion
- the new roster versionboolean resetEntries(java.util.Collection<RosterPacket.Item> items, java.lang.String version)
items
- the entries to storeversion
- the new roster versionboolean removeEntry(Jid bareJid, java.lang.String version)
bareJid
- The bare JID of the entry to be removedversion
- the new roster versionvoid resetStore()