|
Smack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jivesoftware.smack.PrivacyListManager
public class PrivacyListManager
A PrivacyListManager is used by XMPP clients to block or allow communications from other users. Use the manager to:
| Method Summary | |
|---|---|
void |
addListener(PrivacyListListener listener)
Adds a packet listener that will be notified of any new update in the user privacy communication. |
void |
createPrivacyList(String listName,
List<PrivacyItem> privacyItems)
The client has created a new list. |
void |
declineActiveList()
Client declines the use of active lists. |
void |
declineDefaultList()
Client declines the use of default lists. |
void |
deletePrivacyList(String listName)
Remove a privacy list. |
PrivacyList |
getActiveList()
Answer the active privacy list. |
PrivacyList |
getDefaultList()
Answer the default privacy list. |
static PrivacyListManager |
getInstanceFor(Connection connection)
Returns the PrivacyListManager instance associated with a given Connection. |
PrivacyList |
getPrivacyList(String listName)
Answer the privacy list items under listName with the allowed and blocked permissions. |
PrivacyList[] |
getPrivacyLists()
Answer every privacy list with the allowed and blocked permissions. |
void |
setActiveListName(String listName)
Set or change the active list to listName. |
void |
setDefaultListName(String listName)
Set or change the default list to listName. |
void |
updatePrivacyList(String listName,
List<PrivacyItem> privacyItems)
The client has edited an existing list. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static PrivacyListManager getInstanceFor(Connection connection)
connection - the connection used to look for the proper PrivacyListManager.
public PrivacyList getActiveList()
throws XMPPException
XMPPException - if an error occurs.
public PrivacyList getDefaultList()
throws XMPPException
XMPPException - if an error occurs.
public PrivacyList getPrivacyList(String listName)
throws XMPPException
listName - the name of the list to get the allowed and blocked permissions.
XMPPException - if an error occurs.
public PrivacyList[] getPrivacyLists()
throws XMPPException
XMPPException - if an error occurs.
public void setActiveListName(String listName)
throws XMPPException
listName - the list name to set as the active one.
XMPPException - if the request or the answer failed, it raises an exception.
public void declineActiveList()
throws XMPPException
XMPPException - if an error occurs.
public void setDefaultListName(String listName)
throws XMPPException
listName - the list name to set as the default one.
XMPPException - if the request or the answer failed, it raises an exception.
public void declineDefaultList()
throws XMPPException
XMPPException - if an error occurs.
public void createPrivacyList(String listName,
List<PrivacyItem> privacyItems)
throws XMPPException
listName - the list that has changed its content.privacyItems - a List with every privacy item in the list.
XMPPException - if an error occurs.
public void updatePrivacyList(String listName,
List<PrivacyItem> privacyItems)
throws XMPPException
PrivacyItem list MUST contain all elements in the
list (not the "delta").
listName - the list that has changed its content.privacyItems - a List with every privacy item in the list.
XMPPException - if an error occurs.
public void deletePrivacyList(String listName)
throws XMPPException
listName - the list that has changed its content.
XMPPException - if an error occurs.public void addListener(PrivacyListListener listener)
listener - a packet listener.
|
Smack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||