| 
 | Smack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jivesoftware.smack.packet.Packet
org.jivesoftware.smack.packet.IQ
org.jivesoftware.smack.packet.Privacy
public class Privacy
A Privacy IQ Packet, is used by the PrivacyListManager
 and PrivacyProvider to allow and block
 communications from other users. It contains the appropriate structure to suit
 user-defined privacy lists. Different configured Privacy packages are used in the
 server & manager communication in order to:
 
PrivacyItem
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | 
|---|
| IQ.Type | 
| Field Summary | 
|---|
| Fields inherited from class org.jivesoftware.smack.packet.Packet | 
|---|
| DEFAULT_LANGUAGE, ID_NOT_AVAILABLE | 
| Constructor Summary | |
|---|---|
| Privacy() | |
| Method Summary | |
|---|---|
|  boolean | changeDefaultList(String newDefault)Sets a given privacy list as the new user default list. | 
|  void | deleteList(String listName)Remove the list. | 
|  void | deletePrivacyList(String listName)Deletes an existing privacy list. | 
|  String | getActiveName()Returns the name associated with the active list set for the session. | 
|  List<PrivacyItem> | getActivePrivacyList()Returns the active privacy list or null if none was found. | 
|  String | getChildElementXML()Returns the sub-element XML section of the IQ packet, or null if there isn't one. | 
|  String | getDefaultName()Returns the name of the default list that applies to the user as a whole. | 
|  List<PrivacyItem> | getDefaultPrivacyList()Returns the default privacy list or null if none was found. | 
|  PrivacyItem | getItem(String listName,
        int order)Returns the privacy item in the specified order. | 
|  Map<String,List<PrivacyItem>> | getItemLists()Returns the collection of privacy list that the user holds. | 
|  List<PrivacyItem> | getPrivacyList(String listName)Returns a specific privacy list. | 
|  Set<String> | getPrivacyListNames()Returns all the list names the user has defined to group restrictions. | 
|  boolean | isDeclineActiveList()Returns whether the receiver allows or declines the use of an active list. | 
|  boolean | isDeclineDefaultList()Returns whether the receiver allows or declines the use of a default list. | 
|  void | setActiveName(String activeName)Sets the name associated with the active list set for the session. | 
|  List<PrivacyItem> | setActivePrivacyList()Set the active list based on the default list. | 
|  void | setDeclineActiveList(boolean declineActiveList)Sets whether the receiver allows or declines the use of an active list. | 
|  void | setDeclineDefaultList(boolean declineDefaultList)Sets whether the receiver allows or declines the use of a default list. | 
|  void | setDefaultName(String defaultName)Sets the name of the default list that applies to the user as a whole. | 
|  List | setPrivacyList(String listName,
               List<PrivacyItem> listItem)Set or update a privacy list with privacy items. | 
| Methods inherited from class org.jivesoftware.smack.packet.IQ | 
|---|
| createErrorResponse, createResultIQ, getType, setType, toXML | 
| Methods inherited from class org.jivesoftware.smack.packet.Packet | 
|---|
| addExtension, deleteProperty, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, getXmlns, hashCode, nextID, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, setProperty, setTo | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public Privacy()
| Method Detail | 
|---|
public List setPrivacyList(String listName,
                           List<PrivacyItem> listItem)
listName - the name of the new privacy list.listItem - the PrivacyItem that rules the list.
public List<PrivacyItem> setActivePrivacyList()
public void deletePrivacyList(String listName)
listName - the name of the list being deleted.public List<PrivacyItem> getActivePrivacyList()
PrivacyItem or null if none was found.public List<PrivacyItem> getDefaultPrivacyList()
PrivacyItem or null if none was found.public List<PrivacyItem> getPrivacyList(String listName)
listName - the name of the list to get.
PrivacyItem
public PrivacyItem getItem(String listName,
                           int order)
listName - the name of the privacy list.order - the order of the element.
PrivacyItempublic boolean changeDefaultList(String newDefault)
newDefault - the new default privacy list.
public void deleteList(String listName)
listName - name of the list to remove.public String getActiveName()
public void setActiveName(String activeName)
activeName - is the name of the active list.public String getDefaultName()
public void setDefaultName(String defaultName)
defaultName - is the name of the default list.public Map<String,List<PrivacyItem>> getItemLists()
public boolean isDeclineActiveList()
public void setDeclineActiveList(boolean declineActiveList)
declineActiveList - indicates if the receiver declines the use of an active list.public boolean isDeclineDefaultList()
public void setDeclineDefaultList(boolean declineDefaultList)
declineDefaultList - indicates if the receiver declines the use of a default list.public Set<String> getPrivacyListNames()
public String getChildElementXML()
IQExtensions of this class must override this method.
getChildElementXML in class IQ| 
 | Smack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||