public class RosterStore extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
RosterStore.Predicate |
| Modifier and Type | Field and Description |
|---|---|
protected Set<String> |
groups |
protected Map<BareJID,RosterItem> |
roster |
| Constructor and Description |
|---|
RosterStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(BareJID jid,
String name,
AsyncCallback asyncCallback)
Adds new contact to roster.
|
void |
add(BareJID jid,
String name,
Collection<String> groups,
AsyncCallback asyncCallback)
Adds new contact to roster.
|
void |
add(BareJID jid,
String name,
String[] groups,
AsyncCallback asyncCallback)
Adds new contact to roster.
|
void |
clear()
Clears storage.
|
RosterItem |
get(BareJID jid)
Returns RosterItem of given bare JID.
|
List<RosterItem> |
getAll()
Returns all buddies from roster.
|
List<RosterItem> |
getAll(RosterStore.Predicate predicate)
Returns all roster items selected by selector.
|
int |
getCount()
Returns number of roster items in storage.
|
Collection<? extends String> |
getGroups()
Get all known groups of buddies.
|
void |
remove(BareJID jid)
Removes buddy from roster.
|
void |
removeAll() |
void |
update(RosterItem item)
Sends changed RosterItem to server.
|
protected final Map<BareJID,RosterItem> roster
public void add(BareJID jid, String name, AsyncCallback asyncCallback) throws XMLException, JaxmppException
jid - JID of buddyname - name of buddyasyncCallback - callbackXMLExceptionJaxmppExceptionpublic void add(BareJID jid, String name, Collection<String> groups, AsyncCallback asyncCallback) throws XMLException, JaxmppException
jid - JID of buddyname - name of buddygroups - collection of groups nameasyncCallback - callbackXMLExceptionJaxmppExceptionpublic void add(BareJID jid, String name, String[] groups, AsyncCallback asyncCallback) throws XMLException, JaxmppException
jid - JID of buddyname - name of buddygroups - array of groups nameasyncCallback - callbackXMLExceptionJaxmppExceptionpublic void clear()
public RosterItem get(BareJID jid)
jid - bare JID.public List<RosterItem> getAll()
public List<RosterItem> getAll(RosterStore.Predicate predicate)
predicate - selector.public int getCount()
public Collection<? extends String> getGroups()
public void remove(BareJID jid) throws JaxmppException
jid - jid of buddy to remove.JaxmppExceptionpublic void removeAll()
public void update(RosterItem item) throws JaxmppException
item - changed roster item.JaxmppExceptionCopyright © 2006–2014 Tigase. All rights reserved.