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.AffiliationNamespace |
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,
Affiliation.AffiliationNamespace namespace) |
Affiliation(java.lang.String node,
Affiliation.Type affiliation)
Constructs an affiliation.
|
Affiliation(java.lang.String node,
Affiliation.Type affiliation,
Affiliation.AffiliationNamespace namespace)
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(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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(java.lang.String node, Affiliation.Type affiliation, Affiliation.AffiliationNamespace namespace)
node
- The node the user is affiliated with.affiliation
- the optional affiliation.namespace
- the affiliation's namespace.public Affiliation(org.jxmpp.jid.BareJid jid, Affiliation.Type affiliation)
jid
- TODO javadoc me pleaseaffiliation
- TODO javadoc me pleasepublic Affiliation(org.jxmpp.jid.BareJid jid, Affiliation.Type affiliation, Affiliation.AffiliationNamespace 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.NamedElement
public java.lang.String getNamespace()
getNamespace
in interface org.jivesoftware.smack.packet.FullyQualifiedElement
public 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(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
toXML
in interface org.jivesoftware.smack.packet.Element