public final class Privacy
extends java.lang.Object
The implementation of the the <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 java.lang.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(java.lang.String activeName,
java.lang.String defaultName,
java.util.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 |
|---|---|
java.lang.String |
getActiveName()
Gets the active list name.
|
java.lang.String |
getDefaultName()
Sets the default list name.
|
java.util.List<PrivacyList> |
getPrivacyLists()
Gets the privacy lists.
|
java.lang.String |
toString() |
static Privacy |
withActive(java.lang.String active)
Creates a privacy element with an active list.
|
static Privacy |
withDefault(java.lang.String defaultName)
Creates a privacy element with a default list.
|
public static final java.lang.String NAMESPACE
jabber:iq:privacy
public Privacy()
Creates an empty privacy element.
public Privacy(PrivacyList... privacyLists)
Creates a privacy element with one or more privacy lists.
privacyLists - The privacy list(s).public Privacy(java.lang.String activeName,
java.lang.String defaultName,
java.util.Collection<PrivacyList> privacyLists)
Creates a privacy element with one or more privacy lists and an active and default name.
activeName - The active name.defaultName - The default name.privacyLists - The privacy list(s).public static Privacy withActive(java.lang.String active)
Creates a privacy element with an active list.
active - The active list name. Pass an empty string if you want to decline the use of an active list.public static Privacy withDefault(java.lang.String defaultName)
Creates a privacy element with a default list.
defaultName - The default list name. Pass an empty string if you want to decline the use of a default list.public final java.lang.String getActiveName()
Gets the active list name.
public final java.lang.String getDefaultName()
Sets the default list name.
public final java.util.List<PrivacyList> getPrivacyLists()
Gets the privacy lists.
public final java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2014–2019 XMPP.rocks. All rights reserved.