public class Affiliation extends Object implements PacketExtension
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 |
---|---|
protected String |
node |
protected Affiliation.Type |
type |
Constructor and Description |
---|
Affiliation(String nodeId,
Affiliation.Type affiliation)
Constructs an affiliation.
|
Modifier and Type | Method and Description |
---|---|
String |
getElementName()
Returns the root element name.
|
String |
getNamespace()
Returns the root element XML namespace.
|
String |
getNodeId() |
Affiliation.Type |
getType() |
String |
toXML()
Returns the XML representation of the PacketExtension.
|
protected Affiliation.Type type
public Affiliation(String nodeId, Affiliation.Type affiliation)
nodeId
- The node the user is affiliated with.affiliation
- The type of affiliation.public Affiliation.Type getType()
public String getElementName()
PacketExtension
getElementName
in interface PacketExtension
public String getNamespace()
PacketExtension
getNamespace
in interface PacketExtension
public String toXML()
PacketExtension
toXML
in interface PacketExtension