public final class Privacy extends Object
<query/> element in the jabber:iq:privacy namespace.
This class contains information about the active and default list and holds the privacy lists.
This class is immutable.| Modifier and Type | Field and Description |
|---|---|
static String |
NAMESPACE
jabber:iq:privacy
|
| Constructor and Description |
|---|
Privacy()
Creates an empty privacy element.
|
Privacy(PrivacyList... privacyLists)
Creates a privacy element with one or more privacy lists.
|
Privacy(String activeName,
String defaultName,
Collection<PrivacyList> privacyLists)
Creates a privacy element with one or more privacy lists and an active and default name.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getActiveName()
Gets the active list name.
|
String |
getDefaultName()
Sets the default list name.
|
List<PrivacyList> |
getPrivacyLists()
Gets the privacy lists.
|
String |
toString() |
static Privacy |
withActive(String active)
Creates a privacy element with an active list.
|
static Privacy |
withDefault(String defaultName)
Creates a privacy element with a default list.
|
public static final String NAMESPACE
public Privacy()
public Privacy(PrivacyList... privacyLists)
privacyLists - The privacy list(s).public Privacy(String activeName, String defaultName, Collection<PrivacyList> privacyLists)
activeName - The active name.defaultName - The default name.privacyLists - The privacy list(s).public static Privacy withActive(String active)
active - The active list name. Pass an empty string if you want to decline the use of an active list.public static Privacy withDefault(String defaultName)
defaultName - The default list name. Pass an empty string if you want to decline the use of a default list.public final String getActiveName()
public final String getDefaultName()
public final List<PrivacyList> getPrivacyLists()
Copyright © 2014–2018 XMPP.rocks. All rights reserved.