public final class PrivacyList extends Object implements Comparable<PrivacyList>
Most instant messaging systems have found it necessary to implement some method for users to block communications from particular other users (this is also required by sections 5.1.5, 5.1.15, 5.3.2, and 5.4.10 of RFC 2779 [3]. In XMPP this is done by managing one's privacy lists using the 'jabber:iq:privacy' namespace.
| Constructor and Description |
|---|
PrivacyList(String name)
Creates a privacy list.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(PrivacyList o)
Compares this privacy list with another list.
|
static PrivacyList |
createInvisibilityList()
Creates a global invisibility list.
|
static PrivacyList |
createInvisibilityListExceptForGroups(String listName,
String... groups)
Creates a global invisibility list, where you are still visible to some contacts.
|
static PrivacyList |
createInvisibilityListExceptForUsers(String listName,
Jid... jids)
Creates a global invisibility list, where you are still visible to some contacts.
|
static PrivacyList |
createInvisibilityListForGroups(String listName,
String... groups)
Creates a selective invisibility list.
|
static PrivacyList |
createInvisibilityListForUsers(String listName,
Jid... jids)
Creates a selective invisibility list.
|
String |
getName()
Gets the name of the privacy list.
|
List<PrivacyRule> |
getPrivacyRules()
Gets the privacy rules.
|
boolean |
isActive()
Indicates whether this is the active list.
|
boolean |
isDefault()
Indicates whether this is the default list.
|
String |
toString() |
public PrivacyList(String name)
name - The privacy list's name.public static PrivacyList createInvisibilityList()
public static PrivacyList createInvisibilityListExceptForUsers(String listName, Jid... jids)
listName - The list name. See 4. Implementation Notes for recommended list names.jids - The JIDs to which you are still visible.public static PrivacyList createInvisibilityListExceptForGroups(String listName, String... groups)
listName - The list name. See 4. Implementation Notes for recommended list names.groups - The roster groups to which you are still visible.public static PrivacyList createInvisibilityListForUsers(String listName, Jid... jids)
listName - The list name. See 4. Implementation Notes for recommended list names.jids - The JIDs to which you appear invisible.public static PrivacyList createInvisibilityListForGroups(String listName, String... groups)
listName - The list name. See 4. Implementation Notes for recommended list names.groups - The roster groups to which you appear invisible.public List<PrivacyRule> getPrivacyRules()
public String getName()
public boolean isDefault()
public boolean isActive()
public int compareTo(PrivacyList o)
compareTo in interface Comparable<PrivacyList>o - The other list.Copyright © 2014 XMPP.rocks. All rights reserved.