public abstract class RosterStore extends Object implements Property
Modifier and Type | Class and Description |
---|---|
static interface |
RosterStore.Predicate |
Modifier and Type | Field and Description |
---|---|
protected SessionObject |
sessionObject |
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.
|
protected abstract Set<String> |
addItem(RosterItem item) |
protected abstract Set<String> |
calculateModifiedGroups(HashSet<String> groupsOld) |
void |
clear()
Clears storage.
|
abstract RosterItem |
get(BareJID jid)
Returns RosterItem of given bare JID.
|
List<RosterItem> |
getAll()
Returns all buddies from roster.
|
abstract List<RosterItem> |
getAll(RosterStore.Predicate predicate)
Returns all roster items selected by selector.
|
abstract int |
getCount()
Returns number of roster items in storage.
|
abstract Collection<? extends String> |
getGroups()
Get all known groups of buddies.
|
Class<RosterStore> |
getPropertyClass()
Method which returns class which implements this interface which
may be used as a key to store instance of this class in JaxmppCore.
|
void |
remove(BareJID jid)
Removes buddy from roster.
|
abstract void |
removeAll() |
protected abstract void |
removeItem(BareJID jid) |
void |
setSessionObject(SessionObject sessionObject) |
void |
update(RosterItem item)
Sends changed RosterItem to server.
|
protected SessionObject sessionObject
public void add(BareJID jid, String name, AsyncCallback asyncCallback) throws JaxmppException
jid
- JID of buddyname
- name of buddyasyncCallback
- callbackJaxmppException
public void add(BareJID jid, String name, Collection<String> groups, AsyncCallback asyncCallback) throws JaxmppException
jid
- JID of buddyname
- name of buddygroups
- collection of groups nameasyncCallback
- callbackJaxmppException
public void add(BareJID jid, String name, String[] groups, AsyncCallback asyncCallback) throws JaxmppException
jid
- JID of buddyname
- name of buddygroups
- array of groups nameasyncCallback
- callbackJaxmppException
protected abstract Set<String> addItem(RosterItem item)
protected abstract Set<String> calculateModifiedGroups(HashSet<String> groupsOld)
public void clear()
public abstract RosterItem get(BareJID jid)
jid
- bare JID.public List<RosterItem> getAll()
public abstract List<RosterItem> getAll(RosterStore.Predicate predicate)
predicate
- selector.public abstract int getCount()
public abstract Collection<? extends String> getGroups()
public Class<RosterStore> getPropertyClass()
Property
getPropertyClass
in interface Property
public void remove(BareJID jid) throws JaxmppException
jid
- jid of buddy to remove.JaxmppException
public abstract void removeAll()
protected abstract void removeItem(BareJID jid)
public void setSessionObject(SessionObject sessionObject)
public void update(RosterItem item) throws JaxmppException
item
- changed roster item.JaxmppException
Copyright © 2006–2016 Tigase. All rights reserved.