public class Affiliation extends java.lang.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.Type |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ELEMENT |
Constructor and Description |
---|
Affiliation(BareJid jid,
Affiliation.Type affiliation)
Construct a affiliation modification request.
|
Affiliation(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()
Returns the root element name.
|
BareJid |
getJid() |
java.lang.String |
getNamespace()
Returns the root element XML namespace.
|
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.
|
XmlStringBuilder |
toXML()
Returns the XML representation of this Element.
|
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(BareJid jid, Affiliation.Type affiliation)
jid
- affiliation
- public Affiliation(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 java.lang.String getElementName()
NamedElement
getElementName
in interface NamedElement
public java.lang.String getNamespace()
ExtensionElement
getNamespace
in interface ExtensionElement
public PubSubNamespace getPubSubNamespace()
public boolean isAffiliationModification()
true
if this is an affiliation element to modify affiliations on a node, false
otherwise.public XmlStringBuilder toXML()
Element