public class Affiliation extends Object implements 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 |
| 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(String node,
Affiliation.Type affiliation)
Constructs an affiliation.
|
Affiliation(String node,
Affiliation.Type affiliation,
Affiliation.AffiliationNamespace namespace)
Constructs an affiliation.
|
| Modifier and Type | Method and Description |
|---|---|
Affiliation.Type |
getAffiliation() |
String |
getElementName()
Returns the root element name.
|
org.jxmpp.jid.BareJid |
getJid() |
String |
getNamespace()
Returns the root element XML namespace.
|
String |
getNode() |
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.
|
XmlStringBuilder |
toXML(String enclosingNamespace)
Returns the XML representation of this Element.
|
public static final String ELEMENT
public Affiliation(String node, Affiliation.Type affiliation)
node - The node the user is affiliated with.affiliation - the optional affiliation.public Affiliation(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 - affiliation - public Affiliation(org.jxmpp.jid.BareJid jid, Affiliation.Type affiliation, Affiliation.AffiliationNamespace namespace)
@Deprecated public String getNodeId()
getNode() instead.@Deprecated public Affiliation.Type getType()
getAffiliation() instead.public Affiliation.Type getAffiliation()
public org.jxmpp.jid.BareJid getJid()
public String getElementName()
NamedElementgetElementName in interface NamedElementpublic String getNamespace()
ExtensionElementgetNamespace in interface ExtensionElementpublic PubSubNamespace getPubSubNamespace()
public boolean isAffiliationModification()
true if this is an affiliation element to modify affiliations on a node, false otherwise.public XmlStringBuilder toXML(String enclosingNamespace)
Element