public class Affiliation
extends java.lang.Object
implements org.jivesoftware.smack.packet.ExtensionElement
Affiliation.Type defines
the type of affiliation.
Affiliations are retrieved from the PubSubManager.getAffiliations() method, which
gets affiliations for the calling user, based on the identity that is associated with
the XMPPConnection.| Modifier and Type | Class and Description |
|---|---|
static class |
Affiliation.Type |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ELEMENT |
| Constructor and Description |
|---|
Affiliation(org.jxmpp.jid.BareJid jid,
Affiliation.Type affiliation)
Construct a affiliation modification request.
|
Affiliation(org.jxmpp.jid.BareJid jid,
Affiliation.Type affiliation,
PubSubNamespace namespace) |
Affiliation(java.lang.String node,
Affiliation.Type affiliation)
Constructs an affiliation.
|
| Modifier and Type | Method and Description |
|---|---|
Affiliation.Type |
getAffiliation() |
java.lang.String |
getElementName() |
org.jxmpp.jid.BareJid |
getJid() |
java.lang.String |
getNamespace() |
java.lang.String |
getNode() |
java.lang.String |
getNodeId()
Deprecated.
use
getNode() instead. |
PubSubNamespace |
getPubSubNamespace() |
Affiliation.Type |
getType()
Deprecated.
use
getAffiliation() instead. |
boolean |
isAffiliationModification()
Check if this is an affiliation element to modify affiliations on a node.
|
org.jivesoftware.smack.util.XmlStringBuilder |
toXML() |
public static final java.lang.String ELEMENT
public Affiliation(java.lang.String node,
Affiliation.Type affiliation)
node - The node the user is affiliated with.affiliation - the optional affiliation.public Affiliation(org.jxmpp.jid.BareJid jid,
Affiliation.Type affiliation)
jid - affiliation - public Affiliation(org.jxmpp.jid.BareJid jid,
Affiliation.Type affiliation,
PubSubNamespace namespace)
@Deprecated public java.lang.String getNodeId()
getNode() instead.public java.lang.String getNode()
@Deprecated public Affiliation.Type getType()
getAffiliation() instead.public Affiliation.Type getAffiliation()
public org.jxmpp.jid.BareJid getJid()
public java.lang.String getElementName()
getElementName in interface org.jivesoftware.smack.packet.NamedElementpublic java.lang.String getNamespace()
getNamespace in interface org.jivesoftware.smack.packet.ExtensionElementpublic PubSubNamespace getPubSubNamespace()
public boolean isAffiliationModification()
true if this is an affiliation element to modify affiliations on a node, false otherwise.public org.jivesoftware.smack.util.XmlStringBuilder toXML()
toXML in interface org.jivesoftware.smack.packet.Element